How to Set Up IPv6 BGP on Cisco Routers: Configuration and Best Practices

How to Set Up IPv6 BGP on Cisco Routers

Setting up BGP for IPv6 was, for me, one of those tasks that seemed intimidating in theory but turned out to be very approachable once I understood how Cisco IOS handles address families. If you already know IPv4 BGP, the good news is that the underlying protocol mechanics — TCP session establishment, path attributes, best-path selection — are identical. What changes is address family configuration and a few IPv6-specific details around next-hop handling. In this guide I am walking through everything I do when deploying IPv6 BGP in production, from a basic eBGP peering to enterprise-grade filtering and security.

Networking Fundamentals: BGP Address Families

Modern Cisco IOS uses a multiprotocol BGP (MP-BGP) framework where a single BGP process can carry multiple address families — IPv4 unicast, IPv6 unicast, VPNv4, and others — over the same or different TCP sessions. This matters because when you configure IPv6 BGP, you are not starting a separate BGP process; you are adding an address-family ipv6 configuration under the existing (or new) router bgp process and activating your neighbor within that address family.

One detail that trips people up coming from IPv4 BGP: by default, when you configure a neighbor under router bgp, that neighbor is only active in the IPv4 unicast address family unless you explicitly activate it under address-family ipv6 as well.

Basic IPv6 eBGP Configuration

Here is a straightforward eBGP peering example between two routers in different autonomous systems, using IPv6 link-local or global addresses for the session.

Router-A(config)# router bgp 65001
Router-A(config-router)# neighbor 2001:db8:100::2 remote-as 65002
Router-A(config-router)# address-family ipv6
Router-A(config-router-af)# neighbor 2001:db8:100::2 activate
Router-A(config-router-af)# network 2001:db8:1::/48
Router-A(config-router-af)# exit-address-family

On the peer router:

Router-B(config)# router bgp 65002
Router-B(config-router)# neighbor 2001:db8:100::1 remote-as 65001
Router-B(config-router)# address-family ipv6
Router-B(config-router-af)# neighbor 2001:db8:100::1 activate
Router-B(config-router-af)# network 2001:db8:2::/48
Router-B(config-router-af)# exit-address-family

Verification:

Router-A# show bgp ipv6 unicast summary
Router-A# show bgp ipv6 unicast neighbors 2001:db8:100::2

Using Link-Local Addresses for eBGP Sessions

A detail specific to IPv6 that does not exist in IPv4 BGP: you can peer using link-local addresses on directly connected links, which some engineers prefer because it avoids consuming a global unicast address pair just for the peering itself. This requires specifying the outgoing interface explicitly since link-local addresses are not globally routable:

Router-A(config-router)# neighbor FE80::2%GigabitEthernet0/0/1 remote-as 65002
Router-A(config-router)# address-family ipv6
Router-A(config-router-af)# neighbor FE80::2%GigabitEthernet0/0/1 activate

I personally prefer using global unicast addresses for eBGP sessions in most enterprise designs, since link-local peering can complicate troubleshooting (you cannot ping a link-local peer address from a remote location the way you can a global one), but it is a valid and sometimes preferred approach, especially in provider environments optimizing for address conservation.

Configuring iBGP for IPv6

Internal BGP for IPv6 works the same way as internal BGP for IPv4, typically using loopback addresses for session stability:

Router-A(config)# router bgp 65001
Router-A(config-router)# neighbor 2001:db8:ffff::2 remote-as 65001
Router-A(config-router)# neighbor 2001:db8:ffff::2 update-source Loopback0
Router-A(config-router)# address-family ipv6
Router-A(config-router-af)# neighbor 2001:db8:ffff::2 activate
Router-A(config-router-af)# neighbor 2001:db8:ffff::2 next-hop-self

The next-hop-self command is just as important in IPv6 iBGP as it is in IPv4 — without it, iBGP peers will advertise the eBGP-learned next-hop unchanged, which internal routers may not have a route to unless you are also running an IGP that carries the eBGP peer’s directly connected IPv6 prefix.

Redistribution and Route Origination

Just as with IPv4, I generally prefer explicit network statements or careful redistribution with route-maps over blanket redistribution, to avoid accidentally leaking internal or unstable prefixes into BGP.

Router-A(config-router-af)# network 2001:db8:1::/48

If redistributing from an IGP:

Router-A(config-router-af)# redistribute ospfv3 1 route-map FILTER-TO-BGP

I always pair redistribution with a route-map and prefix-list to control exactly what gets advertised, since accidental redistribution has caused more than one embarrassing route leak in networks I have supported.

Filtering and Route Policy

Prefix Filtering with IPv6 Prefix Lists

Router-A(config)# ipv6 prefix-list ALLOWED-IN seq 10 permit 2001:db8:2::/48
Router-A(config)# ipv6 prefix-list ALLOWED-IN seq 20 deny ::/0 le 128

Router-A(config-router-af)# neighbor 2001:db8:100::2 prefix-list ALLOWED-IN in

AS-Path Filtering

Router-A(config)# ip as-path access-list 10 permit ^65002$
Router-A(config-router-af)# neighbor 2001:db8:100::2 filter-list 10 in

Setting Local Preference and MED for Path Control

Router-A(config)# route-map SET-LOCAL-PREF permit 10
Router-A(config-route-map)# set local-preference 200
Router-A(config-router-af)# neighbor 2001:db8:100::2 route-map SET-LOCAL-PREF in

Real-World Enterprise Scenario: Dual-Homed IPv6 Internet Edge

A design I have implemented more than once: an enterprise edge with two IPv6-capable internet transit providers, needing to prefer one provider for outbound traffic while accepting full routes (or a default plus partial routes) from both for redundancy.

