1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

tc syntax

Discussion in 'HyperWRT Firmware' started by noize, Mar 7, 2005.

  1. noize

    noize Network Guru Member

    hi,

    what i have to enter, when i want to give a phys. port a min bandwidth of 100 kbit/s??

    tc filter add .........????

    thanks for help
     
  2. sillygoose

    sillygoose Network Guru Member

    At a minimum i think you are going to need to define class to shape the traffic the way you want and define a filter to match the traffic you want shaped by this class. You may also need to use iptables to get it to filter by port I forget how linksys does that. You can either define this class' parent as an existing qdisc or also define a new qdisc for it.

    check out the howto here http://lartc.org/howto/
     
  3. noize

    noize Network Guru Member

    Sorry, but i dont know a lot about iptables, tc .......

    i will spend time on it ?next? month.
    but i need to give my VoIP-Phone a min. bandwith!

    can someone help me:
    my phone is on the phys. port 2 with ip 192.168.1.150
    i think i have to add something like:
    tc qdisc dev eth? root handle 1 :htb
    tc class add dev eth? parent?:? classid?:? htb rate 256kbit
    ......
    ......
    ......
    ......

    so, can anyone tell me, what i have to add to qdisk.sh???

    my qdisc.sh:
    # more qdisc.sh
    tc qdisc add dev vlan1 root handle 1: htb
    tc class add dev vlan1 parent 1:0 classid 1:1 htb rate 256kbit
    tc qdisc add dev vlan1 parent 1:1 handle 100: prio priomap 2 2 1 2 1 2 0 0 1 1 1
    1 1 1 1 1
    tc qdisc add dev vlan1 parent 100:1 handle 200: pfifo limit 100
    tc qdisc add dev vlan1 parent 100:2 handle 300: pfifo limit 100
    tc qdisc add dev vlan1 parent 100:3 handle 400: pfifo limit 100
    tc filter add dev vlan1 parent 1:0 prio 1 protocol ip u32 match ip protocol 0x0
    0x00 flowid 1:1
    tc qdisc add dev br0 root handle 1: prio priomap 2 2 1 2 1 2 0 0 1 1 1 1 1 1 1 1
    tc qdisc add dev br0 parent 1:1 handle 100: pfifo limit 100
    tc qdisc add dev br0 parent 1:2 handle 200: pfifo limit 100
    tc qdisc add dev br0 parent 1:3 handle 300: pfifo limit 100
    #
    #

    thanks for help
     

Share This Page