Monday 20 May 2013

How to configure a VLAN Trunking Protocol (VTP) ?


Hi. Let's discuss on how to setup a basic VTP configuration.

Network setup

2 units of Cisco Catalyst 2950 are connected to each other via trunk port. SwitchA will be chosen as the VTP Server, SwitchB will be the VTP client.

Steps

1. This step is not compulsory. But to make it easier, I have reset my VLAN and VTP database to default settings. You can learn how to do it here.

SwitchA#sh vtp status
VTP Version                     : 2
Configuration Revision          : 0
Maximum VLANs supported locally : 128
Number of existing VLANs        : 5
VTP Operating Mode              : Server
VTP Domain Name                 :
VTP Pruning Mode                : Disabled
VTP V2 Mode                     : Disabled
VTP Traps Generation            : Disabled
MD5 digest                      : 0x57 0xCD 0x40 0x65 0x63 0x59 0x47 0xBD
Configuration last modified by 0.0.0.0 at 0-0-00 00:00:00
Local updater ID is 10.0.0.110 on interface Vl1 (lowest numbered VLAN interface found)
SwitchB#sh vtp status
VTP Version                     : 2
Configuration Revision          : 0
Maximum VLANs supported locally : 128
Number of existing VLANs        : 5
VTP Operating Mode              : Server
VTP Domain Name                 :
VTP Pruning Mode                : Disabled
VTP V2 Mode                     : Disabled
VTP Traps Generation            : Disabled
MD5 digest                      : 0x57 0xCD 0x40 0x65 0x63 0x59 0x47 0xBD
Configuration last modified by 0.0.0.0 at 0-0-00 00:00:00
Local updater ID is 10.0.0.111 on interface Vl1 (lowest numbered VLAN interface found)

2. Configure at least one trunk port on both switches, because VTP packets will use trunk port to communicate. In this case, I'm using port Fa0/8 on both switches as trunk port. ISL is not available on this switch, therefore, dot1q is used by default.

SwitchA(config)#int fa0/8
SwitchA(config-if)#switchport mode trunk
SwitchA(config-if)#end
SwitchB(config)#int fa0/8
SwitchB(config-if)#switchport mode trunk
SwitchB(config-if)#end

3. Verify your configuration. Make sure it's being set as trunk port. Catalyst 2950 is using dot1q as default trunking encapsulation, therefore, I don't need to configure it manually.

SwitchA#sh int f0/8 switchport
Name: Fa0/8
Switchport: Enabled
Administrative Mode: trunk
Operational Mode: up
Administrative 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-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL
Protected: false
Appliance trust: none
SwitchB#sh int f0/8 switchport
Name: Fa0/8
Switchport: Enabled
Administrative Mode: trunk
Operational Mode: up
Administrative 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-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL
Protected: false
Appliance trust: none

4. Now, let's configure VTP. Please make sure that the VTP domain name and VTP password is identical on both switches.

SwitchA(config)#vtp mode server
Device mode already VTP SERVER.
SwitchA(config)#vtp domain cisco
Changing VTP domain name from NULL to cisco
SwitchA(config)#vtp password cisco
Setting device VLAN database password to cisco
SwitchA(config)#end
SwitchB(config)#vtp mode client
Setting device to VTP CLIENT mode.
SwitchB(config)#vtp domain cisco
Changing VTP domain name from NULL to cisco
SwitchB(config)#vtp password cisco
Setting device VLAN database password to cisco
SwitchB(config)#end

5. Now we have configured VTP on both switches. Let's confirm that by turning on VTP debug events. I noticed that, as soon as a VLAN is added, VTP Server will send a summary packet to its VTP client, less than a second.

a) A VTP summary packet is being transmitted by SwitchA (VTP Server) via its trunk port Fa0/8 to all switches within its domain (cisco).
b) A VTP summary packet is being received by SwitchB via its trunk port Fa0/8 from SwitchA.

