Network Basics: Switching and the OSI Model

As you may now be aware, switching fits into the OSI model at Layer 2. With switching and bridging happening at Layer 2, they deal with the MAC address information found in the Ethernet frames. If you go down to Layer 1, a device such as a repeater or hub simply takes the electrical impulse on the wire and amplifies the signal. A switch, on the other hand, reads the Ethernet frame into memory, reconstructs it, and retransmits it out of the destination port (or all ports, in the case of a broadcast frame).


Switches support the following three basic types of forwarding mechanisms:



  • Store-and-forward switching: A process by which the switch reads the entire Ethernet frame into memory before examining it, at which time the switch will identify the destination address and make a forwarding decision. This type of switching provides two benefits: The switch is assured of a complete frame and no collision will occur on the network before sending the data. The drawback is a slight delay on forwarding of the data.



  • Cut-through switching: With this process, a forwarding decision is made as soon as enough of the frame is read, which can be as little as 17 bytes of data past the preamble. From that much data, the switch can identify the difference among Ethernet II, IEEE 802.3, IEEE 802.2, and Ethernet_SNAP frame types. After this difference is identified, the process of forwarding the frame to its destination can begin.


    Depending on the type of frame and the use of Access Control Lists (ACLs), a total of 54 bytes of data can be read. This condition can significantly reduce the delay in forwarding data to its destination, because without the store-and-forward delay, you can approach true wire speed. The problem occurs when you experience a collision on your network for a data frame that is partially forwarded, making the work done forwarding the frame useless.


    This issue is mitigated on networks that are entirely switched because collisions will occur only when you have two or more devices connected with a hub that is then connected to a port on a switch. By eliminating hubs on your network, you eliminate collisions.



  • Fragment-free switching: This process is similar to cut-through, with the exception that the forwarding decision is not made until the first 64 bytes of the data frame are read and are collision free. After 64 bytes are read, the switch has enough data to forward a legal frame because Ethernet requires frames to be at least 64 bytes.


    On a fully switched network, this process does not provide a benefit over cut-through switching. However, if the chance for collisions is high, this process is preferable to cut-through switching because it prevents forwarding frames that are less than the minimum Ethernet size. (These illegally sized frames are called runts.)




Both switching methods that forward data before the entire frame is read into the switch have a critical flaw when dealing with the integrity of the Ethernet frame. The last piece of data is the FCS, or Frame CheckSum, which is used to verify that the Ethernet frame that has arrived at the switch has not been altered or changed through a network error.


Because the switch has not read the entire frame, the switch is not able to calculate a checksum or compare it to the FCS found at the end of the frame. Frames with a failed checksum should not be forwarded; but in this case, most of the switch has already been forwarded by the time the switch knows the checksum is wrong.


Because of the speed of the current switches, you will likely find that most switches on the market, like Cisco’s switches, use the store-and-forward method of passing data because the new speeds of moving data internally in the switch outweigh the cost of forwarding bad data.




dummies

Source:http://www.dummies.com/how-to/content/network-basics-switching-and-the-osi-model.html

No comments:

Post a Comment