When can we use the third-layer Switching Module and what exactly is the third-layer Switching Module? The following is like introducing these things and knowledge, I hope everyone can learn and think.
It can be seen that L2 switches are mainly used in small LAN, and the number of machines is less than two or thirty. In such a network environment, broadcast packets have little impact, the Quick Switch Feature of L2 switches, multiple access ports, and low prices provide a perfect solution for small network users.
In such a small network, there is no need to introduce the routing function to increase the management difficulty and cost, so there is no need to use a router, of course, there is no need to use a layer-3 switch. A layer-3 switch is designed for IP addresses. It has a simple interface type and has a strong layer-2 packet processing capability. Therefore, it is suitable for large-scale LAN.
To reduce the dangers of broadcast storms, you must divide a large LAN into a small LAN based on factors such as functions or regions, that is, a small network segment, this will inevitably lead to a large number of mutual access between different network segments. Simply using a layer-2 switch can not achieve mutual access between networks, but simply using a router.
Because the number of ports is limited, the routing speed is slow, and the network size and access speed are limited, in this environment, A layer-3 switch that combines L2 switching and routing is the most suitable. Vro has many port types, supports many layer-3 protocols, and has strong routing capabilities. Therefore, vro is suitable for interconnection between large networks.
Although many layer-3 switches or even layer-2 switches have interconnect ports in Heterogeneous Networks, generally there are not many interconnect ports in large networks. The main function of the interconnect device is not to perform fast exchange between ports, instead, you need to select the best path for load balancing, link backup, and most importantly, exchange routing information with other networks. All these are routing functions.
In this case, it is naturally impossible to use the layer-3 Switch module. However, whether or not a layer-3 switch is used depends on the actual situation. The main factors are network traffic, response speed requirements, and investment budget. The most important purpose of a layer-3 switch is to speed up data exchange within a large LAN.
The merged routing function also serves this purpose, so its routing function is not as powerful as a professional router of the same grade. When the network traffic is high, if a layer-3 Switch performs both in-network switching and inter-network routing, it will inevitably increase the load on it and affect the response speed.
When the network traffic is large but the response speed is high, the layer-3 Switch performs Intranet switching, and the router is responsible for inter-network routing, in this way, we can make full use of the advantages of different devices. Of course, if the investment budget is limited, it is also a good choice to connect networks with layer-3 switches.
A device with layer-3 switching is a layer-2 switch with layer-3 routing, but it is an organic combination of the two, it is not simply to overlay the hardware and software of the router device on the LAN switch.
From the hardware point of view, the interface modules of the second layer switch exchange data through the High-Speed Backplane/bus speed up to dozens of Gbit/s). In the third layer switch, the router-related layer-3 Routing hardware module is also inserted on the high-speed backplane/bus.
This method enables the routing module to exchange data with other modules to be routed at a high speed, thus breaking the speed limit of the traditional external router interface. In terms of software, layer-3 switches also have significant initiatives, which define traditional software-based router software.
The practice is:
For packet forwarding, such as IP/IPX packet forwarding, these regular processes are implemented through hardware at a high speed. For layer-3 routing software, such as route information update, route table maintenance, route calculation, and route determination, Use optimized and efficient software.
Assume that two machines that use the IP protocol communicate with each other through the layer-3 Switch. Machine A knows the destination IP address when sending the message, but does not know the MAC address required to send the message on the LAN. Use address resolution ARP) to determine the target MAC address.
Machine A compares its IP address with the target IP address, extracts the network address from the subnet mask configured in its software, and determines whether the target machine is in the same subnet as itself. If the destination machine B and machine A are in the same subnet, A broadcasts an ARP request.
B returns its MAC address. A obtains the MAC address of the target machine B, caches the address, and uses the MAC address to package and forward data, the second layer switch module finds the MAC address table and determines to send data packets to the destination port. If two machines are not in the same subnet, if machine A needs to communicate with machine C, machine A must send an ARP packet to the "Default Gateway, the IP address of the "Default Gateway" has been set in the system software.
This IP address actually corresponds to the layer-3 Switch module of the layer-3 switch. Therefore, when sending an ARP request to the IP address of the "Default Gateway" from machine A, if the layer-3 Switch module obtains the MAC address of the target machine C during the previous communication, then the MAC address of C is sent to machine;
Otherwise, the layer-3 Switch module broadcasts an ARP request to the target machine based on the route information. The target machine C obtains this ARP request and replies its MAC address to the layer-3 Switch module, the layer-3 Switch module saves the address and replies to the sender machine.
Later, when data packets are forwarded between A and C, they are encapsulated with the MAC address of the destination machine. The data forwarding process is all forwarded to the second layer for exchange, enabling high-speed information exchange. The so-called one-time routing and multiple exchanges.