通过本实验,读者可以掌握以下技能:
通过VLAN Trunk配置跨交换机的VLAN;
配置VTP;
配置STP;
查看上述配置项目的相关信息。
2.设备需求
本实验需要以下设备:
Cisco Catalyst 1900系列交换机2台,型号不限,企业版软件,本实验中使用了1912交换机;
交叉线序网线1条;
1台终端服务器,如Cisco 2509路由器,及用于反向Telnet的相应电缆;
1台带有超级终端程序的PC机,以及Consoie电缆及转接器。
3. 线缆连接及配置说明
如图3-3所示,用交叉网线把 SW1交换机的Fast Ethernet0/26端口和SW2交换机的Fast Ethernet0/26端口连接起来。
图示中略去了作为终端服务器的路由器和作为超级终端的PC机。
4. 实验配置及监测结果
电缆连接完成后。给所有设备加电,开始进行实验。
监测清单3-3记录了本实验的操作。
第1段:在SW1和SW2上配置VTP
SW1912#conft
Enter configuration commands,one per line.End with CNTL/Z
SW1912(config)#hostn SW1
SW1(config)#vtp?
client VTP client
domain Set VTP domanin name
passowrd Set VTP password
pruning VTP pruning
server VTP server
transparent VTP transparent
trap VTP trap
SW1(config-if)#tnmk on
SW1(config-if)#
( Ctrl+Shift+6,x )
Term_Server>2
[Resuming connection 2 to switch2...]
>en
#conft
Enter configuration commands,one per line,End with CNTL/Z
(config)#hostn SW2
SW2(config)#vtp domain cisco
SW2(config)#vtp client
SW2(config)#
第2段:配置VLAN Trunk
( Ctrl+Shift+6,x )
Term_Server>2
[Resuming connection 2 to switch2...]
SW1(config)#int fa0/26
SW1(config-if)#trunk?
auto Set DISL state to AUTO
desirable Set DISL state to DESIRABLE
nonegotiate Set DISL state to NONEGOTIATE
off Set DISL state to OFF
on Set DISL state to ON
SW1(config-if)#trunk on
SW1(config-if)#
(Ctrl+Shift+6,x)
Term_Server>2
[Resuming connection 2 to switch2...]
SW2(config)#int fa0/26
SW2(config-if)#trunk?
SW2(config-if)#
SW2#sh trunk a
DISL state:On,Trunking:on,Encapsulation type:ISL
SW2#sh trunk b
DISL state:Off,Trunking:Off,Encapsulation type:Unknown
SW2#sh trunk a allowed-vlans
1-1005
第3段:配置VLAN和查看VTP信息
Term_Server>1
[Resuming connection 1to switch1...]
SW1(config)#vlan 10 name DEPT1
SW1(config)#vlan 11 name DEPT2
SW1(config)#vlan 12 name DEPT3
SW1(config)#vlan 13 name DEPT4
SW1(config)#
SW1#sh vlan
VLAN Name Status Ports
-------------------------------------
1 default Enabled 1-12,AUI,A,B
10 DEPT1 Enabled
11 DEPT2 Enabled
12 DEPT3 Enabled
13 DEPT4 Enabled
1002 fddi-default Suspended
1003 fddi-default Suspended
1004 fddi-default Suspended
1005 fddi-default Suspended
-----------------------------
VLAN Type SAID MTU Parent RingNo BridgeNo Stp Trans1 Trans2
---------------------------------------------------------------------
1 Ethernet 100001 1500 0 0 0 Unkn 1002 1003
10 Ethernet 100010 1500 0 1 1 Unkn 0 0
11 Ethernet 100011 1500 0 1 1 Unkn 0 0
12 Ethernet 100012 1500 0 1 1 Unkn 0 0
13 Ethernet 100013 1500 0 1 1 Unkn 0 0
1002 FDDI 101002 1500 0 0 0 Unkn1 1003
1003 Token-Ring 101003 1500 1005 1 0 Unkn1 1002
1004 FDDI-Net 101004 1500 0 0 1 IEEE0 0
1005 Token-Ring-Net 101005 1500 0 0 1 IEEE0 0
---------------------------------------------------------------------
SW1#
Term_Server>2
[Resuming connection 2 to switch2...]
SW2#sh vlan
VLAN Name Status Ports
------------------------------------------
1 default Enabled 1-12,AUI,A,B
10 DEPT1 Enabled
11 DEPT2 Enabled
12 DEPT3 Enabled
13 DEPT4 Enabled
1002 fddi-default Suspended
1003 token-ring-defau Suspended
1004 fddinet-default Suspended
1005 fddi-default Suspended
...(有关VLAN的具体信息,如SW1,省略)
SW2#sh vtp
VTP version:1
Configuration revision:4
Maximum VLANs supported locally:1005
Number of existing VLANs:9
VTP domain name
VTP password
VTP operating mode :Client
VTP pruning mode : Disabled
VTP traps generation : Enabled
Configruration last modified by:192.168.1.1 at 00-00-0000 00:00:00
SW2#