You can export both IPv6 and IPv4 prefixes over an IPv4 connection where both sides are configured with an IPv4 interface. In this case, the BGP neighbors are IPv4 prefixes. The IPv4-compatible IPv6 prefixes are configured on the interfaces to preclude the configuration of static routes.
Keep the following in mind when exporting IPv6 BGP prefixes:
- BGP derives next-hop prefixes using the IPv4-compatible IPv6 prefix. For example, the IPv4 next-hop prefix
10.19.1.1translates to the IPv6 next-hop prefix::10.19.1.1(hexadecimal format::a13:101).
NOTE: There must be an active route to the IPv4-compatible IPv6 next hop to export IPv6 BGP prefixes.
- An IPv6 connection must be configured over the link. The connection must be either an IPv6 tunnel or a dual-stack configuration.
- When configuring IPv4-compatible IPv6 prefixes, use a mask that is longer than 96 bits.
- Configure a static route if you want to use normal IPv6 prefixes.
Example: Configuring IPv6 BGP Routes over IPv4 Transport
Configure IPv4 transport from interface
ge-0/1/0with an IPv4 prefix11.19.1.2/24to interfacege-1/1/1with an IPv4 prefix11.19.1.1/24to carry IPv6 BGP routes.Define IPv4 and IPv6 BGP groups for
11.19.1.2with BGP neighbor11.19.1.1:[edit protocols]bgp {group ebgp_both {type external;local-address 11.19.1.2;family inet {unicast;}family inet6 {unicast;}peer-as 1;neighbor 11.19.1.1;}}Configure the interfaces with both an IPv4 and a corresponding IPv4-compatible IPv6 prefix:
[edit interfaces]ge-0/1/0 {unit 0 {family inet {address 11.19.1.2/24;}family inet6 {address ::11.19.1.2/126;}}}