Showing posts with label fragment-free switching. Show all posts
Showing posts with label fragment-free switching. Show all posts

Saturday, 25 August 2018

Data Frames Forwarding and Switching Method

With network growing, its facing slower network performance, Ethernet bridges were added to networks to limit the size of the collision domains. The advancement in integrated circuits permitted for LAN switches to replace the early bridges. The modern switches were able to move the layer 2 forwarding decision from software to application-specific-integrated-circuits (ASICs). The ASICs decrease the packet-handling time within the device and permit the device to handle an increased number of ports without degrading performance.  There are two methods of data switching and forwarding:-



  • Store-and-forward method

  • Cut-through Method


Store-and-Forward Switching


The store-and-forward method makes a forwarding decision when the complete frame received and then checked the frame for errors using a mathematical error-checking mechanism known as a cyclic redundancy check (CRC). if the CRC is valid, the switch looks up the destination address, which determines the outgoing interface. The frame is then forwarded out the correct port.


The Store-and-forward method has two primary characteristics that differentiate it from cut-through:



  • Error checking

  • Automatic buffering.


Error Checking


A switch using store-and-forward switching technique performs an error check on each incoming frame. When received the entire frame on the ingress port, as shown in the figure, the switch compares the frame-check-sequence (FCS) value in the last field of the datagram against its own FCS calculations. The FCS is the process that helps to make sure that the frame is free of physical and data-link layer errors. If the frame has no error, the switch forwards the frame to the destination; otherwise, the frame is dropped.


switching 


Automatic Buffering


With any difference in data speeds between the ingress and egress ports, the switch stores the whole frame in a buffer computes the FCS check; forwards it to the egress port buffer and then sends it. For example, when an incoming frame traveling into a Fast Ethernet port that must be sent out a Giga Ethernet interface would require using the store-and-forward method. The store-and-forward switching is the primary method for Cisco switches.


Cut-Through Switching


The Cut-Through Switching is another method of switching, as shown in Figure 2; this method starts the forwarding process when the destination MAC address of an incoming frame and the egress port has been determined. The advantage to this method is the ability to switch data earlier than store-and-forward method. The primary characteristics of cut-through switching are the following:



  • Rapid Frame Switching

  • Fragment Free


switching


 


Rapid Frame Forwarding


A switch using the cut-through method make forwarding immediately when it has found the destination MAC address of the frame in its MAC address table. The switch doesn’t need to wait for the complete frame to receive like store-and-forward method.


A switch using the cut-through method can quickly decide because of ASICs and MAC controller. The cut-through method needs to check a larger portion of a frame’s headers for additional filtering purposes. For example, the switch can examine source MAC address; destination MAC, and the Ether Type fields which are total 14 bytes and also examine an additional 40 bytes in order to carry out more difficult functions Layers 3 and 4.


This method does not drop invalid frames. The frames with errors are forwarded next segments of the network. If there are too much invalid frames in the network, which produce a negative impact on bandwidth.


Fragment Free Switching


It is a modified form of a cut-through switching. In this form of switching the switch waits for the collision window (64 bytes) to pass before forwarding the frame. Each frame will be checked into the data field to make sure there is no fragmentation has occurred. This is provides enhanced error checking than cut-through; without any further latency and delay. The lower latency speed of cut-through switching makes it more suitable for high-performance computing (HPC) applications that need process-to-process latencies of 10 microseconds or less.

Monday, 20 March 2017

Frame Forwarding Methods on Cisco Switches








Cisco switches support different Switching(frame forwarding) Methods. Switching Methods are determined how a switch receives, processes, and forwards a Layer 2 Ethernet frame. Important Switching methods are following:-




  • Store-and-forward switching

  • Cut-through switching


Store-and-forward switching


In Store and Forward switching, Switch copies each complete incoming Ethernet frame into the switch memory. During the storage process, the switch analyzes the frame for information about its destination. Switch also computes trailer for  Cyclic Redundancy Check (CRC) for errors. If a Cyclic Redundancy Check (CRC) error is found. Then Ethernet frame is dropped and if there is no Cyclic Redundancy Check (CRC) error, the switch forwards the Ethernet frame to the destination device.


Store and Forward switching can cause a delay in switching since Cyclic Redundancy Check (CRC) is calculated for each Ethernet frame. CRC uses a mathematical formula, based on the number of bits (1s) in the frame, to determine whether the received frame has an error. After confirming the reliability of the frame, the frame is forwarded out to the right port, toward its destination. Discarding frames with errors reduces the amount of bandwidth consumed by corrupt data. Store-and-forward switching is required for Quality of Service (QoS)


Cut-Through Switching


In cut-through switching, the switch copies into its memory only the destination MAC address the frame before making a switching decision, to which port to forward the data. The destination MAC address is located in the first 6 bytes of the frame following the preamble. The switch looks up the destination MAC address in its switching table, determines the outgoing interface port, and forwards the frame onto its destination through the designated switch port. The switch does not perform any error checking on the frame. switch operating in cut-through switching mode reduces delay because the switch starts to forward the Ethernet frame as soon as it reads the destination MAC address. Problem-related with cut-through switching is that the switch may forward bad frames. Cut-through switching is the predominant switching method used on Cisco switches. There are two variants of cut-through switching:


Fast-forward switching


Fast-forward switching gives the lowest level of latency because switch immediately forwards a packet after reading the destination address. for the reason that fast-forward switching starts forwarding before the entire packet has been received, there may be times when packets are relayed with errors. This occurs infrequently, and the destination network adapter discards the faulty packet upon receipt. In fast-forward mode, latency is measured from the first bit received to the first bit transmitted. Fast-forward switching is the typical cut-through method of switching.


Fragment-free switching


Fragment-free switching is an advanced form of cut-through switching. The switches operating in cut-through switching read only up to the destination MAC address field in the Ethernet frame before making a switching decision. The switches operating in fragment-free switching read and store at least 64 bytes of the Ethernet frame before switching it to avoid forwarding Ethernet runt frames (Ethernet frames smaller than 64 bytes).  Fragment-free switching can be viewed as a compromise between store-and-forward switching and fast-forward switching. The reason fragment-free switching stores only the first 64 bytes of the frame is that most network errors and collisions occur during the first 64 bytes.Fragment-free switching tries to improve fast-forward switching by performing a small error check on the first 64 bytes of the frame.  Fragment-free switching is a compromise between the high latency and high integrity of store-and-forward switching; and the low latency and reduced integrity of fast-forward switching.


Some switches are configured to perform cut-through switching on a per-port basis until a user-defined error threshold is reached; and then they automatically change to store-and-forward. When the error rate falls below the threshold, the port automatically changes back to cut-through switching.


network switch frame forwarding