LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   tc different behavior: redhat5.6 - redhat6.2 (doesn't work well for specific port) (https://www.linuxquestions.org/questions/linux-networking-3/tc-different-behavior-redhat5-6-redhat6-2-doesnt-work-well-for-specific-port-4175473878/)

hudac 08-19-2013 06:32 AM

tc different behavior: redhat5.6 - redhat6.2 (doesn't work well for specific port)
 
Hey,
I wrote once a script which runs `tc` commands in order to create `tc` on specific port.
The `tc` commands ran on `redhat5.6` perfectly.

Now, when I upgraded to `redhat6.2` I've noticed that `tc` doesn't work well on `dev lo` (loopback) and btw still works for `dev eth0`;
When I ran `tc` command on `dev lo` for specific port, let's say 8999, all of the ports on the `lo` get stuck, doesn't matter how much I limit the port. When I delete `tc` structure my process (which use another port or the same, let's say 8998) doesn't return to normal.
My process can run normally only if I don't use the `tc` command on the `lo` at all. At the moment I start `tc` on any port on the `lo`, on any limitation, my process get stuck.

Is there any change in `redhat6.2` that may affect this strange behavior?

My `tc` commands:

initialization: delete `tc` stracture on `lo`:

Code:

tc qdisc del dev lo root
for `lo` put `mtu` to 1500

Code:

ifconfig lo mtu 1500 up
create the root and 1:1

Code:

tc qdisc add dev lo root handle 1: htb default 1
limit free for all ports

Code:

tc class add dev lo parent 1: classid 1:1 htb rate 1024mbit
limit bit rate for specific port to 500kbit

Code:

tc class add dev lo parent 1: classid 1:10 htb rate 500kbit
filter which leads packets to 1:10 (limit-class)

Code:

tc filter add dev lo parent 1: prio 1 protocol ip u32 match ip sport 8999 0xffff flowid 1:10
Thanks.

druuna 08-19-2013 07:01 AM

Cross-posting is against the LQ rules. Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place.

Continue in the other/original thread: https://www.linuxquestions.org/quest...rt-4175471377/

Reported for closure.


All times are GMT -5. The time now is 09:04 AM.