Advertising IPv6 and IPv4 prefixes over IPv4 and IPv6 eBGP peers
The BGP speaker can now carry multiple network layer protocols like IPv4 and IPv6. The following configuration examples show how to advertise an IPv6 prefix over an IPv4 connection and an IPv4 prefix over an IPv6 connection.
The following components of the topology are shown in the preceding figure.
- R1 router with a router ID of 1.1.1.1 and R2 router with a router ID of 2.2.2.2 are two routers.
- The IPv4 unicast address of R1 router is 198.51.100.2.
Router | Step | Commands |
---|---|---|
R1 | Activate the neighbor for the IPv6 unicast address family to enable the exchange of IPv6 unicast routes. |
|
R1 | Set the network to advertise. |
|
R1 | Set R2 in the same AS as R1. |
|
R1 | Show the advertised routes. |
|
From the preceding configuration example, you observe the following:
- The 2001:db8::/64 prefix is configured with a network command.
- The BGP IPv4 transport session with the IPv6 unicast address family is configured.
- The 2001:db8::/64 prefix is advertised with the next hop that is assigned to the IPv4-mapped IPv6 address (::fffff:198.51.100.1) from router 1 to router 2.
The following components of the topology are shown in the preceding figure.
- R1 router with a router ID of 1.1.1.1 and R2 router with a router ID of 2.2.2.2 are two routers.
- The IPv6 unicast address of R1 router is 203.0.113.0/24.
Router | Step | Command |
---|---|---|
R2 | Activate the neighbor for the IPv6 unicast address family to enable the exchange of IPv6 unicast routes. |
|
R2 | Set the network to advertise. |
|
R2 | Set R2 in the same AS as R1. |
|
R2 | Show the advertised routes. |
|
From the preceding configuration example, you observe the following:
- The 203.0.113.0/24 prefix is configured with a network command.
- The BGP IPv6 transport session with the IPv4 unicast address family is configured.
- The 203.0.113.0/24 prefix is advertised with the next hop that is assigned to the router ID 1.1.1.1 from router 1 to router 2.