Many multiprotocol network deployments today have topologies of devices configured with one type of address family interspersed
with devices configured with a different type of address family. An IPv4 core network can be surrounded by IPv6 devices, and
vice versa. Such deployments require the use of multiprotocol BGP (MP-BGP) that allow the advertisement of IPv4 NLRI across
IPv6 next hops. Hence, when MP-BGP is used to advertise the corresponding reachability information in such heterogenous networks,
the BGP router (speaker) advertises the NLRI of a given address family through a next hop of a different address family.
There are several reasons for these heterogenous deployments. A primary reason is the lack of availability of IPv4 addresses
to be used on the interfaces of BGP speakers. A second reason is the intent to move to a pure IPv6 deployment, but in phases.
Hence, by configuring the ipv4 forwarding-enable command on interfaces, the type of address family used does not impact the flow of traffic in the network.
This section describes the configuration required to enable IPv4 NLRI advertisement across an IPv6 next hop.
Configuration
Use the following configuration for advertising IPv4 NLRI through IPv6 netxhops.
In the following example, the eBGP peer is configured on the GigabitEthernet 0/0/0/0 interface, and the iBGP peer is configured on the GigabitEthernet0/0/0/2 interface of the router being configured.
/* Configure the required GigE interfaces with an IPv6 address
and the ipv4 forwarding-enable command */
Router(config)# interface GigabitEthernet 0/0/0/0
Router(config-if)# ipv6 address 2000::2/64
Router(config-if)# ipv4 forwarding-enable
Router(config-if)# no shut
Router(config-if)# commit
Tue Mar 6 10:11:17.910 IST
Router:Mar 6 10:11:17.968 : ifmgr[403]: %PKT_INFRA-LINK-3-UPDOWN : Interface GigabitEthernet0/0/0/0, changed state to Down
Router:Mar 6 10:11:17.983 : ifmgr[403]: %PKT_INFRA-LINK-3-UPDOWN : Interface GigabitEthernet0/0/0/0, changed state to Up
Router(config-if)# exit
Router(config)# interface GigabitEthernet 0/0/0/2
Router(config-if)# ipv6 address 3000::2/64
Router(config-if)# ipv4 forwarding-enable
Router(config-if)# no shut
Router(config-if)# commit
Tue Mar 6 10:12:15.948 IST
RP/0/0/CPU0:Mar 6 10:12:15.978 : ifmgr[403]: %PKT_INFRA-LINK-3-UPDOWN : Interface GigabitEthernet0/0/0/2, changed state to Down
RP/0/0/CPU0:Mar 6 10:12:15.994 : ifmgr[403]: %PKT_INFRA-LINK-3-UPDOWN : Interface GigabitEthernet0/0/0/2, changed state to Up
Router(config-if)# exit
/* Create a route policy to set an IPv6 nexthop for IPv4 routes */
Router(config)# route-policy 5549
Router(config-rpl)# if destination in 5549-pfx then set next-hop 20:20::20:200 endif
Router(config-rpl)# end-policy
Router(config)# prefix-set 5549-pfx
Router(config-pfx)# 3.3.3.3/32, 100.1.1.0/24 end-set
Router(config)# commit
Tue Mar 6 10:26:31.749 IST
/* Configure an iBGP peer through the GigabitEthernet0/0/0/2 interface */
Router(config)# router bgp 100
Router(config-bgp)# address-family ipv4 unicast
Router(config-bgp-af)# exit
Router(config-bgp)# address-family ipv4 multicast
Router(config-bgp-af)# exit
Router(config-bgp)# neighbor 3000::1
Router(config-bgp-nbr)# remote-as 100
Router(config-bgp-nbr)# address-family ipv4 unicast
Router(config-bgp-nbr-af)# next-hop-self
Router(config-bgp-nbr-af)# route-policy pass-all in
Router(config-bgp-nbr-af)# route-policy pass-all out
Router(config-bgp-nbr-af)# commit
Tue Mar 6 10:16:07.134 IST
Router(config-bgp-nbr-af)# exit
Router(config-bgp-nbr)# exit
Router(config-bgp)# exit
/* Configure an eBGP peer through the GigabitEthernet 0/0/0/0 interface
and use the route policy for setting an IPv6 nexthop for IPv4 routes */
Router(config)# router bgp 100
Router(config-bgp)# address-family ipv4 unicast
Router(config-bgp-af)# exit
Router(config-bgp)# address-family ipv4 multicast
Router(config-bgp-af)# exit
Router(config-bgp)# neighbor 2000::1
Router(config-bgp-nbr)# remote-as 200
Router(config-bgp-nbr)# address-family ipv4 unicast
Router(config-bgp-nbr-af)# route-policy pass-all in
Router(config-bgp-nbr-af)# route-policy 5549 out
Router(config-bgp-nbr-af)# commit
Tue Mar 6 10:21:19.434 IST
Router(config-bgp-nbr-af)# exit
Router(config-bgp-nbr)# exit
Router(config-bgp)# exit
/* Before proceeding to feature verification,
confirm your configuration by using the show run command from the Executive mode */
Verification
Use the following show commands to verify the advertisement of IPv4 NLRI through IPv6 nexthops.
/* Verify BGP neighbor configuration and the advertisement of nexthops */
Router# show bgp neighbor
BGP neighbor is 10:10::10:10
Remote AS 100, local AS 100, internal link
Remote router ID 10.10.10.10
Cluster ID 30.30.30.30
BGP state = Established, up for 11:42:17
NSR State: NSR Ready
Last read 00:00:10, Last read before reset 00:00:00
Hold time is 180, keepalive interval is 60 seconds
Configured hold time: 180, keepalive: 60, min acceptable hold time: 3
Last write 00:00:09, attempted 19, written 19
Second last write 00:01:09, attempted 19, written 19
Last write before reset 00:00:00, attempted 0, written 0
Second last write before reset 00:00:00, attempted 0, written 0
Last write pulse rcvd Jun 12 11:57:40.005 last full Jun 12 03:38:09.496 pulse count 1766
Last write pulse rcvd before reset 00:00:00
Socket not armed for io, armed for read, armed for write
Last write thread event before reset 00:00:00, second last 00:00:00
Last KA expiry before reset 00:00:00, second last 00:00:00
Last KA error before reset 00:00:00, KA not sent 00:00:00
Last KA start before reset 00:00:00, second last 00:00:00
Precedence: internet
Non-stop routing is enabled
Multi-protocol capability received
Neighbor capabilities:
Route refresh: advertised (old + new) and received (old + new)
4-byte AS: advertised and received
Address family IPv4 Unicast: advertised and received
Received 866 messages, 0 notifications, 0 in queue
Sent 1021 messages, 0 notifications, 0 in queue
Minimum time between advertisement runs is 0 secs
Inbound message logging enabled, 3 messages buffered
Outbound message logging enabled, 3 messages buffered
For Address Family: IPv4 Unicast
BGP neighbor version 120021
Update group: 0.2 Filter-group: 0.2 No Refresh request being processed
Route-Reflector Client
Extended Nexthop Encoding: advertised and received
Route refresh request: received 0, sent 0
11 accepted prefixes, 11 are bestpaths
Exact no. of prefixes denied : 0.
Cumulative no. of prefixes denied: 0.
Prefix advertised 60006, suppressed 0, withdrawn 60000
Maximum prefixes allowed 1048576
Threshold for warning message 75%, restart interval 0 min
AIGP is enabled
An EoR was not received during read-only mode
Last ack version 120021, Last synced ack version 120021
Outstanding version objects: current 0, max 3
Additional-paths operation: None
Send Multicast Attributes
Advertise routes with local-label via Unicast SAFI
Connections established 1; dropped 0
Local host: 30:30::30:30, Local port: 51453, IF Handle: 0x00000000
Foreign host: 10:10::10:10, Foreign port: 179
Last reset 00:00:00
/* Verify BGP nexthop encoding and the n
Router# show bgp ipv4 unicast update-group
Mon Jun 12 11:47:31.543 UTC
Update group for IPv4 Unicast, index 0.2:
Attributes:
Neighbor sessions are IPv6
Internal
Common admin
First neighbor AS: 100
Send communities
Send GSHUT community if originated
Send extended communities
Route Reflector Client
4-byte AS capable
Advertise routes with local-label via Unicast SAFI
Send AIGP
Send multicast attributes
Extended Nexthop Encoding
Minimum advertisement interval: 0 secs
Update group desynchronized: 0
Sub-groups merged: 5
Number of refresh subgroups: 0
Messages formatted: 156, replicated: 228
All neighbors are assigned to sub-group(s)
Neighbors in sub-group: 0.2, Filter-Groups num:1
Neighbors in filter-group: 0.2(RT num: 0)
10:10::10:10
20:20::20:20
Router# show bgp 3.3.3.3/32
Mon Jun 12 11:57:59.451 UTC
BGP routing table entry for 3.3.3.3/32
Versions:
Process bRIB/RIB SendTblVer
Speaker 21 21
Last Modified: Jun 12 00:15:45.314 for 11:42:14
Paths: (1 available, best #1)
Advertised to update-groups (with more than one peer):
0.2
Path #1: Received by speaker 0
Advertised to update-groups (with more than one peer):
0.2
3000, (Received from a RR-client)
20:20::20:20 (metric 1) from 20:20::20:20 (20.20.20.20)
Origin incomplete, metric 0, localpref 100, valid, internal, best, group-best
Received Path ID 0, Local Path ID 0, version 21
Router# show bgp ipv4 unicast nexthops
...
…….. Snippet …..
Gateway Address Family: IPv6 Unicast
Table ID: 0xe0800000
Nexthop Count: 2
Critical Trigger Delay: 3000msec
Non-critical Trigger Delay: 10000msec
Nexthop Version: 3, RIB version: 1
EPE Table Version: 1, EPE Label version: 1
EPE Downloaded Version: 1, EPE Standby Version: 1
Status codes: R/UR Reachable/Unreachable
C/NC Connected/Not-connected
L/NL Local/Non-local
PR Pending Registration
I Invalid (Policy drop)
Next Hop Status Metric Tbl-ID Notf LastRIBEvent RefCount
10:10::10:10 [R][NC][NL] 1e0800000 1/0 11:42:43 (Cri) 11/14
20:20::20:20 [R][NC][NL] 1e0800000 1/0 11:42:43 (Cri) 8/11
Router# show bgp ipv4 unicast nexthops 10:10::10:10
Nexthop: 10:10::10:10
VRF: Default
Nexthop ID: 0x6000001, Version: 0x2
Nexthop Flags: 0x00000080
Nexthop Handle: 0x7f53e85b136c
RIB Related Information:
Firsthop interface handle 0x00000140
Gateway TBL Id: 0xe0800000 Gateway Flags: 0x00000080
Gateway Handle: 0x7f540d2e8f00
Gateway: reachable, non-Connected route, prefix length 128
Resolving Route: 10:10::10:10/128 (ospf 100)
Paths: 0
RIB Nexhop ID: 0x0
Status: [Reachable][Not Connected][Not Local]
Metric: 1
Registration: Asynchronous, Completed: 2d21h
Events: Critical (1)/Non-critical (0)
Last Received: 11:42:55 (Critical)
Last gw update: (Crit-notif) 11:42:55(rib)
Reference Count: 11
Prefix Related Information
Active Tables: [IPv4 Unicast]
Metrices: [0x1]
Reference Counts: [11]
Interface Handle: 0x0
Router# show route 3.3.3.3/32
Mon Jun 12 12:32:13.503 UTC
Routing entry for 3.3.3.3/32
Known via "bgp 100", distance 200, metric 0
Tag 3000, type internal
Installed Jun 12 00:15:45.626 for 12:16:28
Routing Descriptor Blocks
20:20::20:20, from 20:20::20:20
Route metric is 0
No advertising protos.
Router# show route 3.3.3.3/32 detail
Mon Jun 12 12:32:16.447 UTC
Routing entry for 3.3.3.3/32
Known via "bgp 100", distance 200, metric 0
Tag 3000, type internal
Installed Jun 12 00:15:45.628 for 12:16:30
Routing Descriptor Blocks
20:20::20:20, from 20:20::20:20
Route metric is 0
Label: None
Tunnel ID: None
Binding Label: None
Extended communities count: 0
NHID:0x0(Ref:0)
Route version is 0x1 (1)
No local label
IP Precedence: Not Set
QoS Group ID: Not Set
Flow-tag: Not Set
Fwd-class: Not Set
Route Priority: RIB_PRIORITY_RECURSIVE (12) SVD Type RIB_SVD_TYPE_LOCAL
Download Priority 4, Download Version 24
No advertising protos.
Router# show cef 3.3.3.3/32
Mon Jun 12 12:32:22.627 UTC
3.3.3.3/32, version 24, internal 0x5000001 0x0 (ptr 0x8e0b76b8) [1], 0x0 (0x0), 0x0 (0x0)
Updated Jun 12 00:15:45.631
local adjacency fe80::f83b:74ff:fe65:f004
Prefix Len 32, traffic index 0, precedence n/a, priority 4
via 20:20::20:20/128, 2 dependencies, recursive [flags 0x6000]
path-idx 0 NHID 0x0 [0x8e352034 0x0]
next hop VRF - 'default', table - 0xe0800000
next hop 20:20::20:20/128 via 20:20::20:20/128
Router# show cef 3.3.3.3/32 detail
Mon Jun 12 12:32:25.415 UTC
3.3.3.3/32, version 24, internal 0x5000001 0x0 (ptr 0x8e0b76b8) [1], 0x0 (0x0), 0x0 (0x0)
Updated Jun 12 00:15:45.632
local adjacency fe80::f83b:74ff:fe65:f004
Prefix Len 32, traffic index 0, precedence n/a, priority 4
gateway array (0x8eec3170) reference count 6, flags 0x2010, source rib (7), 0 backups
[1 type 3 flags 0x48501 (0x8e191998) ext 0x0 (0x0)]
LW-LDI[type=0, refc=0, ptr=0x0, sh-ldi=0x0]
gateway array update type-time 1 Jun 12 00:15:45.632
LDI Update time Jun 12 00:15:45.632
via 20:20::20:20/128, 2 dependencies, recursive [flags 0x6000]
path-idx 0 NHID 0x0 [0x8e352034 0x0]
next hop VRF - 'default', table - 0xe0800000
next hop 20:20::20:20/128 via 20:20::20:20/128
Load distribution: 0 1 (refcount 1)
Hash OK Interface Address
0 Y FortyGigE0/0/0/0 fe80::f83b:74ff:fe65:f004
1 Y FortyGigE0/0/0/25 fe80::f83b:74ff:fe65:f08c
You have successfully configured and verified the advertisement of IPv4 NLRI through IPv6 nexthops.