VTP Transparent 模式对Pruning的影响

 

2012-09-15 07:45    by 有希的雪

 

 

 

 

昨天在WS的时候,有位哥碰到了一个问题,由于一台路由器少了个以太网模块,只有一个以太网接口,所以拿了一台二层交换机通过子接口做单臂路由来实现模拟两个借口,本来这没什么问题,但是他却碰到了一些奇怪的现象,导致单臂路由不通。本来也一直没有理清头绪,可能是由于昨晚睡得很踏实的缘故,今天早上醒来时精神很好,还在床上酝酿的时候,忽然想起这个问题,仔细想想就有了头绪,马上起床写下这篇实验总结,供同志们参考。前天晚上只睡了两个多小时,昨天实在是困得不行 = =#

通过观察发现,这是由于交换机的VTP 透明模式[Transparent]VTP 修剪[Pruning]的不支持导致的,这同时也是由于透明模式的特性所决定的,所以这个问题无法避免,只能在实际使用中注意避免出现这样的情况。好了,长话短说,废话不说,先上实验拓扑:

 


 

一、实验拓扑

 


 

二、配置

2.1 基础配置

R1

R1#sh run

!

version 12.4

!

hostname R1

!

!

interface Loopback0

 ip address 1.1.1.1 255.255.255.255

!        

interface FastEthernet0/0

 no ip address

 duplex auto

 speed auto

!

interface FastEthernet0/0.10

 encapsulation dot1Q 10

 ip address 10.1.1.254 255.255.255.0

!

interface FastEthernet0/0.20

 encapsulation dot1Q 20

 ip address 20.1.1.254 255.255.255.0

!

[输出被省略]

 

R1#show ip interface brief

Interface              IP-Address      OK?  Method Status               Protocol

FastEthernet0/0        unassigned      YES  unset   up                    up     

FastEthernet0/0.10      10.1.1.254      YES  manual  up                    up     

FastEthernet0/0.20      20.1.1.254      YES  manual  up                    up     

Loopback0             1.1.1.1         YES  manual  up                    up 

SW1:

SW1#vlan database

SW1(vlan)#vtp domain CCIE

Changing VTP domain name from NULL to CCIE

SW1(vlan)#vtp password cisco

Setting device VLAN database password to cisco.

SW1(vlan)#vtp server

Device mode already VTP SERVER.

SW1(vlan)#vlan 10

VLAN 10 added:

    Name: VLAN0010

SW1(vlan)#vlan 20

VLAN 20 added:

    Name: VLAN0020

SW1(vlan)#ex

APPLY completed.

Exiting....

SW1# configure terminal

SW1(config)#interface vlan 10

SW1(config-if)#ip address 10.1.1.1 255.255.255.0

SW1(config)#interface f0/11

SW1(config-if)#sw trunk encapsulation dot1q

SW1(config-if)#switchport mode trunk

SW1(config-if)#end

SW1#

SW_ACCESS

SW_ACCESS#vlan database

SW_ACCESS(vlan)#vtp domain CCIE

Changing VTP domain name from NULL to CCIE

SW_ACCESS(vlan)#vtp password cisco

Setting device VLAN database password to cisco.

SW_ACCESS(vlan)#vtp client

Setting device to VTP CLIENT mode.

SW_ACCESS(vlan)#exit

In CLIENT state, no apply attempted.

Exiting....

SW_ACCESS# configure terminal

SW_ACCESS(config)#no ip routing

SW_ACCESS(config)#interface f0/1

SW_ACCESS(config-if)#sw trunk encapsulation dot1q

SW_ACCESS(config-if)#switchport mode trunk

SW_ACCESS(config)#interface f0/11

SW_ACCESS(config-if)#sw trunk encapsulation dot1q

SW_ACCESS(config-if)#switchport mode trunk

SW_ACCESS(config)#interface f0/12

SW_ACCESS(config-if)#sw trunk encapsulation dot1q

SW_ACCESS(config-if)#switchport mode trunk

SW_ACCESS(config-if)#end      

SW_ACCESS#

SW2

SW2(vlan)#vtp domain CCIE

Changing VTP domain name from NULL to CCIE

SW2(vlan)#vtp password cisco

Setting device VLAN database password to cisco.

SW2(vlan)#exit

In CLIENT state, no apply attempted.

Exiting....

SW2#configure terminal

SW2(config-if)#ip add 20.1.1.1 255.255.255.0

SW1(config-if)#interface f0/12

SW1(config-if)#sw trunk encapsulation dot1q

SW1(config-if)#switchport mode trunk

SW1(config-if)#end

SW1#

 

 

这时,SW1VTP ServerSW_ACCESSSW2Client,而且没有启用VTP Pruning。情况一切正常,R1子接口也已经可以和SW1SW2SVI借口通信:

R1 ping SW1

R1#ping 10.1.1.1

 

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 16/39/56 ms

 

R1 ping SW2

R1#ping 20.1.1.1

 

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 20.1.1.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 28/32/44 ms