[j-nsp] Joining OPSF & IS-IS areas via 2 ABRs

Smith W. Stacy stacy at acm.org
Thu Oct 7 19:31:24 EDT 2010


Hi Clarke,

I believe I have an answer for you...

Given this example topology:

+-------------+                           +-------------+
|    ospf1    | .1                     .2 |    ospf2    |
|  10.0.0.1   +---------------------------+  10.0.0.2   |
|             |         10.0.1.0/30       |             |
+------+------+                           +------+------+
   .1 |                                      .1 |
      | 10.0.2.0/30                             | 10.0.3.0/30
   .2 |                                      .2 |
+------+------+                           +------+------+
|    abr1     |                           |    abr2     |
| 192.168.0.1 |                           | 192.168.0.2 |
|             |                           |             |
+------+------+                           +------+------+
   .1 |                                      .1 |
      | 192.168.1.0/30                          | 192.168.2.0/30
   .2 |                                      .2 |
+------+------+                           +------+------+
|    isis1    | .1                     .2 |    isis2    |
| 192.168.0.3 +---------------------------+ 192.168.0.4 |
|             |       192.168.3.0/30      |             |
+-------------+                           +-------------+


Here's the appropriate abr (really ASBR) configs (using virtual routers):

routing-instances {
   abr1 {
       instance-type virtual-router;
       interface lt-0/0/0.1;
       interface lt-0/0/0.2;
       interface lo0.1;
       protocols {
           ospf {
               /* redist isis into ospf */
               export abr1-isis-into-ospf;
               area 0.0.0.0 {
                   interface lt-0/0/0.1 {
                       metric 10;
                   }
                   interface lo0.1 {
                       passive;
                   }
               }
           }
           isis {
               /* redist ospf into isis */
               export abr1-ospf-into-isis;
               level 1 disable;
               interface lt-0/0/0.2 {
                   level 2 metric 10;
               }
               interface lo0.1 {
                   passive;
               }
           }
       }
   }
   abr2 {
       instance-type virtual-router;
       interface lt-0/0/0.7;
       interface lt-0/0/0.8;
       interface lo0.2;
       protocols {
           ospf {
               /* redist isis into ospf */
               export abr2-isis-into-ospf;
               area 0.0.0.0 {
                   interface lt-0/0/0.8 {
                       metric 10;
                   }
                   interface lo0.2 {
                       passive;
                   }
               }
           }
           isis {
               /* redist ospf into isis */
               export abr2-ospf-into-isis;
               level 1 disable;
               interface lt-0/0/0.7 {
                   level 2 metric 10;
               }
               interface lo0.2 {
                   passive;
               }
           }
       }
   }
}
policy-options {
   /* List of the prefixes to be redisted from isis to ospf */
   prefix-list isis-into-ospf {
       192.168.0.3/32;
       192.168.0.4/32;
       192.168.1.0/30;
       192.168.2.0/30;
   }
   /* List of the prefixes to be redisted from ospf to isis */
   prefix-list ospf-into-isis {
       10.0.0.1/32;
       10.0.0.2/32;
       10.0.2.0/30;
       10.0.3.0/30;
   }
   policy-statement abr1-isis-into-ospf {
       /* Reject anything that's already tagged */
       /* because that mean's it's already been */
       /* redistributed from one protocol to    */
       /* another. Redisting again would cause  */
       /* a routing information loop.           */
       term 1 {
           from {
               protocol isis;
               tag 666;
           }       
           then reject;
       }
       /* Accept any isis routes that are in the */
       /* prefix list.                           */
       term 2 {
           from {
               protocol isis;
               prefix-list isis-into-ospf;
           }
           then {
               /* Add the tag so we know they've */
               /* been redistributed.            */
               tag 666;
               accept;
           }
       }
       then reject;
   }
   policy-statement abr1-ospf-into-isis {
       /* Reject anything that's already tagged */
       /* because that mean's it's already been */
       /* redistributed from one protocol to    */
       /* another. Redisting again would cause  */
       /* a routing information loop.           */
       term 1 {
           from {
               protocol ospf;
               tag 666;
           }
           then reject;
       }
       /* Accept any ospf routes that are in the */
       /* prefix list.                           */
       term 2 {    
           from {
               protocol ospf;
               prefix-list ospf-into-isis;
           }
           then {
               /* Add the tag so we know they've */
               /* been redistributed.            */
               tag 666;
               accept;
           }
       }
       then reject;
   }
   /* Same policy as abr1, except for the  */
   /* 'metric add 30'. You should replace  */
   /* 30 with the maximum metric it might  */
   /* take a ospf-speaking router to reach */
   /* abr1.                                */
   policy-statement abr2-isis-into-ospf {
       term 1 {
           from {
               protocol isis;
               tag 666;
           }
           then reject;
       }
       term 2 {
           from {
               protocol isis;
               prefix-list isis-into-ospf;
           }
           then {
               metric add 30;
               tag 666;
               accept;
           }
       }
       then reject;
   }
   /* Same policy as abr1, except for the  */
   /* 'metric add 30'. You should replace  */
   /* 30 with the maximum metric it might  */
   /* take a isis-speaking router to reach */
   /* abr1.                                */
   policy-statement abr2-ospf-into-isis {
       term 1 {
           from {
               protocol ospf;
               tag 666;
           }
           then reject;
       }
       term 2 {
           from {
               protocol ospf;
               prefix-list ospf-into-isis;
           }
           then {  
               metric add 30;
               tag 666;
               accept;
           }
       }
       then reject;
   }
}


