Re: [LARTC] TCNG fw classifier question

2003-03-05 Thread Steven Bauer
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
I think I must have the syntax wrong for using the firewall classifier
in TCNG.  Can anyone offer any suggestions for what I am doing wrong.  
Details below...

I am answering my own question here in hopes that anyone reading the 
archive might benefit.

Working syntax is below:

dev eth0 {
htb (rate 128kbps, ceil 150kbps ) {
$c1 = class {
htb (rate 100kbps, ceil 120kbps ) {
class if 1 {
sfq(perturb 10secs);
}
}
};
$c2 = class {
htb (rate 50kbps, ceil 60kbps ) {
class if 1 {
sfq(perturb 10secs);
}
}
};
fw {
class $c1 on (1);
class $c2 on (2);
}
}
}



___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


[LARTC] TCNG fw classifier question

2003-03-04 Thread bauer
I think I must have the syntax wrong for using the firewall classifier
in TCNG.  Can anyone offer any suggestions for what I am doing wrong.  
Details below...

#include packet.def

dev eth0 10 {
htb (rate 128kbps, ceil 150kbps ) {
fw;
class (0x100) {
htb (rate 100kbps, ceil 120kbps ) {
class if 1 {
sfq(perturb 10secs);
}
}
}
class (0x200) {
htb (rate 50kbps, ceil 60kbps ) {
class if 1 {
sfq(perturb 10secs);
}
}
}
}
}

send nfmark=0x100 TCP_PCK()
send nfmark=0x200 TCP_PCK()
end

Invoked with tcsim -v -v -v test3.tcsim.  You can 
see in the resulting simulation run that the packet never 
makes it to the queues I had intended, namely the sfqs. 

.00 T : qdisc add dev eth0 handle 1:0 root htb
0.00 T : class add dev eth0 parent 1:0 classid 1:100 htb rate
16000bps ceil 18750bps
0.00 T : qdisc add dev eth0 handle 2:0 parent 1:100 htb
0.00 T : class add dev eth0 parent 2:0 classid 2:1 htb rate 12500bps
ceil 15000bps
0.00 T : qdisc add dev eth0 handle 3:0 parent 2:1 sfq perturb 10
0.00 T : filter add dev eth0 parent 2:0 protocol all prio 1 u32
match u32 0x0 0x0 at 0 classid 2:1
0.00 T : class add dev eth0 parent 1:0 classid 1:200 htb rate
16000bps ceil 18750bps
0.00 T : qdisc add dev eth0 handle 4:0 parent 1:200 htb
0.00 T : class add dev eth0 parent 4:0 classid 4:1 htb rate 6250bps
ceil 7500bps
0.00 T : qdisc add dev eth0 handle 5:0 parent 4:1 sfq perturb 10
0.00 T : filter add dev eth0 parent 4:0 protocol all prio 1 u32
match u32 0x0 0x0 at 0 classid 4:1
0.00 T : filter add dev eth0 parent 1:0 protocol all prio 1 fw
0.00 E : 0x80ced10 60 : eth0: 453c  4000 0a01
121a006a 4500  4006 0a01 121a006a  
 5000 
0.00 e : 0x80ced10 60 : 0 calling htb (1:0)
0.00 c : 0x80ced10 60 : 1 calling fw at 1:0, prio 0x0001
0.00 c : 0x80ced10 60 : 1 fw at 1:0 returns OK (0) (0:100, 0x0)
0.00 e : 0x80ced10 60 : 0 htb (1:0) returns SUCCESS (0)
0.00 d : 0x0 0 : 0 calling htb (1:0)
0.00 d : 0x80ced10 60 : 0 htb (1:0)
0.00 D : 0x80ced10 60 : eth0: 453c  4000 0a01
121a006a 4500  4006 0a01 121a006a  
 5000 
0.00 E : 0x80cf088 60 : eth0: 453c  4006 0a01
121a006b 4500  4006 0a01 121a006b  
 5000 
0.00 e : 0x80cf088 60 : 0 calling htb (1:0)
0.00 c : 0x80cf088 60 : 1 calling fw at 1:0, prio 0x0001
0.00 c : 0x80cf088 60 : 1 fw at 1:0 returns OK (0) (0:200, 0x0)
0.00 e : 0x80cf088 60 : 0 htb (1:0) returns SUCCESS (0)
0.05 d : 0x0 0 : 0 calling htb (1:0)
0.05 d : 0x80cf088 60 : 0 htb (1:0)
0.05 D : 0x80cf088 60 : eth0: 453c  4006 0a01
121a006b 4500  4006 0a01 121a006b  
 5000 
0.10 d : 0x0 0 : 0 calling htb (1:0)
0.10 d : 0x0 0 : 0 htb (1:0)
0.10 d : 0x0 0 : 0 calling htb (1:0)
0.10 d : 0x0 0 : 0 htb (1:0)
1.00 d : 0x0 0 : 0 calling htb (1:0)
1.00 d : 0x0 0 : 0 htb (1:0)
1.00 d : 0x0 0 : 0 calling htb (1:0)
1.00 d : 0x0 0 : 0 htb (1:0)
1.00 d : 0x0 0 : 0 calling htb (1:0)
1.00 d : 0x0 0 : 0 htb (1:0)
10.00 d : 0x0 0 : 0 calling htb (1:0)
10.00 d : 0x0 0 : 0 htb (1:0)
10.00 d : 0x0 0 : 0 calling htb (1:0)
10.00 d : 0x0 0 : 0 htb (1:0)
3600.00 d : 0x0 0 : 0 calling htb (1:0)
3600.00 d : 0x0 0 : 0 htb (1:0)


___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/