[Xorp-hackers] multiple instances on one machine

Pavlin Radoslavov pavlin at icir.org
Wed Aug 1 12:39:00 PDT 2007


Yuval Lifshitz <yuvalif at gmail.com> wrote:

> Hi all,
> I'm trying to run multiple instances of xorp on the same machine.
> The machine has two different IPs - 172.16.1.141 and 172.16.1.142.
> I run into problems regarding the internal communication on the machine.
> When I tried to use the -i command line flag, I got:
> # ./xorp_rtrmgr -i 172.16.1.141 ../config.boot1
> 172.16.1.141 is not the address of an active interface.

There was a bug in the code that reads the list of IPv4 addresses
from the system: that code didn't consider the secondary (alias)
IP addresses. The problem is now fixed in CVS:

Revision  Changes                                 Path
1.27      +152 -98;  commitid: 2b9a46b0d8a07ea6;  xorp/libxipc/sockutil.cc

> although it is defined on the interface:
> eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
>     link/ether 00:0d:60:1c:40:06 brd ff:ff:ff:ff:ff:ff
>     inet 172.16.0.109/20 brd 172.16.15.255 scope global eth0
>     inet 172.16.1.141/20 brd 172.16.15.255 scope global secondary eth0:1
>     inet 172.16.1.142/20 brd 172.16.15.255 scope global secondary eth0:2
> 
> and in the config.boot1 file:
> 
> interfaces {
>     restore-original-config-on-shutdown: false
>     interface eth0 {
>         description: "data interface"
>         disable: false
>         /* default-system-config */
>         vif eth0 {
>             disable: false
>             address 172.16.1.141 {
>                 prefix-length: 20
>                 broadcast: 172.16.15.255
>                 disable: false
>             }
>         }
>     }
> }
> 
> Then, I tried to use the XORP_FINDER_SERVER_ADDRESS env variable:
> # export XORP_FINDER_SERVER_ADDRESS="172.16.1.141"
> # ./xorp_rtrmgr ../config.boot1
> 
> and got:
> 
> Unexpected exception:   thrown did not correspond to specification - fix
> code.
> InvalidAddress from line 292 of ../../libxipc/finder_tcp.cc -> Not a
> configured IPv4 address

The second error was again because of the bug mentioned above (and
just fixed).
The first error "Unexpected exception" is now fixed as well.

> BTW, when using two ports, it is working fine.

Actually, if you want to run 2+ instances of XORP on the same
machine, the simplest thing is indeed to set the
XORP_FINDER_SERVER_PORT environmental variable to different value
for each instance.

I believe setting the XORP_FINDER_SERVER_ADDRESS should work as well.
Off the top of my head I don't remember whether "-i <addr>" will do
exactly the same thing as XORP_FINDER_SERVER_ADDRESS. If it does,
then it also should work (after applying the above fix).


In any case, please get the latest code from CVS and let us know if
it still doesn't work for you.

Thanks,
Pavlin

> regards,
> 
> Yuval.
> _______________________________________________
> Xorp-hackers mailing list
> Xorp-hackers at icir.org
> http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers



More information about the Xorp-hackers mailing list