Differences between basic vswitch knowledge

Source: Internet
Author: User

Differences between Layer 2 and Layer 3 switches

L2 switches are used in small local networks. There is no need to talk about this. In a small LAN, 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.

The advantage of a layer-3 switch is that it has rich interface types, powerful layer-3 functions, and powerful routing capabilities. It is suitable for routing between large networks. Its advantage is to select the best route and share load, router functions such as link backup and exchange of route information with other networks.

The most important function of a layer-3 switch is to accelerate the fast data forwarding within a large local area network. If a large network is divided into small local networks by department, region, and other factors, this will lead to a large number of Internet mutual access. Simply using a layer-2 switch cannot achieve Internet mutual access. For example, simply using a router, due to the limited number of interfaces and slow route forwarding speed, the network speed and network scale will be limited. Using a layer-3 switch with the routing function for fast forwarding will become the first choice.

In general, in a network with a large volume of intranet data streams and fast response requirements, if all three-layer switches do this, the layer-3 switches will be overloaded and the response speed will be affected, it is a good networking strategy to make full use of the advantages of different devices by handing over the routes between networks to routers. Of course, the premise is that the customer's pockets are great; otherwise, they will leave for the second place, the layer-3 switch is also connected to the Internet.

Layer-4 vswitch Principle

The fourth layer of the OSI model is the transport layer. The transport layer is responsible for peer communication, that is, coordinated communication between the network source and the target system. In the IP protocol stack, This is a TCP transmission protocol) and UDP user packet protocol.

In Layer 4, the TCP and UDP headers contain port numbers), which uniquely differentiate which application protocols are contained in each packet, such as HTTP and FTP ). The endpoint system uses this information to distinguish packet data, especially the port number, so that a computer system at the receiving end can determine the type of the IP packet it receives and hand it over to appropriate high-level software. The combination of the port number and the IP address of the device is usually called "socket )". The port numbers between 1 and 255 are retained. They are called "well-known" ports, that is, these ports are the same in all TCP/I P protocol stack implementations of the host. In addition to the "well-known" port, standard UNIX services are allocated between port 256 and port 1024. custom applications generally allocate port numbers over port 1024. You can find the latest list of allocated port Numbers on RFC1700 "Assigned Numbers.

The additional information provided by the TCP/UDP port number can be used by the network switch, which is the basis for layer-4 switching. A vswitch with the layer-4 function can act as the "virtual IP" (VIP) frontend connected to the server. Each server and server group supporting a single or common application is configured with a VIP address. This VIP address is sent and registered on the domain name system. When a service request is sent, the layer-4 switch identifies the start of a session by determining the start of TCP. Then it uses complex algorithms to determine the best server for processing this request. Once this decision is made, the switch associates the session with a specific IP address and replaces the VIP address on the server with the real IP address of the server.

Each layer-4 switch stores a source IP address that matches the selected server and a connection table associated with the source TCP port. The layer-4 switch then forwards the connection request to the server. All subsequent packets are reinjected and forwarded between the client and the server until the switch discovers a session. When layer-4 switching is used, the access can be connected to a real server to meet user-defined rules, for example, the number of connections on each server is equal or the transmission stream is allocated based on the capacity of different servers.

How to choose a layer-4 Switch

1) Speed

To be effective in Enterprise Networks, layer-4 switching must provide comparable performance with layer-3 line rate routers. That is to say, layer-4 switching must operate on all ports at full-media speed, even on multiple Gigabit Ethernet connections. The Gigabit Ethernet speed is equal to the maximum speed of 1488000 packets per second (assuming the worst case, that is, all packets are the minimum size defined by the network and are 64 bytes long ).

2) server capacity balancing algorithm

Based on the desired capacity balancing interval, there are many algorithms for layer-4 switches to allocate applications to servers, there are simple detection loop recent connections, detection loop latency, or detection server closed loop feedback. Among all predictions, closed-loop feedback provides the most accurate detection that reflects the current business volume of the server.

3) Table capacity

It should be noted that the switch for layer-4 Switching requires the ability to differentiate and store a large number of sending table items. This is especially true for vswitches at the core of a CEN instance. The size of many second/third-layer switches tends to be proportional to the number of network devices. For a layer-4 switch, this quantity must be multiplied by the number of different application protocols and Sessions used in the network. Therefore, the size of the table to be sent increases rapidly as the number of device and application types increases. Layer-4 switch designers need to consider this growth when designing their products. Large table capacity is critical to manufacturing high-performance switches that support line rate transmission of layer-4 traffic.

4) Redundancy

The layer-4 switch supports the redundant topology. When there is a dual-link network card with fault tolerance connection, it is possible to establish a completely redundant system from a server to the network card, the link and the server switch.

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.