Comparison Between Layer-3 vswitches and vrouters

Source: Internet
Author: User

I. Main differences between layer-3 vswitches and vrouters
The most fundamental difference between a layer-3 Switch and a router is that a layer-3 Switch also has a "routing" function, which is consistent with the routing function of a traditional router. However, layer-3 switches and routers are quite essentially different.

1. Different Main Functions

Although both layer-3 switches and routers have routing functions, we cannot equate them. Just as many network devices now have multiple functions of traditional network devices at the same time, for example, many broadband routers not only have the routing function, but also provide the switch port and hardware firewall function. However, they cannot be the same as switches or firewalls. Because the main functions of these routers are still routing functions, other functions are only their additional functions. The purpose is to make the devices more widely applied and more practical. The same is true for the layer-3 switch. It is still a switch product, but it has some basic routing functions. Its main function is data exchange. That is to say, it has both the data exchange and the routing feature, but its main function is the data exchange, and the router only has the main function of routing forwarding.

2. The main application environments are different.

The routing function of a layer-3 switch is usually relatively simple, because it is mainly used for simple LAN connections. Because of this, the routing function of a layer-3 switch is generally simple, and the routing path is far less complex than that of a router. It is mainly used in LAN or provides fast data exchange function to meet the characteristics of frequent LAN data exchange applications.

The router is different. Its initial design is to meet the needs of different types of network connections, although it is also suitable for LAN connections, however, its routing functions are more reflected in the interconnection between different types of networks, such as the connection between the LAN and WAN, and the connection between networks of different protocols, therefore, routers are mainly used between different types of networks. Its main function is route forwarding. It is its ultimate goal to solve the connection of various complex routing paths. Therefore, the router's routing function is usually very powerful, not only applicable to LAN with the same protocol, it is more suitable for LAN and WAN networks with different protocols. Its advantage lies in the selection of the best routing, load balancing, link backup, and the exchange of routing information with other networks. In order to connect to various types of networks, vro interfaces are rich in types, while layer-3 switches are generally only LAN interfaces of the same type, which is very simple.

3. Performance is different

Technically speaking, there are significant differences between a router and a layer-3 Switch in Packet Exchange operations. Generally, a vro performs Packet Exchange by a microprocessor-based software routing engine, while a layer-3 Switch performs Packet Exchange through hardware. After a layer-3 switch routes the first data stream, it will generate a ing table between the MAC address and IP address. When the same data stream passes through again, the table is directly routed from the second layer instead of the second layer, which eliminates the network delay caused by router selection and improves the efficiency of packet forwarding. At the same time, the routing lookup of a layer-3 switch is for data streams. It uses the caching technology and ASIC Technology to easily implement it. Therefore, it can greatly save costs and achieve fast forwarding. Vro's forwarding adopts the longest matching method, which is complicated. It is usually implemented using software, and the forwarding efficiency is low.

For this reason, compared with the overall performance, the performance of the layer-3 switch is far better than that of the router, which is very suitable for LAN with frequent data exchanges, however, its data packet forwarding efficiency is far lower than that of layer-3 switches. It is more suitable for interconnection between different types of networks with less frequent data exchanges, such as the interconnection between local networks and the Internet. If a router, especially a high-end router, is used in a LAN, it is a waste (in terms of its powerful routing function ), in addition, it cannot meet the requirements of LAN communication performance and affect the normal communication between subnets.

To sum up, there are major essential differences between layer-3 switches and routers. In any aspect, it is best to use a layer-3 Switch for multi-subnet connection in the LAN, especially in environments with frequent data exchanges between different subnets. On the one hand, it can ensure the communication performance requirements between subnets, and on the other hand, it saves the investment of purchasing another switch. Of course, if the communication between subnets is not frequent, it is understandable to use vrouters. It can also achieve the purpose of subnet security isolation and mutual communication. Depends on the actual needs.

 

 

Comparison Between Layer-3 vswitches and vrouters
 

Comparison Between Layer-3 vswitches and vrouters

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 the LAN of shared media to the current LAN. The exchange 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 router technology that acts as the interconnection between networks has no qualitative breakthrough. In this case, a new routing technology emerged. This is the layer-3 switching technology: it is a router because it can operate on the layer-3 of the network protocol, 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 switches, layer-3 switches, and routers? To answer this question, let's 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.
Layer-2 switches generally contain Application Specific Integrated Circuit chips used to process data packet forwarding, so 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. The router receives a packet from a port. It first removes the packet header of The Link Layer (unpacks), reads the destination IP address, and searches for the route table. If you can determine where to send the next packet, the packet header (Package) at the link layer is added to forward the packet. 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 on the layer-2 (data link layer) of the OSI reference model, while routing occurs on the layer-3. 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. RoutingAlgorithmWrite different information in 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 (the speed can be 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 the traditional software-based router software. The practice is to forward data packets: such as IP/IPX packet forwarding, these regular processes are implemented through hardware at 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. IP Address Resolution (ARP) is used 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. The so-called one-time routing and multiple exchanges.

Layer-3 switching has the following outstanding features:

The combination of organic hardware accelerates data exchange;

The optimized routing software improves the routing efficiency;

In addition to the necessary route decision processes, most data forwarding processes are processed by Layer 2 exchange;

When multiple subnets are connected, they are only logically connected to the layer-3 Switching Module. Unlike traditional external routers, ports need to be added to protect users' investment.

4. Comparison of the three technologies

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 two-layer switch's fast switching function, multiple access ports, and low price 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. The interface type is simple and has a strong layer-2 packet processing capability. Therefore, it is suitable for large lan. To reduce the risk of broadcast storms, A large lan must be divided into one small LAN based on functions or regions, that is, one small network segment. This will inevitably lead to a large number of mutual access between different network segments, using a layer-2 switch alone cannot 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, so in this environment, A layer-3 switch that combines L2 switching and routing is the most suitable.

Vro has many port types, multiple layer-3 protocols, and strong routing capabilities. Therefore, vro is suitable for interconnection between large networks. Although many layer-3 switches or even layer-2 switches have heterogeneous network interconnection ports, however, generally, there are not many interconnect ports in a large network. The main function of the interconnect device is not to fast exchange between ports, but to select the best path for load balancing, link backup and the most important routing information exchange with other networks, all of which are completed by routing. In this case, it is naturally impossible to use a L2 Switch, but whether or not a l3 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 Integrated routing function also serves this purpose. Therefore, its routing function is not as powerful as a professional router of the same level. 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.

 

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.