Routing

last person joined: 3 days ago 

Ask questions and share experiences about ACX Series, CTP Series, MX Series, PTX Series, SSR Series, JRR Series, and all things routing, including portfolios and protocols.
  • 1.  Conditional Route Advertisement into OSPF

    Posted 12-10-2012 09:21

    I'm attemping to advertise and external route into OSPF, on the condition that ANOTHER router in the table exists....I thought I had it with the 'from condition'  policy statement, but it didn't perform the way that I expected with OSPF, then I read that it only has an affect when used with bgp export statements.  Are there are techniques that work for OSPF?

     

    Alternatively, is there any way to have OSPF advertise say a directly connected route (or link) into OSPF, but only if the router is VRRP active for that link?



  • 2.  RE: Conditional Route Advertisement into OSPF
    Best Answer

    Posted 12-10-2012 12:36

    As far as I know the conditional advertising works with any protocol,not only bgp. Here is an example of advertising rip routes into ospf only when a route exist in inet.0 table:

     

     

    mx5t# run show route protocol rip logical-system r1

    inet.0: 30 destinations, 30 routes (30 active, 0 holddown, 0 hidden)
    + = Active Route, - = Last Active, * = Both

    172.16.16.0/29     *[RIP/100] 1d 00:38:19, metric 2, tag 0
                        > to 172.27.0.30 via ge-1/1/3.200
    172.16.20.0/24     *[RIP/100] 1d 00:38:19, metric 2, tag 0
                        > to 172.27.0.30 via ge-1/1/3.200
    172.16.21.0/24     *[RIP/100] 1d 00:38:19, metric 2, tag 0
                        > to 172.27.0.30 via ge-1/1/3.200

    mx5t# show protocols ospf
    export [ export-rip export-direct ];
    area 0.0.0.0 {
        interface all;
    }

     

    mx5t# show policy-options policy-statement export-rip   
    from {
        protocol rip;
        condition ospf-route;
    }
    then accept;

    mx5t# show policy-options condition ospf-route
    if-route-exists {
        172.27.255.5/32;
        table inet.0;
    }

    mx5t# run show ospf database logical-system r1 external | match 172
    Extern  *172.16.16.0      172.27.255.1     0x80000001    34  0x22 0xc35e  36
    Extern  *172.16.20.0      172.27.255.1     0x80000001    34  0x22 0xc155  36
    Extern  *172.16.21.0      172.27.255.1     0x80000001    34  0x22 0xb65f  36

    mx5t# run show route logical-system r1 172.27.255.1

    inet.0: 31 destinations, 31 routes (31 active, 0 holddown, 0 hidden)
    + = Active Route, - = Last Active, * = Both

    172.27.255.1/32    *[Direct/0] 1d 00:54:55
                        > via lo0.1


     

    When 172.27.255.1 disappear from inet.0, the ospf stop advertising rip routes:

     

    mx5t# run show route logical-system r1 172.27.255.5    

    [edit logical-systems r5]

    mx5t# run show ospf database logical-system r1 external | match 172    

    [edit logical-systems r5]

     



  • 3.  RE: Conditional Route Advertisement into OSPF

    Posted 12-10-2012 13:20

    Thanks mihaigabriel, I think this might be a Junos version issue, the literature I was reading I thinkw as for 9.5, and I tested on a J2300 running 9.3....what version are you running on the device you posted those examples from?



  • 4.  RE: Conditional Route Advertisement into OSPF

    Posted 12-10-2012 13:23

    i'm running 11.4R2.14



  • 5.  RE: Conditional Route Advertisement into OSPF

    Posted 12-11-2012 13:45

    I did some testing on 10.4R1.9 and it seemed to work there, thanks for the input.