Routing function, three-layer exchange of exchange performance ~

xiaoxiao2021-03-06  22

Three-layer meaning

"Three layers" in the three-layer switch refer to the three layers of the following three layers of the seven-layer reference model of the OSI (open system interconnection). If you want to understand three-story exchange, you must first understand the OSI reference model.

1, what is the OSI reference model

The OSI Reference Model is an international standardized organization to solve the model proposed by the interconnection of different systems. It divides the computer network as seven levels, which is the seven-layer model or seven-layer structure in network communication, and the names of each layer are shown in Figure 1. Indicated.

figure 1

There is an interdependent relationship between the OSI layers. If there is no underlying, the upper layer will also be present. Lift a light example. Data transmission on the network is like the underground channel, and must first level the first level step, then the first-level steps can complete the entire process, as shown in Figure 2.

2, OSI Reference Model and Network Equipment OSI Reference Model and Network Equipment, such as hub, switch, router, there is a corresponding relationship, Figure 3 is a corresponding map of the three-layer and network device and network device processing under the OSI model. . (1) The first layer-physical layer physical layer device is the lowest level of network equipment, mainly responsible for actual signal transmission, i.e., bitstream. For physical layer devices, it only knows the bitstream, as for what MAC address, IP address, it doesn't know anything. The hubs (HUB) currently use in some campus networks are typical physical layer devices. (2) The second layer-data link layer data link layer is responsible for establishing a data link connection on both hosts, transmitting data frames to the physical layer, and processing the signal without differential error and reasonably transmitted. The Switch in the campus network (SWITCH) is a typical data link layer device. For data link layer devices, it only knows frames and bitstreams (data below the second floor), as for IP addresses (three floors above things), it doesn't know. "Frame" is a second layer of data unit and is only meaningful in the second layer. The Layer 2 switch can only connect the IP address computer in the same subnet. If the computer's IP address is within different subnets, even if it is connected to the port of the same switch, although it is within easy reach, it is not possible to communicate with each other because The computer communicates with each other through the IP address, and the switch cannot recognize the IP address. (3) The third layer-network layer network layer is mainly responsible for routing, that is, the function of selecting the appropriate path. Router, which is often used in the network is a typical network layer device, which recognizes the three-layer address in the frame. For example, an IP address is "192.168.1.1" computer to communicate with computer "10.1.1.2", as they are not in the same subnet, must be communicated by router routing. The three-layer switching of the three-layer switch is proposed with respect to the traditional exchange concept. Conventional exchange techniques are operated in the Layer 2 (ie, data link layers) in the OSI network reference model, while the three-layer switching technology implements high speed forwarding of packets in the network model. Simply put, three-layer switching technology is a Layer 2 switching technology three-layer forwarding technology, the three-layer switch is "Layer 2 switch hardware-based router".

So how is the three-layer exchange implementation? The technical details of the three-story exchange are very complicated. It is impossible to explain it clearly, but you can simply understand the three-layer switch as a router and a two-layer switch, as shown in Figure 4. The two host communication in different subnets must be routed through the router. In FIG. 4, the first packet sent by the host A to the host B must be routed through the routing processor in the three-layer switch to reach the host B, but when the subsequent packet is sent to the host B, it is not necessary. After the routing processor is processed, because the three-layer switch has the function of "memory" route. The routing memory function of the three-layer switch is implemented by the routing cache. When a data package is sent to a three-layer switch, the three-layer switch first checks in its cached list, see if there is any record in the routing cache, if there is a record, directly to the cache record, but no longer passed The routing processor is processed, and the route speed of such packets is greatly improved. If the three-layer switch does not discover records in the routing cache, the data package is sent to the route processor, and then forward the packet after processing. Figure 4

The caching mechanism of the three-layer switch is very similar to the CPU's cache mechanism. Everyone has such an impression. It will be very slow when they run a large software after boot, but when the software is turned off, then run this software again, it will find that the running speed is greatly accelerated. For example, it is necessary to open Word. 5 ~ 6. Second, after the shutdown, open Word, it will be found that only 1 to 2 seconds can be opened. The reason is that there is a level of cache and secondary cache inside the CPU, which will temporarily store the most recently used data, so start up again than the first start. A three-layer switch with the "function of the router", although there is also a two-layer exchange and the characteristics of the three-layer routing, the three-layer switch and the router are still very different in structure and performance. On the structure, the three-layer switch is closer to the Layer 2 switch, but specializes in three-layer routing. The reason is called "three-layer switch" instead of "exchange router", the reason is here; in exchange performance, the router is much weaker than the exchange performance of the three-layer switches.

转载请注明原文地址:https://www.9cbs.com/read-65596.html

New Post(0)