[Xorp-users] rip and different policies for different interfaces

Bruce Simpson bms at incunabulum.net
Tue May 12 00:56:16 PDT 2009


John Hay wrote:
> Is it possible to have different "export" policies on different interfaces
> for rip?
>   


I don't think the RIP policy hooks are capable of doing this at the 
moment without modifications, see below.

> I had a look at "to" inside "term", neighbor is almost, but with rip
> multicast is used, so it does not quite fit.
>   

The root of the problem is that policies are global, and do not have 
per-interface granularity as such.

RIP peers can't be statically configured. As such, XORP dynamically 
creates RIP peers whenever it discovers them on-link; RIPv2 uses 
link-scope multicasts as you know. Some background: XORP's RIP 
implementation only implements RIPv2. RIPv1 is a seriously brain-dead 
protocol, although folk can and do still use it in situations where 
legacy vendor kit only speaks RIPv1. The hooks in the FEA exist now for 
doing limited broadcast in a portable way, largely due to the work on 
OLSR, which also discovers its peers dynamically.

Compare RIP policy with OLSR policy, which has a few additional useful tags:
    
http://cvsweb.xorp.org/cgi-bin/cvsweb.cgi/xorp/contrib/olsr/policy_varrw.hh?rev=1.5

... OLSR's policy support implements the VAR_ORIGINATOR tag, which 
allows you to implement import policies (only learn routes from OLSR 
nodes with the given router-ID). That is not quite the same thing, 
however, OLSR would probably also benefit from policy filters on 
outgoing interfaces also; think of the case where XORP is configured as 
an OLSR border node and is redistributing e.g. OSPF routes into OLSR HNA 
messages, very similar conceptually to RIP redist.

Unfortunately, we don't have an output interface match condition 
implemented. That would cleanly solve your problem in the example you 
give. I believe the 'neighbor' match condition is only implemented for 
BGP; it doesn't make sense for OSPF, as LSAs are flooded to all OSPF 
routers in an area.

Each interface in xorp_rip is represented by a instance of the C++ class 
Port. Whilst xorp_rip does invoke the policy filters on a per-Port (i.e. 
per-interface) basis, we currently don't have a policy tag in RIP itself 
for the outgoing interface. The machinery in RIP itself is there for 
doing this, but the ifname/vifname are not currently set, see here:    
http://cvsweb.xorp.org/cgi-bin/cvsweb.cgi/xorp/rip/output_table.cc?rev=1.21

thanks,
BMS



More information about the Xorp-users mailing list