[Xorp-hackers] Interfacing for runtime config

Weaver John-JWEAVER1 John.Weaver@motorola.com
Thu, 25 Aug 2005 11:58:19 -0500


So I guess there is no library that I can just make calls to pass just
address and interface info?  I was not looking forward to piecing something
together and scripting it. 

-----Original Message-----
From: Pavlin Radoslavov [mailto:pavlin@icir.org] 
Sent: Thursday, August 25, 2005 11:41 AM
To: Weaver John-JWEAVER1
Cc: xorp-hackers@icir.org
Subject: Re: [Xorp-hackers] Interfacing for runtime config 

> 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