Comparison of Layer 3 Switch, Layer 3 Switch and Router

1. Layer 2 switching technology

The Layer 2 switch is a data link layer device that can read the MAC address information in the data packet and exchange it according to the MAC address. There is an address table inside the switch. This address table shows the correspondence between the MAC address and the switch port. When the switch receives a packet from a port, it first reads the source MAC address in the packet header so that it knows which port the machine of the source MAC address is connected to, and it reads the destination MAC in the packet header. Address, and find the corresponding port in the address table, if there is a port corresponding to the destination MAC address in the table, then copy the packet directly to this port, if the corresponding port can not be found in the table, then the data packet Broadcast to all ports. When the destination machine responds to the source machine, the switch can learn which port a destination MAC address corresponds to. When the data is transmitted next time, it no longer needs to broadcast to all ports. The Layer 2 switch establishes and maintains its own address table. Because Layer 2 switches generally have a very wide switching bus bandwidth, data can be exchanged for many ports at the same time. If the Layer 2 switch has N ports and the bandwidth of each port is M, and its bus bandwidth of the switch exceeds N×M, then the switch can achieve line-speed switching. Layer 2 switches do not restrict broadcast packets. Broadcast packets are copied to all ports.
The Layer 2 switch generally includes an ASIC (Application Specific Integrated Circuit) chip specially designed for processing packet forwarding, so the forwarding speed can be achieved very quickly.

2. Routing technology

The router is the third layer in the OSI Layer 7 network model - the network layer operates. There is a routing table inside the router. This table shows where to go if you want to go somewhere. The router receives a packet from a port. It first removes the packet header from the link layer (unpacking), reads the destination IP address, and then looks up the routing table. If it can determine where to send the packet, then add the link. The packet header (packet) of the road layer forwards the packet; if it cannot determine the next address, it returns a message to the source address and discards the packet.
Routing technology and Layer 2 switching look somewhat similar. The main difference between routing and switching is that switching takes place on the second tier of the OSI reference model (data link layer), and routing occurs on the third tier. This difference determines that routing and switching need to use different control information in the process of data transmission, so the two methods to achieve their respective functions are different.
Routing technology is actually composed of two basic activities, namely, determining the optimal path and transmitting data packets. Among them, the transmission of data packets is relatively simple and direct, and the determination of routing is more complicated. The routing algorithm writes various kinds of information in the routing table. The router will select the best path according to the destination of the data packet to reach and send the data packet to the next router that can reach the destination. When the next router receives the packet, it also looks at its destination and uses the appropriate path to continue to the next router. And so on until the data packet reaches the final destination.
Routers can communicate with each other and can maintain their own routing tables by transmitting different types of information. The route update information main is such a kind of information, generally consists of part or all of the routing tables. By analyzing the routing update information sent by other routers, the router can grasp the topology of the entire network. Link state broadcast is another type of information that is passed between routers. It can notify other routers of the link status of the sender of the message.

3. Three-tier exchange technology

A device with a Layer 3 switching function is a Layer 2 switch with layer 3 routing functions. However, it is an organic combination of the two. It does not simply superimpose the hardware and software of the router device on the LAN switch. on.
From the hardware point of view, the interface modules of Layer 2 switches exchange data through high-speed backplanes/buses (up to tens of Gbit/s in speed). In Layer 3 switches, the layer 3 routing hardware related to routers. The module is also plugged into the high-speed backplane/bus. This way, the routing module can exchange data with other modules that need to be routed at high speed, thus breaking the limitations of traditional external router interface speeds. On the software side, Layer 3 switches also have major initiatives. They define traditional software-based router software. The approach is: For packet forwarding: For example, IP/IPX packet forwarding, these regular processes go through hardware. To achieve high speed.
For Layer 3 routing software, such as routing information updates, routing table maintenance, routing calculations, routing and other functions, using optimized and efficient software.

