Tuesday 26 September 2023

What is VTP Pruning? How to configure Cisco VTP pruning?

VTP pruning is used to improve the allocation and use of network bandwidth by reducing unnecessary traffic flood for example broadcast, multicast, and flooded unicast. Pruning makes more efficient use of trunk bandwidth. 

by default, VTP pruning is disabled, when you enable VTP pruning switch still forwards VLAN unknown unicast and broadcast frames over a trunk port but only forwards if the switch on the receiving end of the trunk has ports in the same VLAN. 

when you enable VTP Pruning on the VTP server all the clients in the VTP domain will automatically enable VTP Pruning. once you enable the VTP pruning by default all the VLANs are prune-eligible except VLAN 1 because it is an administrative VLAN and extended range of VLANs. which means VLAN 2 through VLAN 1005 are eligible for pruning. 

How does VTP pruning work? 


as you can see in the topology here, we have 5 VTP pruned enable switches. a broadcast traffic is generated on switch 2 port which is in VLAN 10. switch 2 forwards it to the trunk and switch-1 receives the traffic and forwards this traffic to switch-4 because the VLAN 10 is only configured on switch 4 and switch 1. The rest of the switches' flooded traffic is pruned. 

let's see the configuration: -

Topology: -




  • configure the topology as per the diagram
  • configure IP addresses on PCs
  • configure the 802.1q between switches
  • configure VTP server on a core switch and switch-1 and 2 clients
  • configure version 2, password cisco123 and the password must be hidden
  • configure VLAN 50,60,70,80 on the VTP server and make sure clients synced this information. 
  • configure VTP pruning on VTP server
  • remove VLAN 80 from Pruned


configure the 802.1q between switches


CORE_switch_(config)#interface range ethernet 0/0-1
CORE_switch_(config-if-range)#switchport trunk encapsulation dot1
CORE_switch_(config-if-range)#switchport mode trunk
CORE_switch_(config-if-range)#exit

switch1(config-if-range)#interface range ethernet 0/0
switch1(config-if-range)#switchport trunk encapsulation dot1q
switch1(config-if-range)#switchport mode trunk
switch1(config-if-range)#exit

switch2(config)#interface ethernet 0/0
switch2(config-if)#switchport trunk encapsulation dot1q
switch2(config-if)#switchport mode trunk
switch2(config-if)#exit



CORE_switch_#show interfaces trunk

Port        Mode             Encapsulation  Status        Native vlan
Et0/0       on               802.1q         trunking      1
Et0/1       on               802.1q         trunking      1

Port        Vlans allowed on trunk
Et0/0       1-4094
Et0/1       1-4094



configure VTP server on a core switch and switch-1 and 2 clients




CORE_switch_(config)#vtp domain internetworks
Changing VTP domain name from NULL to internetworks
*Sep 26 03:11:37.982: %SW_VLAN-6-VTP_DOMAIN_NAME_CHG: VTP domain name changed to internetworks.
CORE_switch_(config)#vtp version 2
CORE_switch_(config)#vtp password cisco123
Setting device VTP password to cisco123
CORE_switch_(config)#vtp mode server
Device mode already VTP Server for VLANS.
CORE_switch_(config)#exit




switch1(config)#vtp domain internetworks
Changing VTP domain name from NULL to internetworks
*Sep 26 03:12:25.415: %SW_VLAN-6-VTP_DOMAIN_NAME_CHG: VTP domain name changed to internetworks.
switch1(config)#vtp version 2
switch1(config)#vtp mode client
Setting device to VTP Client mode for VLANS.
switch1(config)#vtp password cisco123
Setting device VTP password to cisco123
switch1(config)#exit



switch2(config)#vtp domain internetworks
Changing VTP domain name from NULL to internetworks
*Sep 26 03:13:17.946: %SW_VLAN-6-VTP_DOMAIN_NAME_CHG: VTP domain name changed to internetworks.
switch2(config)#vtp mode client
Setting device to VTP Client mode for VLANS.
switch2(config)#vtp version 2
Cannot modify version in VTP client mode unless the system is in VTP version 3
switch2(config)#vtp password cisco123
Setting device VTP password to cisco123
switch2(config)#exit




CORE_switch_#show vtp status
VTP Version capable             : 1 to 3
VTP version running             : 2
VTP Domain Name                 : internetworks
VTP Pruning Mode                : Disabled
VTP Traps Generation            : Disabled
Device ID                       : aabb.cc00.0100
Configuration last modified by 0.0.0.0 at 9-26-23 03:11:46
Local updater ID is 0.0.0.0 (no valid interface found)

