<font face="courier new, monospace">Igor...apologies for the terrible formatting in the previous email. I've re-added the OSPF-->RIP and RIP-->OSPF cost conversion mapping between domains that could be used.<br>
<br>Phil<br><br>On Wed, Jul 25, 2012 at 12:55 AM, Phil Wiggins <<a href="mailto:phil.wiggins@gmail.com">phil.wiggins@gmail.com</a>> wrote:<br>> On Mon, Jul 23, 2012 at 8:47 AM, Igor Maravić <<a href="mailto:igorm@etf.rs">igorm@etf.rs</a>> wrote:><br>
>><br>>> > Suggestion #2 - Further, for redistributing 16/32-bit metrics a "bit<br>>> > shift"<br>>> > function would be helpful for the policy tools to use.<br>>> ><br>
>><br>>> This shouldn't be much of problem to implement.<br>>> Could you explain your idea in little more detail.<br>>> If I understood correctly in this case you would shift OSPF metric by<br>
>> 1, or 2, bits<br>>> and you would got metric that can be used by RIP?<br>>><br>>> (11 >> 1 == 5,<br>>> 21 >> 1 == 10)<br>><br>> To work with the metrics for route redistribution between separate metric<br>
> spaces, it would be useful to have multiply (mult) and divide (div)<br>> functions. Slightly more flexible would be a combination of conversion<br>> tools to do something like ax+b where a is a multiply factor for metric<br>
> space conversion, x is the source metric, and b is some addition.<br>><br>> Bit shift would be shift left (shiftl) and shift right (shiftr) which could<br>> provide some potential savings for embedded environments. The examples that<br>
> you provide are exactly what was intended.<br>><br>> An example for conversion between RIP and OSPF space, RIP to OSPF Conversion<br>> could be a simple multiply by 4096.<br>RIP Metric OSPF Cost<br>0 0<br>
1 4096<br>2 8192<br>3         12288<br>4         16384<br>5         20480<br>6         24576<br>7         28762<br>8         32768<br>9         36864<br>10 40960<br>11 45056<br>
12 49152<br>13 53248<br>14 57344<br>15 61440<br>16 65536<br><br><br>> OSPF to RIP Conversion could be a divide by 4096 possibly with a modulo or<br>> roundup/rounddown<br>
OSPF Cost Range RIP Metric<br>0 0<br>1 – 4096 1<br>4097 – 8192 2<br>8193 – 12288 3<br>12289 – 16384 4<br>16385 – 20480 5<br>20481 – 24576 6<br>
24577 – 28762 7<br>28763 – 32768 8<br>32769 – 36864 9<br>36865 – 40960 10<br>40961 – 45056 11<br>45057 – 49152 12<br>49153 – 53248 13<br>53249 – 57344 14<br>
57345 – 61440 15<br>61441 and up 16<br></font><br>