Advertising IPv6 routes over IPv4 based BGP session, and vice versa, is primarily used to support dual-stack (IPv4/IPv6) network environments. This method enables service providers and network administrators to ensure smooth communication between different IP versions without requiring a complete transition of the entire infrastructure.

Multi-Protocol BGP for IPv6 Over IPv4 Networks

BGP, or more specifically, multi-protocol BGP, is a versatile protocol that can operate with both IPv4 and IPv6. The key feature of BGP is its ability to advertise different protocols over a single session. For example, you can establish an IPv4 BGP session and advertise IPv4, IPv6, VPNv4, VPNv6, and other protocols. Similarly, an IPv6 BGP session can carry not only IPv6 routes but also IPv4, VPNv4, and VPNv6.

When focusing on IPv4 and IPv6, one of the most common applications of multi-protocol BGP is sending IPv6 over an IPv4 BGP session, particularly within MPLS networks.

6PE or 6VPE are current applications of advertising IPv6 routes over IPv4 BGP Neighborship

Many ISPs use MPLS (Multiprotocol Label Switching) to efficiently forward traffic across their backbone networks. However, traditional MPLS implementations are IPv4-based, and support for native IPv6 MPLS forwarding remains limited. ISPs with IPv6 requirements for their customers may face the challenge of supporting IPv6 traffic over an IPv4-only MPLS backbone. Rather than investing in a costly and complex IPv6 MPLS infrastructure, ISPs can use a solution that transports IPv6 traffic over the existing IPv4 MPLS network.

To achieve this, ISPs can establish an IPv4 BGP peering session between their Provider Edge (PE) routers. This BGP session can carry IPv6 routes by using mechanisms like 6PE or 6VPE (IPv6 Provider Edge over MPLS).

In upcoming lessons, we will explore and demonstrate 6PE and 6VPE in more detail as part of the migration section of this course.

IPv6 and IPv4 Route Advertisement over MP-BGP Configuration Examples

To better understand how multi-protocol BGP works, I have prepared two topologies for demonstration.

In the first topology, we will establish an IPv4 BGP neighborship and advertise both IPv4 and IPv6 routes over the IPv4 BGP session. While the routers exchange routing information in the control plane, additional configuration is required in the data plane to enable IPv6 connectivity over an IPv4 network. These configurations will be discussed in detail in the upcoming 6PE and 6VPE lessons.

IPv6 over IPv4 BGP Configuration Example
IPv6 over IPv4 BGP Configuration Example

In the second topology, we will create an IPv6 BGP neighborship and advertise both IPv4 and IPv6 routes over the IPv6 BGP session. While advertising IPv4 routes over an IPv6 BGP session is less common today, it is expected to become more prevalent as networks transition to native IPv6 in the future.

IPv4 over IPv6 BGP Configuration Example
IPv4 over IPv6 BGP Configuration Example

IPv6 Routes over IPv4-based BGP Configuration Example

In the first topology, two routers are connected via an IPv4 link, and each router is configured with a loopback interface assigned both IPv4 and IPv6 addresses. An IPv4 iBGP neighborship is established between these routers.

To advertise IPv4 networks, we configure the address-family ipv4, and to advertise IPv6 networks, we use address-family ipv6. Within each address-family, we activate the configured IPv4 neighbor and use the network command to advertise the network addresses for that specific address-family.

IOU1#sh running-config | sec router bgp
router bgp 65500
 bgp log-neighbor-changes
 neighbor 10.1.2.2 remote-as 65500
 !
 address-family ipv4
  network 1.1.0.0 mask 255.255.0.0
  neighbor 10.1.2.2 activate
 exit-address-family
 !
 address-family ipv6
  network 2001:1::/32
  neighbor 10.1.2.2 activate
 exit-address-family
IOU2#sh running-config | sec router bgp
router bgp 65500
 bgp log-neighbor-changes
 neighbor 10.1.2.1 remote-as 65500
 !
 address-family ipv4
  network 2.2.0.0 mask 255.255.0.0
  neighbor 10.1.2.1 activate
 exit-address-family
 !
 address-family ipv6
  network 2001:1::/32
  neighbor 10.1.2.1 activate
 exit-address-family

To verify BGP operations for both address families, we use the commands show bgp ipv4 unicast summary and show bgp ipv6 unicast summary to check the status of IPv4 and IPv6 BGP neighborships. In the output, the IPv4 BGP neighbor appears even under the IPv6 neighborship, as it is also activated within the IPv6 address family.

With the commands show bgp ipv4 unicast and show bgp ipv6 unicast, we can view the BGP table and the networks advertised in each address family. In the IPv6 BGP table, the next-hop address appears in the format ::FFFF:10.1.2.1, showing an IPv6 address mapped from the IPv4 next-hop address.

