[Xorp-hackers] Interfacing for runtime config

Weaver John-JWEAVER1 John.Weaver@motorola.com
Thu, 25 Aug 2005 13:01:03 -0500


Would it be possible to put the configuration in a common place so that a
user-define process and the xorpsh could access the same info?  I would hate
to lose the use of the xorpsh since it is an invaluable resource for
debugging. 

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

> 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.

You can use the XRL interface/library
(e.g., see xrl/interfaces/fea_ifmgr.xif for configuring the network
interfaces in the FEA). You can use other XRL interface to configure IGMP,
PIM, etc.
However, by talking directly to the processes and by bypassing
xorpsh/rtrmgr, none of the changes will be visible in the XORP configuration
(inside xorpsh). Furthermore, you should not use xorpsh anymore to
reconfigure XORP, otherwise the result will be unpredictable.

I would advice you against using the XRL library to reconfigure XORP, unless
you really need it and you know what you are doing.

Pavlin


> 
> -----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
> _______________________________________________
> Xorp-hackers mailing list
> Xorp-hackers@icir.org
> http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers