Advertise IPv4 prefix for IPv6 enabled BGP peers
IPv6 enabled BGP peers that are configured with address-family ipv4-unicast should have a route-map to define the next hop for the ipv4 prefix. This example defines a route-map for IPv6 enabled BGP peers. The route-map enables the device with a physical IPv6 address to advertise an IPv4 prefix with proper ipv4 address as the next hop.
In this example Router 2 is connected to Router 4 and has IPv4 and IPv6 interfaces. The physical direct connection link is configured with IPv4 30.1.1/24 and IPv6 30:1:1::/64 addresses. Router 2 and Router 4 are configured as BGP peers by using ipv6 30:1:1::/64 address.
The network should look as shown in the figure.
Router | Step | Commands |
---|---|---|
R2 | Display IPv4 prefix advertised by the BGP peer. |
|
R2 | Display the configuration. |
|
R2 | Display the policy configuration. |
|
R2 | Create a rule to match prefix 20.1.1.0/24. |
|
R2 | Create a route-map rule to allow all IP address in the prefix list p1. |
|
R2 | Create a route-map rule to configure the ip-next hop as '30.1.1.2'. |
|
R2 | Redistribute ipv4 unicast directly connected route into BGP. |
|
R2 | Configure IPv4 and IPv6 unicast address family between BGP peers. |
|
R2 | Display interfaces to verify the configuration. |
|
R2 | Display advertised BGP IPv4 unicast routes for a BGP neighbor. |
|
R4 | Display IPv4 unicast routes for R4. |
|
R4 | Display interfaces for R4. |
|
R4 | Display the configuration on R4. |
|
R4 | Configure the IPv6 neighbor. |
|
R4 | Display the configuration. |
|