I could manage it now, modified the netfilter src, add another table not mangle, Which runs after NAT_SRC. :-) Another problem: We know HTB is a tree structure, does it permit to jump to the leaf directly?(I use cls_fw which attached to the root, and with no options, so cls_fw would use nfmark of skb as classid and jump directly into leaf, no traverse) but when I use these: tc qdisc add dev eth0 root handle 1: htb default 12 tc class add dev eth0 parent 1: classid 1:1 htb rate 100kbps ceil 100kbps burst 2k tc class add dev eth0 parent 1:1 classid 1:10 htb rate 30kbps ceil 100kbps burst 2k tc class add dev eth0 parent 1:1 classid 1:11 htb rate 10kbps ceil 100kbps burst 2k tc class add dev eth0 parent 1:1 classid 1:12 htb rate 60kbps ceil 100kbps burst 2k tc filter add dev eth0 protocol ip fw that, packets marked with 0x1000a don't jump into 1:10, why? But when I use these: tc qdisc add dev eth0 root handle 1: htb default 2 tc class add dev eth0 parent 1: classid 1:1 htb rate 5kbps ceil 5kbps burst 2k tc class add dev eth0 parent 1: classid 1:2 htb rate 10kbps ceil 10kbps burst 2k tc filter add dev eth0 protocol ip fw in this situation, packets marked with 0x10001 succeeded in jumping into 1:1. Why? -----Original Message----- From: lartc-admin@xxxxxxxxxxxxxxx [mailto:lartc-admin@xxxxxxxxxxxxxxx] On Behalf Of yangrunhua Sent: 2001年12月12日 13:47 To: lartc@xxxxxxxxxxxxxxx Subject: RE: [LARTC] HTB problem Now, I know the where the problem is. If I already use SNAT, how could I limit the inbound bandwidth of Every intra-network ip protected by SNAT( with the help of iptables nfmark)? But mangle at PREROUTING goes before NAT translate. Is there any method? Thanks. -----Original Message----- From: bert hubert [mailto:ahu@xxxxxxx] Sent: 2001年12月11日 19:10 To: yangrunhua Cc: lartc@xxxxxxxxxxxxxxx Subject: Re: [LARTC] HTB problem On Tue, Dec 11, 2001 at 05:34:22PM +0800, yangrunhua wrote: > tc qdisc add dev eth0 root handle 1: htb default 2 > tc class add dev eth0 parent 1: classid 1:1 htb rate 5kbps ceil 5kbps > burst 2k tc class add dev eth0 parent 1: classid 1:2 htb rate 10mbps > ceil 10mbps burst 2k > tc filter add dev eth0 protocol ip fw I still have a very hard time figuring out your configuration. Please list the following: * your iptables commands * your tc qdisc add commands * your tc class add commands * what kind of traffic you are generating Thanks. -- http://www.PowerDNS.com Versatile DNS Software & Services Trilab The Technology People Netherlabs BV / Rent-a-Nerd.nl - Nerd Available - 'SYN! .. SYN|ACK! .. ACK!' - the mating call of the internet _______________________________________________ LARTC mailing list / LARTC@xxxxxxxxxxxxxxx http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/