Showing posts with label STP. Show all posts
Showing posts with label STP. Show all posts

Tuesday, August 14, 2012

Spanning Tree Protocol priorities

Spanning Tree Protocol (STP) is vital for detecting loops within a switched network. Spanning tree works by designating a common reference point (the root bridge) and systematically building a loop-free tree from the root to all other bridges. All redundant paths remain blocked unless a designated link fails.

Spanning Tree Protocol operation

Select a root bridge.

Determine the least cost paths to the root bridge.

Disable all other root paths.

Modifications in case of ties.


In summary, the sequence of events to determine the best received BPDU (which is your best path to the root) is
  1. Lowest root bridge ID - Determines the root bridge
  2. Lowest cost to the root bridge - Favors the upstream switch with the least cost to root
  3. Lowest sender bridge ID - Serves as a tie breaker if multiple upstream switches have equal cost to root
  4. Lowest sender port ID - Serves as a tie breaker if a switch has multiple (non-Etherchannel) links to a single upstream switch

Bridge ID = priority (16 bits) + ID [MAC address] ( 48bits)
default bridge priority is 32768

Port ID =  priority (4 bits) + ID [Interface number] ( 12bits)
default port priority is 128

Data rate and STP path cost

The table below shows the default cost of an interface for a given data rate.
Data rate STP Cost (802.1D-1998) RSTP Cost (802.1D-2004 / 802.1w)
4 Mbit/s 250 5,000,000
10 Mbit/s 100 2,000,000
16 Mbit/s 62 1,250,000
100 Mbit/s 19 200,000
1 Gbit/s 4 20,000
2 Gbit/s 3 10,000
10 Gbit/s 2 2,000

http://en.wikipedia.org/wiki/Spanning_Tree_Protocol
http://packetlife.net/blog/2008/may/5/spanning-tree-protocol-priorities/
http://www.cisco.com/warp/public/473/spanning_tree1.swf

Friday, August 10, 2012

MAC of Switch and Router

Switch has a base MAC address and different MAC for every interface

MAC addresses should be unique on each network. They can be same in different networks. i.e MAC-address /layer 2 information changes with each hop.
1]
"Every interface of router have same MAC"
This is right behaviour as each interface of the router will be connected to different network. So it will be highly unlikely that mac-addresss clash would take place.

2]
In case of switch "It shows different MAC for every port"
This is also correct as switches can be used as Layer 3 and as well as in a layer 2 environment. Chances are mac-addresses might clash within same network. Consider cases like SVI/VLAN interfaces, routed interfcaes or plain layer interfaces. So it required unique mac on each interface.



A bridge sends a BPDU frame using the unique MAC address of the port itself as a source address, and a destination address of the STP multicast address 01:80:C2:00:00:00.




There are three types of BPDUs:
  • Configuration BPDU (CBPDU), used for Spanning Tree computation
  • Topology Change Notification (TCN) BPDU, used to announce changes in the network topology
  • Topology Change Notification Acknowledgment (TCA)
BPDUs are exchanged regularly (every 2 seconds by default) and enable switches to keep track of network changes and to start and stop forwarding at ports as required.



Thursday, May 17, 2012

Flex Links

Flex Links are a pair of a Layer 2 interfaces (switchports or port channels), where one interface is
configured to act as a backup to the other. Flex Links are typically configured in service-provider or
enterprise networks where customers do not want to run STP. Flex Links provide link-level redundancy
that is an alternative to Spanning Tree Protocol (STP). STP is automatically disabled on Flex Links
interfaces.
To configure the Flex Links feature, you configure one Layer 2 interface as the standby link for the link
that you want to be primary. With Flex Links configured for a pair of interfaces, only one of the
interfaces is in the linkup state and is forwarding traffic. If the primary link shuts down, the standby link
starts forwarding traffic. When the inactive link comes back up, it goes into standby mode.

Configuring Flex Links
Flex links