Re: [LARTC] Traffic problems on HTB Router. <--- Solved.

Linux Advanced Routing and Traffic Control

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

 



grr....
dont you hate that, all I needed to do was read my post to figure it out.

Netfilter entries for the local box need to go in the OUTPUT chain of the mangle table, not the PREROUTING......

Thanks list,
Aaron Daniels
Chincogan Network Services
http://www.chincogan.net.au/

On Wed, 5 Mar 2003 23:03:13 +1100
Chincogan Network Services Lists <lists@xxxxxxxxxxxxxxxx> wrote:

> 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
> 
> From the internet Hosts C and D get their 64k fine which is correct.
> Host B gets his 10mbit which is correct, but....
> Host A only gets the default rate, I have tested this by changing the default rate and the speed gets faster and slower etc.
> A should be in the 10mbit class with host B.
> 
> So my question is how do I put host A in class 1:3 with host B, I thought by setting mark 3 on packets from its IP it would?
> 
> Thanks for your help,
> Aaron Daniels
> Chincogan Network Services
> http://www.chincogan.net.au/
> 
> _______________________________________________
> LARTC mailing list / LARTC@xxxxxxxxxxxxxxx
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
> 


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