My approach:

  1. Accept a default route plus regional aggregates from each provider using prefix-lists, rather than the full IPv6 table, unless there is a specific business need for full routes.
  2. Set local preference higher on the primary provider’s inbound route-map so outbound traffic prefers it under normal conditions.
  3. Use AS-path prepending on outbound advertisements toward the secondary provider to influence inbound traffic engineering, encouraging remote networks to prefer the primary path as well.
Router-A(config)# route-map PREPEND-SECONDARY permit 10
Router-A(config-route-map)# set as-path prepend 65001 65001 65001
Router-A(config-router-af)# neighbor 2001:db8:200::2 route-map PREPEND-SECONDARY out
  1. Configure maximum-prefix limits on both sessions to protect against a provider-side misconfiguration flooding the router with unexpected routes.
Router-A(config-router-af)# neighbor 2001:db8:100::2 maximum-prefix 50000 90

Troubleshooting IPv6 BGP Sessions

When an IPv6 BGP session refuses to establish or behaves unexpectedly, I work through the same layered approach I use for IPv4 BGP, adapted for IPv6 specifics:

Router-A# show bgp ipv6 unicast summary
Router-A# show bgp ipv6 unicast neighbors 2001:db8:100::2
Router-A# show ipv6 route 2001:db8:100::2

If the session is stuck in Idle, I check basic IPv6 reachability to the peer address first — a plain ping ipv6 to the peer confirms whether the problem is at the BGP layer at all or a more fundamental routing/reachability issue underneath it.

If the session reaches Active but never establishes, I check for a firewall or ACL blocking TCP port 179 over IPv6 specifically — it is a surprisingly common oversight for teams that have hardened their IPv4 firewall rules thoroughly but have not mirrored the same policy for IPv6 traffic.

If the session establishes but no routes are exchanged, the neighbor almost certainly was never activated under address-family ipv6 — this is, in my experience, the single most common IPv6 BGP misconfiguration, since it is easy to configure a neighbor at the top of the router bgp process and forget the activation step entirely.

For link-local peering specifically, I double check the outgoing interface is correctly specified in the neighbor statement, since Cisco IOS requires it and the session will not form without it.

Common Configuration Mistakes

  • Configuring the neighbor under router bgp but forgetting to activate it under address-family ipv6, resulting in a TCP session that never actually exchanges IPv6 routes
  • Forgetting next-hop-self on iBGP sessions, leading to unreachable next-hops for eBGP-learned IPv6 routes
  • Using link-local peering without specifying the correct outgoing interface, which Cisco IOS requires and will reject otherwise
  • Not filtering redistributed IGP routes into BGP, leaking unintended internal prefixes
  • Accepting full IPv6 tables from a transit provider without maximum-prefix protection

Security Best Practices

  • Use TCP MD5 authentication (or TCP-AO where supported) on all eBGP sessions
  • Apply strict inbound prefix-lists rather than accepting “any” from external peers
  • Use maximum-prefix limits on every eBGP session to protect against route table exhaustion
  • Implement RPKI-based origin validation where the platform and IOS version support it, to reduce the risk of accepting maliciously or accidentally originated bogus prefixes
Router-A(config-router)# neighbor 2001:db8:100::2 password IPv6BGPSecure123

Performance Tuning

  • Use BFD for fast failure detection on IPv6 BGP sessions running over stable, low-latency links
  • Tune BGP scan-time and update-source consistently across the AS to avoid unnecessary session churn
  • Where full IPv6 tables are accepted, ensure the platform’s TCAM/FIB has sufficient IPv6 route capacity — this is a hardware consideration I always verify before turning up full-table IPv6 peering on older platforms
Router-A(config-router-af)# neighbor 2001:db8:100::2 fall-over bfd

Frequently Asked Questions

Why isn’t my IPv6 BGP neighbor exchanging routes even though the session is established? Check whether the neighbor has been activated under address-family ipv6 — configuring the neighbor under router bgp alone only enables the IPv4 address family by default.

Can I use the same BGP process for both IPv4 and IPv6? Yes, MP-BGP allows a single router bgp process to carry multiple address families, either over separate sessions per address family or, less commonly, a single session carrying both.

Should I peer using global unicast or link-local IPv6 addresses? Global unicast is generally easier to troubleshoot and more flexible; link-local peering is valid for directly connected links but requires specifying the interface and can complicate remote diagnostics.

Do I need next-hop-self for IPv6 iBGP the same way I do for IPv4? Yes — without it, iBGP peers may receive an unreachable next-hop for eBGP-learned routes unless your IGP also carries that specific prefix.

Summary

IPv6 BGP configuration on Cisco routers follows the same fundamental logic as IPv4 BGP, wrapped in the multiprotocol address-family framework. The most common pitfall is forgetting to activate neighbors under address-family ipv6, but once that habit is built, the rest — filtering, path control, redundancy design, and security hardening — mirrors IPv4 BGP practices you likely already know well.

References

  • Cisco IPv6 Configuration Guide: Implementing BGP for IPv6 — cisco.com
  • RFC 4271 — A Border Gateway Protocol 4 (BGP-4)
  • RFC 2545 — Use of BGP-4 Multiprotocol Extensions for IPv6 Inter-Domain Routing
Total
2
Shares

Leave a Reply

Previous Post
How to Implement IPv6 EIGRP on Cisco Routers

How to Implement IPv6 EIGRP on Cisco Routers: Complete Configuration Guide

Next Post
How to Configure IPv6 Tunneling on Cisco Routers

How to Configure IPv6 Tunneling on Cisco Routers: GRE, 6to4, and Manual Tunnels Explained

Related Posts