[Xorp-cvs] XORP cvs commit: xorp/libxipc xorp

Pavlin Radoslavov pavlin@icir.org
Sat, 04 Jun 2005 11:07:49 -0700


> 
> >Log message:
> >	* Add support to set the finder server address from the
> >	  XORP_FINDER_SERVER_ADDRESS environmental variable.
> >	  This variable in combination with the existing
> >	  XORP_FINDER_CLIENT_ADDRESS can be used to run the XORP processes
> >	  on different machines.
> >	
> >	* Rename the existing XORP_FINDER_CLIENT_PORT environmental variable
> >	  to XORP_FINDER_SERVER_PORT (to reflect better its purpose).
> >	  Note that we cannot set the client port, because it is automatically
> >	  assigned/selected by the sockets.
> 
> I'm confused.  Are you saying that to rib (say) bgp on a different
> machine, I need to set XORP_FINDER_CLIENT_ADDRESS and
> XORP_FINDER_SERVER_PORT to communicate with the remote finder?  Surely
> they should be consistent.

After the change XORP_FINDER_SERVER_ADDRESS and
XORP_FINDER_SERVER_PORT specify the address and the port of the
finder.
XORP_FINDER_CLIENT_ADDRESS is the address that the client will
choose to communicate with the finder. This also will be the address
that the finder will associate with that client.

Typically, if you want to communicate with a remote finder you need
to set both XORP_FINDER_SERVER_ADDRESS and
XORP_FINDER_CLIENT_ADDRESS on the client side:
 - The server address needs to be set so the client knows where to
   find the finder.
 - The client address needs to be set so the client uses that
   address instead of the default 127.0.0.1 to listen for messages
   from the finder, and also to create its own instance name. That
   instance name is sent to the finder and the finder decodes it to
   obtain the client's address (in other words the client has to
   explicitly tell the finder its own address).

The XORP_FINDER_SERVER_PORT is optional and is an additional
clarifier to XORP_FINDER_SERVER_ADDRESS in case the finder is not
listening on the default port.

On the finder side, you have to tell the finder to listen to a
routable address (in addition to the default 127.0.0.1). For that
you have to start the libxipc/xorp_finder or the rtrmgr/xorp_rtrmgr
binaries with the "-i <interface>" command line option (and the "-p
<port>" option to change the default port as well); see
FinderServer::add_binding().

Though, now that I think of it, it makes sense that the finder
itself also should consider the XORP_FINDER_SERVER_ADDRESS and
XORP_FINDER_SERVER_PORT environmental variables when binding to
local interface addresses.
I just committed a modification to the FinderServer constructor that
does this, so we are not forced to use the "-i <interface>" and "-p
<port>" command-line options to xorp_finder xorp_rtrmgr.

Pavlin