Routing

Expand all | Collapse all

rib-groups importing: route imported but not advertised to OSPF peers

Jump to Best Answer
  • 1.  rib-groups importing: route imported but not advertised to OSPF peers

    Posted 05-21-2017 08:49

    I'm playing around with routing instances and redistributing routes between them on vMX and got a bit confused.

     

    I have this simple topology:

    R4---R6---R7.

    I have OSPF enabled on all three routers.

     

    I have the following configuration on R6:

     

     

    interfaces {
        ge-0/0/0 {
            unit 0 {
                family inet {
                    address 10.0.67.6/24;   
                }
            }
        }
        ge-0/0/2 {
            unit 0 {
                family inet {
                    address 10.0.46.6/24;
                }
            }
        }
        ge-0/0/3 {
            unit 0 {
                family inet {
                    address 10.0.36.6/24;
                }
            }
        }
        lo0 {
            unit 0 {
                family inet {
                    address 6.6.6.6/32;
                }
            }                               
        }
    }
    routing-options {
        interface-routes {
            rib-group inet TESTRIB;
        }
        rib-groups {
            TESTRIB {
                import-rib [ inet.0 IAMTEST.inet.0 ];
            }
            TESTRIB2 {
                import-rib [ IAMTEST.inet.0 inet.0 ];
            }
        }
    }
    protocols {
        ospf {
            rib-group TESTRIB;
            export REDIS_DIRECT;
            area 0.0.0.2 {
                interface ge-0/0/2.0;
                interface ge-0/0/3.0;
                interface lo0.0;            
            }
        }
    }
    policy-options {
        policy-statement REDIS_DIRECT {
            term 1 {
                from protocol direct;
                then accept;
            }
        }
    }
    routing-instances {
        IAMTEST {
            instance-type virtual-router;
            interface ge-0/0/0.0;
            routing-options {
                interface-routes {
                    rib-group inet TESTRIB;
                }
            }
            protocols {
                ospf {
                    rib-group TESTRIB2;     
                    export REDIS_DIRECT;
                    area 0.0.0.2 {
                        interface ge-0/0/0.0;
                    }
                }
            }
        }
    }

    Both routing instances exchange routes with each other.

     

    However, routes, received from OSPF peer in one routing instance appear in another routing instance, but are not advertised to OSPF peer in that instance.

     

    For example, take route 7.7.7.7, which is being advertised by R7 and originally appears in instance IAMTEST:

     

    root# run show route protocol ospf 
    
    inet.0: 11 destinations, 11 routes (11 active, 0 holddown, 0 hidden)
    + = Active Route, - = Last Active, * = Both
    
    7.7.7.7/32         *[OSPF/10] 00:00:48, metric 1
                        > to 10.0.67.7 via ge-0/0/0.0
    10.0.14.0/24       *[OSPF/10] 00:00:51, metric 2
                        > to 10.0.46.4 via ge-0/0/2.0
    10.0.34.0/24       *[OSPF/10] 00:00:51, metric 2
                        > to 10.0.46.4 via ge-0/0/2.0
    224.0.0.5/32       *[OSPF/10] 00:08:44, metric 1
                          MultiRecv
    
    IAMTEST.inet.0: 11 destinations, 11 routes (11 active, 0 holddown, 0 hidden)
    + = Active Route, - = Last Active, * = Both
    
    7.7.7.7/32         *[OSPF/10] 00:00:48, metric 1
                        > to 10.0.67.7 via ge-0/0/0.0
    10.0.14.0/24       *[OSPF/10] 00:00:51, metric 2
                        > to 10.0.46.4 via ge-0/0/2.0
    10.0.34.0/24       *[OSPF/10] 00:00:51, metric 2
                        > to 10.0.46.4 via ge-0/0/2.0
    224.0.0.5/32       *[OSPF/10] 00:08:44, metric 1
                          MultiRecv         
    

    It appears in master instance, but is not advertised to R4.

    The only way to advertiise this route is to create another policy for OSPF instead of REDIS_DIRECT which will allow all routes to be exported to peer.

    So obviously this route is somehow not considered an OSPF route. However, I failed to find any mention of this issue in documentation. Why does it happen?

     

    (In case you're wondering, why would I even need configuraton like this: just getting prepared to JNCIS-SP and exploring what you can (and what you cannot) do with rib-groups).

     



  • 2.  RE: rib-groups importing: route imported but not advertised to OSPF peers

    Posted 05-22-2017 14:20

    I dont think we have enough information to help answer your question, How is R4 confifgured to suppot OSPF with the other routers?

    The route is considered and ospf route as you can see from both advertisement the protocol preference:

    7.7.7.7/32         *[OSPF/10]

     

    OSPF requires full mesh. As far as we can tell you have 2 ospf areas. What interface on R4 is configured for OSPF and what area is it in. Can you show the details of the ospf database on both R4 and R6?



  • 3.  RE: rib-groups importing: route imported but not advertised to OSPF peers
    Best Answer

    Posted 05-22-2017 19:47

    Hi, you are trying to annonce ospf routes between different "ospf processes", one is in ri IAMTEST, and another in inet.0 , so yes, you will need to redistribute this routes. 

     

     



  • 4.  RE: rib-groups importing: route imported but not advertised to OSPF peers

    Posted 05-23-2017 07:48

    I added second statement to my policy accepting routes from another instance's OSPF process and now it works. Thanks.