[Click] Single NIC Router config sample

Eddie Kohler kohler at CS.UCLA.EDU
Mon Sep 13 22:09:46 EDT 2004


Hi Beyers!

Sorry for the delay.  Thanks for sending this config; I think it's 
probably the right way to do this, and it's interesting.  However, it 
would be a lot more attractive if you helped us change 
"make-ip-conf.pl" to support this kind of configuration, if given the 
right options.  Would you like to try this?

Eddie


On Aug 13, 2004, at 5:45 AM, Beyers Cronje wrote:

> I've just started playing around with Click config and thought you 
> might want to add the following "Single NIC Router config" to the 
> samples page. This can be ideal to play around with Click when you 
> only have one NIC installed in the router.
>
> The sample config runs two subnets 10.51.1.0/24 and 192.168.0.0/24 on 
> the single interface. I havent tested this config extensively but it 
> seems to work just fine. Default route points to 192.168.0.1. I'm new 
> to Click so should anyone feel there is a better config for this 
> scenario feel free to enlighten me.
>
> Regards
>
> Beyers Cronje
>
>
> //*****************************************
> // Generated by make-ip-conf.pl
> // eth0 10.51.1.1 00:0D:61:CB:C9:EA
> // eth0 192.168.0.2 00:0D:61:CB:C9:EA
>
> // Shared IP input path and routing table
> ip :: Strip(14)
>     -> CheckIPHeader(INTERFACES 10.51.1.1/255.255.255.0 
> 192.168.0.2/255.255.255.0)
>     -> rt :: StaticIPLookup(
> 	10.51.1.1/32 0,
> 	10.51.1.255/32 0,
> 	10.51.1.0/32 0,
> 	192.168.0.2/32 0,
> 	192.168.0.255/32 0,
> 	192.168.0.0/32 0,
> 	10.51.1.0/255.255.255.0 1,
> 	192.168.0.0/255.255.255.0 2,
> 	255.255.255.255/32 0.0.0.0 0,
> 	0.0.0.0/32 0,
> 	0.0.0.0/0.0.0.0 192.168.0.1 1);
>
> // ARP responses are copied to each ARPQuerier and the host.
> arpt :: Tee(3);
>
> // Input and output paths for eth0
> c0 :: Classifier(12/0806 20/0001,12/0806 20/0002 38/0A330101 ,12/0806 
> 20/0002 38/C0A80002,12/0800, -);
> FromDevice(eth0) -> c0;
> out0 :: Queue(200) -> todevice0 :: ToDevice(eth0);
> c0[0] -> ar0 :: ARPResponder(10.51.1.1 00:0D:61:CB:C9:EA, 192.168.0.2 
> 00:0D:61:CB:C9:EA) -> out0;
> arpq0 :: ARPQuerier(10.51.1.1, 00:0D:61:CB:C9:EA) -> out0;
> arpq1 :: ARPQuerier(192.168.0.2, 00:0D:61:CB:C9:EA) -> out0;
> c0[1] -> arpt;
> arpt[0] -> [1]arpq0;
> c0[2] -> arpt;
> arpt[1] -> [1]arpq1;
>
> c0[3] -> Paint(1) -> ip;
> c0[4] -> Print("eth0 non-IP") -> Discard;
>
>
> // Local delivery
> toh :: ToHost;
> arpt[2] -> toh;
> rt[0] -> EtherEncap(0x0800, 1:1:1:1:1:1, 2:2:2:2:2:2) -> toh;
>
> // Forwarding path for eth0
> rt[1] -> DropBroadcasts
>     -> cp0 :: PaintTee(1)
>     -> gio0 :: IPGWOptions(10.51.1.1)
>     -> FixIPSrc(10.51.1.1)
>     -> dt0 :: DecIPTTL
>     -> fr0 :: IPFragmenter(1500)
>     -> [0]arpq0;
> dt0[1] -> ICMPError(10.51.1.1, timeexceeded) -> rt;
> fr0[1] -> ICMPError(10.51.1.1, unreachable, needfrag) -> rt;
> gio0[1] -> ICMPError(10.51.1.1, parameterproblem) -> rt;
> cp0[1] -> ICMPError(10.51.1.1, redirect, host) -> rt;
>
> // Forwarding path for eth0
> rt[2] -> DropBroadcasts
>     -> cp1 :: PaintTee(2)
>     -> gio1 :: IPGWOptions(192.168.0.2)
>     -> FixIPSrc(192.168.0.2)
>     -> dt1 :: DecIPTTL
>     -> fr1 :: IPFragmenter(1500)
>     -> [0]arpq1;
> dt1[1] -> ICMPError(192.168.0.2, timeexceeded) -> rt;
> fr1[1] -> ICMPError(192.168.0.2, unreachable, needfrag) -> rt;
> gio1[1] -> ICMPError(192.168.0.2, parameterproblem) -> rt;
> cp1[1] -> ICMPError(192.168.0.2, redirect, host) -> rt;
> This is an email from CS Holdings. It is confidential to the ordinary 
> user of the email address
> to which it is addressed and may contain copyright and/or legally 
> privileged information. No one
> else may read, print, store, copy, forward or act in reliance upon all 
> or any part of it or its
> attachments. If you received this email in error please notify its 
> sender.
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click



More information about the click mailing list