LAN Switching

  • Posted on: 16 October 2010
  • By: shyamal

 

Introduction

Switches are Layer 2 devices. Switching is the process of taking an incoming frame from one interface to and delivering it out through another interface. The difference between Layer 2 and Layer 3 switching is the type of information inside the frame that is used to determine the correct destination. With Layer 2 switching, frames are switched based on MAC address, with Layer 3 switching, frames (packets) are switched based on Network Layer IP address.

A switch will examine the incoming frame's MAC header to determine the Physical or Hardware address of the destination device. Whereas a HUB simply repeats an incoming frame out of all its ports, the switch creates a virtual path to forward frames to the Port where it knows the destination device exist. Switch can provide flow control to network traffic by temporarily storing frames in a buffer. Switch can also generate Back Pressure to cause transmitting device to wait long enough for the Switch to deal with backlogged traffic. To create Back Pressure, the switch broadcast false collation detection signals to cause network interface card to back off.

A key advantage associate with the use of LAN switches results from their ability to support parallel switching, permitting multiple cross connections between source and destination to occur simultaneously. For Example, if eight100 baseT networks were connected to 8 port switch, 4 simultaneous cross connections, each at 100 Mbps could occur resulting in an increase in bandwidth to 400 Mbps. Here each cross connection represents a dedicated 100 Mbps bandwidth for the duration of a frame. Thus a N port LAN switch supporting a 100 Mbps operating rate on each port provides a through put up to (N/2)X100 Mbps.

Layer 2 and Layer 3 Switching

The difference between Layer 2 and Layer 3 switching is the type of information inside the frame that is used to determine the correct output interface. With layer 2 switching, frames are switched based on MAC address information. With layer 3 switching, frames are switched based on network layer information.

Layer 2 switching does not look inside a packet for network layer information as does layer 3 switching. Layer 2 switching is performed by looking at a destination MAC address within a frame. It looks at the frame's destination address and sends it to the appropriate interface if it knows the destination address location. Layer 2 switching builds and maintains a switching table that keep track of which MAC addresses belong to each port or interface.

If the layer 2 switch does not know where to send the frame, it broadcasts the frame out all its ports to the network to learn the correct the correct destination. When the frame's reply is returned, the switch learns the location of the new address and the information to the switching table.

Switching Methods

Store and Forward The switch fully receives all bits in the frame before forwarding the frame. This allows the switch to check the FCS before forwarding the frame. Once the frame is stored, the switch checks the frame's integrity by performing a Cyclic Redundancy Check (CRC) ,comparing its computed CRC against the CRC contained in the frame's Frame Check Sequence (FCS) field. If the two match, the frame is considered to be error free and additional processing ans switching will occur otherwise it will be discarded.

Cut Through The switch performs address table lookup as soon as the destination address field in the header is received. The first bit in the frame can be sent out the outbound port before the final bits in the incoming frames are receives. This does not allow the switch to discard frame that fail the FCS. A cut through switch really helps to reduce latency because it begins to forward the frame as soon as it reads the destination address and determines the outgoing interface, but it also propagate errors.

Fragmentfree Fragmentfree is a modified form of cut-through switching in which the switch waits for the collision window to pass before forwarding. This is because if a packet has a collision error ,it almost always occurs within the first 64 byts. The goal of fragmentfree switching is to reduce the number of Ethernet RUNT frames (runt < 64 bytes) that are being switched.

Forwarding Logic of a Switch

 A frame is received.
 If the destination is a broadcast or multicast, forward on all ports except the port in which the frame was received.
 If the destination is a multicast and the address is not in the address table, forward on all ports except the port in which the frame was received.
 If the destination is a unicast and the address is in the address table, and if the associated interface is not the interface in which the frame arrived, forward the frame out the one correct port.
 Otherwise do not forward the frame.

Introduction

Switches are Layer 2 devices. Switching is the process of taking an incoming frame from one interface to and delivering it out through another interface. The difference between Layer 2 and Layer 3 switching is the type of information inside the frame that is used to determine the correct destination. With Layer 2 switching, frames are switched based on MAC address, with Layer 3 switching, frames (packets) are switched based on Network Layer IP address.

A switch will examine the incoming frame's MAC header to determine the Physical or Hardware address of the destination device. Whereas a HUB simply repeats an incoming frame out of all its ports, the switch creates a virtual path to forward frames to the Port where it knows the destination device exist. Switch can provide flow control to network traffic by temporarily storing frames in a buffer. Switch can also generate Back Pressure to cause transmitting device to wait long enough for the Switch to deal with backlogged traffic. To create Back Pressure, the switch broadcast false collation detection signals to cause network interface card to back off.

A key advantage associate with the use of LAN switches results from their ability to support parallel switching, permitting multiple cross connections between source and destination to occur simultaneously. For Example, if eight100 baseT networks were connected to 8 port switch, 4 simultaneous cross connections, each at 100 Mbps could occur resulting in an increase in bandwidth to 400 Mbps. Here each cross connection represents a dedicated 100 Mbps bandwidth for the duration of a frame. Thus a N port LAN switch supporting a 100 Mbps operating rate on each port provides a through put up to (N/2)X100 Mbps.

Layer 2 and Layer 3 Switching

The difference between Layer 2 and Layer 3 switching is the type of information inside the frame that is used to determine the correct output interface. With layer 2 switching, frames are switched based on MAC address information. With layer 3 switching, frames are switched based on network layer information.

Layer 2 switching does not look inside a packet for network layer information as does layer 3 switching. Layer 2 switching is performed by looking at a destination MAC address within a frame. It looks at the frame's destination address and sends it to the appropriate interface if it knows the destination address location. Layer 2 switching builds and maintains a switching table that keep track of which MAC addresses belong to each port or interface.

If the layer 2 switch does not know where to send the frame, it broadcasts the frame out all its ports to the network to learn the correct the correct destination. When the frame's reply is returned, the switch learns the location of the new address and the information to the switching table.

Switching Methods

Store and Forward The switch fully receives all bits in the frame before forwarding the frame. This allows the switch to check the FCS before forwarding the frame. Once the frame is stored, the switch checks the frame's integrity by performing a Cyclic Redundancy Check (CRC) ,comparing its computed CRC against the CRC contained in the frame's Frame Check Sequence (FCS) field. If the two match, the frame is considered to be error free and additional processing ans switching will occur otherwise it will be discarded.

Cut Through The switch performs address table lookup as soon as the destination address field in the header is received. The first bit in the frame can be sent out the outbound port before the final bits in the incoming frames are receives. This does not allow the switch to discard frame that fail the FCS. A cut through switch really helps to reduce latency because it begins to forward the frame as soon as it reads the destination address and determines the outgoing interface, but it also propagate errors.

Fragmentfree Fragmentfree is a modified form of cut-through switching in which the switch waits for the collision window to pass before forwarding. This is because if a packet has a collision error ,it almost always occurs within the first 64 byts. The goal of fragmentfree switching is to reduce the number of Ethernet RUNT frames (runt < 64 bytes) that are being switched.

Forwarding Logic of a Switch

A frame is received.

If the destination is a broadcast or multicast, forward on all ports except the port in which the frame was received.
If the destination is a multicast and the address is not in the address table, forward on all ports except the port in which the frame was received.
If the destination is a unicast and the address is in the address table, and if the associated interface is not the interface in which the frame arrived, forward the frame out the one correct port.
Otherwise do not forward the frame.