Switch

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:
  1. Forward it
  2. Filter it (drop it)
  3. Flood it (send it everywhere, except back where it came from)
  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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