<font face="courier new, monospace">Igor...apologies for the terrible formatting in the previous email.  I&#39;ve re-added the OSPF--&gt;RIP and RIP--&gt;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 &lt;<a href="mailto:phil.wiggins@gmail.com">phil.wiggins@gmail.com</a>&gt; wrote:<br>&gt; On Mon, Jul 23, 2012 at 8:47 AM, Igor Maravić &lt;<a href="mailto:igorm@etf.rs">igorm@etf.rs</a>&gt; wrote:&gt;<br>

&gt;&gt;<br>&gt;&gt; &gt; Suggestion #2 - Further, for redistributing 16/32-bit metrics a &quot;bit<br>&gt;&gt; &gt; shift&quot;<br>&gt;&gt; &gt; function would be helpful for the policy tools to use.<br>&gt;&gt; &gt;<br>

&gt;&gt;<br>&gt;&gt; This shouldn&#39;t be much of problem to implement.<br>&gt;&gt; Could you explain your idea in little more detail.<br>&gt;&gt; If I understood correctly in this case you would shift OSPF metric by<br>

&gt;&gt; 1, or 2, bits<br>&gt;&gt; and you would got metric that can be used by RIP?<br>&gt;&gt;<br>&gt;&gt; (11 &gt;&gt; 1 == 5,<br>&gt;&gt; 21 &gt;&gt; 1 == 10)<br>&gt;<br>&gt; To work with the metrics for route redistribution between separate metric<br>

&gt; spaces, it would be useful to have multiply (mult) and divide (div)<br>&gt; functions.  Slightly more flexible would be a combination of conversion<br>&gt; tools to do something like ax+b where a is a multiply factor for metric<br>

&gt; space conversion, x is the source metric, and b is some addition.<br>&gt;<br>&gt; Bit shift would be shift left (shiftl) and shift right (shiftr) which could<br>&gt; provide some potential savings for embedded environments.  The examples that<br>

&gt; you provide are exactly what was intended.<br>&gt;<br>&gt; An example for conversion between RIP and OSPF space, RIP to OSPF Conversion<br>&gt; 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>&gt; OSPF to RIP Conversion could be a divide by 4096 possibly with a modulo or<br>&gt; 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>