Junos OS

 View Only
last person joined: 2 days ago 

Ask questions and share experiences about Junos OS.
  • 1.  ospf route advertisement filtering

     
    Posted 09-12-2021 15:26
    hi all

    I want to prevent certain directly connected routes from being advertise into OSPF

    How do i do that ?

    set policy-options policy-statement static_to_ospf term 2 from protocol direct
    set policy-options policy-statement static_to_ospf term 2 from route-filter 192.168.1.0/24 exact
    set policy-options policy-statement static_to_ospf term 2 then reject
    set protocols ospf area 0.0.0.0 interface irb.2
    set protocols ospf area 0.0.0.0 interface irb.97
    set protocols ospf export static_to_ospf

    irb.2 is directly connected to 192.168.1.0/24
    i want to prevent 192.168.1.0/24 from being advertised though irb.97 but still able to receive routing updates

    Thank you


  • 2.  RE: ospf route advertisement filtering

    Posted 09-13-2021 15:58
    Doing it by policy is certainly the way to go, below is the policy to advertise lo0.0 only:
    # Policy for advertising lo0.0 only:
    set policy-options policy-statement OSPF-EXPORT term LO0 from interface lo0.0
    set policy-options policy-statement OSPF-EXPORT term LO0 then accept
    set policy-options policy-statement OSPF-EXPORT term ELSE-REJECT then reject
    
    # Set the policy in OSPF:
    set protocols ospf export OSPF-EXPORT​


    Regards,

    Elvin