A Linux system-based, TC flow control

Source: Internet
Author: User

#! /bin/bash

TC Qdisc del Dev $lan root &>/dev/null



TC Qdisc Add dev $lan root handle 1:HTB default 10


TC class Add dev $lan parent 1:classid 1:1 HTB rate 100Mbit


TC class Add Dev $lan parent 1:1 classid 1:10 HTB rate 10Mbit ceil 15Mbit burst 20kbit


TC class Add Dev $lan parent 1:1 classid 1:2 HTB rate 1Mbit ceil 2Mbit burst 15kbit



For ((i=230;i<=238;i++))

Do

TC Filter Add dev $lan protoco IP parent 1:prio 1 u32 match IP DST "192.168.20. $i" Flowid 1:2

Done


A TC-based flow control script


1:2 is the name of the class, if there are 3 network segments, then write 3 is bad, you can use the same name class, can also be different name

Links: http://zhangchong105.blog.163.com/blog/static/844814802012114112830295/

A Linux system-based, TC flow control

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.