3 Starting up an Active Router
During this discussion the terms Active Router and PLAN node,
both of which refer to the pland program, will be used
interchangeably.
The first step towards being part of an active network is to set up a local
machine as an active router. The pland program serves as the entry
point for the router. For more detailed usage information, please refer to
The PLAN Active Router [3] document. Try typing1:
% bin/pland -help
You will get a message about the usage of pland :
usage : bin/pland [-router] [-firewall d1,d2,...dn] [-l log]
[-ip port] [-rf rout_tab_file] [-hf host_file] [-key key_file]
[-policy policy_file] [-authlist h1,h2,...,hn] ifc_spec_file
-router Turn on router mode.
-firewall Specify devices to firewall (default=None)
-l Set log file.
-ip Specify local port number (default=3324).
-rf Specify static route table file.
-hf Specify host name file (default=EXP_IP_ADDRS).
-key Specify key file (default=./key.<local portnum>).
-policy Specify policy specification file (depends on policy engine in use)
-authlist Specify nodes to authenticate with (default=None)
The -router
option specifies that pland should execute in router mode which means that no local connections to host applications will
be accepted; this should help performance. The -firewall
option
takes a list of comma-separated device names as an argument and specially
processes packets received on those devices; see the Security Guide for more
on the firewall. The argument given to -l
indicates the file that
all messages should be logged to (if none is specified, the file ``log'' in
the current directory will be used; a ``-'' indicates stdout).
The -ip
option specifies the implicit port number that PLAN will
receive local connections on; any program which injects packets to
pland must specify this port. If no port number is given, a default
of 3324 is used. Using different port numbers allows several PLAN nodes in
the same PLAN network to reside on the same machine. Only one Active Router
can be using any port at any time.
The default is that a RIP-style protocol will be used to dynamically
determine the routing tables of the PLAN node. Alternatively, the
-rf
flag can used to specify a file used by this node to form its
routing table. The -hf
flag specifies the name of the file used to
resolve hostnames; this file is in the same format as /etc/hosts. If
no file is specified, ./EXP_IP_ADDRS is used.
To make use of service-level security, the active router must be able to
determine its public and private keys. By default, these keys are read in
from a file in the current directory called key.portnum where
portnum is the node's implicit port. If this file does not exist,
then a default pair of keys is used (essentially meaning that you don't
intend to make use of the security features). Additionally, the -policy flag is used to specify the node's security policy file, which
depends on the policy manager compiled into pland. Additionally,
security relationships will (attempt to be) estabilshed for the
comman-separated list of hosts given to -authlist
. For this
tutorial, we won't be worried about security; for more details, see the PLAN
Security Guide [4].
Finally, the only required argument is the interface specification file.
This file is used to indicate which link layers pland shall run on top
of. A sample file will be given below for expositional purposes. More
details on the interface file format, as well as a more detailed desription
of all of these arguments may be found in [3].
3.1 An Example
Let us construct an active network of two nodes on our machine m (where
m is the DNS name of the machine). We will
first have to construct two interface files; we'll call the first m1
and the second m22.
The contents of the two files:
m1:
1 ip0 ip
m:3324
m:3325
m2:
1 ip0 ip
m:3325
m:3324
These two files describe a virtual network of two nodes, m1 and m2. The
network is virtual because both nodes will run on the same machine, m.
The first file indicates that the node m1 has one IP interface named ip0 with PLAN-network address m:3324
. The network neighbor of
this interface has address m:3325
. The second file indicates
that the node m2 has one IP interface named ip0 (ip device names are
arbitrary) with PLAN-network address m:3325
. The network
neighbor of this interface has address m:3324
.
Before you can start a node, you must add your machine to the DNS resolution
table, by default stored in the file EXP_IP_ADDRS in the plan
directory. This file has the same format as the file /etc/hosts
(and you can in fact provide /etc/hosts as an argument to
-hf if you choose). Looking at the file, you will see entries like:
10.0.1.1 pride.cis.upenn.edu pride
10.0.0.1 wrath.cis.upenn.edu wrath
10.0.0.2 bootsy.cis.upenn.edu bootsy
Each line of the file consists of at least two
fields, separated by whitespace. The first field is the address
of the node, in octet-format, the same as used by IP. If you are
running PLAN on top of IP, then you should specify your machine's
actual IP address here. The second field is the domain name of
the machine. Thus, for our example, we would add the following line
to the table:
w.x.y.z m
where w.x.y.z is the IP address of the machine you are running on, m.
Note that any fields following the name of the machine on the same line
are considered aliases, and can be used interchangeably with the name
itself to refer to the machine. In particular, any calls to the service
getHostByName (explained later) will return the same address
when given any of the aliases mapped to it.
Typing in a terminal window of m in the plan directory3, we can start node m1:
% bin/pland -l log3324 -ip 3324
m1
or alternatively
% bin/pland -l log3324
m1
to make use of the default port setting. In another terminal window, we can
start node m2:
% bin/pland -l log3325 -ip 3325
m2
Notice that the argument to -ip for both nodes matches the port
portion of the network address for each node. This is necessary, for
reasons we shall see below (and further explained in [3]).
If you have any trouble starting up the nodes as described here, please
first refer to the PLAN FAQ, which is present in this distribution as an
HTML file. The most up-to-date version can be found at
http://www.cis.upenn.edu/~switchware/PLAN/FAQ.html
.