Frame forwarding:
The concept of exchange in networks and telecommunications
The frame on the Ethernet contains the source MAC address and the destination MAC address. The switch receives the frame from the source device and quickly sends it to the destination address. The basic concept of exchange refers to devices that make decisions based on the following two guidelines:
· Enter (ingress) port
· Destination Address
The term ingress is used to describe a frame entering a device through a specific port,egress used to describe the device leaving the device through a specific port. When a switch makes a forwarding decision, it is based on the entry port and the destination address of the message.
The LAN switch maintains a table that determines how the data stream is forwarded. The only smart part of a LAN switch is to use this table to forward based on the incoming port and destination address of the message. A LAN switch has only one primary interchange table that defines the address and port, so that messages from the same destination address will always depart from the same exit, regardless of the ingress port.
Dynamic update of MAC Address Table
A switch to know which port to use to transfer frames, you must first learn which devices are on each port. As the switch learns about the port-to-device relationship, it establishes a table of MAC addresses, or a Content addressable storage table (CAM). Cam is a specific type of memory that is applied to high-speed search applications. The switch logs the MAC address of the device connected to its port to the Mac table, and then uses the information in the table to send the frame to the output port device, which is assigned to the device.
The simple word of remembering the switch operation mode is that the switch learns "source address" and forwards it based on "destination address" . When the frame enters the switch, the switch "learns" to receive the source MAC address of the frame and adds this address to the MAC address table, or refreshes the aging register of the MAC Address table entry that already exists; Subsequent messages can be forwarded according to this table if they go to that MAC address. When frame forwarding, the switch checks the destination MAC address and compares it to the address in the MAC address table. If the address is in a table, forward to the port that corresponds to the MAC address in the table. If the destination MAC address is not found in the table, the switch forwards to all ports except the ingress port flooding (flooding). In a network with multiple interconnect switches, the MAC Address Table records multiple MAC addresses for a port connected to another switch.
The following steps describe how to update the MAC Address table:
1. The switch receives a frame from PC 1 at Port 1.
2. The switch checks the source MAC address and compares it to the MAC address table.
· If the address is not in the table, the switch associates the source MAC address of PC 1 to the Ingress port (Port 1) in the MAC Address table.
· If the MAC Address table entry for the source address already exists, the switch resets the aging timer. Typically, a table entry is kept for 5 minutes.
3. After the switch records the source address information, check the destination address
· If the destination MAC address is not in the table key or if it is a broadcast MAC address, the switch floods the frame (flood) to all ports except the ingress port.
4. Target device (PC 3) returns a unicast frame with the destination address of PC 1.
5. In the Switch Address table, enter the source MAC address of PC 3 and the port number to enter it. Locate the destination address of the frame and the associated output port in the table entry.
6. The switch can now transfer frames between the source and target devices without flooding, because table entries in the Address table that specify the associated port already have.
Switch Forwarding mode:
Store-and-forward switching (Store-and-forward)
A switch running in store-and-forward mode reads the entire frame of data into memory before sending the message and checks its correctness. Although this approach takes more time than a passthrough approach, it is possible to store the forwarded data in such a way that it can be used to ensure accuracy. Because the switch running in store-and-forward mode does not propagate error data, it is more suitable for large LANs. There are two main features of the storage and forwarding mode that differ from the Passthrough forwarding mode:
Error control:
The switch using the storage and forwarding technology makes error control of the incoming frame. After the entry port receives a full frame, the switch compares the frame check sequence (frame check sequence, FCS) of the datagram's last field with its FCS. The FCS validation process is used to help ensure that frames have no physical and data link errors, and if the frame checksum is correct, the switch forwards. Otherwise, discard.
Auto cache:
The store-and-forward switch supports a hybrid connection of different rate Ethernet by entering the port cache. For example, by receiving a frame at 1gb/s rate and forwarding it to a Gigabit Ethernet port, you need to use a storage-forwarding method. When the entry does not match the output port rate, the switch places the entire frame content in the cache, calculates the FCS checksum, and forwards the frame to the output cache.
The primary switching mode for Cisco is storage-and-forward switching.
Passthrough Switching (Cut-through)
One advantage of passthrough switching is that it is faster than storage-and-forward technology. A switch with Passthrough mode reads the frame header before it receives the entire packet and decides which port to send the data to. There is no need to cache data or check the integrity of the data. There are two main features of this switching method: Fast frame forwarding and invalid frame handling.
Fast Frame forwarding:
As shown, once the switch finds the destination MAC address in the MAC Address table, it makes a forwarding decision immediately. Without waiting for the rest of the frame to enter the port and make a forwarding decision.
Switches with pass-through mode can quickly determine whether it is necessary to check more parts of the frame header for additional filtering purposes. For example, the switch can check the first 14 bytes (source MAC address, destination Mac, Ethernet Type field), and 40 bytes after it to implement IPV4 three-and four-tier related functions.
Invalid frame handling:
For most invalid frames, the passthrough switch does not discard it. The error frame is forwarded to another network segment. If there is a high error rate (invalid frame) in the network, passthrough switching can adversely affect bandwidth, and corruption and invalid frames can cause bandwidth congestion. In the case of congestion, such a switch must be cached like a store-and-forward switch.
No fragmentation forwarding (Fragment free)
Non-fragmentation forwarding is an improved mode of the Passthrough mode. The switch forwards checks if the frame is larger than 64 bytes (less than dropped) to ensure no fragmentation of the frame. The no-fragmentation method has better error detection than a pass-through method, but does not actually increase the delay. It is more suitable for high-performance computing applications where process-to-process latency is less than 10 milliseconds.
Switch domain:
The two terms that the switch is more likely to confuse are conflict domains and broadcast domains. This section describes the two important concepts that affect LAN performance.
Conflict domain
Sharing the same network segment between devices is called a conflict domain. A conflict may occur because more than two devices in the network segment are trying to communicate simultaneously. Using switches that work at the data link layer isolates the conflicting domains of each segment and reduces the number of devices competing for bandwidth. Each port of the switch is a new network segment because there is no need to compete between the devices that are plugged into the port. As a result, each port represents a new conflict domain. Devices on a network segment can use more bandwidth, and conflicts within a conflict domain do not affect other network segments, which is also a micro-network segment.
As shown, each switch port is connected to a single host, and each switch port represents an isolated conflict domain.
Broadcast domain
Although the switch filters most frames by MAC address, they do not filter the broadcast frames. After a switch on a LAN receives a broadcast packet, it must flood all ports. The interconnected set of switches forms a broadcast domain. Network layer devices, such as routers, can isolate two-tier broadcast domains. Routers can isolate conflicts and broadcast domains at the same time.
When the device issues a two-layer broadcast packet, the destination MAC address in the frame is set to the full binary number, and all devices in the broadcast domain receive the frame. The second-level broadcast domain is also known as the Mac broadcast domain. The Mac broadcast domain contains all the devices on the LAN that receive broadcast frames. Broadcast traffic can bring a storm of broadcast. Especially in the network segments with different rates, the broadcast traffic generated by high-speed network segments can lead to severe congestion and even collapse of low-speed segments.
Network basic Skills (ii): detail switch