Migrating away from BGP default-information originate
Background
I recently had yet another nbn unplanned outage. Now I have a GL-MT300N-V2 which I have basic config and a floating, static route on my central/downstream multilayer switch as a backup route with a worse metric than BGP, so that I can share my mobile phone's Mobile Broadband in the event that my Fortigate (FGT) can't forward default route traffic, but for some reason it was not working as expected/intended.
Problem #1 - IPTABLES default reject on FORWARD table
I did not capture the issue in detail, but it turned out that the GL-MT300N-V2 was blocking traffic in the forwarding table, changing this setting is what allowed forward traffic to pass to the MBB tether.
Problem #2 - default-information originate
The upstream BGP default route from my FGT persisted even in the event of an outage, when it should have disappeared so that the floating static route comes takes over internet forwarding (the Fortigate article linked herein explains this however this is normal BGP behaviour, but it was initially overlooked at the time of implementation. whoops!), but this was because I was using the Fortinet option 'set capability default-information-originate` in the BGP configuration, so I ended up tuning the BGP configuration and made the default route more dynamic as follows:
The solution
- Created a DEFAULT route prefix list
- Created a Route-map that uses the prefix list
- Redistributed static routes into the BGP table using the route-map
config router prefix-listedit "PL_DEFAULT"config ruleedit 1set prefix 0.0.0.0 0.0.0.0unset geunset lenextendnextendconfig router route-mapedit "RM_DEFAULT"config ruleedit 1set match-ip-address "PL_DEFAULT"nextendnextendconfig redistribute "static"set status enableset route-map "RM_DEFAULT"end
I then disconnected the nbn and enabled `debug ip routing` on my switch to test the solution.
During testing and while the nbn was offline, the floating static was in place, exactly as expected:
SWITCH#show ip route | invl 0\.0\.0\.0\/0S* 0.0.0.0/0 [254/0] via 192.168.81.1SWITCH#
1w0d: RT: updating bgp 0.0.0.0/0 (0x0):via 10.8.18.11w0d: RT: closer admin distance for 0.0.0.0, flushing 1 routes1w0d: RT: add 0.0.0.0/0 via 10.8.18.1, bgp metric [20/0]1w0d: RT: default path is now 0.0.0.0 via 10.8.18.1
SWITCH#show ip route bgp | incl 0\.0\.0\.0\/0B* 0.0.0.0/0 [20/0] via 10.8.18.1, 00:27:41SWITCH#
No comments:
Post a Comment