The network environment of a server in the company is too high. when the server is connected to the source server for download, it runs to 400 M-500 M. in order to control the server, we studied TC. To control traffic. to control it to a small point, do not let this one occu
Company currently has a server, network environment is too high, that server and source server connection download, ran to 400m-500m, in order to control, so studied the TC, to do flow control. Give him a little bit of control, don't let this one take up all the networks. TC
:protocol IP prio u32 match IP DST 192.168.111.0/24 flowid 1:1can limit 192.168.111.0 to 255 of the bandwidth of 3000k, the actual download speed of about 200k.In this case, all the machines in this segment share the 200k bandwidth.You can also add a SFQ (random fair queue)TC Qdisc Add dev eth0 root handle 1:htb r2q 1TC class Add dev eth0 parent 1:classid 1:1 HTB rate 3000kbit Burst 10kTC Qdisc Add dev eth0 parent 1:1 handle 10:SFQ perturb 10TC Filter
Article Title: Use TC in linux to control server traffic. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
The network environment of a server in the company is too high. When the server
Release date:Updated on:
Affected Systems:VMWare vFabric tc Server 2.xUnaffected system:VMWare vFabric tc Server 2.1.2VMWare vFabric tc Server 2.0.6Description:---------------------------------------------------------------------
, and U32 The classifier allows us to select the traffic based on any headers. It should be noted that the filter (filter) is inside the qdisc, and they cannot be the main body.
Application flow of TCPacket->iptables (when passing iptables, Iptables sets different mark)->TC based on different IP (class)-
>TC (Queue)
Application
Assume that the eth0 bit is the external network interface of the
based on any header. It should be noted that filter (filter) is inside qdisc and they cannot be used as the main body.Application flow of TCPacket->iptables (when passing iptables, iptables sets a different mark based on different IP)->TC (Class)->TC (Queue)ApplicationAssume that the eth0 bit is the server's extranet network interface. Before you begin, clear the Eth0 all queue rules firstTC Qdisc del dev
application.
TC class Add dev eth0 parent 1:1 classid 1:2 HTB rate 98mbit ceil 100mbit prio 2
TC class Add dev eth0 parent 1:1 classid 1:3 HTB rate 1mbit ceil 2mbit prio 2
Note: The above is our control output server speed, one for 98M, one for 2M.Rate: is the bandwidth value guaranteed by a class. If there is more than one class, ensure that the sum of all ch
[Code sea shell TC] Use View to define dynamic Class, sea shell tcPreface
In TC,
Persistent Class corresponds to Table.
Define a Persistent Class. updatedb generates the corresponding table.
In the development environment of TC, a corresponding username will generate a table under this username
In the formal environment, because adm, su, and key are used, the cor
Settings \ Application Data \ directory
% $ Mypictures %
Corresponds to the My Documents \ my pictures directory
% $ Personal %
Corresponds to the my documents directory
% $ Programs %
Corresponding Documents and Settings \ current user \ Start Menu \ Programs \ directory
% $ Startmenu %
Corresponding Documents and Settings \ current user \ Start Menu \ directory
% $ Startup %
Corresponding Documents and Settin
. Note: Because TC can only restrict the sending of packets, so download the network card on, and upload the external network card control.
First, download Settings
1, rules (eth0 for the Internal network card, you can limit the download traffic)
TC Qdisc Add dev eth0 root handle 2:0 HTB default 30
TC class Add dev eth0 parent 2:0 classid 2:1 HTB rate 4Mbit bu
network to normal.) The PC is connected to a vswitch and connects multiple servers, including the Video Server 1.1.1.60 that provides external services, the Nat server 1.1.1.56, the company's email server 1.1.1.57, and the testing and monitoring server 1.1.1.58 provide Internet services for employees.
About
Tc introduction under linux-Linux Enterprise Application-Linux server application information. The following is a detailed description. Linux supports QOS from kernel 2.1.105. However, you need to recompile the kernel. When running 'make config', set EXPERIMENTAL _ OPTIONS to 'y' and set Class Based Queueing (CBQ), Token Bucket Flow, and Traffic Shapers to 'y ', run 'make dep; make clean; make bzilo' to gen
You need to control the traffic of the gateway, control the IP address and network segment, and use iptables to implement the traffic. You may also have the server for the Intranet and Internet, and the rules are easy to understand.
The following is a shell script, not in iptables mode:
#! /Bin/bash
# Set the following values to somewhat less than your actual download
# And uplink speed. In kilobits. Also set the device that is to be shaped.
# INGOING
Many small and medium-sized enterprises server access bandwidth is often only 10Mbps usually servers also run other services, such as the DNS service, when the site is large and many people download at the same time, the bandwidth is easily exhausted, resulting in server delay increase or drop packets. How do I limit the speed of 80 ports and ensure that other services work?You can use the
Use linux as the nat service, and use tc to limit traffic-Linux Enterprise Application-Linux server application information. For details, refer to the following section. Recently, some colleagues used bt and e for crazy download. We were greatly affected when playing cs on the Internet, so we made traffic control on nat and introduced some experience to netizens, hope to help cs fans.
The Internet environme
Article title: TC + IPTables download and upload bandwidth limit script. Linux is a technology channel of the IT lab in China. It includes desktop applications, Linux system management, kernel research, embedded systems, open source, and other basic categories. each IP address is restricted and can be modified at any time. If you are using dial-up Internet access, add the following content to the/etc/ppp/ip-up.local, otherwise there will be no Upload
Red Hat Linux 7.3 kernel 2.4.18. The eth0 of the server is bound to the external address eth0:192.168.1.3,eth1 bind the internal address eth1:1 172.17.1.1,eth1:2 172.18.1.1,eth1:3 172.19.1.1.
Now to achieve the function is the entire export limit in the 512kbit (upload traffic), 172.17 network download traffic to download to 512Kbit, 172.18 network Segments limited to the 128KBIT,172.19 network segment to 3Mbit.
The method is as follows:
First, the
Recent work more or less with Linux flow control a bit of a relationship, since a few years ago know have TC such a thing and some understand its principle, I did not move it, because I do not like TC command line, is too cumbersome, iptables command line is also more cumbersome, But the TC command line is more intuitive than the
#! /Bin/bashDev = "tun0"Uplink ink = 300# About half of the downstream downlink 3200 K, so as to get more concurrent connectionsDownlink = 2048VIP1 = "192.168.1.159/32"VIP2 = "192.168.1.163/32"# Two VIP usersEcho "=============================== packetfilter and traffic control by Network Technology Department ver. 1.0 ================================="Start_routing (){Echo-n "queue settings start ......"# TC qdisc del Dev $ Dev root> null 2 > 1# Dele
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.