Study Session Number 12! STP! #13

Hi Everyone! 

Today I decided that I would brush up on Spanning-tree, I was originally going to spend the day with HSRP but the concept of it was actually a lot easier than what I thought it was going to be - to keep use updated over the past few days I've done OSPF and lots of labbing then HSRP yesterday, I've configured and verified spanning-tree before - both PVST+ and RSTP so I believe this session will be more of a remembering lesson than a learning one. 

Spanning tree is used to provide redundancy to a network. STP uses BPDU's (Bridge protocol data units) and sends these out every few seconds to let the other switches on the network know the sending switches state that way if a link goes down the other switch will know and will set a port that has been put in a blocked state to unblocked. 

Spanning tree is enabled by default on switches. 

Layer 3 devices (routers) have a TTL within the packets that are sent out this prevents looping, in a Layer 2 environment the switches have no TTL so to prevent looping spanning tree is used, if spanning tree isn't used a broadcast storm will occur. 

Rules - 
Elect the root - oldest device will be elected as the root bridge. this should be the center of the network.
Find the best ports to the root switch:
    1) Lowest cost based on link bandwidth:
        10mbps = cost 100
        100Mbps = cost 19
        1Gbps = cost 4
    2) Lowest Bridge ID
    3) Lowest Port Number
These 3 steps go in order, if cost is the same the bridge ID is next, if bridge ID is the same lowest port number (interface number so fa0/1 etc).
BRIDGE ID = BRIDGE PRIORITY (DEFAULT 32768) + BRIDGE MAC (EXAMPLE - 0000.0000.0000) = 32768.0000.0000.0000 - EACH SWITCH WILL HAVE ITS OWN ONE.
Block any unused ports.
These rules apply every time a switch picks the best route to the root bridge, the ports that are pointing towards the root bridge are called root ports and the ports that are pointing away from the root bridge are called designated ports all ports on a root bridge are considered designated ports any unused ports are BLOCKED.

Per-VLAN - In a per-vlan spanning tree configuration these rules are replicated BUT they are replicated onto each individual vlan, this means that each vlan that is assigned is assigned with its own root bridge and root ports to provide a more efficient network. 

Portfast - Portfast is used to speed up the time it takes ports to transition to the forwarding state. Commands below. 

BPDU Guard - Used to stop ports receiving BPDU's on an interface. Commands below.

Root Guard - Prevents unintended switch from becoming the root bridge. Commands Below,


Standards - 
Spanning Tree Protocol (STP - 802.1d)  
Rapid Spanning Tree (RSTP - 802.1w
Multiple Spanning Tree (MSTP - 802.1s

Commands 
Manually configure Bridge ID - 
spanning-tree vlan *vlan number* root primary - Changes the bridge priority to 24576 to make it the root bridge (given there is no other switches with a lower bridge ID)
spanning-tree vlan *vlan number* root secondary- Changes the bridge priority to 28672 to make it the root bridge (given there is no other switches with a lower bridge ID)

Portfast on interface - 
int *int*
    spanning-tree portfast

Portfast by default on switch -
(config)spanning-tree portfast default 

BPDU Guard on interface - 
int *int*
    spanning-tree portfast
    spanning-tree bpduguard enable 

BPDU Guard on switch - 
(config)spanning-tree portfast bpduguard default

Root Guard -
int *int*
    spanning-tree guard root

Verify - 
show spanning-tree = can see bridge ID + MAC Address (In "Address" heading if Root ID and Bridge ID are the same, this means that switch is the root - useful for exam.)
show spanning tree vlan *vlan number* - Specific Spanning Tree VLAN Information (In "Address" heading if Root ID and Bridge ID are the same, this means that switch is the root - useful for exam.)
show run | inc span - will show what spanning tree is running.
show mac address-table 

Comments

Popular posts from this blog

Python Crash Course Chapter 1-2! #1

I PASSED! Cisco CCNA 200-301! Experience & Where I'm going from here!

Python Notes #6 Functions