Montag, 13. April 2015

Spanning Tree Protocol (STP)

-What is the thing called Spanning Tree Protocol?
-Was ist ein sogennantes Spanning Tree Protocol?

 Kleines Zitat für den Anfang:

Quote:
"Allerdings muss die LAN-Technologie sicherstellen, dass zwischen zwei Rechnern jeweils nur ein Datenpfad existiert, um Pakete eindeutig weiterleiten zu können."  
-wikipedia.com 
 Later, when we come to this question again, we will hear more, what a STP is.

 But at first let's have a look at these three videos to get a small overview about this protocol:





After watching these videos, let's answer the following questions:

Please use also Wikipedia to answer the questions! 
http://en.wikipedia.org/wiki/Spanning_Tree_Protocol
http://www.fachadmin.de/index.php/Spanning_Tree




  • What's the primary purpose of the protocol?
The main purpose of this protocol is to avoid network loops. -To prevent bridge loops and the broadcast radiation (=result of them)

  • What are redundant paths?
These are not necessary paths. The ports there are going to get switched off.

  • What is a broadcast storm? How does a switch handle a broadcast from one port?
A broadcast storm is a multitude of broadcast messages in a network. In this case the broadcast-message gets send out to get the Source-MAC-Address. But if there is a loop, you can't reach the target, so there will be send out many broadcast-messages.
The switches send the broadcast-message from another switch to the next switch.
At the end the network is overloaded and it's not able to build up a new network connection.

  • What happens if a switch goes down?
When a switch goes down, another inactive switch will be activated.

  • What happened if STP wouldn't exist or STP would be switched off?
The packets can't be transfered clearly.

  • What happens to the links when STP is turned on? 
When STP is on, at the switch the links/ports are going to another state.

  • Name the states of a link when using STP.



  • How can you read the ARP cache on a PC with Windows-OS?
CMD -> arp -a

  • Why does a PC send an ARP broadcast before sending a ping request?
Because the PC needs the MAC-address to communicate with another PC.

  • STP differs between Root PortsDesignated Ports and Non-Designated Ports. Explain these different types?
Designated Ports: Forwarding Ports
Designated = 'chosen to do a particular job'
That's the bridge with the lowest path costs in LAN.

Non-designated Ports: Blocking

Root Port: The lowest costs path from a non-root bridge to the root bridge

  • What is a Root Bridge? How is it elected?
Root-Bridge = Switch with the smallest Root-BID.

Here is a nice animation from CISCO:

At the start, when a switch goes up, every switch thinks "I am the root-bridge".
After, the BDPUs(Bridge Data Protocol Unit) are going to send to the other switches in the network.
In this BDPUs the own MAC-address is saved. The switches send their Bridge-ID (BID) and their Root-BID with their Sender-BID. (Thats a characteristic of a designated switch).
The BIDs are transfered from switch to switch. The switches are looking, if the Root-BID is smaller than its own.
If he gets a smaller one, the smaller one is the new Root-BID.
At the end, when every switch has the smallest Root-BID, they all know the Root-Bridge.


  • What is the Bridge ID? How can it be determined on a Cisco Switch?
Bridge ID (BID):
length of 8Bytes (2 Byte Bridge-Priority, 6 Byte MAC-address) (picture beneath)
The bridge with the lowest Bridge-Priority is going to be the new Root-Bridge. (see above)


  • What are the costs to the Root Bridge? How are they calculated?
The costs are dependent of the distance to the root bridge and the uplink to the target.

  • How can the Bridge ID be set on a Cisco Switch?
Use this command in Cisco:
spanning-tree vlan x priority 32768 (any value, must be a multiple of 4096) // 32768 = standard value
or
spanning-tree vlan x root primary/secundary

  • How often are BPDUs sent? How do they look like?
By default de BPDUs are sent every 2 seconds.
Before the root is selected, all switches send BPDUs, after the root has been selected, just the root switch sends BPDUs (the other switches are just getting it and forwarding it).



  • How can you set a certain switch as a root bridge?
SW1(config)# spanning vlan [...] root primary

SW1(config)# spanning-tree mode rapid-pvst
SW1(config)# spanning-tree mode vlan1-100 priority x      //  a timed amount of the number 4096


Other important commands:




Important terms:

Bridge ID:














BPDU:
Bridge Protocol Data Units = frames that contain information about the STP

Keine Kommentare:

Kommentar veröffentlichen