VTP (VLAN Trunking Protocol) is the protocol that propagates the information close which VLANs be from i switch to approximately other switch. If VTP did non furnish this information, VLANs would accept to hold upwardly created on all switches individually inward the network.
VTP is a Cisco proprietary protocol. The default fashion of a switch is configured equally VTP server. In whatever case, the server services are turned off, role the next ascendence to plough it dorsum on equally VTP server.
SwitchA#vlan database
SwitchA(vlan)#vtp server
SwitchA(vlan)#exit
First employ multiple VLANs amongst name, assign multiple ports to them in addition to thus employ 802.1q body link betwixt the 2 switches to permit communication betwixt VLANs.
To employ a VLAN, commencement motion into global configuration fashion to run the next commands.
Configuration to employ VLAN 2 in addition to iii on switch H5N1 (VTP server)
SwitchA(config)#configure final (enter inward global configuration mode)
SwitchA(config)#vlan 2 (defining the vlan 2)
SwitchA(config)#vlan 2 advert marketing (assigning the advert marketing to vlan 2)
SwitchA(config)#vlan 3 (defining the vlan 3)
SwitchA(config)#vlan iii advert management (assigning the advert administration to vlan 3)
SwitchA(config)#exit (exit from vlan 3)
Now assigning the ports 2 in addition to iii to VLAN 2, it must hold upwardly done from the interface mode. Enter the next commands to add together port 2 in addition to iii to VLAN 2.
SwitchA(config)#configure terminal (enter inward global configuration mode)
SwitchA(config)#interface fastethernet 0/2 (select the Ethernet 0 of port 2)
SwitchA(config-if)#switchport access vlan 2 (allot the membership of vlan 2)
SwitchA(config-if)#exit (exit from interface 2)
SwitchA(config)#interface fastethernet 0/3 (select the Ethernet 0 of port 3)
SwitchA(config-if)#switchport access vlan 2 (allot the membership of vlan 2)
SwitchA(config-if)#exit (exit from interface 3)
Now assigning the ports four in addition to v to VLAN 3, motion into the next commands to add together port four in addition to v to VLAN 3.
SwitchA(config)#configure terminal (enter inward global configuration mode)
SwitchA(config)#interface fastethernet 0/4 (select the Ethernet 0 of port 4)
SwitchA(config-if)#switchport access vlan 3 (allot the membership of vlan 3)
SwitchA(config-if)#exit (exit from interface 4)
SwitchA(config)#interface fastethernet 0/5 (select the Ethernet 0 of port 5)
SwitchA(config-if)#switchport access vlan 3 (allot the membership of vlan 3)
SwitchA(config-if)#exit (exit from interface 5)
Configuration of VTP customer on switch B
SwitchB#vlan database
SwitchB(vlan)#vtp client
SwitchB(vlan)#vtp domain group1
SwitchB(vlan)#exit
Trunking amongst 802.1q
Now employ 802.1q body link betwixt the 2 switches to permit communication betwixt VLANs.
On both switches, SwitchA in addition to SwitchB type the next ascendence amongst 802.1q at the fastethernet 0/1 interface.
SwitchA(config)#configure terminal (enter inward global configuration mode)
SwitchA(config)#interface fastethernet 0/1 (select the Ethernet 0 of port 1)
SwitchA(config-if)#switchport fashion trunk (set port 1 equally body port)
SwitchA(config-if)#switchport body encapsulation dot1q
SwitchA(config-if)#end (exit from interface 1)
SwitchB(config)#interface fastethernet 0/1 (select the Ethernet 0 of port 1)
SwitchB(config-if)#switchport fashion trunk (set port 1 equally body port)
SwitchA(config-if)#switchport body encapsulation dot1q
SwitchB(config-if)#end (exit from interface 1)
-
To verify that fastethernet 0/1 has been established equally body port, type the show interface fastethernet 0/1 switchport at the privileged EXEC mode.
-
Although the VLAN definitions accept migrated to the switch B using VTP, only it is necessary to assign ports to these VLANs on switch B.
-
Now assigning the ports 2 in addition to iii to VLAN 2, it must hold upwardly done from the interface mode. Enter the next commands to add together port 2 in addition to iii to VLAN 2.
SwitchB(config)#configure terminal (enter inward global configuration mode)
SwitchB(config)#interface fastethernet 0/2 (select the Ethernet 0 of port 2)
SwitchB(config-if)#switchport access vlan 2 (allot the membership of vlan 2)
SwitchB(config-if)#exit (exit from interface 2)
SwitchB(config)#interface fastethernet 0/3 (select the Ethernet 0 of port 3)
SwitchB(config-if)#switchport access vlan 2 (allot the membership of vlan 2)
SwitchB(config-if)#exit (exit from interface 3)
Now assigning the ports four in addition to v to VLAN 3, motion into the next commands to add together port four in addition to v to VLAN 3.
SwitchB(config)#configure terminal (enter inward global configuration mode)
SwitchB(config)#interface fastethernet 0/4 (select the Ethernet 0 of port 4)
SwitchB(config-if)#switchport access vlan 3 (allot the membership of vlan 3)
SwitchB(config-if)#exit (exit from interface 4)
SwitchB(config)#interface fastethernet 0/5 (select the Ethernet 0 of port 5)
SwitchB(config-if)#switchport access vlan 3 (allot the membership of vlan 3)
SwitchB(config-if)#exit (exit from interface 5)