Problem in using TC Traffic Control - Networking

This is a discussion on Problem in using TC Traffic Control - Networking ; Hi I am new to “tc” Traffic Control but not new to Linux. I am using Fedora 9 with 2.6.23 kernel with new iproute2 package and preinstalled “tc” in the fedora. I am using the following rules for the “tc”. ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Problem in using TC Traffic Control

  1. Problem in using TC Traffic Control

    Hi
    I am new to “tc” Traffic Control but not new to Linux. I am using
    Fedora 9 with 2.6.23 kernel with new iproute2 package and preinstalled
    “tc” in the fedora. I am using the following rules for the “tc”.


    I am using the Linux Box as a router which is forwarding packets
    already mark with required parameters such as ToS marking, so I think
    I shouldn’t have to use the iptables mangling features.

    The linux is accepting the kernel but the problem is that when I do
    “tc filter show” or “tc class show” it is not showing any thing.

    The packets I am forwarding is not affected by these rules.

    I am using HTB, is there any issue in using this.


    tc qdisc add dev eth1 root handle 1: htb default 20

    tc class add dev eth1 parent 1: classid 1:1 htb rate 100mbit ceil
    100mbit

    tc class add dev eth1 parent 1:1 classid 1:10 htb rate 1mbit ceil
    100mbit tc class add dev eth1 parent 1:1 classid 1:20 htb rate 99mbit
    ceil 100mbit

    tc filter add dev eth1 protocol ip parent 1:0 prio 1 u32 match ip tos
    46 0xff flowid 1:10

    Can any one guide me what I am doing wrong

    Regards
    Karim Asif

  2. Re: Problem in using TC Traffic Control

    Asif wrote:

    > The linux is accepting the kernel but the problem is that when I do
    > “tc filter show” or “tc class show” it is not showing any thing.


    Hmm I would have thought tc would have thrown an error if you used
    those, but it doesn't.

    Your rules work for me, to see them -

    tc -s filter ls dev eth1
    tc -s class ls dev eth1

    > tc qdisc add dev eth1 root handle 1: htb default 20


    Won't matter in this case, but arp will go to default.

    >
    > tc class add dev eth1 parent 1: classid 1:1 htb rate 100mbit ceil
    > 100mbit


    You need to back off from 100mbit if it's a 100mbit nic, try 95 to allow
    for overheads.

    If it's a gig nic you may get issues with tso (tcp segmentation offload)
    causing super size packets. You can turn it off with ethtool -k.

    > tc filter add dev eth1 protocol ip parent 1:0 prio 1 u32 match ip tos
    > 46 0xff flowid 1:10


    I've never used tos to mark, but if it doesn't work remember to check
    for decimal vs hex problems.

+ Reply to Thread