[Xorp-users] XORP as a distributed router

Pavlin Radoslavov pavlin at icir.org
Tue Oct 16 18:08:31 PDT 2007


Mayank Kandari <mayank.kandari at gmail.com> wrote:

> Is it possible to run XORP as a distributed router e.g . Forwarding engine
> in one machine and routing protocol in another machine.
> If yes then what changes  need to made ?

Yes, it is possible, but not "out-of-the-box" (yet).
In a nutshell, you might need to perform some simple edits to some
of the rtrmgr templates and you might need to start some of the
processes by hand.

Below is a copy from an old email with instructions how to start a
remote StaticRoutes process.

You can use a similar mechanism to start the xorp_fea process
remotely. The difference would be that you need to fool the rtrmgr
so it doesn't start the FEA locally.

As an alternative to editing some of the etc/templates/*.tp template
files you could replace the xorp_fea binary with, say, a script with
the same name that sleeps forever.

Note that it has been a while since I've tried this, so let me know
if something doesn't work.

I guess other folks on the list might have done something similar
and they might have more automated solutions.


Hope that helps,
Pavlin

================================================================
I played a bit and I was able to run a remote static_routes
process. Here is the procedure I used (note that the rtrmgr IP
address is 10.2.0.1; the IP address of the host that will run
static_routes is 10.2.0.2):

1. First edit etc/templates/static_routes.tp and replace line:
%modinfo:    path            "static_routes/xorp_static_routes";

with

%modinfo:    path            "fea/xorp_fea";

This is to fool the rtrmgr so it doesn't attempt to run the
xorp_static_routes binary. Using fea/xorp_fea instead is a harmless
hack; altenatively, you can just remove the above line.

If you want to run other programs remotely (e.g., rip/ripng), then
edit the corresponding template file instead (e.g. rip.tp or
ripng.tp).

2. On the rtrmgr side setup the finder server and client addresses
   as usual:
setenv XORP_FINDER_SERVER_ADDRESS 10.2.0.1
setenv XORP_FINDER_CLIENT_ADDRESS 10.2.0.1

3. On the remote static_routes side setup the finder server and
   client addresses as usual:
setenv XORP_FINDER_SERVER_ADDRESS 10.2.0.1
setenv XORP_FINDER_CLIENT_ADDRESS 10.2.0.2

4. Run the rtrmgr and enable connections from host 10.2.0.2:

./xorp_rtrmgr -b static.boot -a 10.2.0.2

5. Once the rtrmgr is started, at some moment you will see periodic
messages (once a second) like:

[ 2005/06/20 13:39:23  WARNING xorp_rtrmgr:66898 XrlFinderTarget
+406 ../xrl/targets/finder_base.cc handle_finder_0_2_resolve_xrl ]
Handling method for finder/0.2/resolve_xrl failed: XrlCmdError 102
Command failed Target "static_routes" does not exist or is not
enabled.

That is normal. At that time you can start the xorp_static_routes on
the remote machine, and soon after that the above messages should
stop.

6. Soon after that you should see the usual "No more tasks to run"
   message in the rtrmgr log output, and at that time the router
   should be up and running.

7. Note that if you want to start xorpsh on the rtrmgr host, you
   still must setup the finder sender and client addresses:
setenv XORP_FINDER_SERVER_ADDRESS 10.2.0.1
setenv XORP_FINDER_CLIENT_ADDRESS 10.2.0.1

8. If you stop/kill (Ctrl-C) the rtrmgr, then it will gracefully
   shutdown the remote xorp_static_routes process.

9. Note that if you really need to start the xorp_static_routes
   process before starting the rtrmgr, you could do so, but then you
   have 10 seconds to start the rtrmgr (otherwise the
   xorp_static_routes process will quit).

10. If for whatever reason you cannot edit the
    etc/templates/static_routes.tp template file, then you can try
    to replace static_routes/xorp_static_routes binary with some
    dummy program (and again ignore the periodic error messages as
    in step 5), but I haven't tried this myself so off the top of my
    head I don't know whether you may run into some hidden issues.
================================================================
To automate the starting of the remote xorp_static_routes process,
you can use a script that does ssh to the remote host and runs the
process there. For example:

#!/bin/sh
# 
ssh static_routes_host env XORP_FINDER_SERVER_ADDRESS=rtrmgr_host_addr XORP_FINDER_CLIENT_ADDRESS=static_routes_host /usr/local/xorp/static_routes/xorp_static_routes

Then you don't need to edit the etc/templates/static_routes.tp
template file.

Obviously, you must have configured ssh such that when the rtrmgr
runs the script it doesn't require a password (e.g., by adding the
public keys to the authorized keys on the static_routes_host, etc).
================================================================



More information about the Xorp-users mailing list