[Xorp-users] Fwd: Route redistribution issue

Phil Wiggins phil.wiggins at gmail.com
Tue Jul 24 20:55:04 PDT 2012


On Mon, Jul 23, 2012 at 8:47 AM, Igor Maravić <igorm at etf.rs> wrote:>
>
>  > Suggestion #2 - Further, for redistributing 16/32-bit metrics a "bit
> shift"
> > function would be helpful for the policy tools to use.
> >
>
> This shouldn't be much of problem to implement.
> Could you explain your idea in little more detail.
> If I understood correctly in this case you would shift OSPF metric by
> 1, or 2, bits
> and you would got metric that can be used by RIP?
>
> (11 >> 1 == 5,
> 21 >> 1 == 10)
>
To work with the metrics for route redistribution between separate metric
spaces, it would be useful to have multiply (mult) and divide (div)
functions.  Slightly more flexible would be a combination of conversion
tools to do something like ax+b where a is a multiply factor for metric
space conversion, x is the source metric, and b is some addition.

Bit shift would be shift left (shiftl) and shift right (shiftr) which could
provide some potential savings for embedded environments.  The examples
that you provide are exactly what was intended.

An example for conversion between RIP and OSPF space, RIP to OSPF
Conversion could be a simple multiply by 4096.

**

RIP Metric****

OSPF Cost****

*0*

*0*

*1*

*4096*

*2*

*8192*

*3*

*12288*

*4*

*16384*

*5*

*20480*

*6*

*24576*

*7*

*28762*

*8*

*32768*

*9*

*36864*

*10*

*40960*

*11*

*45056*

*12*

*49152*

*13*

*53248*

*14*

*57344*

*15*

*61440*

*16*

*65536*

OSPF to RIP Conversion could be a divide by 4096 possibly with a modulo or
roundup/rounddown****

****OSPF** **Cost **Range********

RIP Metric****

*0*

*0*

*1 – 4096*

*1*

*4097 – 8192*

*2*

*8193 – 12288*

*3*

*12289 – 16384*

*4*

*16385 – 20480*

*5*

*20481 – 24576*

*6*

*24577 – 28762*

*7*

*28763 – 32768*

*8*

*32769 – 36864*

*9*

*36865 – 40960*

*10*

*40961 – 45056*

*11*

*45057 – 49152*

*12*

*49153 – 53248*

*13*

*53249 – 57344*

*14*

*57345 – 61440*

*15*

*61441 and up*

*16*
*
*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-users/attachments/20120725/f1b9e2d4/attachment-0001.html 


More information about the Xorp-users mailing list