12-05-2011 04:03 AM - edited 03-01-2019 04:45 PM
As defined in RFC 2283, a BGP speaker has capability of carrying routing information for multiple network layer protocols (e.g., IPv6, IPX, etc..). In this configuration example, we are routing IPv6 traffic over preestablished IPv4 EBGP connection.
In this document, interface Fast Ethernet [0/0] of routers R1 and R2 are establishing EBGP peering. The two routers are in two different autonomous systems 100 and 200. The loopback interface (loopback 10) is assigned with IPv6 address and it is required to advertise these addresses over IPv4 EBGP peers. In the process it is important to set the IPv6 Next-Hop, in this scenario a route-map is configured to set the Next-Hop [command set ipv6 next-hop] .Or if you don’t want to use IPv6 addresses on the direct link, one has to configure a tunnel to have a valid and reachable ipv6 Next-Hop.
Note: All configurations is tested in a lab environment on Cisco 2811 router running IOS C2800NM-ADVENTERPRISEK9, Version 12.4(15)T14.
Router R1Router R2
hostname R1
ip cef ipv6 unicast-routing
interface Loopback10 no ip address ipv6 address 2011:ABC:12E:121::1/64 ipv6 enable
interface FastEthernet0/0 ip address 17.17.17.1 255.255.255.0 duplex auto speed auto ipv6 address 2011::1/64 ipv6 enable
router bgp 100 bgp router-id 1.1.1.1 bgp log-neighbor-changes neighbor 17.17.17.2 remote-as 200 neighbor 17.17.17.2 ebgp-multihop 5
address-family ipv4 neighbor 17.17.17.2 activate no auto-summary no synchronization network 17.17.17.1 mask 255.255.255.255 exit-address-family
address-family ipv6 neighbor 17.17.17.2 activate neighbor 17.17.17.2 route-map IPv6-NextHop out network 2011:ABC:12E:121::/64 exit-address-family
route-map IPv6-NextHop permit 10 set ipv6 next-hop 2011::1
end | hostname R2
ip cef ipv6 unicast-routing
interface Loopback10 no ip address ipv6 address 3011:ABC:12E:122::1/64 ipv6 enable
interface FastEthernet0/0 ip address 17.17.17.2 255.255.255.0 duplex auto speed auto ipv6 address 2011::2/64 ipv6 enable
router bgp 200 bgp router-id 2.2.2.2 bgp log-neighbor-changes neighbor 17.17.17.1 remote-as 100 neighbor 17.17.17.1 ebgp-multihop 5
address-family ipv4 neighbor 17.17.17.1 activate no auto-summary no synchronization network 17.17.17.2 mask 255.255.255.255 exit-address-family
address-family ipv6 neighbor 17.17.17.1 activate neighbor 17.17.17.1 route-map IPv6-NextHop out network 3011:ABC:12E:122::/64 exit-address-family
route-map IPv6-NextHop permit 10 set ipv6 next-hop 2011::2 end |
On Router R1
R1#show ipv6 route
IPv6 Routing Table - 6 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
U - Per-user Static route, M - MIPv6
I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
D - EIGRP, EX - EIGRP external
C 2011::/64 [0/0]
via ::, FastEthernet0/0
L 2011::1/128 [0/0]
via ::, FastEthernet0/0
C 2011:ABC:12E:121::/64 [0/0]
via ::, Loopback10
L 2011:ABC:12E:121::1/128 [0/0]
via ::, Loopback10
B 3011:ABC:12E:122::/64 [20/0]
via 2011::2
L FF00::/8 [0/0]
via ::, Null0
R1#show bgp ipv6 unicast
BGP table version is 3, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 2011:ABC:12E:121::/64:: 0 32768 i
*> 3011:ABC:12E:122::/64 2011::2 0 0 200 i
As seen from the above output, the IPv6 prefix 3011:ABC:12E:122::/64 is being learn by Router R1.
R1#ping ipv6
Target IPv6 address: 3011:ABC:12E:122::1
Repeat count [5]:
Datagram size [100]:
Timeout in seconds [2]:
Extended commands? [no]: y
Source address or interface: 2011:ABC:12E:121::1
UDP protocol? [no]:
Verbose? [no]:
Precedence [0]:
DSCP [0]:
Include hop by hop option? [no]:
Include destination option? [no]:
Sweep range of sizes? [no]:
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3011:ABC:12E:122::1, timeout is 2 seconds:
Packet sent with a source address of 2011:ABC:12E:121::1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/0/0 ms
Implementing Multiprotocol BGP for IPv6
Cisco IOS IPv6 Command Reference
IPv6 Tunnel through an IPv6 Network
Cisco: IP Version 6 (IPv6) Support Page
I find a lot of IPv4 BGP neighbors do not support IPv6, so I end up using the IPv6 addresses to connect the neighbors.
Also, for the example above, keep in mind that the neighbor 17.17.17.2 route-map IPv6-NextHop out statement isn't doing much, as it is more of a policy route-map instead of a BGP filter route-map.
This is great !
But I dont understand why we have to change ebgp multihop to 5 ?
neighbor 17.17.17.1 ebgp-multihop 5
I did your lab again and if we do not usr the command " neighbor 17.17.17.1 ebgp-multihop 5 " we dont have ipv6 routes in R1 and R2
Could somebody explane it for me pls ?
Probably because TTL is 1 so when the next-hop is changed from an IPv4 address to an IPv6 address the TTL is 0 and the packet is dropped. If we change the TTL to 2+ then the packet is forwarded to its neighbor.
Similar to EBGP neighborship when using Loopbacks to form the neighborship.
thanks for this post,
what makes me surprised is the you cannot use inbound next-hop in this scenario, you have to only use outbound, otherwise the next-hop will still shows you inaccessable even through it is directly connected,
not sure if this is bug or not
Hi Sunil,
Great article, thanks. When I think of IPv6 over IPv4, I think of VPNv6 (if you have VRF configured) or 6PE (where you use BGP+label). I never truly thought that you technically could transport IPv6 packets over IPv4 TCP session, but then the problem we run into is that the next-hop for that particular IPv6 prefix which was just network'ed is unreachable. This can be fixed as you pointed out with the use of route-map setting the next-hop value to the outgoing interface.
Also, one thing I would like to point is that there was NO need for me to turn up eBGP multihop and I was able to ping lo0 to lo0.
Code version used: Cisco IOS Software, IOSv Software (VIOS-ADVENTERPRISEK9-M), Version 15.6(2)T, RELEASE SOFTWARE (fc2)
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: