Layer 4 switching
A simple definition of layer 4 switching is: it is a function that determines that the transmission is not only based on the MAC address (layer 2 bridge) or source / destination IP address (layer 3 routing), but also based on TCP / UDP ( Layer 4) Application port number. The Layer 4 switching function is like a virtual IP, pointing to the physical server. The services it transmits are subject to various protocols, including HTTP, FTP, NFS, Telnet, or other protocols. These services require complex load balancing algorithms based on physical servers. In the IP world, the service type is determined by the terminal TCP or UDP port address, and the application interval in the fourth layer exchange is determined by the source and terminal IP addresses, TCP and UDP ports.
In the fourth layer exchange, set up a virtual IP address (VIP) for each server group for search, each group of servers supports a certain application. Each application server address stored in a domain name server (DNS) is a VIP, not a real server address.
When a user applies for an application, a VIP connection request (such as a TCP SYN packet) with the target server group is sent to the server switch. The server switch selects the best server in the group, replaces the VIP in the terminal address with the IP of the actual server, and transmits the connection request to the server. In this way, all packets in the same interval are mapped by the server switch and transmitted between the user and the same server.
Second, the principle of layer 4 switching The fourth layer of the OSI model is the transport layer. The transport layer is responsible for end-to-end communication, that is, to coordinate communication between the network source and the target system. In the IP protocol stack, this is the protocol layer where TCP (a transport protocol) and UDP (user packet protocol) are located.
In the fourth layer, the TCP and UDP headers contain the port number (portnumber), they can uniquely distinguish which application protocol each packet contains (such as HTTP, FTP, etc.). The endpoint system uses this information to distinguish the data in the packet, especially the port number so that a receiving computer system can determine the type of IP packet it receives and give it to the appropriate high-level software. The combination of port number and device IP address is commonly referred to as a "socket".
Port numbers between 1 and 255 are reserved, they are called "well-known" ports, that is, TCP / I on all hosts
In the implementation of the P protocol stack, these port numbers are the same. In addition to "well-known" ports, standard UNIX services are allocated in the 256 to 1024 port range, and custom applications are generally allocated port numbers above 1024.
A recent list of assigned port numbers can be found on RFc1700 "Assigned Numbers". The additional information provided by the TCP / UDP port number can be used by network switches, which is the basis of layer 4 switching.
Examples of "well-known" port numbers:
Application protocol port number FTP 20 (data)
21 (Control)
TELNET 23
SMTP 25
HTTP 80
NNTP 119
NNMP 16
162 (SNMP traps)
The additional information provided by the TCP / UDP port number can be used by the network switch, which is the basis of the fourth layer exchange.
The switch with layer 4 functions can function as a "virtual IP" (VIP) front end connected to the server.
Each server and server group supporting a single or universal application are configured with a VIP address. This VIP address is sent out and registered on the domain name system.
When issuing a service request, the Layer 4 switch recognizes the start of a session by deciding on the start of TCP. It then uses sophisticated algorithms to determine the best server to handle 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 server's real IP address.
Each layer 4 switch maintains a connection table associated with the source IP address and source TCP port of the selected server. Then the layer 4 switch forwards the connection request to this server. All subsequent packets are remapped and forwarded between the client and server until the switch discovers the session.
In the case of using layer 4 switching, the access can be connected with a real server to meet the rules set by the user, such as making each server have an equal number of accesses or allocating transport streams according to the capacity of different servers.
Third, the role of layer 4 switching The main function of layer 4 switching is to improve the reliability and scalability of servers and server farms.
If the speed of the server cannot keep up, even the network with the fastest switching cannot fully guarantee end-to-end performance. It is conceivable that high-priority services in this QoS-enabled network will be blocked by low-priority service queues in the server. In a worse case, the server may even lose the ability to process business in a loop.
The purpose of the layer 4 switching designed on the server is to extend the performance and business flow management functions of the layer 2 and layer 3 switching in the server and applications in the past.
Fourth, the advantages of Layer 4 switching Layer 4 switching uses the header information of Layer 3 and Layer 4 packets to identify the service flow according to the application interval, and distribute the entire interval of the service flow to the appropriate application server for processing.
Each open zone is associated with a specific server. For tracking servers, the fourth layer of switching enables multiple servers to support special applications that linearly enhance overall performance as the number of servers increases. At the same time, Layer 4 switching improves the reliability of the application by reducing the dependence on any particular server.
Layer 4 switching also requires end-to-end QoS, improving the ability of Layer 2 and Layer 3 switching to exchange QoS packets one by one. For example, business from high-level users or network traffic of important applications can be allocated to the fastest I / O system and CPU, while ordinary business is allocated to machines with poor performance.
5. Layer 4 switching and layer 2 and layer 3 switching. If layer 2 switching is the reproduction of a bridge and layer 3 switching is routing, then what is layer 4 switching? Layer 4 switching can queue traffic based on specialized applications, which provides a more operable way for rule-based quality of service mechanisms. We can call the layer 4 switch a "session switch".
a. Layer 2 switched LAN switching technology emerged as a solution to provide effective network segmentation for shared LANs. It enables each user to share as much bandwidth as possible. As mentioned above, the switching technology operates at the second layer of the OSI seven-layer network model, the data link layer, so the forwarding of data packets by the switch is based on the MAC address-physical address. For the IP network protocol, it is transparent, that is, when the switch forwards the data packet, it does not need to know the IP address of the source machine and the sink machine, only its physical address is the MAC address. During the operation of the switch, the switch will continuously collect data to create its own address table. This table is quite simple. It shows on which port a certain MAC address was found. So when the switch receives a TCP / IP packet At that time, he will look at the destination MAC address of the label part of the packet, check his address table to confirm which port to send the packet from, because this process is relatively simple, plus today's function is by ASIC hardware The speed is quite high, generally only a few tens of microseconds, the switch can decide where to send an IP packet. It is worth mentioning that if the switch receives an unknown packet, that is, if the destination MAC address cannot be found in the address table, the switch will "spread" the IP packet, that is, remove it from each port Send it out, as if the switch received a broadcast packet. The weakness of the layer 2 switch is that its method of processing broadcast packets is too inefficient. For example, when a switch receives a broadcast packet from a TCP / IP workstation, it will pass the packet to all other ports. Go, even if some ports are connected to IPX or DECnet workstations! In this way, the bandwidth of non-TCP / IP contacts will be negatively affected, even if they are the same TCP / IP contacts, unless their subnet and the broadcast packet are sent. The subnets of the workstations are the same, otherwise they will receive some network broadcasts that have nothing to do with them for no reason, and the efficiency of the entire network will be greatly reduced.
b. Layer 3 switching Assume that host A and host B have previously communicated through the switch. If the middle switch supports layer 3 switching, he will record the IP addresses of A and B and their MAC addresses when other hosts If C wants to communicate with A or B, for the addressing packet sent by C, the Layer 3 switch will send C a reply packet without hesitation to tell him the MAC address of A or B, and of course C will use A or B in the future. The MAC address communicates "directly" with him. Because both parties to the communication do not pass through a third party such as a router, even if A, B, and C belong to different subnets, they can directly know the MAC address of the other party to communicate. More importantly, the layer 3 switch does not Broadcast packets are not diffused like other switches. Layer 3 switches are called layer 3 switches because they can understand layer 3 information.
Such as IP address, ARP, etc. Therefore, the Layer 3 switch can understand the purpose of a broadcast packet, and meet the needs of the person who sent the broadcast packet (whether they are in any subnet) without spreading it out. If the layer 3 switch is considered to be a router, it should also be called an ultra-high-speed anti-traditional router, because the layer 3 switch does not do any "demolition" of data packets, and all packets passing by him will not be modified and The speed of the exchange reaches the destination.
In contrast, the router operates in the third layer of the OSI seven-layer network model-the network layer, which is in the network,
When receiving any data packet (including broadcast packets), the second layer (data link layer) information of the data packet must be removed (called "unpacking"), and the third layer information (IP address) should be checked. . Then, determine the route of the data packet according to the routing table, and then check the security access table; if it is passed, then encapsulate the second layer of information (called "packaging"), and finally forward the data packet. If the network address corresponding to the MAC address cannot be found in the routing table, the router will return a message to the source address site and discard the packet.
Compared with the switch, the router can obviously provide a series of access control mechanisms that constitute the security control strategy of the enterprise network. Because the router must have a "demolition" process for any data packet, even for all data packets sent from the same source address to the same destination address, the same process must be repeated. This makes it impossible for routers to have high throughput and is one of the reasons why routers become network bottlenecks. End-to-end performance and quality of service require careful balancing of the load of all networked devices to ensure data between clients and servers Flow smoothly. Layer 2 and Layer 3 switching products have played a good role in solving the bandwidth and capacity problems of LAN and Internet, but this may not be enough, and more performance is needed, which is exactly the fourth layer switching Where it comes in.
Layer 2 switching connects users and the network and directs traffic in subnets. Layer 3 switching or routers transfer packets from one subnet to another. Layer 4 switching transfers packets to terminal servers. The fourth layer of switching is an important factor in the network infrastructure, which makes the server capacity increase as the network bandwidth increases.
From an operational point of view, Layer 4 switching is stable because it controls packets in the interval from the source to the sink. On the other hand, routers or Layer 3 switching only deal with a single packet. It is not clear where the previous packet came from or the situation of the next packet. They just detect the TCP port number in the packet header and establish a priority queue based on the application. The router determines the routing of packets based on the links and the nodes available on the network. The fourth layer is to determine the interval based on available servers and performance.
Sixth, layer 4 switching and server clustering There are some common functions between layer 4 switching and server clustering technologies (such as Microsoft's Wolfpack). They both provide service product load balancing and fail-safe functions, although many clustering implementations support load balancing of applications across multiple servers. The difference between these two technologies is that the cluster function is often densely integrated in the server operating system, and is therefore proprietary to the manufacturer. Being embedded in the operating system means that clustering technology can support file system sharing and tight server resource abuse testing, and allow faster server fault tolerance. On the other hand, the fourth layer of exchange is built on the standard IP protocol family. Therefore, it enables servers of different vendors and different operating systems to form a "loosely coupled" server cluster for load balancing and enhanced reliability. These two technologies are not opposed to each other. Server clusters can use Layer 4 switching to improve both application scalability and server availability.
Using layer 4 switching in a server cluster can use the function of layer 4 switching on the switch to ensure the load balance of the servers in the server cluster. The fourth layer of exchanges allows people to make unscrupulous choices for many backup servers. At the same time, there will be a series of servers providing the same services, so that the traffic load on each server can be balanced.
So far, the only way to balance the load is to rotate the host address, but the problem is that it is not easy to predict or control the load that each server will get. This is simply too primitive to satisfy users ’needs. Requirements for Layer 4 switching. The application of the fourth layer switching, using advanced application distribution algorithm, can better and more intelligently achieve load balancing. According to the granularity of the required load balancing, the layer 4 switch can use a variety of methods to distribute application sessions to the server. These methods include a simple weighted loop for minimum weight access, measuring round-trip delay and closed loop feedback of the server itself, and so on.
Closed loop feedback is the most advanced method. It utilizes specific system information such as available memory, I / O interrupts, and CPU utilization. This information can be automatically obtained for the adapter driver and the Layer 4 switch. The current closed loop feedback mechanism requires the installation of software agents on each server.
Seven, how to choose a suitable layer 4 switch a, speed In order to be effective in the enterprise network, the layer 4 switch must provide comparable performance to the layer 3 wire-speed router. That is, Layer 4 switching must operate at full media speed on all ports, even on multiple Gigabit Ethernet connections. Gigabit Ethernet speed is equal to routing at the maximum speed of 1488000 packets per second (assuming the worst case, that is, all packets are the smallest size defined by the network, 64 bytes long).
b, server capacity balancing algorithm
Depending on the desired capacity balance interval size, the layer 4 switch will allocate a variety of applications to the server. There are simple detection of the nearest connection of the loop, detection of the loop delay, or detection of the closed loop feedback of the server itself. In all predictions, closed-loop feedback provides the most accurate detection that reflects the server's existing traffic.
c. Table capacity. It should be noted that the switch that performs Layer 4 switching needs to have the ability to distinguish and store a large number of sending table entries. This is especially true when switches are at the core of an enterprise network. Many Layer 2 / Layer 3 switches tend to have a size that is proportional to the number of network devices. For Layer 4 switches, this number must be multiplied by the number of different application protocols and sessions used in the network. Therefore, the size of the transmission table increases rapidly with the increase in the number of endpoint devices and application types. Layer 4 switch designers need to consider this growth in the design of their products. Large meter capacity is critical for manufacturing high-performance switches that support wire-speed transmission of Layer 4 traffic.
d. The redundant layer 4 switch has the function of supporting redundant topology. When a fault-tolerant connection with a dual-link network card, it is possible to establish a completely redundant system from a server to the network card, link and server switch.
8. Introduce several layer 4 switching products: Berkeley Networks's exponeNT e4 and Alteon Networks' ACEswith 180. These two layer 4 switching products have outstanding performance and flexibility and can be made better than layer 2 and layer 3 switches. Smarter forwarding decisions. Because the code of the packet header query is embedded in the application specific integrated circuit (ASIC) in the switch to achieve the above functions, almost no delay is caused. Both manufacturers' switches can implement 10M, 100M and Gigabit Ethernet functions, but Berkeley's switches are designed for enterprise applications, while Alteon switches are for organizations with a large number of Web or FTP servers.
Alteon's Layer 4 switching technology can monitor the performance and running status of the server in real time, and according to the health status of different servers, the future data streams can be distributed to the appropriate servers in a cost-effective manner. At the same time, Alteon ’s Layer 4 switching technology has a Web cache redirection function that can intercept HTTP communications destined for remote Internet hosts and redirect these communications to the local cache server, greatly speeding up access to the Internet Speed, and save a lot of valuable WAN bandwidth. And this is completely transparent for users and information providers, without any settings by users and information providers.
Cabletron ’s SmartSwitch Router and Torrent Networking Technologies ’IP9000 Gigabit Router are also products with Layer 4 switching capabilities. Among them, SmartSwitch Router can realize the upgrade and transformation of the backbone network from the conventional layer 3 switching to the comprehensive layer 3 and layer 4 switching functions. Its unique WAN integration capabilities and the access control capabilities based on layer 4 switching are safe for network data transmission. Orderly play played a key role. In addition, Cabletron Smart SwitchRouter provides different levels of priority processing capabilities for data exchange for specific business applications based on the QoS function of Layer 4 switching.
Nine, the fourth layer of switching and single-function load balancing products At present, general single-function load balancing products can connect 400 to 800 accesses per second. The connection speed of a new generation of products with both Layer 2 and Layer 4 functions (hardware-based load balancing using customized application-specific integrated circuits) exceeds 100,000 accesses per second.
Layer 4 switches are completely different from dedicated load balancers in form and function. The traditional hardware-based load balancer is an optimized two-port device with a speed of 45Mbps. The fourth layer switch is designed for high-speed Intranet applications, it supports 100Mbps or Gigabit interface.
Layer 4 switching supports other functions in addition to the load balancing function, such as the transport flow control function based on application type and user ID. Using multi-level queuing technology, Layer 4 switches can mark transport streams and assign priorities to transport streams based on the application. In addition, the Layer 4 switch is directly placed on the front of the server, and it understands the content of application sessions and user permissions, thus making it an ideal platform to prevent unauthorized access to the server.
Tenth, the fourth layer switching scheme In this scheme, the use of Alteon's fourth layer switch to achieve Web Server load balancing.
HTTP is the most important application in the Internet. Currently, the Web Server widely used on the Internet uses multi-process technology, which occupies more system resources and has lower efficiency. Generally, a Web Server can only withstand hundreds of concurrent users. The use of the fourth layer switch can solve the scalability problem of Web Server, improve the reliability of Web Server system, and distribute the load among Web Server reasonably.
Alteon's Layer 4 switch monitors the availability of the Web Server, including the physical connection, the health status of the Web Server host, and the HTTP Server itself. When it is found that a Web Server cannot provide Web services, the switch automatically distributes Web requests to the good two Web Server. Alteon Layer 4 switches can further ensure the reliability of the Web system by setting the maximum number of sessions that each Web Server can withstand, setting overflow Web Server, and backing up Web Server.
Web Server uses multiple load balancing algorithms when implementing load balancing in the same local area network, including Least
ConnecTIon, Round Robin, MinMiss and Hash algorithms, as well as the weighting of the algorithm and so on.
When the Web Server is not in the same local area network, the global load balance technology of Alteon switch is used to realize the rationality of load sharing.
LED Solar Light, including LED Solar Street Light, LED Solar Column Light, LED solar Flood Light.
1. Elegant Integrated Design,Aluminum alloy case
2. Night sensor + PIR motion sensor+Remote Control
3. 120°wide lighting angle, long detecting distance
4. Easy to install
5. Support more than 2-3 rainy days with the best technology.
6. Waterproof IP65
7. Turn on/off at dusk and dawn automatically
8. ODM, lighting solution.
LED Solar Light
LED Solar Light,LED Solar Street Light, LED Solar Garden Light,LED Solar Column Light
ZHONGSHAN G-LIGHTS LIGHTING CO., LTD. , https://www.glightsled.com