A switch is a high-speed device that receives incoming data packets and redirects them to their destination on a LAN. A LAN switch operates at the data link layer (Layer 2), as such it can support all types of packet protocols.
Working of a Switch
When switch receives a frame, it has to choose between three actions to take:
- Forward it
- Filter it (drop it)
- Flood it (send it everywhere, except back where it came from)
- To help make this decision, the switch builds the table of MAC(layer 2) addresses. Their are two Mac addresses are contained in every frame, a source and a destination address.
- The switch looks at the source address of the incoming frame before it looks at the destination address and it's the source Mac addresses that are used to build the all important MAC address table.
- Forwarding happens when the switch has the entry for the frame destination MAC. The frame will be forwarded only out the port indicate the Mac table.
- Flooding occur when the switch has no entry from the frame destination Mac in its Mac table. With flooding, the frame is sent out except the port the frame came in on.
- Filtering happens when the source and destination Mac addresses are located off the same port. the frame is simply dropped.
No comments:
Post a Comment