Switch and router's distinction (reproduced)

xiaoxiao2021-03-06  55

Computer networks are often connected by many different types of networks. If several computer networks are only physically connected, they cannot communicate, then this "interconnect" is not practical. Therefore, when it comes to "interconnection", it has already implicit that these interconnected computers can communicate, that is, from functional and logically, these computer networks have already formed a large computer network, or It is also known as the Internet, which is also referred to as the Internet, the interconnection network.

Connect the network to each other to use some intermediate equipment (or intermediate systems), ISO's terminology is called a Relay system. According to the level where the relay system is located, there may be the following five relay systems:

1. Physical layer (i.e., the first layer, layer L1) relay system, that is, a repeater.

2. The data link layer (ie the second layer, layer L2), that is, a bridge or bridge (Bridge).

3. Network layer (third layer, layer L3) relay system, that is, router.

4. Bridge and router's mixture bridges and network bridges and routers.

5. The relay system above the network layer, the gateway.

When the relay system is a transponder, it is generally not called network interconnection because this is just a network, and this is still a network. High-rise gateways are currently used in complicated. Therefore, it is generally discussed that the network interconnects refers to the Internet that interconnects with the switch and router. This paper mainly describes the switch and router and its differences.

2 switches and routers

"Switching" is a word that has the highest frequency in today's network. From the bridge to the path to ATM until the telephone system, no matter what kind of occasions, it can be used, and it is true to exchange. In fact, the word exchange first appears in the telephone system, specifically refers to the exchange of voice signals between two different telephone, and the equipment that does this work is a telephone switch. So in contentive, exchange is just a technical concept, that is, the completion signal is forwarded by the equipment entrance to the export. Therefore, all devices that conform to this definition can be referred to as switching devices. It can be seen that "exchange" is a wide range of words that actually refer to a bridging device when it is used to describe the device second layer of the data network; and when it is used to describe the third layer of the data network When the device is, it refers to a routing device.

The Ethernet switch we often is actually a multi-port second-layer network device based on bridge technology, which provides low-delay, low overhead pathways from a forward to another any port.

It can be seen that there should be a swap matrix at the core of the switch, providing a passage between any two ports, or a fast switching bus to deliver the data frame received by any port from other ports. In actual equipment, the function of swap matrix is ​​often completed by a special chip (ASIC). In addition, the Ethernet switch has an important assumption in design ideas, that is, the speed of the exchange core is very fast, so that the usual large flow data will not cause congestion, in other words, the exchange of exchanges is relative to the amount of information Innovation (contrary to this, the idea of ​​the ATM switch is designed, and the ability to exchange the exchange is limited in the amount of information).

Although the Ethernet second-layer switch is based on multi-port bridge development, it has been exchanged with a richer feature, which is not only the best way to get more bandwidth, but also make it easier to manage. The router is a packet switching device (or network layer relay device) in the network layer of the OSI protocol model, and the basic function of the router is to transmit data (IP packets) to the correct network, including:

1. The forwarding of the iP datagram, including the diameter and transmission of the datagram;

2. Subnet isolation, suppress broadcast storm;

3. Maintain the routing table and exchange routing information with other routers, which is the basis for IP packet forwarding.

4. IP datagical error handling and simple congestion control;

5. Filtering and billing for IP datagrams.

The side focus of the role of the router is different for the network of different places.

On the backbone, the main role of the router is routing. The router on the backbone network must know the path to all lower networks. This requires a huge routing table and makes it possible to respond as quickly as possible. The fault of the router will lead to serious information transmission issues.

In the regional network, the main role of the router is network connection and routing, that is, connect the lower layer network units - park network, while responsible for data forwarding between the lower network.

The main role of the router is to divide the net. Early interconnect base units are local area network (LAN), where all hosts are in the same logical network. As the network scale continues to expand, the local area network evolves into a garden network composed of multiple subnets connected to high-speed trunk and router. In this, the subnet is logically independent, while the router is the only device that can separate them, it is responsible for the forwarding and broadcast isolation of the subnet, and the router on the boundary is responsible for connecting to the upper network.

3 Differences between the second layer switch and the router

Traditional switches are developed from the bridge, belong to the second layer of the OSI, the data link layer device. It is based on the MAC address, selects routes through the station, and the establishment and maintenance of the stop is automatically performed by the switch. The router belongs to the third layer of the OSI, which is addressed according to the IP address, generated by the routing table routing protocol. The maximum benefit of the switch is fast. Because the switch only needs to identify the MAC address in the frame, it is easy to select the forwarding port algorithm according to the MAC address, which is easy to implement, so the forwarding speed is extremely high. But the work mechanism of the switch also brings some problems.

1. Current: According to the switch address learning and stop establishment algorithm, there is no way to exist between the switches. Once there is a loop, the generated tree algorithm must be started, block the port generated to generate the loop. The router's routing agreement does not have this problem, and there are multiple paths between the routers to balance the load and improve reliability.

2. Load Concentration: There is only one passage between the switches, so that the information is concentrated on a communication link and cannot be dynamically allocated to balance the load. The router's routing protocol algorithm can avoid this, but the OSPF routing protocol algorithm can not only produce multiple routes, but also choose the different optimal routes for different network applications.

