- 论坛徽章:
- 15
|
本帖最后由 yzkarchive 于 2011-12-13 14:15 编辑
The function of switch
1: Learning
The switch compare the source MAC of the frame with CAM table of the switch, if the CAM table without the MAC, record it.
The record just like that:
4011 0800.56c8.160d DYNAMIC Gi0/24
2: Forwarding
If the destination MAC is a broadcast address, forward the frame from all the ports exception the input port
If the destination MAC is a multicast, deal with the multicast to unicasts, then forward it
If the destination MAC is a unicast, and the destination MAC in the CAM table, forward it according the CAM table, If the destination MAC isn't in the CAM table, broadcast it.
3: Removing the layer-2 loop
According the mechanism of forwarding, forward the broadcast frame to all ports exception the input port, if there have three switch connection with each other, there will be a loop. Another the have more than one cable between two switches in the same vlan, there has a loop olso.
The spanning tree protocol is to remove the layer-2 loop.
According the switch ID the select the root switch, the swith ID is made up of two components:
the priority of the switch, the default priority is: 32768.
the MAC address of the switch.
The root switch has the maximum age time: 20 seconds
If there more than one cable between the switches in a vlan, the root port is needed.
choose the lowest cast path to the root
choose the lowest priority switch to the root
choose the port witch lowest priority
choose the lowest-number physical port |
|