BGP advertise default and as path prepending
Hi,
Question: Is it possible to do as path prepending for default route advertised using capability-default-originate enable?
We have a setup with 2 Fortigates connected southbound to APN on Mobile Network, and northbound to the internet.
Towards the APN BGP is used, and the Fortigate must always advertise default route to APN, regardless whether the northbound internet connection is up or down. For this I can use set capability-default-originate in BGP configuration.
config router bgp set as 65534 set router-id 1.2.3.4 set keepalive-timer 10 set holdtime-timer 30 config neighbor edit "1.2.3.5" set bfd enable set capability-default-originate enable
Furthermore we would like to use as path prepending on one Fortigate in order to steer the traffic to the other Fortigate. For this I can use set-aspath in route-map configuration.
config router prefix-list edit "only_dflt" config rule edit 1 set prefix 0.0.0.0 0.0.0.0 unset ge unset le next end next
config router route-map edit "only_dflt_route" config rule edit 1 set match-ip-address "only_dflt" set set-aspath "65534 65534 65534" next end next
However this as-path prepending works if I redistribute the static default route into bgp using:
config router bgp
config redistribute "static" set status enable end
Showing advertised route:
FG02 # get router info bgp neighbors 1.2.3.5 advertised-routes BGP table version is 42, local router ID is 1.2.3.4 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight RouteTag Path *> 0.0.0.0/0 1.2.3.5 32768 0 65534 65534 65534 ? Total number of prefixes 1
But if I don't do this and advertise default using capability-default-originate enable there is no as-path prepending performed.
Showing advertise routes:
FG02 # get router info bgp neighbors 1.2.3.5 advertised-routes BGP table version is 42, local router ID is 1.2.3.4 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight RouteTag Path *> 0.0.0.0/0 1.2.3.5 100 32768 0 i Total number of prefixes 1
Is there a way to do as-path prepending in combination with capability-default-originate?
Best Regards!
Arjan
