Friday, November 22, 2013

VTP Client! Where it saves its VLAN Information?


We all know that the role of the VTP protocol is to replicate the VLAN information to all switches in a VTP domain. So when the network administrator creates new VLAN (say VLAN100) on one switch, the VTP will automatically update all the switches in the network.
VTP stands for VLAN Trunking Protocol, and comes in three modes:
1-      Server Mode: the switch that’s configured in this mode will allow VLANs to be created and/or deleted. VLANs are stored in VLAN.dat file under the flash directory.  VTP will send the updated information to all other switches in the LAN.
2-      Client Mode: the switch that’s configured in this mode will not allow any VLAN creation or deletion. All the VLAN information is taken from the VTP server.
3-      Transparent Mode: just like the VTP server mode, it allows VLAN creation and/or deletion, and store VLAN information in VLAN.dat. But unlike server mode, transparent mode will not tell any switch any VLAN information, and will not listen to any updates from any other switch.

There’s a debate out there about where a VTP Client stores its VLAN information. Whether it’s stored in a VLAN.dat file (just like a VTP server), or just taken from the VTP server, even after a reboot.
As a reminder, VLANs stored in VLAN.dat file will save them from being erased, even after we “write erase” our switch.
Let’s try it out on Packet tracer!
The below illustration is all what we need to test our understanding


Here’s the basic configuration:
VTP_CLIENT(config-if)#int fas0/1
VTP_CLIENT(config-if)#switchport mode trunk
VTP_CLIENT(config)#vtp mode client
VTP_CLIENT(confi#vtp domain VTP
VTP_SERVER(config)#int fas0/1
VTP_SERVER(config-if)#switchport mode trunk
VTP_SERVER(config)#vtp mode server
VTP_SERVER(config)#vtp domain VTP


Now let’s update our VTP server switch by adding a new VLAN (VLAN100). As you might guess, VTP will update the VTP Client with this information. To make sure, just do “show vlan brief” on VTP client!

VTP_CLIENT# show vlan brief

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa0/1, Fa0/3, Fa0/4, Fa0/5
                                                Fa0/6, Fa0/7, Fa0/8, Fa0/9
                                                Fa0/10, Fa0/11, Fa0/12, Fa0/13
                                                Fa0/14, Fa0/15, Fa0/16, Fa0/17
                                                Fa0/18, Fa0/19, Fa0/20, Fa0/21
                                                Fa0/22, Fa0/23, Fa0/24
100  VLAN0100                         active
VTP_SERVER(config)# vlan 100



Now, for us to make sure that even when the switch is in VTP Client mode, it will keep the VLAN information, we’ll do the following test:
1-      Disconnect the link between the two switches. This will ensure that the VTP Client will not update itself from the VTP server
2-      Issue “write erase” on the VTP client
3-      Issue reload on VTP client
After the switch boots up, we can notice that the switch name is returned to the default name, i.e. “switch”, which tells that the switch is returned to its factory default.
Let’s issue “show vlan brief” again on the client switch

Switch#show vlan brief

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa0/1, Fa0/2, Fa0/3, Fa0/4
                                                Fa0/5, Fa0/6, Fa0/7, Fa0/8
                                                Fa0/9, Fa0/10, Fa0/11, Fa0/12
                                                Fa0/13, Fa0/14, Fa0/15, Fa0/16
                                                Fa0/17, Fa0/18, Fa0/19, Fa0/20
                                                Fa0/21, Fa0/22, Fa0/23, Fa0/24
100  VLAN0100                         active


Sure enough! VLAN100 is still there. This is a good proof that VTP client saves its information in the VLAN.dat, the fact that can easily be hidden from many.

No comments:

Post a Comment