Click Configuration

roy roy_cfk at hotmail.com
Fri Jan 18 16:26:06 EST 2002


Hi,

I would like to build denial-service-router using IPRateMonitor. But
encounter this message:

#cat /proc/click/errors:
line 14: can't reuse `rm0 :: IPRateMonitor' push output 0
line 34: `b1 :: CompareBlock' input 0 unused
line 14: `rm0 :: IPRateMonitor' output 1 unused
Router could not be initialized!

The configuration file as below:

      1 // Generated by make-ip-conf.pl
      2 // eth0 172.17.16.113 00:C0:4F:18:B0:F2
      3 // eth1 172.17.15.10 00:20:AF:D5:56:B8
      4
      5 tol :: ToLinux;
      6 t :: Tee(3);
      7 t[2] -> tol;
      8
      9 c0 :: Classifier(12/0806 20/0001,
     10                   12/0806 20/0002,
     11                   12/0800,
     12                   -);
     13
     14 rm0 :: IPRateMonitor(PACKETS, 0.5, 256, 600);
     15
     16 b0 :: CompareBlock(5, 2, 100);
     17 b0[0] -> [0]c0;
     18 b0[1] -> co3 :: Counter -> Discard;
     19
     20 FromDevice(eth0) -> co1 :: Counter -> [0]rm0 -> b0;
     21 out0 :: Queue(200) -> todevice0 :: ToDevice(eth0);
     22 arpq0 :: ARPQuerier(172.17.16.113, 00:C0:4F:18:B0:F2);
     23 c0 [1] -> t;
     24 t[0] -> [1]arpq0;
     25 arpq0 -> out0;
     26 ar0 :: ARPResponder(172.17.16.113 00:C0:4F:18:B0:F2);
     27 c0 [0] -> ar0 -> out0;
     28
     29 c1 :: Classifier(12/0806 20/0001,
     30                   12/0806 20/0002,
     31                   12/0800,
     32                   -);
     33
     34 b1 :: CompareBlock(5, 2, 100);
     35 b1[0] -> [0]c1;
     36 b1[1] -> co4 :: Counter -> Discard;
     37
     38 FromDevice(eth1) -> co2 :: Counter -> [1]rm0 -> b1;
     39 out1 :: Queue(200) -> todevice1 :: ToDevice(eth1);
     40 arpq1 :: ARPQuerier(172.17.15.10, 00:20:AF:D5:56:B8);
     41 c1 [1] -> t;
     42 t[1] -> [1]arpq1;
     43 arpq1 -> out1;
     44 ar1 :: ARPResponder(172.17.15.10 00:20:AF:D5:56:B8);
     45 c1 [0] -> ar1 -> out1;
     46
     47 rt :: StaticIPLookup(
     48  172.17.16.113/32 0,
     49  172.17.16.255/32 0,
     50  172.17.16.0/32 0,
     51  172.17.15.10/32 0,
     52  172.17.15.255/32 0,
     53  172.17.15.0/32 0,
     54  172.17.16.0/255.255.255.0 1,
     55  172.17.15.0/255.255.255.0 2,
     56  255.255.255.255/32 0.0.0.0 0,
     57  0.0.0.0/32 0);
     58 // 0.0.0.0/0 18.26.4.1 1);
     59
     60 rt[0] -> EtherEncap(0x0800, 1:1:1:1:1:1, 2:2:2:2:2:2) -> tol;
     61 ip ::  Strip(14)
     62     -> CheckIPHeader(172.17.16.255 172.17.15.255 )
     63     -> GetIPAddress(16)
     64     -> [0]rt;
     65 c0 [2] -> Paint(1) -> ip;
     66 c1 [2] -> Paint(2) -> ip;
     67
     68 rt[1] -> DropBroadcasts
     69         -> cp0 :: PaintTee(1)
     70         -> gio0 :: IPGWOptions(172.17.16.113)
     71         -> FixIPSrc(172.17.16.113)
     72         -> dt0 :: DecIPTTL
     73         -> fr0 :: IPFragmenter(1500)
     74         -> [0]arpq0;
     75 dt0 [1] -> ICMPError(172.17.16.113, 11, 0) -> [0]rt;
     76 fr0 [1] -> ICMPError(172.17.16.113, 3, 4) -> [0]rt;
     77 gio0 [1] -> ICMPError(172.17.16.113, 12, 1) -> [0]rt;
     78 cp0 [1] -> ICMPError(172.17.16.113, 5, 1) -> [0]rt;
     79 c0 [3] -> Print(xx0) -> Discard;
     80 rt[2] -> DropBroadcasts
     81         -> cp1 :: PaintTee(2)
     82         -> gio1 :: IPGWOptions(172.17.15.10)
     83         -> FixIPSrc(172.17.15.10)
     84         -> dt1 :: DecIPTTL
     85         -> fr1 :: IPFragmenter(1500)
     86         -> [0]arpq1;
     87 dt1 [1] -> ICMPError(172.17.15.10, 11, 0) -> [0]rt;
     88 fr1 [1] -> ICMPError(172.17.15.10, 3, 4) -> [0]rt;
     89 gio1 [1] -> ICMPError(172.17.15.10, 12, 1) -> [0]rt;
     90 cp1 [1] -> ICMPError(172.17.15.10, 5, 1) -> [0]rt;
     91 c1 [3] -> Print(xx1) -> Discard;

----- Original Message -----
From: "Eddie Kohler" <kohler at icir.org>
To: "roy" <roy_cfk at hotmail.com>
Cc: <click at amsterdam.lcs.mit.edu>
Sent: Friday, January 18, 2002 1:58 AM
Subject: Re: Click Configuration


> Hi Roy,
>
> I'm guessing that you are confused about how to connect IPRateMonitor
> multiple times.
>
> The key is to give it a name with the "::" construct, then reuse that
name.
> For example:
>
> ratemon :: IPRateMonitor;
>
> FromDevice(eth0) -> [0] ratemon;
> FromDevice(eth1) -> [1] ratemon;
> ratemon [0] -> ToDevice(eth1);
> ratemon [1] -> ToDevice(eth0);
> ratemon [2] -> Discard;
>
> Look in the "conf/" subdirectory of the distribution for more examples, or
> on the Web at www.pdos.lcs.mit.edu/click/ex/
>
> Eddie
>
> > Anyone know how to derive click configuration from this diagram: -
> >
> > FromDevice(eth0) ->                                   -> ToDevice(eth1)
> >                                    IPRateMonitor      -> ToDevice(eth0)
> > FromDevice(eth1) ->                                   -> Discard
> >
> > Your help very much appreciated.
>
>



More information about the click mailing list