[Xorp-users] Basic static route configuration problem

Pavlin Radoslavov pavlin at icir.org
Fri Dec 21 11:54:17 PST 2007


Alan Patterson <alankp1 at optusnet.com.au> wrote:

> I hope someone can help me with a problem I am having with static routes 
> on the LiveCD version of Xorp 1.4.  I have the following simple 
> configuration file:
> 
> interfaces {
>     restore-original-config-on-shutdown: false
>     interface xl0 {
>         disable: false
>         discard: false
>         description: "LAN 1"
>         vif xl0 {
>             disable: false
>             address 192.168.10.99 {
>                 prefix-length: 24
>                 broadcast: 192.168.10.255
>                 disable: false
>             }
>         }
>     }
>     interface xl1 {
>         disable: false
>         discard: false
>         description: "LAN 2"
>         vif xl1 {
>             disable: false
>             address 192.168.20.100 {
>                 prefix-length: 24
>                 broadcast: 192.168.20.255
>                 disable: false
>             }
>         }
>     }
>     interface lo0 {
>         disable: false
>         discard: false
>         description: "Loopback interface"
>         vif lo0 {
>             disable: false
>         }
>     }
> }
> 
> protocols {
>         static {
>               route 192.168.30.0/24 {
>                         next-hop: 192.168.10.100
>                         metric: 1
>                 }
>         }
> }
> 
> fea {
>     unicast-forwarding4 {
>         disable: false
>     }
> }
> 
> Communication between hosts on the two directly connected networks 
> 192.168.10.0/24 and 192.168.20.0/24 works fine, but packets to the 
> 192.168.30.0/24 network are not forwarded to 192.168.10.100. The command 
> 'show route table .....' returns a completely empty table. What have I 
> got wrong?

Your configuration seems fine, so I find it odd that it doesn't work
for you. Could you double-check that the
"show route table ipv4 unicast static" xorpsh command indeed doesn't
return the 192.168.30.0/24 route.

In general, the following two reasons could prevent a static route
being added to the RIB:
a) The next-hop IP address is not directly connected to
   XORP-configured interface.
   This is not the case in your config.
b) The cable toward the next-hop IP address is disconnected.
   If the forwarding toward 192.168.10.0/24 is OK, then you don't
   have a disconnected cable.

If the above "show route ..." command indeed returns an empty table,
could you restart the xorp_rtrmgr with XRL tracing enabled.
Off the top of my head, the commands for the LiveCD will be
something like:

1. Login as a root and kill the running xorp_rtrmgr process:

killall xorp_rtrmgr

   Make sure that there are no leftover XORP processes (i.e.,
   processes with "xorp" name prefix):

ps -auxww | egrep xorp

2. Start the XORP instance by hand, by enabling the XRL tracing and
   saving the output to a file:

cd /tmp
export XRLTRACE=yes
script
/usr/local/xorp/bin/xorp_rtrmgr -b /etc/xorp.cfg

3. Let XORP run, and use a separate terminal (use Alt-F2, Alt-F3,
Alt-F4 to switch to a new terminal) to login as user "xorp" and
double-check that the static route is not in the RIB.

4. Stop the xorp_rtrmgr process in the terminal you started it:

Ctrl-C
exit

The log file with the output should be saved in /tmp/typescript .
Please send me that file so I can analyze it. No need to send it to
the list, because it will be a large file.

Pavlin



More information about the Xorp-users mailing list