Routing

 View Only
last person joined: 4 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.  route-filter-list stop advertising subnet via bgp

    Posted 02-17-2023 05:51

    I want to stop the following /24 being advertised out to the internet, so this will failover to our other DC which is advertising a /23 which includes this subnet
    set policy-options route-filter-list DCX_1XX_BLOCK_24 1XX.XX.XX.0/24 exact
    Can i just change the above statement to reject
    set policy-options route-filter-list DCX_1XX_BLOCK_24 1XX.XX.XX.0/24 reject


    set policy-options policy-statement PL_INTERNET_OUT term INTERNET_DCX_1XX_24 from protocol bgp
    set policy-options policy-statement PL_INTERNET_OUT term INTERNET_DCX_1XX_24 from route-filter-list DCX_1XX_BLOCK_24



    ------------------------------
    STUART GILSON
    ------------------------------


  • 2.  RE: route-filter-list stop advertising subnet via bgp

    Posted 02-18-2023 09:49

    In the policy your using to put that route into BGP, in the "then" statement, add the no-export community to it.  This will allow the route to be advertised internally, but not externally(outside your AS).




  • 3.  RE: route-filter-list stop advertising subnet via bgp

    Posted 02-20-2023 08:54

    Hi Steve, so this filter is used in multiple policies and i dont want it advertised internally or externally. So would the reject comment stop this?



    ------------------------------
    STUART GILSON
    ------------------------------



  • 4.  RE: route-filter-list stop advertising subnet via bgp

    Posted 02-20-2023 10:26

    Yes a "then reject" statement would stop the advertisement of that route.  I misunderstood what it was you were trying to do.  

    I do have a question, the route you're trying to not be advertised, how is it even getting into BGP? 




  • 5.  RE: route-filter-list stop advertising subnet via bgp

    Posted 02-21-2023 03:48

    Hi Stuart,

    • If a "reject" action is added in the "then" statement of the policy, and if the policy is applied as an import policy in the BGP configuration, the /24 prefix received from the BGP peer will not be accepted on that router as well. It means the edge router will also not have this BGP route in its table.
    • If the requirement is to accept the route and not advertise it to any other BGP peer, please use the "no-advertise" community in the "then" statement. This will accept the route at the edge router but not advertise it to any other external or internal BGP peer.
    • If the requirement is to accept the route but not advertise to any other BGP peer, please use the "no-export" community in the "then" statement. This will accept the route at the edge and will advertise to only internal peers, but not to any external BGP peer.

    These are the three options available based on your exact requirement.

    Note that you must define the community "no-advertise" and "no-export" in the set policy community configuration hierarchy, although these are well-known BGP communities.

    Regards



    ------------------------------
    Sheetanshu Shekhar
    ------------------------------



  • 6.  RE: route-filter-list stop advertising subnet via bgp

    Posted 02-22-2023 07:39

    So just to confirm

    Changes the route filter from exact to reject will not stop BGP advertising this subnet

    set policy-options route-filter-list DCX_1XX_BLOCK_24 1XX.XX.XX.0/24 exact
    set policy-options route-filter-list DCX_1XX_BLOCK_24 1XX.XX.XX.0/24 reject

    Regards

    Stuart



    ------------------------------
    STUART GILSON
    ------------------------------



  • 7.  RE: route-filter-list stop advertising subnet via bgp

    Posted 02-23-2023 00:45

    Hi,

    "set policy-options route-filter-list DCX_1XX_BLOCK_24 1XX.XX.XX.0/24 reject" is not a valid syntax. The valid syntax would be

    "set policy-options route-filter-list DCX_1XX_BLOCK_24 1XX.XX.XX.0/24 exact reject". This will stop the prefix from being advertised towards the BGP peer wherever the policy PL_INTERNET_OUT is applied.



    ------------------------------
    Sheetanshu Shekhar
    ------------------------------



  • 8.  RE: route-filter-list stop advertising subnet via bgp

    Posted 02-23-2023 03:01

    Perfect thanks



    ------------------------------
    STUART GILSON
    ------------------------------