IOU2#show bgp ipv4 unicast summary
BGP router identifier 2.2.2.2, local AS number 65500
BGP table version is 3, main routing table version 3
2 network entries using 280 bytes of memory
2 path entries using 160 bytes of memory
2/2 BGP path/bestpath attribute entries using 288 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 728 total bytes of memory
BGP activity 3/0 prefixes, 3/0 paths, scan interval 60 secs

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
10.1.2.1        4        65500       7       6        3    0    0 00:00:25        1
IOU2#show bgp ipv4 unicast
BGP table version is 3, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>i 1.1.0.0/16       10.1.2.1                 0    100      0 i
 *>  2.2.0.0/16       0.0.0.0                  0         32768 i
IOU2#show bgp ipv6 unicast summary
BGP router identifier 2.2.2.2, local AS number 65500
BGP table version is 1, main routing table version 1
1 network entries using 164 bytes of memory
1 path entries using 104 bytes of memory
1/0 BGP path/bestpath attribute entries using 144 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 412 total bytes of memory
BGP activity 3/0 prefixes, 3/0 paths, scan interval 60 secs

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
10.1.2.1        4        65500       7       6        1    0    0 00:00:43        1
IOU2#
IOU2#show bgp ipv6 unicast
BGP table version is 2, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 * i 2001:1::/32      ::FFFF:10.1.2.1          0    100      0 i
 *>  2001:2::/32      ::                       0         32768 i

IPv4 Routes over IPv6-based BGP Configuration Example

In the first topology, two routers are connected via an IP64 link, and each router is configured with a loopback interface assigned both IPv4 and IPv6 addresses. An IPv4 iBGP neighborship is established between these routers.

To advertise IPv4 networks, we configure the address-family ipv4, and to advertise IPv6 networks, we use address-family ipv6. Within each address-family, we activate the configured IPv6 neighbor and use the network command to advertise the network addresses for that specific address-family.

IOU3#show running-config | sec router bgp
router bgp 6500
 bgp log-neighbor-changes
 neighbor 2001:AA:3:4::4 remote-as 6500
 !
 address-family ipv4
  network 3.3.0.0 mask 255.255.0.0
  neighbor 2001:AA:3:4::4 activate
 exit-address-family
 !
 address-family ipv6
  network 2001:3::/32
  neighbor 2001:AA:3:4::4 activate
 exit-address-family
IOU4#show running-config | sec router bgp
router bgp 6500
 bgp log-neighbor-changes
 neighbor 2001:AA:3:4::3 remote-as 6500
 !
 address-family ipv4
  network 4.4.0.0 mask 255.255.0.0
  neighbor 2001:AA:3:4::3 activate
 exit-address-family
 !
 address-family ipv6
  network 2001:4::/32
  neighbor 2001:AA:3:4::3 activate
 exit-address-family

To verify BGP operations for both address families, we use the commands show bgp ipv4 unicast summary and show bgp ipv6 unicast summary to check the status of IPv4 and IPv6 BGP neighborships. In the output, the IPv6 BGP neighbor appears even under the IPv4 neighborship, as it is also activated within the IPv4 address family.

With the commands show bgp ipv4 unicast and show bgp ipv6 unicast, we can view the BGP table and the networks advertised in each address family.

IOU3#show bgp ipv6 unicast summary
BGP router identifier 3.3.3.3, local AS number 6500
BGP table version is 3, main routing table version 3
2 network entries using 328 bytes of memory
2 path entries using 208 bytes of memory
2/2 BGP path/bestpath attribute entries using 288 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 824 total bytes of memory
BGP activity 4/0 prefixes, 6/2 paths, scan interval 60 secs

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
2001:AA:3:4::4  4         6500      16      15        3    0    0 00:08:21        1
IOU3#show bgp ipv6 unicast
BGP table version is 3, local router ID is 3.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>  2001:3::/32      ::                       0         32768 i
 *>i 2001:4::/32      2001:AA:3:4::4           0    100      0 i
IOU3#show bgp ipv4 unicast summary
BGP router identifier 3.3.3.3, local AS number 6500
BGP table version is 2, main routing table version 2
2 network entries using 280 bytes of memory
2 path entries using 160 bytes of memory
2/1 BGP path/bestpath attribute entries using 288 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 728 total bytes of memory
BGP activity 4/0 prefixes, 6/2 paths, scan interval 60 secs

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
2001:AA:3:4::4  4         6500      16      16        2    0    0 00:08:32        1
IOU3#show bgp ipv4 unicast
BGP table version is 2, local router ID is 3.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>  3.3.0.0/16       0.0.0.0                  0         32768 i
 * i 4.4.0.0/16       32.1.0.170               0    100      0 i
Back to: IPv6 (in progress) > IPv6 Routing

Leave a Reply

Your email address will not be published. Required fields are marked *


Post comment