Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
gilfalko
New Contributor III

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 8
Iescudero
Contributor II

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

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
New Contributor III

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

 

Iescudero

just add this to the prefix:

unset ge set le 32

and try again

gilfalko
New Contributor III

same thing I'm afraid.

emnoc
Esteemed Contributor III

try

 

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

 

Ken

 

PCNSE 

NSE 

StrongSwan  

PCNSE NSE StrongSwan
gilfalko
New Contributor III

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

Thanks for the info!

Announcements

Select Forum Responses to become Knowledge Articles!

Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.

Labels
Top Kudoed Authors