[Xorp-hackers] Interfacing for runtime config

Pavlin Radoslavov pavlin@icir.org
Thu, 25 Aug 2005 09:40:38 -0700


> This message is in MIME format. Since your mail reader does not understand
> this format, some or all of this message may not be legible.
> 
> ------_=_NextPart_001_01C5A98F.2DA9DBF2
> Content-Type: text/plain
> 
> I am needing to find out how would be the best way to config XORP at init.
> Our system does not have predefined interfaces until some our applications
> come up and do the IPCP over the backhaul and read from a database.  We then
> set up our interfaces and then bring up XORP for PIM and IGMP functionality.
> So for us to have a boot.config is not possible.  Is there a way to write my
> our process that I can allow the other apps to talk to and tell it what the
> interface info is so I can config the VIFs?

Below is one possible solution:

1. Start XORP with an empty configuration file.

2. After your applications have started up and all interface
information is available, then use an automated script to
auto-generate the XORP configuration based on the available
information. Write that configuration to a XORP config file
(config.boot).

3. Execute a script like the following to reconfigure XORP:

#!/bin/sh

/path/to/xorpsh <<EOF
configure
load /path/to/config.boot
EOF

You could use a similar approach (running xorpsh in non-interactive
mode) to incrementally modify the XORP configuration: you just
record the particular xorpsh commands that need to be executed and
then add those commands to the above script. Though, in that case
you may want to use, say, Python so you can check for errors, etc.

Of course, you could write a process that the applications talk to,
and then the process uses step 3 above to reconfigure XORP.

Pavlin