Routing

last person joined: 5 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.  Newbie Route filtering question

    Posted 04-23-2015 18:02

    Hi,

     

    I've just started studying Junos with a view to getting certification and have been playing around with a lab in work.

     

    I have a question which I'm struggling to find an answer to on google. Any help would be appreciated.

     

    I have a core hub router connecting out to spoke sites.

     

    I want to prevent OSPF from advertising one specific route in the core network out to the remote sites.

     

    I figured that routing policies would be the best way to do this. So I'm trying to set up a policy that prevents 192.168.0.0/30 being advertised out the remote sites but still allows it to be advertsed back into the rest of the core network. 

    With the available options (from/to) I can't see way to make this work.

     

    Would anyone be able to advise how or if this is even possible using routing policies?



  • 2.  RE: Newbie Route filtering question

     
    Posted 04-23-2015 18:44

    Can you confirm how OSPF learns about 192.168.0.0/30? Is this network part of OSPF interface or learned via other protocols like BGP/Static?

    Also are you trying to control advertisement between 2 area or in same area?

     

     



  • 3.  RE: Newbie Route filtering question

    Posted 04-23-2015 20:09

    Hi Suraj,

     

    Thanks for replying

     

    The 192.168.0.0/30 subnet is connecting 2 routers, one in my data centre and the other in the corporate head office. On both of these routers the prefix is learned from the respective OSPF interfaces. Both of these interfaces are in Area 0. The remote sites connect via another interface of the same data centre router (the dc router interface linking to the remote sites and the remote sites themselves are all in Area 1)

     

    So I imagine what I should be trying to do is stop that route being advertised into area 1 from area 0.

     

    I know in a real situation in would probably be better to just set that subnet as a static route on the DC & HO routers with no-readvertise set. I just wanted to use this as a way to learn about routing policies and filtering. Perhaps I've set myself a bad example to learn with.



  • 4.  RE: Newbie Route filtering question

     
    Posted 04-23-2015 21:00

    Can you try something like below, I havent tested this.

     

    root@SRX# show policy-options
    policy-statement TEST {
        from {
            protocol ospf;
            area 0.0.0.0;
            route-filter 192.168.0.0/30 exact;
        }
        to area 0.0.0.1;
        then reject;
    }

    [edit]
    root@SRX



  • 5.  RE: Newbie Route filtering question

    Posted 04-27-2015 16:49

    Hi Suraj,

     

    Sorry I haven't had a chance to test this yet; I'm on holiday for a week and promised my other half I would take a break from studying. Will try that when I'm back next weekend 



  • 6.  RE: Newbie Route filtering question
    Best Answer

    Posted 04-29-2015 00:06

    I don't think Juniper has a way to prevent that from happening. Seems like you are saying the routes are OSPF routes learned from the OSPF interfaces. Only if they were learned from another protocol, e.g Static/BGP you could write a policy to restrict those routes. otherwise, you would just have to remove that interface from ospf and advertise the specific routes you want to using a policy.



  • 7.  RE: Newbie Route filtering question

    Posted 05-03-2015 08:44

    I've tried applying that config but it didn't seem to stop the route getting through to Area 1

     

    I guess you are right Lyndidon.

     

    I'll find myself a better example for practicing policys.

     

    Cheers to both of you for the help, much appreciated 🙂