simple DSDV configuration

Douglas S. J. De Couto decouto at lcs.mit.edu
Tue Feb 18 11:40:44 EST 2003


here is a simplified version of a configuration to do only DSDV.  For
this configuration to work, you need to have the latest version of CVS
click, as the implementation of many elements have changed.  The stuff
on the grid web-page is really out of date.  I don't have a graph for
this config, you'll have to draw one yourself.  I generated this
configuration using conf/simple-dsdv.click and
tools/build-grid-config.sh

I used this command to produce the following configuration on my
machine:

./tools/build-grid-config.sh 18.26.7.1 255.255.255.0 eth1 \
    --click ./userlevel/click --config ./conf/simple-dsdv.click \
    --params ./tools/grid-params.m4 


here is the config (slightly reformatted):

////////////////////////////////////////////////////

// simple-dsdv.click

// bare-bones kernel-compatible DSDV configuration for a single interfac

// to be used with tools/build-grid-config.sh

elementclass ToGridDev {
  // push, no output

  // Send packets to the output device, fixing location and checksum
  // header fields; maintain separate queues for protocol and data
  // packets; send a copy of the packet to sniffers such as tcpdump.
  $dev |
  input -> cl :: Classifier(19/02,
			    19/03);
  prio :: PrioSched;
  cl [0] -> route_counter :: Counter -> route_q :: Queue(5) -> [0] prio;
  cl [1] ->  data_counter :: Counter ->  data_q :: Queue(5) -> [1] prio;
  prio
    -> FixSrcLoc(li)
    -> SetGridChecksum
    -> t :: PullTee 
    -> ToDevice($dev);
  t [1] -> SetTimestamp -> ToHostSniffers($dev);
};

elementclass FromGridDev {
  // push, no input

  // Get packets from the input device; ignore non-grid packets, or
  // packets that are corrupt; send a copy of any packet we process to
  // sniffers such as tcpdump.
  $dev, $mac |
  FromDevice($dev, PROMISC false) 
    -> t :: Tee 
    -> Classifier(12/7fff)
    -> HostEtherFilter($mac, DROP_OWN true)
    -> ck :: CheckGridHeader
    -> output;
  t [1] -> ToHostSniffers($dev);
  ck [1] -> Print("Bad Grid header received", TIMESTAMP true) -> Discard;
};

li :: GridLocationInfo2(0, 0, LOC_GOOD false);

nb :: DSDVRouteTable(3200,
		     1300, 300, 500,
		     00:40:96:34:91:06, 18.26.7.1, 
		     MAX_HOPS 100,
                     METRIC hopcount);

lr :: LookupLocalGridRoute2(00:40:96:34:91:06, 18.26.7.1, nb);

grid_demux :: Classifier(19/03,    // encapsulated (data) packets
			 19/02)     // route advertisement packets

arp_demux :: Classifier(12/0806 20/0001, // arp queries
			12/0800);        // IP packets

// handles IP packets with no extra encapsulation
ip_demux :: IPClassifier(dst host 18.26.7.1,   // ip for us
			 dst net 18.26.7/24);  // ip for Grid network

// handles IP packets with Grid data encapsulation
grid_data_demux :: IPClassifier(dst host 18.26.7.1,   // ip for us
				dst net 18.26.7/24);  // ip for Grid network

// dev0
FromGridDev(eth1, 00:40:96:34:91:06) -> Paint(0) -> grid_demux
dev0 :: ToGridDev(eth1);


grid_demux [0] -> Align(4, 2) -> CheckIPHeader( , 82) -> grid_data_demux;
grid_demux [1] -> nb -> dev0;

to_host :: ToHost(grid0);
to_host_encap :: EtherEncap(0x0800, 1:1:1:1:1:1, 2:2:2:2:2:2) -> to_host; 
from_host :: FromHost(grid0, 18.26.7.1/255.255.255.0) -> arp_demux -> ARPResponder(0.0.0.0/0 1:1:1:1:1:1) -> to_host;
arp_demux [1] -> Strip(14) -> CheckIPHeader -> GetIPAddress(16) -> ip_demux;

ip_demux [0] -> IPPrint("ip_loopback") -> to_host_encap;  // loopback packet sent by us
ip_demux [1] -> GridEncap(00:40:96:34:91:06, 18.26.7.1) -> lr;  // forward packet sent by us

grid_data_demux [0] -> Strip(82) -> to_host_encap;  // receive packet from net for us  
grid_data_demux [1] -> lr;                          // forward packet from net for someone else

lr -> dev0;












More information about the click mailing list