2008年9月13日星期六

CCNA - Spanning-Tree




When 3 switch connect together, make a circle. Without spanning-tree, there will be a loop.
Here is how switches make spanning-tree, it is enabled by default on the switches.



1). Elect the Root bridge, I like to call it Root switch.

- Switches send BID(Bridge ID) out of its connecting ports.
- BID composed with Bridge Priority, Extend System ID and MAC.
- Default BID priority is 32769, but can be changed switch-globally per vlan.
- With BID, switches compare with each other, which who has lowest BID will be the Root bridge, the BOSS.



2). Elect the non-designated port on the other switches.

- There are 3 kinds of port roles, root port, designated port and non-designated port.
- Root port is the port that has the direction toward the root bridge(the BOSS), designated port is just the opposite.
- Non-designated port is the port that the traffic will be blocked on this port except BPDU.
- How to decide which switch's port to be blocked:
- They use port cost and BID to decide. The port cost is the first priority.
- Post cost is the how fast it go toward the Root bridge.
- Here are the cost definitiion: 10G - 2, 1G - 4, 100M - 19, 10M - 100.



3). States of a switch port without configurated portfast.

- Blocking: Only receivce BPDU, no other traffic
- Listening: Send and receive BPDU, preparing to participate in the active topology.
- Learning: Prepares to participate in frame forwarding and begins to populate the MAC address table.
- Forwarding: All traffic allowed.
- Disable: Port is down, administratively disabled.



4). BPDU Timers

- Hello time: By default, 2 seconds to send a BPDU frame. Can be changed between 1 and 10.
- Forward delay: The time spent in the listening and learning state. Default 15 seconds for each state, can be changed between 4 and 30.
- Maximum age: The time a switch port saves BPDU information. 20 seconds by default, but can be changed between 6 and 40.




沒有留言: