Cisco VTP: VLAN Trunking Protocol/H2>
VLAN Trunking
Protocol (VTP) is a Cisco Layer 2 messaging protocol that manages the addition,
deletion, and renaming of VLANs on a network-wide basis. Virtual Local Area
Network (VLAN) Trunk Protocol (VTP) reduces administration in a switched
network. When you configure a new VLAN on one VTP server, the VLAN is
distributed through all switches in the domain. This reduces the need to
configure the same VLAN everywhere. VTP is a Cisco-proprietary protocol that is
available on most of the Cisco Catalyst Family products.
VTP ensures that all
switches in the VTP domain are aware of all VLANs. There are occasions,
however, when VTP can create unnecessary traffic. All unknown unicasts and
broadcasts in a VLAN are flooded over the entire VLAN. All switches in the
network receive all broadcasts, even in situations where few users are
connected in that VLAN. VTP pruning is a feature used to eliminate (or prune)
this unnecessary traffic.
By default, all Cisco
Catalyst switches are configured to be VTP servers. This is suitable for
small-scale networks where the size of the VLAN information is small and easily
stored in all switches (in NVRAM). In a large network, a judgment call must be
made at some point when the NVRAM storage needed is wasted, because it is
duplicated on every switch. At this point, the network administrator should
choose a few well-equipped switches and keep them as VTP servers. Everything
else participating in VTP can be turned into a client. The number of VTP
servers should be chosen so as to provide the degree of redundancy desired in
the network.
Modes of Operation
Server
In VTP server mode, you can
create, modify, and delete VLANs and specify other configuration parameters
(such as VTP version and VTP pruning) for the entire VTP domain. VTP servers
advertise their VLAN configuration to other switches in the same VTP domain and
synchronize their VLAN configuration with other switches based on
advertisements received over trunk links. VTP server is the default mode.
Transparent
VTP transparent switches do
not participate in VTP. A VTP transparent switch does not advertise its VLAN
configuration and does not synchronize its VLAN configuration based on received
advertisements. However, in VTP version 2, transparent switches do forward VTP
advertisements that they receive out their trunk ports.
Client
VTP clients behave the same
way as VTP servers, but you cannot create, change, or delete VLANs on a VTP
client.
Advertisements
Summary Advertisements
When the switch receives a
summary advertisement packet, it compares the VTP domain name to its own VTP
domain name. If the name is different, the switch simply ignores the packet. If
the name is the same, the switch then compares the configuration revision to
its own revision. If its own configuration revision is higher or equal, the
packet is ignored. If it is lower, an advertisement request is sent.
Subset Advertisements
When you add, delete, or
change a VLAN in a switch, the server switch where the changes were made increments
the configuration revision and issues a summary advertisement, followed by one
or several subset advertisements. A subset advertisement contains a list of
VLAN information. If there are several VLANS, more than one subset
advertisement may be required in order to advertise them all.
Advertisement Requests
A switch needs a VTP
advertisement request in the following situations:
· The switch has been reset.
· The VTP domain name has been changed.
· The switch has received a VTP summary advertisement with a higher
configuration revision than its own.
Upon receipt of an
advertisement request, a VTP device sends a summary advertisement, followed by
one or more subset advertisements.
Configuration
To configure an IOS based
switch to be a VTP server, issue the following commands:
SwitchA# vlan database
SwitchA(vlan)# vtp domain vtpdom
SwitchA(vlan)# vtp server
SwitchA(vlan)# exit
These commands configure
the switch to be a VTP server in the VTP domain vtpdom. The changes are saved
and the revision number is incremented when the exit command is issued.
To configure a VTP client,
run the following commands:
SwitchB# vlan database
SwitchB(vlan)# vtp domain vtpdom
SwitchB(vlan)# vtp client
SwitchB(vlan)# exit
To disable VTP, set the vtp
mode to transparent as such:
SwitchC# vlan database
SwitchC(vlan)# vtp transparent
SwitchC(vlan)# exit
To monitor the VTP
operation and status, use either:
SwitchA# show vtp status
SwitchA# show vtp counters
Router On A Stick Tutorial
Someone asked me about
configuring a router on a stick yesterday, so I figured I’d make a short
tutorial on it. I haven’t seen this used much in the real world as L3 switches
are so common, but it is something I had to learn for the CCNA. Router on a
stick is used when for inter-VLAN routing when you have an L2 switch and a
router. Here’s the topology:
Here we have an L2 switch
with three VLANs connected to a router. Here’s the config:
Switch
Switch(config)#vlan 5
Switch(config-vlan)#exit
Switch(config)#vlan 10
Switch(config-vlan)#exit
Switch(config)#vlan 15
Switch(config-vlan)#exit
Switch(config)#interface FastEthernet0/1
Switch(config-if)#switchport trunk encapsulation dot1q
Switch(config-if)#switchport mode trunk
|
The switch config is
pretty basic, we create VLANs 5, 10 and 15, then we make a trunk port to the
router.
Router
Router(config)#interface FastEthernet0/0
Router(config-if)#no ip address
Router(config-if)#interface FastEthernet0/0.5
Router(config-subif)#encapsulation dot1Q 5
Router(config-subif)#ip add 192.168.5.1 255.255.255.0
Router(config-subif)#interface FastEthernet0/0.10
Router(config-subif)#encapsulation dot1Q 10
Router(config-subif)#ip add 192.168.10.1 255.255.255.0
Router(config-subif)#interface FastEthernet0/0.15
Router(config-subif)#encapsulation dot1Q 15
Router(config-subif)#ip add 192.168.15.1 255.255.255.0
|
On the router, we go to
the interface connected to the switch and make sure there is no IP address.
Then we configure our subinterfaces with 802.1q and the appropriate VLAN. Then
we give each subinterface an IP address. Now we can see all the subinterfaces
are up:
Router#sh ip int b
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 unassigned YES NVRAM up up
FastEthernet0/0.5 192.168.5.1 YES manual up up
FastEthernet0/0.10 192.168.10.1 YES manual up up
FastEthernet0/0.15 192.168.15.1 YES manual up up
|
Now we’ll verify
connectivity by pinging the subinterfaces from the switch:
Switch#ping 192.168.5.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.5.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/8 ms
Switch#ping 192.168.10.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.10.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/8 ms
Switch#ping 192.168.15.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.15.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/8 ms
|
That’s it, we have a
working router on a stick. Pretty simple configuration.
OTHER
Cisco switch: 802.1q trunk to
router, aka router-on-a-stick
Connect a Cisco switch and router
via 802.1q trunking. This configuration is known as a router-on-a-stick.
First, let’s start with the switch. VLAN 1 exists by default, so we’ll add a couple of other VLANs:
vlan 100name datastate activevlan 200name datastate active
Now, let’s configure the switchport to
connect to the router:
interface fastethernet 1/0/1switchport trunk encapsulation dot1qswitchport mode trunk
Over
to the router!
interface fastethernet 0/0no ip address
interface
fastethernet 0/0.1
encapsulation dot1q 1 native
encapsulation dot1q 1 native
interface
fastethernet 0/0.100
encapsulation dot1q 100
ip address 192.168.100.1 255.255.255.0
encapsulation dot1q 100
ip address 192.168.100.1 255.255.255.0
interface fastethernet 0/0.200encapsulation dot1q 200ip address 192.168.200.1 255.255.255.0
At
this point, workstations on VLAN 100 should be able to ping the 192.168.100.1
address, and workstations on VLAN 200 should be able to ping the 192.168.200.1
address.
If,
for some reason, the native VLAN on the switchport is something other than 1,
change the encapsulation statement on the router, or the trunk may not form.

No comments:
Post a Comment