3. Broadcast control: The switch can only shrink the conflict domain without narrowing the broadcast domain. The entire switched network is a large broadcast area, broadcasting the literary scattered to the entire switched network. The router can isolate the broadcast domain, and the broadcast packet cannot continue to broadcast through the router. 4. Subnet Division: The switch can only identify the MAC address. The MAC address is a physical address, and a flat address structure is used, so it cannot be divided according to the MAC address. The router identifies the IP address, the IP address is allocated by the network administrator, and the IP address has a hierarchy. It is divided into a network number and host number. It can be very convenient to divide the subnet, the main function of the router is used for Connect different networks.

5. Confidentiality Problem: Although the switch can also filter the frame according to the source MAC address of the frame, the destination MAC address, and other frames, the router can be reported to the source IP address, destination IP address, TCP port address, etc. according to the source IP address of the packet. Text is filtered, more intuitive and convenient.

6. Media Related: The switch can also perform conversion between different link layers and physical layers as bridging devices, but this conversion process is more complicated, not suitable for ASIC implementation, will now reduce the forwarding speed of the switch. The current switch mainly completes the network interconnection of the same or similar physical media and link protocols, and is not used to interconnect between the physical media and the link layer protocol. The router is different, it is mainly used between interconnection between different networks, thereby connecting different physical media, link layer protocols, and network layer protocols. Although the router is functioning, it takes advantage of it, but the price is expensive, the packet forwarding is low.

In recent years, the switch has made many improvements to improve performance, and the most prominent improvement is a virtual network and a three-layer exchange.

Divided subnets can reduce the broadcast domain to reduce the impact of broadcast storm on the network. Each interface of the router is connected to a subnet, and the broadcast message cannot be broadcast through the router. The subnet connected to the router is different subnets, and the subnet range is physically divided by the router. For the switch, each port corresponds to a network segment, and since the subnet is composed of several network segments, the subnet can be logically divided by a combination of the switch port. Broadcast messages can only broadcast in subnet, and cannot spread to other subnets, and achieve the purpose of controlling broadcast by reasonable partial logic subnet. Since the logical subnet is arbitrarily combined by the switch port, there is no physical correlation, it is called a virtual subnet, or a virtual network. Virtual network technology does not need a router to address the isolation problem of broadcast packets, and the virtual network segment is independent of its physical location, that is, adjacent network segments can belong to different virtual networks, and two network segments that are far apart may belong to different virtual The network, and the two network segments that are far apart may belong to the same virtual network. The terminals within different virtual networks cannot communicate with each other, enhance access control of data within the network.

Switches and routers are the contradiction between performance and function, the switch exchange speed, but the control function is weak, the router is controlled, but the packet forwarding is slow. The latest technology to solve this contradiction is three-layer exchange, existing switching machine line speed forwarding message capabilities, and has a good control function of the router.

4 distinction between third floors and routers

Before the third layer exchange technology, there is almost no need to distinguish the routing function and the router. They are completely the same: providing routing functions are working in the router, however, the third-layer switch is fully able to perform the larger router Most functions. As a network interconnected device, the third layer switch has the following characteristics: 1. Forward traffic based on the third layer address;

2. Fully exchange function;

3. You can complete special services, such as packet filtering or certification;

4. Execute or do not perform routing processing.

The third layer switch has the following advantages compared to the traditional router:

1. Subnet transmission bandwidth can be arbitrarily allocated: the traditional router connects one subnet for each interface, and the subnet is transmitted by the router by the bandwidth of the interface. The three-layer switches are different. It can define multiple ports into a virtual network, which consists of multiple ports as a virtual network interface, which can be given to a three-layer switch by constituting the port of the virtual network. Since the port number can be arbitrarily specified, the subnet transmission bandwidth is not limited.

2. Reasonable configuration information: Since the resource rate of accession subnet is not different from the resource rate in the global network, the Subnet Sets a separate server, and the server group is set by setting the server group in the global network, but also a reasonable configuration. information resource.

3. Reduce cost: The usual network design is used as a subnet, and the sub-network interconnection is performed using the router. The network design is currently using a three-layer switch, which can be used for any virtual subnet divide, but also through the three-layer routing function of the switch, which saves the price expensive router.

4. Connection between the switches is flexible: as a switch, there is no way to exist, as a router, but also multiple pathways to improve reliability, balance the load. The three-layer switch blocks the port of the loop with the generated tree algorithm, but when the routing is selected, the blocking path is still involved in the route selection.

5 Conclusion

In summary, the switch is generally used for the LAN-WAN connection, the switch is attributed to the bridge, and is a device of the data link layer, and some switches can also implement the third layer exchange. The router is used for the connection between WAN-WANs, which can solve the forwarding group between the heterogeneous networks, which acts on the network layer. They just accepted the input packet on a line and then forwarded to another line. These two lines may be divided into different networks and use different protocols. In contrast, the function of the router is powerful than the switch, but the speed is relatively slow, the price is expensive, the third-layer switch has both switch line speed forwarding packets, and there is a good control function of the router, so broadcast applications.

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

New Post(0)