In case it helps your understanding, here's the full config for all routers in the topology:

interfaces {
   lt-0/0/0 {
       unit 1 {
           encapsulation frame-relay;
           dlci 1;
           peer-unit 12;
           family inet {
               address 10.0.2.2/30;
           }
       }
       unit 2 {
           encapsulation frame-relay;
           dlci 2;
           peer-unit 3;
           family inet {
               address 192.168.1.1/30;
           }
           family iso;
       }
       unit 3 {
           encapsulation frame-relay;
           dlci 2;
           peer-unit 2;
           family inet {
               address 192.168.1.2/30;
           }
           family iso;
       }
       unit 4 {
           encapsulation frame-relay;
           dlci 4; 
           peer-unit 5;
           family inet {
               address 192.168.3.1/30;
           }
           family iso;
       }
       unit 5 {
           encapsulation frame-relay;
           dlci 4;
           peer-unit 4;
           family inet {
               address 192.168.3.2/30;
           }
           family iso;
       }
       unit 6 {
           encapsulation frame-relay;
           dlci 6;
           peer-unit 7;
           family inet {
               address 192.168.2.2/30;
           }
           family iso;
       }
       unit 7 {
           encapsulation frame-relay;
           dlci 6;
           peer-unit 6;
           family inet {
               address 192.168.2.1/30;
           }
           family iso;
       }
       unit 8 {
           encapsulation frame-relay;
           dlci 8;
           peer-unit 9;
           family inet {
               address 10.0.3.2/30;
           }
       }
       unit 9 {
           encapsulation frame-relay;
           dlci 8;
           peer-unit 8;
           family inet {
               address 10.0.3.1/30;
           }
       }
       unit 10 {
           encapsulation frame-relay;
           dlci 10;
           peer-unit 11;
           family inet {
               address 10.0.1.2/30;
           }
       }
       unit 11 {
           encapsulation frame-relay;
           dlci 10;
           peer-unit 10;
           family inet {
               address 10.0.1.1/30;
           }
       }
       unit 12 {
           encapsulation frame-relay;
           dlci 1;
           peer-unit 1;
           family inet {
               address 10.0.2.1/30;
           }
       }
   }
   lo0 {
       unit 1 {
           family inet {
               address 192.168.0.1/32;
           }
           family iso {
               address 49.0001.1921.6800.0001.00;
           }
       }
       unit 2 {
           family inet {
               address 192.168.0.2/32;
           }
           family iso {
               address 49.0002.1921.6800.0002.00;
           }
       }
       unit 3 {    
           family inet {
               address 192.168.0.3/32;
           }
           family iso {
               address 49.0003.1921.6800.0003.00;
           }
       }
       unit 4 {
           family inet {
               address 192.168.0.4/32;
           }
           family iso {
               address 49.0004.1921.6800.0004.00;
           }
       }
       unit 5 {
           family inet {
               address 10.0.0.1/32;
           }
       }
       unit 6 {
           family inet {
               address 10.0.0.2/32;
           }
       }
   }
}
policy-options {
   prefix-list isis-into-ospf {
       192.168.0.3/32;
       192.168.0.4/32;
       192.168.1.0/30;
       192.168.2.0/30;
   }
   prefix-list ospf-into-isis {
       10.0.0.1/32;
       10.0.0.2/32;
       10.0.2.0/30;
       10.0.3.0/30;
   }
   policy-statement abr1-isis-into-ospf {
       term 1 {
           from {
               protocol isis;
               tag 666;
           }       
           then reject;
       }
       term 2 {
           from {
               protocol isis;
               prefix-list isis-into-ospf;
           }
           then {
               tag 666;
               accept;
           }
       }
       then reject;
   }
   policy-statement abr1-ospf-into-isis {
       term 1 {
           from {
               protocol ospf;
               tag 666;
           }
           then reject;
       }
       term 2 {    
           from {
               protocol ospf;
               prefix-list ospf-into-isis;
           }
           then {
               tag 666;
               accept;
           }
       }
       then reject;
   }
   policy-statement abr2-isis-into-ospf {
       term 1 {
           from {
               protocol isis;
               tag 666;
           }
           then reject;
       }
       term 2 {
           from {
               protocol isis;
               prefix-list isis-into-ospf;
           }
           then {
               metric add 30;
               tag 666;
               accept;
           }
       }
       then reject;
   }
   policy-statement abr2-ospf-into-isis {
       term 1 {
           from {
               protocol ospf;
               tag 666;
           }
           then reject;
       }
       term 2 {
           from {
               protocol ospf;
               prefix-list ospf-into-isis;
           }
           then {  
               metric add 30;
               tag 666;
               accept;
           }
       }
       then reject;
   }
}
routing-instances {
   abr1 {
       instance-type virtual-router;
       interface lt-0/0/0.1;
       interface lt-0/0/0.2;
       interface lo0.1;
       protocols {
           ospf {
               export abr1-isis-into-ospf;
               area 0.0.0.0 {
                   interface lt-0/0/0.1 {
                       metric 10;
                   }
                   interface lo0.1 {
                       passive;
                   }
               }
           }
           isis {
               export abr1-ospf-into-isis;
               level 1 disable;
               interface lt-0/0/0.2 {
                   level 2 metric 10;
               }
               interface lo0.1 {
                   passive;
               }
           }
       }
   }
   abr2 {
       instance-type virtual-router;
       interface lt-0/0/0.7;
       interface lt-0/0/0.8;
       interface lo0.2;
       protocols {
           ospf {
               export abr2-isis-into-ospf;
               area 0.0.0.0 {
                   interface lt-0/0/0.8 {
                       metric 10;
                   }
                   interface lo0.2 {
                       passive;
                   }
               }
           }
           isis {
               export abr2-ospf-into-isis;
               level 1 disable;
               interface lt-0/0/0.7 {
                   level 2 metric 10;
               }
               interface lo0.2 {
                   passive;
               }
           }
       }
   }
   isis1 {
       instance-type virtual-router;
       interface lt-0/0/0.3;
       interface lt-0/0/0.4;
       interface lo0.3;
       protocols {
           isis {
               level 1 disable;
               interface lt-0/0/0.3 {
                   level 2 metric 10;
               }
               interface lt-0/0/0.4 {
                   level 2 metric 10;
               }
               interface lo0.3 {
                   passive;
               }
           }
       }
   }
   isis2 {
       instance-type virtual-router;
       interface lt-0/0/0.5;
       interface lt-0/0/0.6;
       interface lo0.4;
       protocols {
           isis {
               level 1 disable;
               interface lt-0/0/0.5 {
                   level 2 metric 10;
               }
               interface lt-0/0/0.6 {
                   level 2 metric 10;
               }
               interface lo0.4 {
                   passive;
               }
           }
       }
   }
   ospf1 {
       instance-type virtual-router;
       interface lt-0/0/0.11;
       interface lt-0/0/0.12;
       interface lo0.5;
       protocols {
           ospf {
               area 0.0.0.0 {
                   interface lt-0/0/0.11 {
                       metric 10;
                   }
                   interface lt-0/0/0.12 {
                       metric 10;
                   }
                   interface lo0.5 {
                       passive;
                   }
               }
           }
       }
   }
   ospf2 {
       instance-type virtual-router;
       interface lt-0/0/0.9;
       interface lt-0/0/0.10;
       interface lo0.6;
       protocols {
           ospf {
               area 0.0.0.0 {
                   interface lt-0/0/0.9 {
                       metric 10;
                   }
                   interface lt-0/0/0.10 {
                       metric 10;
                   }
                   interface lo0.6 {
                       passive;
                   }
               }
           }
       }
   }
}






More information about the juniper-nsp mailing list