In: Physics
Link Layer
Describe the idea of self-learning in a link layer
switch. Specifically, describe how a
switch fills the switch table entries.
A switch is a self-learning link layer device which is capable to store and forward Ethernet frames. Being a link layer device, CSMA/CD is implemented in such construction. Most switches are plug-and-play, being transparent to nodes. Also, since a switch is a store and forward device, it isolates traffic to only the interfaces those are necessary. Thus it breaks up a large broadcast domain (LAN) into multiple collision domains (LAN segments) if hubs are present. If the network is made only of switches, then it will be collisionless, which results in: increased total maximum throughput,limitless nodes and geographical coverage,connectivity to different Ethernet types and plug and play of link layer switches.
Layer 2 switches (bridges) have a MAC address table that contains a MAC address and a port number. Switches follow this straightforward algorithm for forwarding packets:
1)When a frame is received, the switch compares the SOURCE MAC address to the MAC address table. If the SOURCE is unknown, the switch adds it to the table along with the port number the packet was received on. This way, the switch learns the MAC address and port of every transmitting device.
2)The switch then compares the DESTINATION MAC address with the table. If there is an entry, the switch forwards the frame out the associated port. If there is no entry, the switch sends the packet out all its ports, except the port that the frame was received on (Flooding).
In this way, the switch fills the switch table entries.