Skip to main content
gilfalko
New Member
October 8, 2015
Question

Blocking broadcast of Default route via BGP

Hey,

This is my problem:

 

 

How do I block default route from being broadcast over BGP?

 

Thanks!

    8 replies

    Iescudero
    New Member
    October 8, 2015

    Hello!!

    First a Prefix:

     

    config router prefix-list edit "Blocked Default Route" set comments "Bloquea aprendizaje de rutas por BGP de la MPLS" config rule edit 1 set prefix 192.168.0.0 255.255.0.0 next end

     

     

    Then a Route Map:

     

    config router route-map edit "ROUTE_MAP_DEFAULT" config rule edit 1 set action deny set match-ip-address "Blocked Default Route" next end

     

    And last, apply Route Map in your neighbour:

     

    config router bgp set as 64XXX config neighbor edit "XXX.XXX.XXX.XXX" set remote-as 64XXX set route-map-in "ROUTE_MAP_DEFAULT" end

     

    Maybe exist a better solution, but this one worked for me when i dont want to learn some routes.

     

    Hope it helps.

    Iescudero
    New Member
    October 8, 2015

    Ups i made a mistake:

     

    This is the right prefix for you:

     

    config router prefix-list edit "Blocked Default Route" config rule edit 1 set prefix 0.0.0.0 0.0.0.0 next end

     

    Cyas

    gilfalko
    gilfalkoAuthor
    New Member
    October 8, 2015

    This will block EVERYTHING, not just the default route,...

     

    emnoc
    New Member
    October 11, 2015

    try

     

    In the mask   "set prefix 0.0.0.0 255.255.255.255" or "set prefix 0.0.0.0/0"

     

    Ken

     

    gilfalko
    gilfalkoAuthor
    New Member
    October 11, 2015

    Well, I nailed it eventually :)

     

    This was an ACCESS-LIST but there's a small "twist" sort of speak which is not mentioned in the Forti documents as usual.

     

     

     

    config router access-list edit "Block_Def_Route" config rule edit 1 set action deny set exact-match enable next edit 2 set exact-match disable next end next end

     

    config neighbor edit "10.40.15.1" set distribute-list-in "Block_Def_Route" set remote-as 6167 set route-map-out "Verizon_Prepend1" next edit "10.40.16.1" set distribute-list-in "Block_Def_Route" set remote-as 6167 set route-map-out "Verizon_Prepend" next end

     

    Without adding the bolded text this would have never worked.

    what it means is to allow everything else BUT what is being actioned as "denied"

     

     

    Iescudero
    New Member
    October 13, 2015

    Thanks for the info!

    Thought Leadership. Security Summit. Thursday, November 12th, PGA National Resort, Palm Beach Gardens, FL.
    Thought Leadership. Security Summit. Thursday, October 8th. Disney's Grand Californian Hotel & SPA, Anaheim, CA.
    Security Operations Summit: Modernize SecOps. Operate AI-Native.AMER: November 4 | 9:00 AM PST. India and SAARC: November 5 | 10:00 AM IST. EMEA: November 5 | 10:30 AM CET. APAC: November 5 | 11:00 AM SGT