SwitchA#debug sw-vlan vtp events
vtp events debugging is on
SwitchA#
SwitchA(config)#vlan 100
SwitchA(config-vlan)#name ciscovlan
SwitchA(config-vlan)#end
SwitchA#
00:28:56: VTP LOG RUNTIME: Transmit vtp summary, domain cisco, rev 1, followers 1, tlv blk size 5 (inc #tlv field),
   MD5 digest calculated = 8D 6C F5 D2 A8 3D B0 F5 29 38 B0 A0 A7 01 6F EB

00:28:56: VTP LOG RUNTIME: Summary packet received, domain = cisco, rev = 1, followers = 1, length 77, trunk Fa0/8

00:28:56: VTP LOG RUNTIME: Summary packet rev 1 equal to domain cisco rev 1

00:28:56: VTP LOG RUNTIME: Subset packet received, domain = cisco, rev = 1, seq = 1, length = 228
SwitchB#debug sw-vlan vtp events
vtp events debugging is on
SwitchB#
00:50:42: VTP LOG RUNTIME: Summary packet received, domain = cisco, rev = 1, followers = 1, length 77, trunk Fa0/8

00:50:42: VTP LOG RUNTIME: Summary packet rev 1 greater than domain cisco rev 0

00:50:42: VTP LOG RUNTIME: Domain cisco currently not in updating state

00:50:42: VTP LOG RUNTIME: pdu len 77, #tlvs 1

00:50:42: VTP LOG RUNTIME: Subset packet received, domain = cisco, rev = 1, seq = 1, length = 228

00:50:42: VTP LOG RUNTIME: Transmit vtp summary, domain cisco, rev 1, followers 1, tlv blk size 5 (inc #tlv field),
   MD5 digest calculated = 8D 6C F5 D2 A8 3D B0 F5 29 38 B0 A0 A7 01 6F EB

6. VTP Revision number is now increased by 1 value (from 0 to 1), and we can see VLAN 100 is also added on SwitchB which was being added on SwitchA.

SwitchA#sh vtp status
VTP Version                     : 2
Configuration Revision          : 1
Maximum VLANs supported locally : 128
Number of existing VLANs        : 6
VTP Operating Mode              : Server
VTP Domain Name                 : cisco
VTP Pruning Mode                : Disabled
VTP V2 Mode                     : Disabled
VTP Traps Generation            : Disabled
MD5 digest                      : 0x8D 0x6C 0xF5 0xD2 0xA8 0x3D 0xB0 0xF5
Configuration last modified by 10.0.0.110 at 3-1-93 00:28:56
Local updater ID is 10.0.0.110 on interface Vl1 (lowest numbered VLAN interface found)

SwitchA#sh vlan

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa0/1, Fa0/5, Fa0/6, Fa0/7, Fa0/9, Fa0/10, Fa0/11, Fa0/12
100  ciscovlan                        active
1002 fddi-default                     act/unsup
1003 token-ring-default               act/unsup
1004 fddinet-default                  act/unsup
1005 trnet-default                    act/unsup

VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1    enet  100001     1500  -      -      -        -    -        0      0
100  enet  100100     1500  -      -      -        -    -        0      0
1002 fddi  101002     1500  -      -      -        -    -        0      0
1003 tr    101003     1500  -      -      -        -    -        0      0
1004 fdnet 101004     1500  -      -      -        ieee -        0      0
1005 trnet 101005     1500  -      -      -        ibm  -        0      0

Remote SPAN VLANs
------------------------------------------------------------------------------


Primary Secondary Type              Ports
------- --------- ----------------- ------------------------------------------
SwitchB#sh vtp status
VTP Version                     : 2
Configuration Revision          : 1
Maximum VLANs supported locally : 128
Number of existing VLANs        : 6
VTP Operating Mode              : Client
VTP Domain Name                 : cisco
VTP Pruning Mode                : Disabled
VTP V2 Mode                     : Disabled
VTP Traps Generation            : Disabled
MD5 digest                      : 0x8D 0x6C 0xF5 0xD2 0xA8 0x3D 0xB0 0xF5

SwitchB#sh vlan

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa0/1, Fa0/2, Fa0/3, Fa0/4, Fa0/5, Fa0/6, Fa0/7, Fa0/9, Fa0/10, Fa0/11, Fa0/12
100  ciscovlan                        active
1002 fddi-default                     act/unsup
1003 token-ring-default               act/unsup
1004 fddinet-default                  act/unsup
1005 trnet-default                    act/unsup

VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1    enet  100001     1500  -      -      -        -    -        0      0
100  enet  100100     1500  -      -      -        -    -        0      0
1002 fddi  101002     1500  -      -      -        -    -        0      0
1003 tr    101003     1500  -      -      -        -    srb      0      0
1004 fdnet 101004     1500  -      -      -        ieee -        0      0
1005 trnet 101005     1500  -      -      -        ibm  -        0      0

Remote SPAN VLANs
------------------------------------------------------------------------------


Primary Secondary Type              Ports
------- --------- ----------------- ------------------------------------------

Conclusion

  • We can see that our VTP has been configured correctly, and we have verified that it's working fine as it should.
  • Please be advised that VTP is a layer 2 Cisco Proprietary Protocol, please do not attempt to implement this on other switches. :)

I hope this post will benefit you guys. Thank you for dropping by.

- Soulpower

No comments:

Post a Comment