All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] TCNG fw classifier question
@ 2003-03-04 23:06 bauer
  2003-03-05 19:38 ` Steven Bauer
  0 siblings, 1 reply; 2+ messages in thread
From: bauer @ 2003-03-04 23:06 UTC (permalink / raw)
  To: lartc

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 100000 {
                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. 

.000000 T : qdisc add dev eth0 handle 1:0 root htb
0.000000 T : class add dev eth0 parent 1:0 classid 1:100 htb rate
16000bps ceil 18750bps
0.000000 T : qdisc add dev eth0 handle 2:0 parent 1:100 htb
0.000000 T : class add dev eth0 parent 2:0 classid 2:1 htb rate 12500bps
ceil 15000bps
0.000000 T : qdisc add dev eth0 handle 3:0 parent 2:1 sfq perturb 10
0.000000 T : filter add dev eth0 parent 2:0 protocol all prio 1 u32
match u32 0x0 0x0 at 0 classid 2:1
0.000000 T : class add dev eth0 parent 1:0 classid 1:200 htb rate
16000bps ceil 18750bps
0.000000 T : qdisc add dev eth0 handle 4:0 parent 1:200 htb
0.000000 T : class add dev eth0 parent 4:0 classid 4:1 htb rate 6250bps
ceil 7500bps
0.000000 T : qdisc add dev eth0 handle 5:0 parent 4:1 sfq perturb 10
0.000000 T : filter add dev eth0 parent 4:0 protocol all prio 1 u32
match u32 0x0 0x0 at 0 classid 4:1
0.000000 T : filter add dev eth0 parent 1:0 protocol all prio 1 fw
0.000000 E : 0x80ced10 60 : eth0: 4500003c 00000000 40000000 0a000001
121a006a 45000000 00000000 40060000 0a000001 121a006a 00000000 00000000
00000000 50000000 00000000
0.000000 e : 0x80ced10 60 : <0> calling htb (1:0)
0.000000 c : 0x80ced10 60 : <1> calling fw at 1:0, prio 0x00010000
0.000000 c : 0x80ced10 60 : <1> fw at 1:0 returns OK (0) (0:100, 0x0)
0.000000 e : 0x80ced10 60 : <0> htb (1:0) returns SUCCESS (0)
0.000000 d : 0x0 0 : <0> calling htb (1:0)
0.000000 d : 0x80ced10 60 : <0> htb (1:0)
0.000000 D : 0x80ced10 60 : eth0: 4500003c 00000000 40000000 0a000001
121a006a 45000000 00000000 40060000 0a000001 121a006a 00000000 00000000
00000000 50000000 00000000
0.000000 E : 0x80cf088 60 : eth0: 4500003c 00000000 40060000 0a000001
121a006b 45000000 00000000 40060000 0a000001 121a006b 00000000 00000000
00000000 50000000 00000000
0.000000 e : 0x80cf088 60 : <0> calling htb (1:0)
0.000000 c : 0x80cf088 60 : <1> calling fw at 1:0, prio 0x00010000
0.000000 c : 0x80cf088 60 : <1> fw at 1:0 returns OK (0) (0:200, 0x0)
0.000000 e : 0x80cf088 60 : <0> htb (1:0) returns SUCCESS (0)
0.000005 d : 0x0 0 : <0> calling htb (1:0)
0.000005 d : 0x80cf088 60 : <0> htb (1:0)
0.000005 D : 0x80cf088 60 : eth0: 4500003c 00000000 40060000 0a000001
121a006b 45000000 00000000 40060000 0a000001 121a006b 00000000 00000000
00000000 50000000 00000000
0.000010 d : 0x0 0 : <0> calling htb (1:0)
0.000010 d : 0x0 0 : <0> htb (1:0)
0.000010 d : 0x0 0 : <0> calling htb (1:0)
0.000010 d : 0x0 0 : <0> htb (1:0)
1.000000 d : 0x0 0 : <0> calling htb (1:0)
1.000000 d : 0x0 0 : <0> htb (1:0)
1.000000 d : 0x0 0 : <0> calling htb (1:0)
1.000000 d : 0x0 0 : <0> htb (1:0)
1.000000 d : 0x0 0 : <0> calling htb (1:0)
1.000000 d : 0x0 0 : <0> htb (1:0)
10.000000 d : 0x0 0 : <0> calling htb (1:0)
10.000000 d : 0x0 0 : <0> htb (1:0)
10.000000 d : 0x0 0 : <0> calling htb (1:0)
10.000000 d : 0x0 0 : <0> htb (1:0)
3600.000000 d : 0x0 0 : <0> calling htb (1:0)
3600.000000 d : 0x0 0 : <0> htb (1:0)


_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [LARTC] TCNG fw classifier question
  2003-03-04 23:06 [LARTC] TCNG fw classifier question bauer
@ 2003-03-05 19:38 ` Steven Bauer
  0 siblings, 0 replies; 2+ messages in thread
From: Steven Bauer @ 2003-03-05 19:38 UTC (permalink / raw)
  To: lartc

bauer@MIT.EDU [bauer@MIT.EDU] 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 / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-03-05 19:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-04 23:06 [LARTC] TCNG fw classifier question bauer
2003-03-05 19:38 ` Steven Bauer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.