您的位置:首页 > 编程语言 > PHP开发

在2950交换机上配置VTP

2007-06-16 23:12 459 查看



SW1配置:
SW1#conf t
SW1(config)#int f0/14
SW1(config-if)#switchport mode trunk
SW1(config-if)#end
SW1#vlan database
SW1(vlan)#vtp server
SW1(vlan)#vtp domain sy
SW1(vlan)#vtp password cisco
SW1(vlan)#vtp pruning
SW1(vlan)#exit
SW1#vlan database
SW1(vlan)#vlan 2
SW1(vlan)#vlan 3
SW1(vlan)#exit
SW1#conf t
SW1(config)#int vlan 1
SW1(config-if)#ip address 192.168.1.1 255.255.255.0
SW1(config-if)#no shutdown
SW1(config-if)#exit
SW1(config)#int f0/2
SW1(config-if)#switchport access vlan 2
SW1(config-if)#exit
SW1(config)#int f0/3
SW1(config-if)#switchport access vlan 3
SW1(config-if)#end
SW1#show vtp status

VTP Version : 2
Configuration Revision : 4
Maximum VLANs supported locally : 256
Number of existing VLANs : 7
VTP Operating Mode : Server
VTP Domain Name : sy
VTP Pruning Mode : Enabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0x6D 0xEC 0x95 0x75 0xF9 0x33 0x11 0x2F
Configuration last modified by 192.168.1.1 at 3-1-02 00:09:20
Local updater ID is 192.168.1.1 on interface Vl1 (lowest numbered VLAN interface found)
SW1#show vlan-switch brief
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/0, Fa0/1, Fa0/4, Fa0/5
Fa0/6, Fa0/7, Fa0/8, Fa0/9
Fa0/10, Fa0/11, Fa0/12, Fa0/13
Fa0/15
2 VLAN0002 active Fa0/2
3 VLAN0003 active Fa0/3
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
SW2配置:
SW2#conf t
SW2(config)#int range f0/14 - 15
SW2(config-if-range)#switchport mode trunk
SW2(config-if-range)#end
SW2#vlan database
SW2(vlan)#vtp transparent
SW2(vlan)#vtp domain sy
SW2(vlan)#vtp password cisco
SW2(vlan)#exit
SW2#vlan database
SW2(vlan)#vlan 4
SW2(vlan)#vlan 5
SW2(vlan)#exit
SW2#conf t
SW2(config)#int f0/2
SW2(config-if)#switchport access vlan 4
SW2(config-if)#exit
SW2(config)#int f0/3
SW2(config-if)#switchport access vlan 5
SW2(config-if)#end
SW2#show vtp status
VTP Version : 2
Configuration Revision : 0
Maximum VLANs supported locally : 256
Number of existing VLANs : 7
VTP Operating Mode : Transparent
VTP Domain Name : sy
VTP Pruning Mode : Disabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0x0A 0xD6 0x8D 0xF1 0x4B 0xDC 0xB1 0xAB
Configuration last modified by 0.0.0.0 at 3-1-02 00:04:57
SW2#show vlan-switch brief
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/0, Fa0/1, Fa0/4, Fa0/5
Fa0/6, Fa0/7, Fa0/8, Fa0/9
Fa0/10, Fa0/11, Fa0/12, Fa0/13
4 VLAN0004 active Fa0/2
5 VLAN0005 active Fa0/3
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
SW3配置:
SW3#conf t
SW3(config)#int f0/15
SW3(config-if)#switchport mode trunk
SW3(config-if)#end
SW3#vlan database
SW3(vlan)#vtp client
SW3(vlan)#vtp domain sy
SW3(vlan)#vtp password cisco
SW3(vlan)#exit
SW3#show vtp status

VTP Version : 2
Configuration Revision : 4
Maximum VLANs supported locally : 256
Number of existing VLANs : 7
VTP Operating Mode : Client
VTP Domain Name : sy
VTP Pruning Mode : Enabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0x6D 0xEC 0x95 0x75 0xF9 0x33 0x11 0x2F
Configuration last modified by 192.168.1.1 at 3-1-02 00:09:20
SW3#conf t
SW3(config)#int f0/2
SW3(config-if)#switchport access vlan 2
SW3(config-if)#exit
SW3(config)#int f0/3
SW3(config-if)#switchport access vlan 3
SW3(config-if)#end
SW3#show vlan-switch brief

VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/0, Fa0/1, Fa0/4, Fa0/5
Fa0/6, Fa0/7, Fa0/8, Fa0/9
Fa0/10, Fa0/11, Fa0/12, Fa0/13
Fa0/14
2 VLAN0002 active Fa0/2
3 VLAN0003 active Fa0/3
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
客户机配置:
PC1:
属于vlan2成员,与SW1的F0/2口相连
IP:10.0.0.1/24
PC2:
属于VLAN2成员,与SW3的F0/2口相连
IP:10.0.0.2/24
测试:
PC1#ping 10.0.0.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.0.0.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 72/140/192 ms
总结:
transparent(透明)模式可以转发同一域名下的VTP信息(vtp version 1),但不学习VTP信息。可以创建、删除、修改VLAN,但只在本地有效。透明模式在VTP VERSION 2下可以转发不同域名的VTP信息。


附件:http://down.51cto.com/data/2348089
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息