Routing

last person joined: 2 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.  OSPF - not advertising a passive interface network to specific neighbor

    Posted 11-05-2013 07:11

    Hi Guys

     

    There are 3 OSPF routers in the same area connected as shown below

     

    On R2 OSPF is running on interfaces connected to R1 and R3

    and the other interfaces ge-0/0/2 and ge-0/0/5 are OSPF passive interfaces

    so networks 192.168.1.0/24 and 172.32.32.0/24 will be advertised to R1 and R3

     

    The requirement:

    ----------------------------

     

    Network 172.32.32.0/24 is required to still be advertised to R1, but shouldn't be advertised to R3, and its interface ge-0/0/5 should stay configured as an OSPF passive interface

     

    By which means this can be done???

     

     

                                                      (R3)

                                                         |

                                                         |

                                                         |

    (R1) ================= (R2)-----ge-0/0/5 ospf passive - IP address 172.32.32.0/24

                                                         /

                                                        /

                                                      ge-0/0/2 ospf passive - IP address 192.168.1.0/24

     

     

    Thanks in Advance 🙂



  • 2.  RE: OSPF - not advertising a passive interface network to specific neighbor
    Best Answer

    Posted 11-05-2013 09:10

    Hello,

    I slighly amended Your diagram for clarity.

     


    @Eng_Ahmad wrote:

     

     

                                                      (R3)

                                                         |

                                                         |

                                                         |

    (R1) =========ge-9/9/9= (R2)-----ge-0/0/5 ospf passive - IP address 172.32.32.0/24

                                                         /

                                                        /

                                                      ge-0/0/2 ospf passive - IP address 192.168.1.0/24

     

     

     



    Assuming R1 is connected to R2 with a dedicated interface (i.e. ge-9/9/9 as shown aboive on amended diagram), then no-forwarding instance+OSPF export policy+rib-groups for route leaking between no-forwarding instance& inet.0 would accomplish what You want.

    Link

    http://www.juniper.net/techpubs/en_US/junos10.4/information-products/topic-collections/config-guide-routing/topic-32747.html

    (although instance-type is not explicitly configured in this example, the default instance-type is "no-forwarding")

    HTH

    Thanks

    Alex



  • 3.  RE: OSPF - not advertising a passive interface network to specific neighbor

    Posted 11-09-2013 07:47

    Thanks aarseniev for the provided information and sorry for the delay from my side in reply.

     

    Isn't there any simpler way than this? can't this be done using policy-options or any other idea?

     

    Regarding the provided idea , when using another routing instance then this make me have to import interface-routes also inside this other routing instance .. so what if I'm already using another routing instances and using the ((set routing-options interface-routes rib-group inet  RIB_GROUP_NAME)) command to import interface routes inside another instance.

    Unfortunately the above command can be applied only on one rib-group so I will not be able to use with several rib-groups.

     

    Awaiting your reply and thanks for your support 🙂

     


    @aarseniev wrote:

    Hello,

    I slighly amended Your diagram for clarity.

     


    @Eng_Ahmad wrote:

     

     

                                                      (R3)

                                                         |

                                                         |

                                                         |

    (R1) =========ge-9/9/9= (R2)-----ge-0/0/5 ospf passive - IP address 172.32.32.0/24

                                                         /

                                                        /

                                                      ge-0/0/2 ospf passive - IP address 192.168.1.0/24

     

     

     



    Assuming R1 is connected to R2 with a dedicated interface (i.e. ge-9/9/9 as shown aboive on amended diagram), then no-forwarding instance+OSPF export policy+rib-groups for route leaking between no-forwarding instance& inet.0 would accomplish what You want.

    Link

    http://www.juniper.net/techpubs/en_US/junos10.4/information-products/topic-collections/config-guide-routing/topic-32747.html

    (although instance-type is not explicitly configured in this example, the default instance-type is "no-forwarding")

    HTH

    Thanks

    Alex


     



  • 4.  RE: OSPF - not advertising a passive interface network to specific neighbor

    Posted 11-11-2013 00:32

    Hello,

     


    @Eng_Ahmad wrote:

    Thanks aarseniev for the provided information and sorry for the delay from my side in reply.

     

    Isn't there any simpler way than this? can't this be done using policy-options or any other idea?

     

     

    "policy-options" do not filter anything, this stanza is used to hold policy-statements. And policy-statements do filter routes _IF_ applied correctly.

    Making an OSPF "passive" interface create Type-1 LSA/OSPF Internal route(s) which cannot be filtered with JUNOS policy.

    If you export direct routes using OSPF export policy, this wil create Type-5 LSA/OSPF External route(s) which can be filtered _from_ LSDB _to_ route table using OSPF import policy on remote router.

    HTH

    Thanks

    Alex



  • 5.  RE: OSPF - not advertising a passive interface network to specific neighbor

    Posted 11-11-2013 10:37
    Yes, I know that policy-options will have no effect unless applied some where, and that what I was asking about, if we can apply a routing policy somewhere to accomplish the requirement.

    Ok, no I'm interested to know how to accomplish this using the first suggestion you provided, so could you please provide a sample configuration for this case if possible.

    Thanks 🙂

    Regards,
    Ahmad Rabie


  • 6.  RE: OSPF - not advertising a passive interface network to specific neighbor

    Posted 11-13-2013 06:16

    Hello,

    Here You go:

     

                                                      (R3)
    
                                                         |
    
                                                         |
    
                                                         |
    
    (R1) ========ge-1/0/6.10== (R2)-----ge-1/0/2.0 ospf passive - IP address 198.18.15.0/30

     

     

    The required config on R2:

     

    [edit]
    aarseniev@R2# show protocols ospf    
    area 0.0.0.0 {
        interface ge-1/1/8.2011 {
            interface-type p2p;
        }
        interface lo0.0 {
            interface-type p2p;
            passive;
        }
        interface ge-1/0/2.0 {
            interface-type p2p;
            passive;
        }
    }
    
    [edit]
    aarseniev@sadok# show routing-instances NF-OSPF 
    instance-type no-forwarding;
    interface ge-1/1/6.10;
    routing-options {
        instance-import inet0->NF-OSPF;
    }
    protocols {
        ospf {
            export global-ospf-export;
            area 0.0.0.0 {
                interface ge-1/1/6.10 {
                    interface-type p2p;
                }
            }
        }
    }
    [edit]
    aarseniev@sadok# show policy-options policy-statement global-ospf-export 
    term 10 {
        from protocol ospf;
        then accept;
    }
    
    [edit]
    aarseniev@sadok# show policy-options policy-statement inet0->NF-OSPF        
    term 1 {
        from {
            instance master;
            protocol ospf;
        }
        then accept;
    }

     Verification:

     

    - 198.18.15.0/30 should be visible as OSPF route on R3 BUT it is NOT visible as OSPF route on R1:

     

    aarseniev@R3> show route protocol ospf 198.18.15.0/30 
    
    inet.0: 26 destinations, 27 routes (26 active, 0 holddown, 0 hidden)
    + = Active Route, - = Last Active, * = Both
    
    198.18.15.0/30     *[OSPF/10] 1d 19:50:01, metric 1
                        > to 198.18.22.1 via ge-1/1/8.2011

     

    aarseniev@R1> show route protocol ospf 198.18.15.0/30 
    
    aarseniev@R1>  

     HTH

    Thanks

    Alex