Pages

Thursday 28 February 2013

Ethernet switch and its function

Ethernet switch and its function

Ethernet Switch is a device used to connect multiple nodes. Installing too easy just plugged RJ-45 into its port, installing LAN Driver in nodes, assigning IP address ant that’s all. You computers are connected in your network.[accordion]
Before emerging of switch, Hubs were used to connect multiple switch and bridges were used to break collision domain. Switch performs both function of hub and bridge with more efficiency and more controlling.
Switch is also a layer 2 (data link layer) device, thus, data are transmitted on the basis of mac address. Switch performs main three function (same as Bridge but more fruitful.)

  • Learning MAC Address
  • Forwarding Frames
  • Removing Layer 2 loops
Learning MAC Address: Switch learns MAC address and stores in CAM (Contents Addressable Memory) table with corresponding port number and Vlan ID. When any port of switch receives any frame, first, before forwarding the frame to the destination, it learns the source MAC address from the frame and updates the CAM table. Look the picture below.
Learning MAC Address
Learning MAC-address in the switch is performed by a special hardware, called ASIC (Application Specific Integrated Circuit). Actually this hardware is a processor, used in learning MAC address.
Mac Address is stored in CAM table for 300 sec. If communication with the certain mac address is not occur up to 300 sec., certain MAC address will be removed from the CAM table. Once source mac-address is stored in CAM table, it is time to forward the frame.

Forwarding Frame: Since switch forwards the frame on the basis of MAC address, thus, switch needs to take decision intelligently. It does not need to learn only MAC address but also examine the destination MAC address, so that, frame can be forwarded to the exact destination.
When a frame arrives switch’s port, learning MAC address is performed and examine the destination MAC address. Switch finds the destination MAC address in CAM table, there could be several option, such as :

  • Destination MAC address is unicast and available in CAM table. (Known Unicast)
  • Destination MAC address is unicast and not available in CAM table. (Unknown Unicast)
  • Destination MAC address is multicast or broadcast address.
  • Destination MAC address and source MAC address, both, are learned on the same port.
Destination MAC address is unicast and available in CAM table: If this examines the frame will be forwarded to correspondence port where MAC address was learned and there is no problem.
Look the picture below.
Destination MAC address is unicast and available in CAM table  

Destination MAC address is unicast and not available in CAM table: if this examines the frame will be flooded, means the frame will be sent out all the active ports except the receiving port. Then end device decides to accept or rejects the particular frame on the basis of IP address.
Look the picture below.
 Destination MAC address is unicast and not available in CAM table:  

Destination MAC address is multicast or broadcast address: If this examines the frame will be broadcasted, means the frame will be sent out all the active ports except the receiving port, same action as flooding. But this time switch is instructed to broadcast the frame, This frame is not a unicast frame.
Look the picture below.
Destination MAC address is multicast or broadcast address:

Destination MAC address and source MAC address, both, are learned on the same port: If this examines the frame will be discarded or dropped. But the question is how is this possible? Actually, It is possible when switch is connected with Hub.
Look at the picture below and clear all your confusion.
Destination MAC address and source MAC address, both, are learned on the same port  

Removing Layer 2 Loop: Another Major function of switch is removing layer 2 loop. For the reliability and make your network always up, you need to create some redundancy link, so that if any network path goes down you network still alive. Look the picture of redundancy in switch network.
Removing Layer 2 Loop:
But redundancy is cause of layer 2 loops, when switch broadcast or flood the frame, frame will continuously moving one switch to another and always broadcasted and forms a layer 2 loop. Switch uses some protocols and mechanism to remove layer 2 loop, such as STP, PVST, RSTP etc.

More Information about Switch:

  • Switch is layer 2 (data link) deivce.
  • It has main three function : Learning MAC Address, Forwarding Frames and Removing layer 2 loop.
  • It breaks up collision domain
  • Every active port is one collision domain.
  • Switch creates one broadcast domain.
  • Vlan can break up broadcast domain.
  • It support high speed, such as 100 Mbps, 1 Gbps, 10 Gbps etc.
  • It is full duplex device.
  • It supports all forwarding mechanism: Store and forward, Fast forward and cut through.
  • It has two type: configurable switch and non-configurable switch
  • Configurable switch has also two type: Layer 2 (Traditional switch) and Layer 3 ( MLS)
Download pdf file

No comments:

Post a Comment