Comprehensive comparison of layer-3 vswitches and vro networking Performance

Source: Internet
Author: User

Many people like to compare layer-3 vswitches with vrouters. In fact, from an objective point of view, they both play different roles in networking and play an important role. In order to adapt to the challenges brought by the deepening of network applications, the scale and speed of the network are rapidly developing. The speed of the LAN has increased from 10 Mbit/s to 100 Mbit/s, currently, Gigabit Ethernet technology is widely used. In terms of network structure, it has also evolved from an earlier LAN with shared media to the current LAN. The LAN technology enables dedicated bandwidth to be exclusive to users, greatly improving the efficiency of LAN transmission.

It can be said that in the network system integration technology, the first-layer interface and the second-layer exchange technology that are directly oriented to users have obtained satisfactory answers. However, as the core of the network, the device technology that acts as the interconnection between networks has no qualitative breakthrough. In this case, a new technology came into being. This is the layer-3 Exchange Technology: it is a router because it can operate on the layer-3 of the network, it is a type of routing that understands a device and can act as a route decision. It is a switch because it is extremely fast and almost achieves the second-layer switching speed. Who are the advantages and disadvantages of Layer 2 vswitches, Layer 3 vswitches, and vrouters? To answer this question, we should first start with the working principles of these three technologies.

1. layer-2 Exchange Technology

A layer-2 switch is a device at the data link layer. It can read the MAC address information in the data packet and exchange it based on the MAC address. There is an address table inside the vswitch, which indicates the relationship between the MAC address and the vswitch port. When a vswitch receives a packet from a port, it first reads the source MAC address from the packet header so that it knows the port on which the machine with the source MAC address is connected, it then reads the destination MAC address in the packet header and finds the corresponding port in the address table. If there is a port corresponding to the destination MAC address in the table, the packet is copied directly to the port, if no corresponding port is found in the table, the packet is broadcast to all ports. When the target machine responds to the source machine, the switch can learn which port the target MAC address corresponds, the next time you transmit data, you no longer need to broadcast all ports. The second-layer switch creates and maintains its own address table. Because L2 switches generally have a wide switching bus bandwidth, they can exchange data for many ports at the same time. If a L2 Switch has N ports, and the bandwidth of each port is M, and the bus bandwidth of the switch exceeds N × M, the switch can achieve line rate switching. The L2 Switch does not limit the broadcast packets. It copies the broadcast packets to all ports. Generally, L2 switches contain ASICApplicationspecificIntegrated Circuit chip used to process data packet forwarding. Therefore, the forwarding speed can be very fast.

2. Routing Technology

A Router operates at the network layer, the third layer in the OSI Layer-7 network model. There is a route table inside the router, which indicates where to go if you want to go somewhere. When a router receives a packet from a port, it first removes the packet header at the link layer), reads the destination IP address, searches for the route table, and determines where to send the next packet, then, the packet header of the link layer is packaged.) The packet is forwarded. If the next address cannot be determined, a message is returned to the source address and the packet is discarded.

The routing technology and layer-2 switching seem a bit similar. In fact, the main difference between routing and switching is that switching occurs at the layer-2 data link layer of the OSI reference model. This difference determines that different control information needs to be used for routing and exchange during data transmission. Therefore, the two methods to implement their respective functions are different.

The routing technology is actually composed of two basic activities, that is, determining the optimal path and transmitting data packets. Among them, data packet transmission is relatively simple and direct, while the route determination is more complex. The routing algorithm writes different information into the routing table. The router selects the optimal path based on the destination to which the data packet arrives and sends the data packet to the next vro that can reach the destination. When a router receives the packet, it will also view its target address and use the appropriate path to continue transmission to the subsequent router. And so on until the data packet reaches the final destination.

Vrouters can communicate with each other and maintain their route tables by transmitting different types of information. The route update information is generally composed of some or all route tables. By analyzing the route update information sent by other routers, the router can master the topology of the entire network. Link Status broadcast is another type of information transmitted between routers. It can send the link status and incoming notifications of information senders to other routers.

3. layer-3 Switching Technology

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, which enables the routing module to exchange data with other modules that require routing at high speed, this breaks through the speed limit of the traditional external router interface. In terms of software, layer-3 switches also have major initiatives. They 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 using IP addresses communicate with each other through the layer-3 Switch. Machine A knows the destination IP address when it starts sending, but does not know the MAC address required for sending it 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, and B returns its MAC address. After A obtains the MAC address of the destination machine B, it caches the address, use this MAC address to package and forward the data. The second layer switch module looks for the MAC address table and determines to send the data packet 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, send the MAC address of C to machine A. Otherwise, the layer-3 Switch module broadcasts an ARP request to the target machine based on the routing information, the target machine C receives the ARP request and replies to its MAC address to the layer-3 Switch module. The layer-3 Switch module saves the address and sends it back to 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.

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: info-contact@alibabacloud.com 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.