步骤8
只须在VTP服务器上启用修剪就启用了整个管理域的修剪。
sw1(config)#vtp pruning
Pruning switched on
sw1(config)#
验证配置:
sw1#show vtp status
VTP Version : 2
Configuration Revision : 2
Maximum VLANs supported locally : 64
Number of existing VLANs : 7
VTP Operating Mode : Server
VTP Domain Name : cisco
VTP Pruning Mode : Enabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0xE3 0xBD 0xA0 0xC9 0x14 0x85 0x9B 0xFC
Configuration last modified by 0.0.0.0 at 3-1-93 00:47:48
Local updater ID is 0.0.0.0 (no valid interface found)
sw1#
sw2#show vtp status
VTP Version : 2
Configuration Revision : 2
Maximum VLANs supported locally : 64
Number of existing VLANs : 7
VTP Operating Mode : Client
VTP Domain Name : cisco
VTP Pruning Mode : Enabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0xE3 0xBD 0xA0 0xC9 0x14 0x85 0x9B 0xFC
Configuration last modified by 0.0.0.0 at 3-1-93 00:47:48
sw2#
步骤9
在SW1的中继中去除vlan3的修剪
sw1#config t
Enter configuration commands, one per line. End with CNTL/Z.
sw1(config)#interface range fastethernet0/11 - 12
sw1(config-if-range)#switchport trunk pruning vlan remove 3
sw1(config-if-range)#
验证配置:
sw1#show interface fastethernet0/11 switchport
Name: Fa0/11
Switchport: Enabled
Administrative Mode: dynamic desirable
Operational Mode: trunk (member of bundle Po1)
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk private VLANs: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2,4-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL
Protected: false
Appliance trust: none
sw1#show interface fastethernet0/12 switchport
Name: Fa0/12
Switchport: Enabled
Administrative Mode: dynamic desirable
Operational Mode: trunk (member of bundle Po1)
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk private VLANs: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2,4-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL
Protected: false
Appliance trust: none
sw1#
在SW2上验证:
sw2#show interface fastethernet0/11 switchport
Name: Fa0/11
Switchport: Enabled
Administrative Mode: dynamic desirable
Operational Mode: trunk (member of bundle Po1)
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Protected: false
Voice VLAN: none (Inactive)
Appliance trust: none
我们会发现SW2上并没有去除vlan3的修剪,说明移出修剪不同启用修剪。需要根据情况在每个交换机上配置。
修剪的意义:
交换机默认情况下是在网络上传播广播和未知数据包。这样会给整个网络带来大量的不必要流量。
VTP修剪通过减少不必要的流量,如:广播、多播、未知等。来提高带宽利用率。

