Routing

 View Only
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.  Remove default route from BGP

    Posted 03-21-2022 10:13
    hi everyone, 

    I have a BGP tunnel to Azure, but I'm trying to remove the published 0.0.0.0/0 route from the BGP advertisements..  I created a policy-option to remove it, but it's still being published:

    policy-statement preprend1 {
    term prependterm1 {
    from neighbor [ 172.16.5.120 172.16.5.121 ];
    then {
    preference subtract 10;
    accept;
    }
    }
    term removeDefault {
    from {
    route-filter 0.0.0.0/0 through 0.0.0.0/32;
    }
    to neighbor [ 172.16.9.228 172.16.9.229 ];
    then reject;
    }
    term send-direct {
    from protocol direct;
    then accept;
    }
    }

    and on the BGP peer: 
    group azure {
    type external;
    multihop {
    ttl 50;
    }
    local-address 172.16.5.1;
    export preprend1;
    peer-as 65515;
    local-as 65050;
    neighbor 172.16.83.254;
    neighbor 172.16.160.242;
    neighbor 172.16.9.228;
    neighbor 172.16.9.229;
    }

    (sorry not sure how to do the correct formatting)

    Any ideas why 0.0.0.0/0 is not removed?

    ------------------------------
    Roelf Zomerman
    ------------------------------


  • 2.  RE: Remove default route from BGP

    Posted 03-21-2022 20:17
    Policy terms are processed in order and the first matching term is the one used.

    So the term removeDefault needs to be the first one in your policy.

    Also the match condition you want  to remove only the default route is as follows
    0.0.0.0/0 exact

    Junos also processes imports and exports as separate policies.  So it looks like you want to remove the third term and make that an export policy for you bgp group.

    Finally, both policies should end with a final term of just reject.  Because the default bgp behavior is to accept anything that makes it to the end of the policy chain.  And I think you only want to accept or send the terms you are declaring.

    ------------------------------
    Steve Puluka BSEET - Juniper Ambassador
    IP Architect - DQE Communications Pittsburgh, PA (Metro Ethernet & ISP)
    http://puluka.com/home
    ------------------------------



  • 3.  RE: Remove default route from BGP

    Posted 03-22-2022 09:49
    ah thanks!.. I will try

    ------------------------------
    Roelf Zomerman
    ------------------------------