Assuming that two machines using the IP protocol communicate through the Layer 3 switch, machine A knows the destination IP address when it starts sending, but it does not know the MAC address needed to send it on the LAN. Address Resolution (ARP) is used to determine the destination MAC address. Machine A compares its own IP address with the destination IP address and extracts the network address from the subnet mask configured in its software to determine if the destination machine is in the same subnet as itself. If destination machine B is in the same subnet as machine A, A broadcasts an ARP request and B returns its MAC address. After A obtains the MAC address of destination machine B, it caches the address and uses the MAC address to forward the packet. The Layer 2 switching module looks up the MAC address table and determines to send the data packet to the destination port. If the two machines are not in the same subnet, if sending machine A wants to communicate with destination machine C, sending machine A will send an ARP packet to the "default gateway", and the IP address of "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 machine A broadcasts an ARP request to the IP address of the “default gateway”, if the layer 3 switching module has obtained the MAC address of the destination machine C during the previous communication process, it will reply C to the sending machine A. MAC address; otherwise, the Layer 3 switching module broadcasts an ARP request to the destination machine based on the routing information. After the destination machine C obtains the ARP request, it returns its MAC address to the Layer 3 switching module. The Layer 3 switching module saves the address and returns Send machine A. Later, when data packets are forwarded between A and C, they will be encapsulated with the MAC address of the final destination machine, and the data forwarding process will be completely passed to the second layer for exchange. The information will be exchanged at high speed. There are so-called one-way routings and many exchanges.

The third layer of exchange has the following salient features:

The combination of organic hardware accelerates data exchange;

Optimized routing software makes the routing process more efficient;

In addition to the necessary routing decision process, most of the data forwarding process is handled by Layer 2 switching;

When multiple subnets are interconnected, they are only logically connected to the third-tier switching module, unlike traditional external routers, which require ports to be added to protect the user's investment.


4. Comparison of three technologies


It can be seen that Layer 2 switches are mainly used in small local area networks, and the number of machines is less than 20 or 30. Under such a network environment, broadcast packets have little effect, and the fast switching function of Layer 2 switches, multiple access ports, and The low modest price provides a perfect solution for small network users. In such a small network, there is no need to introduce a routing function to increase the difficulty and cost of management. Therefore, there is no need to use a router, and of course, there is no need to use a three-layer switch.

The Layer 3 switch is designed for IP. It has a simple interface type and has a very strong Layer 2 packet processing capability. Therefore, it is suitable for large-scale LANs. In order to reduce the harm of broadcast storms, the large-scale LAN must be classified as a function or geographical area. A small LAN, that is, a small network segment, this will inevitably lead to a large number of mutual visits between different network segments, simply using a two-tier switch can not achieve mutual access between the network and simply use the router, due to the number of ports Limited, routing speed is slow, and it limits the size of the network and access speed. Therefore, in this environment, a three-layer switch formed by the combination of Layer 2 switching technology and routing technology is most suitable.

Routers have many types of ports, support many Layer 3 protocols, and have strong routing capabilities. Therefore, they are suitable for interconnection between large-scale networks. Although many Layer 3 switches and even Layer 2 switches have interconnection ports for heterogeneous networks, they are generally There are not many interconnected ports on a large network. The main function of interconnected devices is not to perform fast switching between ports, but to choose the best path for load sharing, link backup, and most importantly, routing information with other networks. Exchange, all these are the function that the route finishes. In this case, it is naturally not possible to use Layer 2 switches, but whether to use Layer 3 switches depends on the circumstances. The main factors that affect the network traffic, response speed requirements and investment budgets. The most important purpose of the Layer 3 switch is to speed up the data exchange within the large LAN. The routing function incorporated into this service serves this purpose. Therefore, its routing function is not as strong as a professional router with the same level. In the case of large network traffic, if the three-tier switch does both intra-network and intra-network routing, it will inevitably greatly increase its burden and affect the response speed. In the case that the network traffic is large, but the response speed is high, the switching is performed within the network by the three-layer switch. The router is responsible for the routing between the networks. This can give full play to the advantages of different devices and is a good one. Cooperate. Of course, if you are limited by the investment budget, it is also a good choice for the three-tier switch to do inter-network interconnection.

Glass Chandelier

Glass chandelier is cool, fashion and colorful chandelier, and there are DIY glass chandeliers that you can develop flexibility by your hands, bringing you a lot of DIY pleasure. We provide kinds of chandeliers, such as clear color glass chandelier, mixed color glass chandelier, art glass chandelier glass Floor Lamp, home style glass chandelier, etc. The glass chandelier we supplied are all perfect accessory for you.

The glass chandeliers are all textured popular designs in the market. Different from traditional crystal chandeliers, their quality is more focused on the glass shape. It is popular for hotel, home, villa, shopping mall and any other kind of places.

Glass Chandelier,custom glass chandelier,hotel large glass chandelier,glass chandelier Manufacturer in China

Guangdong Lavius Lighting Co., Ltd. , https://www.lovuslight.com