Feature VLAN:
--------------
VTP Operating Mode                : Server
Maximum VLANs supported locally   : 1005
Number of existing VLANs          : 5
Configuration Revision            : 1
MD5 digest                        : 0xB0 0x7D 0xCC 0xCF 0xDE 0xA2 0xBB 0x5F
                                    0x8E 0x01 0x27 0x33 0xCA 0x24 0x8C 0xF5













configure VLAN 50,60,70,80 on the VTP server and make sure clients synced this information. 



CORE_switch_(config)#vlan 50,60,70,80
CORE_switch_(config-vlan)#exit


CORE_switch_#show vlan brief

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Et0/0, Et0/1, Et0/2, Et0/3
                                                Et1/0, Et1/1, Et1/2, Et1/3
                                                Et2/0, Et2/1, Et2/2, Et2/3
                                                Et3/0, Et3/1, Et3/2, Et3/3
50   VLAN0050                         active
60   VLAN0060                         active
70   VLAN0070                         active
80   VLAN0080                         active
1002 fddi-default                     act/unsup
1003 trcrf-default                    act/unsup
1004 fddinet-default                  act/unsup
1005 trbrf-default                    act/unsup






CORE_switch_#show vtp status
VTP Version capable             : 1 to 3
VTP version running             : 2
VTP Domain Name                 : internetworks
VTP Pruning Mode                : Disabled
VTP Traps Generation            : Disabled
Device ID                       : aabb.cc00.0100
Configuration last modified by 0.0.0.0 at 9-26-23 03:40:50
Local updater ID is 0.0.0.0 (no valid interface found)

Feature VLAN:
--------------
VTP Operating Mode                : Server
Maximum VLANs supported locally   : 1005
Number of existing VLANs          : 10
Configuration Revision            : 3
MD5 digest                        : 0x34 0x44 0xB2 0xF5 0x7D 0xC7 0x00 0x22
                                    0x1D 0x91 0x17 0x51 0x19 0x45 0x9E 0x64



configure VTP pruning on VTP server




CORE_switch_(config)#vtp pruning
Pruning switched on


CORE_switch_#show vtp status
VTP Version capable             : 1 to 3
VTP version running             : 2
VTP Domain Name                 : internetworks
VTP Pruning Mode                : Enabled
VTP Traps Generation            : Disabled
Device ID                       : aabb.cc00.0100
Configuration last modified by 0.0.0.0 at 9-26-23 03:45:47
Local updater ID is 0.0.0.0 (no valid interface found)

Feature VLAN:
--------------
VTP Operating Mode                : Server
Maximum VLANs supported locally   : 1005
Number of existing VLANs          : 10
Configuration Revision            : 4
MD5 digest                        : 0xCF 0x32 0xAF 0xCF 0xE1 0x2E 0xB5 0x62
                                    0x15 0x6E 0xC6 0xEE 0x9C 0xF7 0x2E 0xB2
















CORE_switch_#show interfaces ethernet 0/0 pruning

Port                Vlans pruned for lack of request by neighbor
Et0/0               10,50,60,70,80

Port                Vlan traffic requested of neighbor
Et0/0               1


switch1#show interfaces ethernet 0/0 pruning

Port                Vlans pruned for lack of request by neighbor
Et0/0               10,50,60,70,80

Port                Vlan traffic requested of neighbor
Et0/0               1


CORE_switch_#show interfaces ethernet 0/0 pruning

Port                Vlans pruned for lack of request by neighbor
Et0/0               10,50,60,70,80

Port                Vlan traffic requested of neighbor
Et0/0               1


remove VLAN 80 from Pruned



CORE_switch_(config)#interface ethernet 0/0
CORE_switch_(config-if)#switchport trunk pruning vlan ?
  WORD    VLAN IDs of the allowed VLANs when this port is in trunking mode
  add     add VLANs to the current list
  except  all VLANs except the following
  none    no VLANs
  remove  remove VLANs from the current list

CORE_switch_(config-if)#switchport trunk pruning vlan remove 80
CORE_switch_(config-if)#exit
CORE_switch_(config)#exit

CORE_switch_#show interfaces ethernet 0/0 pruning

Port                Vlans pruned for lack of request by neighbor
Et0/0               10,50,60,70

Port                Vlan traffic requested of neighbor
Et0/0               1,80







No comments:

What is Virtual Router Redundancy Protocol (VRRP)? How to configure Virtual Router Redundancy Protocol (VRRP)?

 Virtual Router Redundancy Protocol (VRRP) is a gateway redundancy networking protocol used to create a virtual gateway similar to HSRP . VR...