Hub, router, switch, layer-3 Switch Technology)

Source: Internet
Author: User

A hub is an important part of a LAN. It is the connection point of a network connection. The basic working principle is to use the broadcast technology, that is, after the hub receives a packet from any port, it broadcasts the packet to all other ports, the Hub does not remember which MAC address the information package is attached. Nic connected to the hub port performs the corresponding action according to the functions required by the information package, which is controlled by the network layer. The broadcast technology mentioned above means that the hub sends the information packet to all other ports in the form of broadcast, rather than changing the packet to a broadcast data packet.

The working principle of the hub is similar to that of a courier in reality. The courier only transmits a letter based on the address on the envelope, does not care about the content of the letter and whether the recipient replies, whether or not the recipient did not reply for some reason, causing the sender to be anxious. The only difference is that the courier will return the email when he cannot find the address, and the hub is only responsible for forwarding the email regardless of the Bounce Message.


A Router operates at the network layer, the third layer in the OSI Layer-7 network model. It works by removing the information of the second layer (data link layer) of a packet (including a broadcast packet) received on the Network (called "unpacking "), and view the layer-3 Information (IP address ). Then, the route of the data packet is determined based on the route table, and then the security access table is checked. If it can pass, the second-layer information is encapsulated (also known as "packaging "), the packet is finally forwarded. At this time, if the network address of the corresponding MAC address cannot be found in the routing table, the router will return a message to the site of the source address, and then discard the packet.

According to the working principle of the router, the role of the router is very similar to that of the switch and bridge. However, unlike switches that work on the physical layer and divide network segments physically, vrouters use specialized software protocols to logically divide the entire network. For example, a router that supports the IP protocol can divide the network into multiple sub-network segments. Only network traffic directed to a Special IP Address can pass through the router. The router recalculates the verification value for each received packet and writes it to a new physical address. Therefore, using a vro in a network to forward and filter data is usually slower than simply viewing the physical address of a data packet. However, for networks with complex network structures, using routers to connect to the network can improve the overall efficiency of the network. Another obvious advantage of a vro is that it can automatically filter network broadcasts, but in general, the installation process of adding a vro to a network is much more complicated than that of a plug-and-play vswitch.


The switch can check each received packet and process the packet accordingly. The physical address of all nodes in each CIDR block is stored in the vswitch, which only allows necessary network traffic to pass through the vswitch. For example, after a vswitch receives a data packet, it needs to check the sender address and receiver address contained in the Data Packet according to its own network address table. If the receiver address is in the sender's address segment, the packet will be discarded by the switch and will not be transmitted to other network segments through the switch. If the receiver address and the sender address belong to two different network segments, the packet will be forwarded to the destination CIDR block by the switch. In this way, we can use the filter and forwarding functions of the switch to avoid network broadcast storms and reduce the occurrence of incorrect packets and wrong packets.

In the actual network component process, whether to select a switch or other network components depends on the different roles of different components in the network. Vswitches play an important role in the network. First, the switch can divide the original network into multiple sub-networks, which can expand the effective transmission distance of the network and support more network nodes. Second, using vswitches to divide networks can also effectively isolate network traffic, reduce network conflicts, and alleviate network congestion. However, when a vswitch is used to process data packets, the processing delay is inevitable, therefore, blind use of vswitches without any need may actually reduce the performance of the entire network.

Layer 3 Exchange Technology

The layer-3 Exchange Technology (also known as multi-layer exchange technology or IP address exchange technology) is proposed in comparison with the traditional exchange concept. As we all know, the traditional exchange technology operates on the data link layer, the second layer of the OSI network standard model, and the multi-layer exchange technology implements high-speed packet forwarding in the network model. To put it simply, the multi-layer switching technology is Layer 2 switching technology + Layer 3 forwarding technology, or combining the data packet processing functions of traditional routers with the speed advantages of switches.

It is not difficult to understand the principle of layer-3 switching technology. We can assume that a host a and B previously communicated through a switch. If the switch can support layer-3 switching, then it records the IP addresses of A and B and Their MAC addresses. When other host C wants to communicate with host a or host B, after the switch receives the addressing packet sent by C, it will send it back to C without thinking about it and tell it the MAC address of host a or host B, then host C will use the MAC address of host a or host B to communicate directly.

Because the communication parties do not "package" or "package" through the vro, the host a, B, or C may belong to different subnets, they can also directly know the MAC address of the other party for communication. The most important thing is that layer-3 switches do not spread broadcast packets like other switches, A layer-3 switch is called a layer-3 switch because it can understand layer-3 information, such as IP addresses and ARP. Therefore, a layer-3 switch can understand the purpose of a broadcast packet. Without spreading it out, it can also meet the needs of those who send the broadcast packet, (whether in any subnet ). Because the layer-3 switch does not perform any "split" packet operation, all data packets passing through it will not be modified and will be transferred to the destination at the switching speed. Therefore, the layer-3 switching technology can be used to achieve the network routing function and achieve optimal network performance according to different network conditions. We can believe that with the continuous development of network technology, layer-3 switches are expected to replace existing routers in large-scale networks.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.