Generally, the internal network of an enterprise has enough bandwidth to use. However, the Internet access for enterprises is limited. To improve the quality of use of the network and ensure that users use the bandwidth of the entire network according to the business design requirements in the network, you can analyze and optimize the Linux system from the perspective of the traffic control server, it brings convenience and efficiency to Enterprise Services. Next, let's take a look at the implementation and usage of Linux traffic control.
Basic Implementation of Linux Traffic Control
In Linux, the traffic controller TC is mainly used to set up a queue at the output port to implement traffic control. Linux Kernel 2.1.105 supports traffic control and needs to be re-compiled during use. The basic implementation of Linux traffic control is described in figure 1. Figure 1 shows how the kernel processes the received packets, generates the sent packets, and sends them to the network.
Figure 1 basic implementation of Linux Traffic Control
When the receiving package comes in, the Input multi-channel distributor Input De-Multiplexing is used to determine and select: if the receiving package is for the current host, the package is sent to the upper layer for processing; otherwise, the packet needs to be forwarded, forward the received packet to the Forwarding Block. The forwarding block also receives packets generated by the upper layer of the host, such as TCP and UDP. The next hop of the processed package is determined by viewing the route table. Then, arrange the packages to send them to the Output Interface ). Linux traffic control is implemented during sorting.
Figure 2 basic traffic control framework
As shown in 2, Linux traffic control is implemented by three major components:
◆ Queue rule Queue Discipline)
◆ Category Classes)
◆ Filter Filters)
Therefore, Linux traffic control is mainly divided into three aspects: establishing a queue, establishing a classification, and creating a filter. The basic implementation steps are as follows:
1) bind a queue to a network physical device, such as the ethernet card eth0;
2) create a category on the queue;
3) create a routing-based filter for each category.
- Create and filter HTB queues in Linux Traffic Control
- Simple Steps for installing SVNWebClient in Linux
- How to view Linux Nic traffic and Its Features
- Linux Network Traffic Security Management Method
- Introduction to Linux Command to view performance