[LARTC] Traffic problems on HTB Router.

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,
Sorry for the long post, and bad ascii art...

I have been using HTB for about 6 or so months without problems, but I have recently set it up on a separate network and am having a few issues.

Network Setup.

                    B
                   /
Internet ------ A /--- C
                  \
                   \
                    D

A is my internet router running kernel 2.4.20 with HTB
eth0 = 202.162.100.201/30, eth1 = 192.168.0.1/24

B, eth0 = 192.168.0.2/24
C, eth0 = 192.168.0.32/24
D, eth0 = 192.168.0.33/24
are hosts hanging off my network.

in my HTB setup I have the following classes.
tc qdisc add dev eth0 root handle 1: htb default 2
tc class add dev eth0 parent 1: classid 1:1 htb rate 10240kbit ceil 10240kbit
tc class add dev eth0 parent 1:1 classid 1:2 htb rate 4kbit ceil 4kbit
tc class add dev eth0 parent 1:1 classid 1:3 htb rate 4kbit ceil 10240kbit
tc class add dev eth0 parent 1:1 classid 1:4 htb rate 4kbit ceil 64kbit
tc qdisc add dev eth1 root handle 1: htb default 2
tc class add dev eth1 parent 1: classid 1:1 htb rate 10240kbit ceil 10240kbit
tc class add dev eth1 parent 1:1 classid 1:2 htb rate 4kbit ceil 4kbit
tc class add dev eth1 parent 1:1 classid 1:3 htb rate 4kbit ceil 10240kbit
tc class add dev eth1 parent 1:1 classid 1:4 htb rate 4kbit ceil 64kbit

..and filters.
tc filter add dev eth0 protocol ip parent 1: prio 1 handle 3 fw flowid 1:3
tc filter add dev eth0 protocol ip parent 1: prio 1 handle 4 fw flowid 1:4
tc filter add dev eth1 protocol ip parent 1: prio 1 handle 3 fw flowid 1:3
tc filter add dev eth1 protocol ip parent 1: prio 1 handle 4 fw flowid 1:4

....and netfilter entries.
iptables -A PREROUTING -t mangle -s 192.168.0.1 -j MARK --set-mark 3
iptables -A PREROUTING -t mangle -s 192.168.0.2 -j MARK --set-mark 3
iptables -A PREROUTING -t mangle -s 202.162.100.201 -j MARK --set-mark 3
iptables -A PREROUTING -t mangle -s 192.168.0.32/28 -j MARK --set-mark 4


[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux