[Xorp-users] Unreachable default route.

Pavlin Radoslavov pavlin at icir.org
Wed Sep 12 18:16:50 PDT 2007


Ben Greear <greearb at candelatech.com> wrote:

> Pavlin Radoslavov wrote:
> > Tim Durack <tdurack at gmail.com> wrote:
> > 
> >> On a Cisco you would configure a floating static route - that is a
> >> static with a higher administrative distance than a dynamic routing
> >> protocol. The static will be overridden by the dynamic, but if the
> >> dynamic default goes away, the static will be installed.
> >>
> >> Not sure if XORP supports this (I don't think you can change admin
> >> distance), so this probably doesn't help.
> > 
> > No, unfortunately XORP doesn't support floating static routes (yet).
> > The RIB itself has already XRL interface to set the admin distance
> > per protocol, but this interface is not used yet, and it will set
> > the admin distance for all routes for a given protocol.
> > 
> > If modifying the admin distance for all static routes (so they are
> > less preferred than, say, OSPF) is acceptable to you, the easiest
> > hack is to modify rib/rib.cc (the RIB constructor) and change the
> > "static" entry for _admin_distances to a value that is larger than
> > the dynamic protocols (e.g., 220).
> 
> Does this still use the 'discard0' method that you suggested before?

No.

> It doesn't seem I can just make up an interface on Linux..it needs
> to exist or Xorp complains.  I tried using 'eth2' on my system
> instead, and now I get no errors, but I also do not see any routes
> created.


You could use the following configuration on Linux to configure a
discard interface and a static route that is blackhole:

interfaces {
    interface my_discard {
        discard: true
        vif my_discard {
        }
    }
}

fea {
    unicast-forwarding4 {
        disable: false
    }
}

protocols {
    static {
        interface-route 10.10.10.0/24 {
            next-hop-interface: "my_discard"
            next-hop-vif: "my_discard"
        }
    }
}

Then use the "ip route" command to see the blackhole 10.10.10.0/24
route:

pavlin at xorp1[20] ip route
<DEL>
blackhole 10.10.10.0/24  proto xorp  metric 1 notify 


However, before doing that you might want to update with the latest
CVS, because I just fixed a blackhole-related bug. FYI, this bug
wasn't the show-stopper but is good to have it fixed in your code:

Revision  Changes                                 Path
1.5       +40 -31;  commitid: 1551046e88e867ea6;
xorp/fea/data_plane/control_socket/netlink_socket_utilities.cc

Regards,
Pavlin

> I have not actually loaded the build with the patch you mentioned here, but I figured
> I should at least get some sort of default route even if it is at too-high
> priority...
> 
> Thanks,
> Ben
> 
> 
> -- 
> Ben Greear <greearb at candelatech.com>
> Candela Technologies Inc  http://www.candelatech.com
> 
> _______________________________________________
> Xorp-users mailing list
> Xorp-users at xorp.org
> http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-users



More information about the Xorp-users mailing list