Two forwarding methods of Ethernet switches

1. Cut-through switching

A pass-through Ethernet switch can be understood as a line matrix telephone switch with criss-crossing lines between each port. When it detects a data frame at the input port, it checks the header of the frame, obtains the destination Mac address of the frame (occupying 6B), starts the internal dynamic lookup table and converts it into the corresponding output port, and connects at the intersection of input and output. Pass the data packet directly to the corresponding port to realize the switching function without having to cache the entire frame before processing.

  • Since cut-through switching does not require storage, the delay is very small and the switching is very fast.

  • Cut-through switching directly forwards frames without checking for errors, and may forward some invalid frames to other hosts.

  • Since there is no cache, input/output ports with different rates cannot be connected directly, and packet loss is easy.

2. Store-and-Forward switching

The store-and-forward method is the most widely used method in the computer network field. It checks the data packets at the input port, takes out the destination address of the data packet after processing the error packet, and converts it into a packet sent out at the output port through a lookup table. Because of this, the store-and-forward method has a large delay in data processing, which is its shortcoming, but it can performerror detection on data packets entering the switch, effectively improve network performance. What is particularly important is that it can support conversion between ports of different speeds and maintain the cooperative work between high-speed ports and low-speed ports.

3.For example

For a 100Mbps Ethernet switch, when the output port has no queue and forwards an Ethernet frame (excluding the preamble) in cut-through
switching, The introduced forwarding delay is at least A. 0μs B. 0.48μs C. 5.12μs D. 121.44μs

The Ethernet Mac frame format is as follows:
Insert image description here

The physical layer also adds an 8B preamble in front of the Ethernet frame before sending it.
Given question:
- No queuing at the output port
- Cut-through switching
- No Including the preamble
, it can be deduced that as long as the destination MAC address of the Ethernet frame is received, the frame can be forwarded directly to the destination port without buffering the frame or checking the frame. The minimum forwarding delay introduced It is the time it takes to receive the destination MAC address (6B).
(6 x 8bit)/(100 x 10**6 bit/s)
= 0.48(us)

Guess you like

Origin blog.csdn.net/MrKingloveyou/article/details/126804443