>UDLD: works only for fiber optic ports. It helps to check if there is any broken links between switches.
#conf t
#udld enable
> In the trunk the native vlan frames travel with out tagging. default all ports on a switch belong to VLAN1(native vlan)
> Tag is nothing but vlan identifier
> ISL and 802.1q can identify layer 2 frames
>ISL adds a 26-byte headerand a 4-byte trailer to the frame. The source VLAN is identified with a 10-bit VLAN ID field in the header. The trailer contains a cyclic redundancy check (CRC) value to ensure the data integrity of the new encapsulated frame
>BPDU: Bridge Protocol data unit. These are unique frames exchanged between switches to identify and topology changes. These messages are used to create a loop free switch network. The BPDU has following items:
a> Root Bridge ID : Priority Number + MAC address
b> Root Bridge Path Cost
c> Sender Bridge ID: Priority Number+MAC address
d> Port ID: Determines the port from which these BPDU are sent
e> 8 Flags (1st flag determines there is a change in the network, last flag determies topology change ack)
f> other feilds like forward delay, max age and Hello timers
> Spanning Tree Protocol: is used to optimize switch networks by dropping trees on redundant paths. The algo uses BPDU to determine loop free path in the network. Below is the process on how it works
>If the bridge piority is same then the MAC address usually resolves the tie.
>STP port Status :
Process blocking listening learning forwarding disable
Receives& Process Yes Yes Yes Yes No
BPDU
Forward Frames rcvd No No No Yes No
on interface
Forward data frames No No No Yes No
received from another
interface
Learn MAC address No No Yes Yes No
> Port
> Root Guard is mainly for changing designated port to" Inconsistent Blocked port" if the root receives any superior BPDU.
> Root Guard: It is interface configuration command like
#interface f0/2 - 4 --->here this f0/2, f0/3, f0/4 are connected to different switches
#spanning-tree guard root
#conf t
#udld enable
> In the trunk the native vlan frames travel with out tagging. default all ports on a switch belong to VLAN1(native vlan)
> Tag is nothing but vlan identifier
> ISL and 802.1q can identify layer 2 frames
>ISL adds a 26-byte headerand a 4-byte trailer to the frame. The source VLAN is identified with a 10-bit VLAN ID field in the header. The trailer contains a cyclic redundancy check (CRC) value to ensure the data integrity of the new encapsulated frame
>BPDU: Bridge Protocol data unit. These are unique frames exchanged between switches to identify and topology changes. These messages are used to create a loop free switch network. The BPDU has following items:
a> Root Bridge ID : Priority Number + MAC address
b> Root Bridge Path Cost
c> Sender Bridge ID: Priority Number+MAC address
d> Port ID: Determines the port from which these BPDU are sent
e> 8 Flags (1st flag determines there is a change in the network, last flag determies topology change ack)
f> other feilds like forward delay, max age and Hello timers
> Spanning Tree Protocol: is used to optimize switch networks by dropping trees on redundant paths. The algo uses BPDU to determine loop free path in the network. Below is the process on how it works
- each switch in the network considers it self as Root Bridge (the default priority is 32768)
- If switch receives any BPDU it compares the Root Bridge ID with its own database. If its better (checks the priority first if its a tie then matches the MAC address. Remember the lower the better) with low Root Bridge ID then it deletes already stored and adds root bridge to its database.
- Once the root bridge is determined next step is to find the lowest cost path to reach it or finding the root port. Lower the cost of the path the better is the link ( 10 Mbps cost is 100 and 1Gbps is 4). So each switch should have atleast one root port. The Root Bridge will never have root ports.
- If a switch has multiple connections through different switches with equal cost then it will chooe path via the switch with Lower bridge ID(as lower is better).
- Once root port is determined now its time to find the designated ports and the blocked ports.
- All the ports connected to end devices will be designated along with those ports connected to the root ports of the other switches.
- Important: Blocked ports. How to determine them : check examples in the below link http://ccnpswitch.blogspot.com/2011_08_01_archive.html
>STP port Status :
Process blocking listening learning forwarding disable
Receives& Process Yes Yes Yes Yes No
BPDU
Forward Frames rcvd No No No Yes No
on interface
Forward data frames No No No Yes No
received from another
interface
Learn MAC address No No Yes Yes No
> Port
> Root Guard is mainly for changing designated port to" Inconsistent Blocked port" if the root receives any superior BPDU.
> Root Guard: It is interface configuration command like
#interface f0/2 - 4 --->here this f0/2, f0/3, f0/4 are connected to different switches
#spanning-tree guard root