Skip to main content
manucmp
Explorer
July 3, 2023
Solved

Advertising bgp routes

  • July 3, 2023
  • 2 replies
  • 3435 views

Hi all, we have around 50 static routes. I just need to advertise two of them in eBGP. I managed to stop propagating static route and try to advertise only the two needed... can't get it done (is there a clear how-to I can follow?).
I could re-advertise static routes and block all 48 not needed... but it feels an overkill...
What should I do? Thank you.

Best answer by Toshi_Esumi

Or, create the same prefix-list @saneeshpv_FTNT suggests EXCEPT edit 3, to simply match without denying the rest. Then create a route-map like below and use it at neighbor config section in route-map-out statement. route-maps have implicit deny at the end.

 

config router route-map

  edit "advertise-limited-routes"

    config rule

      set match-ip-address "Test"

    next

end

 

config router bgp

  config neighbor

    edit <neighbor_IP>

      set route-map-out  "advertise-limited-routes"

    next

  end

end

 

This adds one more layer so additional work. But more flexible when you start dealing with multiple prefix lists in the future.

 

Toshi

2 replies

saneeshpv_FTNT
Staff
Staff
July 3, 2023

Hi ,

 

You may use a prefix-list to filter routes a per your requirement and then call them in BGP configuration for route-advertisement.

 

Ex:

FGVM02TM22000863 (Test) # show
config router prefix-list
edit "Test"
config rule
edit 1
set prefix 1.1.1.1 255.255.255.255
unset ge
unset le
next
edit 2
set prefix 2.2.2.1 255.255.255.255
unset ge
unset le
next
edit 3
set action deny
set prefix any
unset ge
unset le
next
end
next
end

 

https://community.fortinet.com/t5/FortiGate/Technical-Tip-How-to-control-BGP-route-advertisement-with-prefix/ta-p/192930 

 

Regards

Toshi_Esumi
SuperUser
SuperUser
July 3, 2023

Or, create the same prefix-list @saneeshpv_FTNT suggests EXCEPT edit 3, to simply match without denying the rest. Then create a route-map like below and use it at neighbor config section in route-map-out statement. route-maps have implicit deny at the end.

 

config router route-map

  edit "advertise-limited-routes"

    config rule

      set match-ip-address "Test"

    next

end

 

config router bgp

  config neighbor

    edit <neighbor_IP>

      set route-map-out  "advertise-limited-routes"

    next

  end

end

 

This adds one more layer so additional work. But more flexible when you start dealing with multiple prefix lists in the future.

 

Toshi