BGP Dual-ISP Edge Design: Redundancy, Traffic Engineering and Safe Filtering
Short answer: A dual-ISP BGP edge can provide route redundancy and influence which provider carries outbound or inbound traffic, but BGP policy cannot guarantee end-to-end path symmetry or force remote networks to follow your preferred return path. Keep advertisements tightly filtered, choose an intentional inbound route policy, and test failures with the firewall and NAT design in mind.[1][2]
What dual-ISP BGP provides
With two independent providers, your edge can learn routes from both and advertise your authorized public prefixes to each. BGP selects routes according to local policy and path attributes; the forwarding table then uses the selected next hop. This creates resilience to a provider or link failure and gives you tools to shape traffic, but it does not make both links automatically active for every destination.[1][2]
Design choices before configuration
- Addressing: for portable multihoming, coordinate an address block and ASN that both providers will accept; confirm prefix-length filters and any registration/route-validation requirements with them.
- Route volume: decide whether you need full tables, selected routes, or default-only. Full tables increase memory and operational burden; defaults are simpler but provide less path visibility.
- Redundancy: use independent circuits and, where justified, separate edge routers and power paths. Two sessions on one router do not protect against router failure.
- Security: explicitly permit only your authorized prefixes outbound and apply inbound prefix limits/filters. Never assume a newly configured eBGP peer has safe default policy.[2]
- Stateful services: review NAT, firewall state, VPNs, DNS and health-check behavior during failover. A changed egress path can break sessions even when routing converges.
Outbound traffic: what your AS can control
Outbound means traffic your network sends toward the Internet. Set higher LOCAL_PREF on routes learned from the preferred provider across your AS; this is an internal decision and is not sent to ordinary external peers. Match policy carefully so the backup remains eligible, and consider route scope, not just a single default route.[1]
ip prefix-list ISP-A-DEFAULT seq 5 permit 0.0.0.0/0
route-map ISP-A-IN permit 10
match ip address prefix-list ISP-A-DEFAULT
set local-preference 200
route-map ISP-A-IN permit 100
!
router bgp 65010
neighbor 192.0.2.1 remote-as 64496
neighbor 192.0.2.1 route-map ISP-A-IN in
neighbor 198.51.100.1 remote-as 64497
This illustrative IOS-style snippet prefers ISP-A's default route when both providers send one. It is not a complete production configuration: add explicit inbound and outbound prefix policy, peer authentication where supported, maximum-prefix limits, and platform-specific syntax. A broad final permit above is shown only to keep the example focused; production policy should be deliberately scoped.
Inbound traffic: influence, not command
Inbound means remote networks sending traffic toward your advertised prefixes. Your edge can advertise a longer AS_PATH to one provider using prepend, or use a provider-supported community to request a provider-local preference change. MED may help when paths are compared within the same neighboring AS, but remote policy determines whether and how these signals matter. Test provider communities with each provider's documentation and support team.[1][2]
ip prefix-list OUR-PREFIX seq 5 permit 203.0.113.0/24
route-map ISP-B-OUT permit 10
match ip address prefix-list OUR-PREFIX
set as-path prepend 65010 65010 65010
route-map ISP-B-OUT deny 100
!
router bgp 65010
neighbor 198.51.100.1 route-map ISP-B-OUT out
Prepending can make the ISP-B path look longer to some remote networks, but it is not a guarantee: remote LOCAL_PREF and other policy can outweigh AS_PATH length. Keep the origin announcement consistent at both providers unless there is a deliberate, validated reason to vary it.
What BGP cannot guarantee
- It cannot force every remote AS to choose a particular inbound path.
- It does not provide deterministic per-packet load balancing across unequal providers; typical BGP selection chooses a best route, while carefully designed prefix splits may distribute flows unevenly.[3]
- It cannot preserve stateful firewall/NAT sessions if failover moves traffic to an edge without corresponding state or address continuity.
- It cannot replace physical diversity, provider SLA validation, monitoring, or tested operational procedures.
Route-policy walk-through
- Receive ISP-A and ISP-B routes; reject anything outside the agreed route scope.
- Set LOCAL_PREF internally to select the preferred outbound provider for the relevant destinations.
- Advertise only authorized customer prefixes to each provider.
- Apply a separately documented inbound-influence policy, such as a provider community or selective prepend.
- Validate installed routes and actual data-plane reachability; a BGP session being Established does not prove application connectivity.
Verification commands
show ip bgp summary
show ip bgp
show ip bgp 0.0.0.0
show ip route bgp
show ip bgp neighbors 192.0.2.1 advertised-routes
show ip bgp neighbors 192.0.2.1 received-routes
Expected logic: both sessions should be Established; the intended route should have the preferred LOCAL_PREF and be selected/installed; advertised-routes should contain only approved public prefixes; and after a controlled circuit failure, the alternate route should become usable. Command availability and syntax differ by platform and software release.
Troubleshooting checklist
- Confirm session state, peer ASN, interface reachability, TCP/179 filtering, and negotiated capabilities.
- Check whether the provider accepts your prefix length and ASN path; inspect received and advertised route views.
- Verify route-map direction, prefix-list match, sequence order, and policy attachment.
- Check next-hop resolution and whether the BGP route entered the routing table.
- Check firewall/NAT symmetry, return routing, MTU, and application probes during failover.
- Test failover and failback in a maintenance window; record convergence and session impact.
Modern edge considerations
For cloud and hybrid edges, treat provider circuits, cloud gateways, route propagation, and security policy as one design. A cloud VPN or private interconnect may have provider-specific path-selection behavior, so verify its documented communities, route limits, and failover semantics rather than assuming public-Internet BGP behavior.
Interview answer
“With two ISPs, I use inbound filters to accept only the required route scope, LOCAL_PREF to choose outbound paths inside my AS, and strict outbound filters to advertise only authorized prefixes. For inbound traffic I can influence provider or remote selection with communities, MED where applicable, or AS-path prepending, but the remote AS makes the final decision. I also validate stateful firewall/NAT behavior and test physical and routing failures.”
Related reading
Sources
- RFC 4271: BGP-4
- Cisco: Configure BGP with Two Different Service Providers
- Cisco: Understand Load Sharing with BGP
Try it: BGP Route Lookup - free, runs in your browser. Also try: CIDR to IP Range - free, runs in your browser.
Related reading
- OSPF Route Filtering Explained: Distribute Lists vs ABR Filter Lists
- OSPF Summarization Explained: ABR area range, ASBR Summaries and Blackholes
- BGP Troubleshooting: Established but No Routes, RIB-Failure and Missing Advertisements
- BGP Convergence Explained: BFD, PIC, Graceful Restart and Failover
- BGP in Cisco ACI Explained: L3Outs, MP-BGP and Route Reflectors
- BGP EVPN Explained: VXLAN Routes, Route Types and Troubleshooting
Comments
Post a Comment