These two days I am determined to do a good job in Network Flow --
What is the problem? I am talking about connecting N + 2 and N + 1 with infinite capacity... I read about STD...
The point is that you need to request multiple network streams. Don't
100Mbit rate 100Mbit Allot 1514 weight 1Mbit Prio 8 ma Xburst AVPKT 1000
/SBIN/TC class Add dev $ODEV parent 20:0 classid 20:1 CBQ bandwidth 1Mbit rate 1Mbit Allot 1514 weight 10Kbit Prio 8 Maxbu RST AVPKT 1000
#
# do not limit intranet downloads from this server.
# Note If there is a proxy on this server, the user can bypass the bandwidth limit by proxy,
# you can cancel the following three sentences to d
digits of the bitmap and the line number to which the start bit belongs. The saves the returned results of the B4, so that you know how to judge the next time, and you don't need to put the whole bitmap in, just one line, and the speed can be much faster. The Hardware module YJMK has a maximum of 16 scripts and only 4 bits in the 8-bit command code are valid. There are 5 commonly used bitmaps related to the bitmap: number 0-5 instruction code. Allot
eth0 parent classid CBQ bandwidth 10 Mbit Rate10 Mbit allot 1514 weight 1 Mbit PRIO 8 maxburst 20 avpkt 1000This command actually has more meaning than the previous command. Among them, 1514 is the MTU value.The following is an ISP class:# TC class add Dev eth0 parent 10classid CBQ bandwidth 10 Mbit Rate8 Mbit allot 1514 weight 800 kbit PRIO 5 maxburst 20 avpkt 1000 boundedWe allocated 8 MB of bandwidth to
qdisc add dev eth0 root tbf rate 512k lantency 50ms burst 1540
The TBF (tokenbucket filter) filter queue is used on the NIC Eth0, the export is limited to 512kbit, the delay 50ms, the burst data 1540,rate The specified value is the limited bandwidth. Continue to make restrictions in eth1:
#tc qdisc add dev eth1 root handle 1:0 cbq bandwidth 100Mbit avpkt 1000 cell 8
Create a queue, indicating that the network card is a 100M NIC, which is independent of the traffic limit and is used for calcu
:, assign a bandwidth of 10 Mbit, and set the priority to 8.
· Tc class add dev eth0 parent 1:0 classid 1:1 cbq bandwidth 10 Mbit rate 10 Mbit maxburst20 allot 1514 prio 8 avpkt 1000 cell 8 weight 1 Mbit
The maximum available bandwidth of this queue is 10 Mbit, the actually allocated bandwidth is 10 Mbit, and the maximum number of packets that can receive conflicting messages is 20 bytes; the maximum transmission unit and MAC header size are 1514 byte
The classification is based on the queue.
Generally, you need to create a root category for a queue, and then create a subcategory on it. For a classification, the classification takes effect in the order of serial numbers, and smaller serial numbers take precedence. Once a data packet is sent through a classification matching rule, the subsequent classification does not take effect.
1) create a root category:, assign a bandwidth of 10 Mbit, and set the priority to 8.
· TC class add Dev
by the Network Adapter. Therefore, the upload speed must be limited to eth0.---- Delete old queueTC qdisc del Dev eth0 Root---- Add a root queue with a NIC speed of 10 Mbit, And the upload speed is also availableTC qdisc add Dev eth0 root handle 100: CBQ bandwidth 10 Mbit avpkt 1000---- Add a root classTC class add Dev eth0 parent 100:0 classid 100cbq bandwidth 10 Mbit rate 10 Mbit allot 1514 weight 1 Mbit PRIO 8 maxburst 8 avpkt 1000 bounded---- Add
sending packets, so the upload rate limit to be done on the eth0
----Delete an old queue
TC Qdisc del Dev eth0 root
----Add a root queue, the rate of network card with the rate of 10Mbit, also available upload rate
TC Qdisc Add dev eth0 root handle 100:cbq bandwidth 10Mbit AVPKT 1000
----Add a root class
TC class Add dev eth0 parent 100:0 classid 100:1 CBQ bandwidth 10Mbit rate 10Mbit Allot 1514 weight 1Mbit Prio 8 Maxburst 8 Avpkt bounded
----plus a
bandwidth of 10 Mbit, and set the priority to 8.
· Tc class add dev eth0 parent 1:0 classid 1:1 cbq bandwidth 10 Mbit rate 10 Mbit maxburst 20 allot 1514 prio 8 avpkt 1000 cell 8 weight 1 Mbit
The maximum available bandwidth of this queue is 10 Mbit, the actually allocated bandwidth is 10 Mbit, and the maximum number of packets that can receive conflicting messages is 20 bytes; the maximum transmission unit and MAC header size are 1514 bytes, the pr
-- set-mark 2
------------ Perform traffic control for the upload speed
Tc requires kernel 2.4.18 or above, so upgrade is not enough
Tc can only control the speed at which packets are sent by the Network Adapter. Therefore, the upload speed must be limited to eth0.
---- Delete old queue
Tc qdisc del dev eth0 root
---- Add a root queue with a NIC speed of 10 Mbit, And the upload speed is also available
Tc qdisc add dev eth0 root handle 100: cbq bandwidth 10 Mbit avpkt 1000
---- Add a root class
priority is 6.
1. Create a queueGenerally, only one queue is required for one Nic.
Bind a CBQ queue to the network physical device eth0 with the serial number of 1:0. The actual bandwidth of the network physical device eth0 is 10 Mbit, and the average package size is 1000 bytes; the size of the packet interval sending unit is 8 bytes, and the minimum transfer package size is 64 bytes.· TC qdisc add Dev eth0 root handle 1: CBQ bandwidth 10 Mbit avpkt 1000 cell 8 MPU 64
2. Create a categoryThe cl
number of 1:0. The actual bandwidth of the network physical device eth0 is 10 Mbit, and the average package size is 1000 bytes; the size of the packet interval sending unit is 8 bytes, and the minimum transfer package size is 64 bytes.
? TC qdisc add Dev eth0 root handle 1: CBQ bandwidth 10 Mbit avpkt 1000 cell 8 MPU 64
2. Create a category
The classification is based on the queue. Generally, you need to create a root category for a queue, and then create a subcategory on it. For a classificati
the parameters of commands such as TC in the script, you can refer to the random document, which is limited by space.
#! /Bin/sh
# Path to tc and the ip utilities;
# Change to reflect yours.
TC =./iproute2/tc
IP =./iproute2/ip
######################################## ##########
# Addresses to be aliased
# Change or add more to reflect yours
#
ALIAS1 = 10.0.0.10
ALIAS2 = 10.0.0.11
######################################## ##########
# Add ip aliasing support
# Uncomment if you want to use the
8 bytes in size, and the minimum transport packet size is 64 bytes.tc Qdisc Add dev eth0 root handle 1:cbq bandwidth 10Mbit avpkt cell 8 MPU 642. Create a classificationClassifications are built on top of the queue.In general, a root classification is created for a queue and then sub-classifications are created on it. For classification, the number order of their classification function, the number of small priority; Once a classification matching rule is met, the classification will no longer
queue to the network physical device eth0, which is numbered 1:0, the actual bandwidth of the network physical device eth0 is Mbit, the average packet size is 1000 bytes, the packet interval sending unit is 8 bytes in size, and the minimum transport packet size is 64 bytes. tc Qdisc Add dev eth0 root handle 1:cbq bandwidth 10Mbit avpkt cell 8 MPU 64 2. Create a classification Classifications are built on top of the queue. In general, a root classification is created for a queue and then sub
8 bytes in size, and the minimum transport packet size is 64 bytes.tc Qdisc Add dev eth0 root handle 1:cbq bandwidth 10Mbit avpkt cell 8 MPU 642. Create a classificationClassifications are built on top of the queue.In general, a root classification is created for a queue and then sub-classifications are created on it. For classification, the number order of their classification function, the number of small priority; Once a classification matching rule is met, the classification will no longer
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.