With the help of VTP, we can simplify the
process of creating Vlan. In multiple switches,we can configure one switch as VTP server and
all other switches will be configured as VTP client. We will create Vlans on VTP server
switch. The server will send periodic updates to VTP client switches. The clients will
create Vlans from the update received from the VTP server.
VTP server :-- VTP server is a switch in which we can create, delete or modify Vlans. The server will send periodic updates for client.
VTP client :-- On VTP client, we are not able to create, modify or delete Vlans. The client will receive and forward vtp updates. The client will create same Vlans as defined in vtp update.
Switch(config)#exit
VTP server :-- VTP server is a switch in which we can create, delete or modify Vlans. The server will send periodic updates for client.
VTP client :-- On VTP client, we are not able to create, modify or delete Vlans. The client will receive and forward vtp updates. The client will create same Vlans as defined in vtp update.
VTP Transparent :-- Transparent is a switch, which will receive and
forward VTP update. It is able to create,delete and modify Vlans locally. A transparent
will not send its own VTP updates and will not learn any information from received vtp update.
Commands
Switch#conf ter
Switch(config)#vtp domain <name>
Switch(config)#vtp password <word>
Switch(config)#vtp mode <server|client|transparent>
Switch(config)#exit
By default in cisco switches the VTP mode is set
as VTP server with no domain and no password
To display VTP status -- Switch#sh vtp status
VTP Pruning
Pruning is the VTP feature through which a trunk link
can be automatically disable, for a particular Vlan if neighbor switch does not
contain ports in that Vlan. Vlan1 is not prun eligible.
Command to configure VTP Pruning :- We have to use only one command on VTP server for VTP
Pruning.
Switch#conf ter
Switch(config)#vtp pruning
Inter Vlan Communication
After creating Vlans, each Vlan has own broadcast
domain. If we want communication from one Vlan to another Vlan then we need to
perform routing. There are three methods for inter vlan communication.
(1) Inter Vlan using multi-interface router
(2) Inter Vlan using router on a stick method
(3) Inter Vlan using layer 3 switch 1751, 2621 routers supports Vlan
(1) Inter Vlan using multi-interface router
In this
case, we have to connect one interface of router in each Vlan. This interface will act as gateway for the corresponding vlan.
Each Vlan has to use different n/w addresses. Data from one Vlan to another Vlan
will travel by router.
(2) Inter Vlan using router on a stick method
In this
method a special router is used for Inter Vlan. In this router, we can create
one interface for each Vlan. The physical interface
of router will be connected on trunk port switch. This router will route traffic on the
same interface by swapping vlan id information with the help of frame tagging
protocol.
Configuration on Router
Router#config ter
Router#config ter
Router(config)#interface fastethernet 0/0
Router(config-if)#no ip address
Router(config-if)#no sh
Router(config-if)#exit
Router(config)#interface fastethernet 0/0.1
Router(config-if)#encapsulation dot1q 1
Router(config-if)#ip address 10.0.0.1 255.0.0.0
Router(config-if)#no sh
Router(config-if)#exit
Router(config)#interface fastethernet 0/0.2
Router(config-if)#encapsulation dot1q 3
Router(config-if)#ip address 11.0.0.1 255.0.0.0
Router(config-if)#no sh
Router(config-if)#exit
Router(config)#interface fastethernet 0/0.3
Router(config-if)#encapsulation dot1q 5
Router(config-if)#ip address 12.0.0.1 255.0.0.0
Router(config-if)#no sh
Router(config-if)#exit
Configuration on Core switch
(1) Configure switch as VTP server
(2) Create Vlans
(3) Configure interface connected to router as Trunk
(4) Configure interfaces connected to other switches
as trunk (if required)
Configuration on Distribution layer switches
(1) Configure switch as VTP client
(2) Configure required interface as Trunk (optional)
(3) Add ports to Vlan
Configuration on Pc
Configure IP and Gateway
Spanning Tree Protocol
When we connect multiple switches with each other and
multiple path exist from one switch to another switch then it may lead to the
switching loop in the network. Multiple paths are used to create redundancy in the
network. STP is only required when multiple path exist then there is possibility of loop in n/w.
Problems the occur with redundancy path
(1) Multiple copies of the frame will be received by
destination.
(2) Frequent changes in the mac address table of switch.
(3) A mac address may appear at multiple ports in a switch.
(4) Packets may enter in the endless loop.
Spanning Tree Protocol will solve this problem
by blocking the redundancy interface. So that only one path will remain active in the
switches. If the primary path goes down then disabled link will become enable and data will be
transferred through that path.
Working of STP
The STP will create a topology database in which one
switch will be elected as Route switch. Path cost is calculated on the basis of
bandwidth. The lowest path cost link will be enable mode and another path will be disable.
STP terminology
(1) Bridge id :-- It
is the combination of bridge priority and base mac address. In Cisco switches default priority no. is 32768.
(2) Root Bridge :-- The Bridge/Switch with lowest Bridge id will
become the Route Bridge . Route Bridge is used as
the center point for calculating path cost in topology.
(3) BPDU Bridging Protocol Data Units :-- It
is the STP information, which is exchange between the switches to create topology & path selection.
(4) STP port mode :-- An STP is enabled a port may be in one of the
following mode.
(i) Listening: - in this mode a port will send/receive BPD.
(ii) Learning: -
a port will learn mac address table.
(iii)
Forwarding: - the port will forward data based on mac address table.
(iv) Blocking: -
the port is block to send/receive data by Spanning Tree Protocol.
(v)
Disable: - the port is administratively disabled.
Path cost calculation :-- The links in switches will be enable or disabled on
the basis of path cost. The path cost for each link is calculated according to
following table.
Old
IEEE New IEEE
Speed Cost Cost
10 Mb 100 100
100 Mb 10 19
1 Gb 1 4
10 Gb 1 2
To configure ports for forwarding mode directly
Switch#config ter
Switch(config)#interface <type> <no>
Switch(config-if)#switchport host
Configuring port security
In manageable switches, we can restrict the no. of mac
addresses that a port can learn.Even we can specify the mac address statically
with a command. With port security, we can also specify the action to be perform if
port security violation is detected.
Switch#conf ter
Switch(config)#interface <type> <no>
Switch(config-if)#switchport port-security
Switch(config-if)#switchport port-security maximum <no.
of mac>
Switch(config-if)#switchport port-security violation
<shutdown|restrict|reject>
Switch(config-if)#switchport port-security mac-address
sticky
Switch(config-if)#switchport port-security mac-address
sticky <mac address>
Switch(config-if)#exit