计算机网络安装与维修

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

配置2960实现telnet 远程登录

Switch>en

Switch#conf t

Enter configuration commands, one per line. End with CNTL/Z.

Switch(config)#inter vlan 1

Switch(config-if)#ip add 192.168.1.1 255.255.255.0

Switch(config-if)#no shut

%LINK-5-CHANGED: Interface Vlan1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up

Switch(config-if)#exit

Switch(config)#line vty 0 4

Switch(config-line)#password 5ijsj

Switch(config-line)#exit

Switch(config)#enable password 123456

Switch(config)#

配置VLAN

Switch>en

Switch#conf t

Enter configuration commands, one per line. End with CNTL/Z.

Switch(config)#inter vlan 1

Switch(config-if)#ip add 192.168.1.1 255.255.255.0

Switch(config-if)#no shut

%LINK-5-CHANGED: Interface Vlan1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up

Switch(config-if)#exit

Switch(config)#vlan 10

Switch(config-vlan)#name VLAN10

Switch(config-vlan)#exit

Switch(config)#exit

Switch#

%SYS-5-CONFIG_I: Configured from console by console

Switch#vlan database

% Warning: It is recommended to configure VLAN from config mode,

as VLAN database mode is being deprecated. Please consult user documentation for configuring VTP/VLAN in config mode.

Switch(vlan)#vlan 20 name VLAN20

VLAN 20 added:

Name: VLAN20

Switch(vlan)#vlan 30 name VLAN30

VLAN 30 added:

Name: VLAN30

Switch(vlan)#exit

APPLY completed.

Exiting....

Switch#conf t

Enter configuration commands, one per line. End with CNTL/Z.

Switch(config)#inter fa 0/2

Switch(config-if)#switchport mode access

Switch(config-if)#switchport access vlan 10

Switch(config-if)#inter fa0/3

Switch(config-if)#switchport mode access

Switch(config-if)#switchport access vlan 10

Switch(config-if)#inter range fa0/4-5

Switch(config-if-range)#switchport mode access

Switch(config-if-range)#switchport access vlan 20

Switch(config-if-range)#inter range fa0/6-7

Switch(config-if-range)#switchport mode access

Switch(config-if-range)#switchport access vlan 30

Switch(config-if-range)#end

%SYS-5-CONFIG_I: Configured from console by console

Switch#sh vlan

VLAN Name Status Ports

---- -------------------------------- --------- -------------------------------

1 default active Fa0/1, Fa0/8, Fa0/9, Fa0/10

Fa0/11, Fa0/12, Fa0/13, Fa0/14

Fa0/15, Fa0/16, Fa0/17, Fa0/18

Fa0/19, Fa0/20, Fa0/21, Fa0/22

Fa0/23, Fa0/24, Gig1/1, Gig1/2

10 VLAN10 active Fa0/2, Fa0/3

20 VLAN20 active Fa0/4, Fa0/5

30 VLAN30 active Fa0/6, Fa0/7

1002 fddi-default act/unsup

1003 token-ring-default act/unsup

1004 fddinet-default act/unsup

1005 trnet-default act/unsup

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2 ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------

1 enet 100001 1500 - - - - - 0 0

10 enet 100010 1500 - - - - - 0 0

20 enet 100020 1500 - - - - - 0 0

相关文档
最新文档