Advertising IPv4 NLRI with IPv6 Next-Hop
This chapter describes Advertising IPv4 Network Layer Reachability Information (NLRI) with IPv6 Next-Hop.
Topics in this chapter include:
Applicability
The CLI in the current edition is based on SR Linux Release 26.3.2.
Overview
In networks where the routers are interconnected by IPv6-only links, SR Linux routers can advertise and receive BGP routes that convey reachability to IPv4-unicast destinations that are reachable through IPv6 next-hops. Advertising and receiving IPv4 routes with IPv6 next-hops is useful in networks or regions with IPv6-only interfaces, such as data center deployments where leaf, spine, and aggregation routers are interconnected by IPv6-only links that carry a mix of unencapsulated IPv4 and IPv6 packets.
This feature requires the Extended Next Hop encoding BGP capability which is described in RFC 8950, Advertising IPv4 Network Layer Reachability Information with an IPv6 Next Hop. BGP capabilities are advertised between peers. For the Extended Next Hop encoding capability, the capability code field must be set to 5, the capability length field set to the length of the capability value field, and a capability value field with the format shown in Capability value field format:
Each triplet (NLRI AFI, NLRI SAFI, Nexthop AFI) indicates that NLRI AFI/SAFI may be advertised with a next-hop address belonging to the network-layer protocol of Nexthop AFI.
By default, IPv4-unicast routes are advertised with IPv4 next-hops. However, on IPv6-only TCP transport sessions, IPv4-unicast routes can be advertised with IPv6 next-hops if the advertise-ipv6-next-hops true command applies to the session.
For receiving IPv4-unicast routes with IPv6 next-hop addresses, the receive-ipv6-next-hops true command must be applied to the session. This advertises the RFC 8950 capability to the peer for the different address families.
The advertise-ipv6-next-hops command and the receive-ipv6-next-hops command can be enabled per address family, as follows:
# on PE-1 (example for AFI/SAFI: ipv4-unicast):
enter candidate
network-instance default {
protocols {
bgp {
afi-safi ipv4-unicast {
ipv4-unicast {
?
--{ candidate shared default }--[ network-instance default protocols bgp afi-safi ipv4-unicast ipv4-unicast ]--
A:admin@PE-1# ?
Local commands:
advertise-ipv6-next-hops*
Enables advertisement of IPv4 routes with IPv6 next-hops
backup-paths Configure backup paths support for the AFI/SAFI
convergence Options for controlling and monitoring routing convergence of the relevant address family
next-hop-resolution
Options for controlling next-hop resolution procedures
receive-ipv6-next-hops*
Enables the advertisement of the RFC 8950 capability to receive IPv4 routes with IPv6 next-hops
When the BGP session is established, the BGP peers advertise the capability to each other, and the Extended Next Hop encoding capability is both a local (Cap Sent) and a remote (Cap Recv) capability, as in the following example between BGP peers 2001:db8::12:1 and 2001:db8::12:2:
A:admin@PE-1# show / network-instance default protocols bgp neighbor 2001:db8::12:2 detail | grep Cap
Cap Sent: ROUTE_REFRESH EXT_NH_ENCODING 4-OCTET_ASN MP_BGP GRACEFUL_RESTART
Cap Recv: ROUTE_REFRESH EXT_NH_ENCODING 4-OCTET_ASN MP_BGP GRACEFUL_RESTART
When next-hop-self true applies to the BGP session and the neighbor address is IPv6, an IPv4-unicast route that is advertised or re-advertised gets the following as next-hop:
The IPv6 local address used for peering, if the peer opened the BGP session by advertising an extended next-hop encoding capability with NLRI AFI=1, SAFI=1, and nexthop AFI=2, and the session is associated with an advertise-ipv6-next-hops true command.
The IPv4 system interface address in all other cases.
Configuration
Example topology with IPv6 interfaces shows the example topology with three nodes with IPv6-only interfaces in different Autonomous Systems (ASs).
The initial configuration includes:
-
Cards, MDAs, interfaces
-
Router interfaces with IPv6 addresses
In the example, IPv4, label-IPv4, and VPN-IPv4 routes are advertised with an IPv6 next-hop. On PE-1, loopback interfaces lo0.1 (10.1.0.1/32) and lo0.2 (10.131.0.1/32) are configured; lo0.1 is advertised as an IPv4 route and lo0.2 as a label-IPv4 route. IP-VRF-1 is configured on all nodes with loopback interface lo0.3, and prefix 172.31.0.1/32 is advertised as a VPN-IPv4 route on PE-1. PE-2 and PE-3 have similar loopback interfaces. Loopback addresses and advertised IPv4, label-IPv4, and VPN-IPv4 routes shows the loopback addresses and the advertised routes.
On PE-2, the interface configuration is as follows:
# on PE-2:
enter candidate
interface ethernet-1/2 {
admin-state enable
vlan-tagging true
ethernet {
port-speed 100G
}
subinterface 1000 {
type routed
description int-PE-2-PE-1_IPv6only
admin-state enable
ipv6 {
admin-state enable
address 2001:db8::12:2/126 {
}
}
vlan {
encap {
single-tagged {
vlan-id 1000
}
}
}
}
}
interface ethernet-1/1 {
admin-state enable
vlan-tagging true
ethernet {
port-speed 100G
}
subinterface 1000 {
type routed
description int-PE-2-PE-3_0_IPv6only
admin-state enable
ipv6 {
admin-state enable
address 2001:db8::23:1/126 {
}
}
vlan {
encap {
single-tagged {
vlan-id 1000
}
}
}
}
}
interface ethernet-1/3 {
admin-state enable
vlan-tagging true
ethernet {
port-speed 100G
}
subinterface 1000 {
type routed
description int-PE-2-PE-3_4_IPv6only
admin-state enable
ipv6 {
admin-state enable
address 2001:db8::23:5/126 {
}
}
vlan {
encap {
single-tagged {
vlan-id 1000
}
}
}
}
}
interface system0 {
admin-state enable
subinterface 0 {
admin-state enable
ipv4 {
admin-state enable
address 192.0.2.2/32 {
}
}
ipv6 {
admin-state enable
address 2001:db8::2:2/128 {
}
}
}
}
interface lo0 {
admin-state enable
subinterface 1 {
admin-state enable
description lo0.1-10.2.0.1
ipv4 {
admin-state enable
address 10.2.0.1/32 {
}
}
ipv6 {
admin-state enable
address 2001:db8::10:2:0:1/128 {
}
}
}
subinterface 2 {
admin-state enable
description lo0.2-10.132.0.1
ipv4 {
admin-state enable
address 10.132.0.1/32 {
}
}
ipv6 {
admin-state enable
address 2001:db8::10:132:0:1/128 {
}
}
}
subinterface 3 {
admin-state enable
description lo0.3-172.31.0.2
ipv4 {
admin-state enable
address 172.31.0.2/32 {
}
}
ipv6 {
admin-state enable
address 2001:db8::172:31:0:2/128 {
}
}
}
}The interface configuration on PE-1 and on PE-3 is similar.# on PE-2:
enter candidate
network-instance IP-VRF-1 {
type ip-vrf
admin-state enable
interface lo0.3-172.31.0.2 {
interface-ref {
interface lo0
subinterface 3
}
}
protocols {
bgp-ipvpn {
bgp-instance 1 {
admin-state enable
ecmp 2
mpls {
next-hop-resolution {
allowed-tunnel-types [
bgp
]
}
}
}
}
bgp-vpn {
bgp-instance 1 {
route-distinguisher {
rd 192.0.2.2:1
}
route-target {
import-rt target:1:1
export-rt target:1:1
}
}
}
}The IP-VRF configuration on PE-1 and on PE-3 is similar.
On PE-2, network-instance default is configured with interfaces, as follows:
# on PE-2:
enter candidate
network-instance default {
admin-state enable
router-id 192.0.2.2
interface int-PE-2-PE-1 {
interface-ref {
interface ethernet-1/2
subinterface 1000
}
}
interface int-PE-2-PE-3_0 {
interface-ref {
interface ethernet-1/1
subinterface 1000
}
}
interface int-PE-2-PE-3_4 {
interface-ref {
interface ethernet-1/3
subinterface 1000
}
}
interface system0.0 {
interface-ref {
interface system0
subinterface 0
}
}
interface lo0.1-10.2.0.1 {
interface-ref {
interface lo0
subinterface 1
}
}
interface lo0.2-10.132.0.1 {
interface-ref {
interface lo0
subinterface 2
}
}
On PE-2, eBGP is configured toward three IPv6 neighbors with next-hop-self true enabled. For each of the BGP neighbors, receive-ipv6-next-hops true and advertise-ipv6-next-hops true are configured for each IPv4 related address family. The BGP configuration is as follows:
# on PE-2:
enter candidate
network-instance default {
protocols {
bgp {
admin-state enable
autonomous-system 64502
router-id 192.0.2.2
bgp-label {
labeled-unicast {
dynamic-label-block BGP-LU-labels
}
bgp-vpn {
dynamic-label-block BGP-VPN-labels
}
}
route-advertisement {
rapid-withdrawal true
}
afi-safi ipv4-unicast {
admin-state enable
import-policy [pol_import-1:1-3:3]
export-policy [pol_export-10.2]
multipath {
ebgp {
maximum-paths 2
}
}
ipv4-unicast {
advertise-ipv6-next-hops true
receive-ipv6-next-hops true
}
}
afi-safi ipv6-unicast {
admin-state enable
import-policy [pol_import-1:1-3:3]
export-policy [pol_export-10.2]
multipath {
ebgp {
maximum-paths 2
}
}
}
afi-safi ipv4-labeled-unicast {
admin-state enable
import-policy [pol_import-1:1-3:3]
export-policy [pol_export-10.132]
multipath {
ebgp {
maximum-paths 2
}
}
ipv4-labeled-unicast {
advertise-ipv6-next-hops true
receive-ipv6-next-hops true
rapid-update true }
}
afi-safi ipv6-labeled-unicast {
admin-state enable
import-policy [pol_import-1:1-3:3]
export-policy [pol_export-10.132]
multipath {
ebgp {
maximum-paths 2
}
}
ipv6-labeled-unicast {
rapid-update true
}
}
afi-safi l3vpn-ipv4-unicast {
admin-state enable
import-policy [pol_import_VPN-from-EBGP]
export-policy [pol_export_VPN-to-EBGP]
multipath {
ebgp {
maximum-paths 2
}
}
l3vpn-ipv4-unicast {
advertise-ipv6-next-hops true
receive-ipv6-next-hops true
inter-as-vpn true
rapid-update true
}
}
afi-safi l3vpn-ipv6-unicast {
admin-state enable
import-policy [pol_import_VPN-from-EBGP]
export-policy [pol_export_VPN-to-EBGP]
multipath {
ebgp {
maximum-paths 2
}
}
l3vpn-ipv6-unicast {
inter-as-vpn true
rapid-update true
}
}
group EBGP_IPv6 {
admin-state enable
}
neighbor 2001:db8::12:1 {
admin-state enable
next-hop-self true
peer-as 64501
peer-group EBGP_IPv6
}
neighbor 2001:db8::23:2 {
admin-state enable
next-hop-self true
peer-as 64503
peer-group EBGP_IPv6
}
neighbor 2001:db8::23:6 {
admin-state enable
next-hop-self true
peer-as 64503
peer-group EBGP_IPv6
}
}
}
The BGP configuration on PE-1 and on PE-3 is similar.
# on PE-2:
enter candidate
routing-policy {
extended-community-set ecs-RT:1:1 {
member [target:1:1]
}
standard-community-set scs-1:1 {
member [1:1]
}
standard-community-set scs-2:2 {
member [2:2]
}
standard-community-set scs-3:3 {
member [3:3]
}
prefix-set ps_10.2.0.0/16 {
prefix 10.2.0.0/16 mask-length-range 16..32 { }
}
prefix-set ps_10.132.0.0/16 {
prefix 10.132.0.0/16 mask-length-range 16..32 { }
}
prefix-set ps_2001:db8::10:2:0:0/96 {
prefix 2001:db8::10:2:0:0/96 mask-length-range 96..128 { }
}
prefix-set ps_2001:db8::10:132:0:0/96 {
prefix 2001:db8::10:132:0:0/96 mask-length-range 96..128 { }
}
policy pol_export-10.2 {
statement stmt-10 {
match {
prefix {
prefix-set ps_10.2.0.0/16
}
}
action {
policy-result accept
bgp {
standard-community {
operation add
referenced-sets [
scs-2:2
]
}
}
}
}
statement stmt-20 {
match {
prefix {
prefix-set ps_2001:db8::10:2:0:0/96
}
}
action {
policy-result accept
bgp {
standard-community {
operation add
referenced-sets [
scs-2:2
]
}
}
}
}
statement stmt-30 {
match {
bgp {
standard-community {
standard-community-set scs-1:1
}
}
}
action {
policy-result accept
}
}
statement stmt-40 {
match {
bgp {
standard-community {
standard-community-set scs-3:3
}
}
}
action {
policy-result accept
}
}
}
policy pol_export-10.132 {
statement stmt-10 {
match {
prefix {
prefix-set ps_10.132.0.0/16
}
}
action {
policy-result accept
bgp {
standard-community {
operation add
referenced-sets [
scs-2:2
]
}
}
}
}
statement stmt-20 {
match {
prefix {
prefix-set ps_2001:db8::10:132:0:0/96
}
}
action {
policy-result accept
bgp {
standard-community {
operation add
referenced-sets [
scs-2:2
]
}
}
}
}
statement stmt-30 {
match {
bgp {
standard-community {
standard-community-set scs-1:1
}
}
}
action {
policy-result accept
}
}
statement stmt-40 {
match {
bgp {
standard-community {
standard-community-set scs-3:3
}
}
}
action {
policy-result accept
}
}
}
policy pol_import-1:1-3:3 {
statement stmt-10 {
match {
bgp {
standard-community {
standard-community-set scs-1:1
}
}
}
action {
policy-result accept
}
}
statement stmt-20 {
match {
bgp {
standard-community {
standard-community-set scs-3:3
}
}
}
action {
policy-result accept
}
}
}
policy pol_export_VPN-to-EBGP {
default-action {
policy-result reject
}
statement stmt-10 {
match {
family [
l3vpn-ipv4-unicast
l3vpn-ipv6-unicast
]
bgp {
extended-community {
extended-community-set ecs-RT:1:1
}
}
}
action {
policy-result accept
}
}
}
policy pol_import_VPN-from-EBGP {
default-action {
policy-result reject
}
statement stmt-10 {
match {
family [
l3vpn-ipv4-unicast
l3vpn-ipv6-unicast
]
bgp {
extended-community {
extended-community-set ecs-RT:1:1
}
}
}
action {
policy-result accept
}
}
}The policies on PE-1 and on PE-3 are similar.
The BGP neighbor overview on PE-1 shows that for each of the configured address families, one route is advertised and two routes are received and accepted:
A:admin@PE-1# show / network-instance default protocols bgp neighbor
---------------------------------------------------------------------------------------------------------------------------------------------------------
BGP neighbor summary for network-instance "default"
Peer flags: see legend after the summary when applicable.
---------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------
+-----------------+------------------------+-----------------+------+---------+--------------+--------------+-----------------------------------+
| Net-Inst | Peer | Group | Flag | Peer-AS | State | Uptime | AFI/SAFI [Rx/Active/Tx] |
| | | | s | | | | |
+=================+========================+=================+======+=========+==============+==============+===================================+
| default | 2001:db8::12:2 | EBGP_IPv6 | S | 64502 | established | 0d:0h:18m:9s | ipv4-labeled-unicast [2/2/1] |
| | | | | | | | ipv4-unicast [2/2/1] |
| | | | | | | | ipv6-labeled-unicast [2/2/1] |
| | | | | | | | ipv6-unicast [2/2/1] |
| | | | | | | | l3vpn-ipv4-unicast [2/2/1] |
| | | | | | | | l3vpn-ipv6-unicast [2/2/1] |
+-----------------+------------------------+-----------------+------+---------+--------------+--------------+-----------------------------------+
---------------------------------------------------------------------------------------------------------------------------------------------------------
Summary:
1 configured neighbors, 1 configured sessions are established, 0 disabled peers
0 dynamic peers
---------------------------------------------------------------------------------------------------------------------------------------------------------
Peer flag legend:
S Static neighbor
On PE-1, the following IPv4 routes with IPv6 next-hop are received and used: route 10.2.0.1/32 originates from PE-2 and route 10.3.0.1/32 from PE-3. Both routes have next-hop 2001:db8::12:2 because next-hop-self true is enabled, as follows:
A:admin@PE-1# show / network-instance default protocols bgp routes ipv4 summary
---------------------------------------------------------------------------------------------------------------------------------------------------------
Show report for the BGP route table of network-instance "default"
---------------------------------------------------------------------------------------------------------------------------------------------------------
Status codes: u=used, *=valid, >=best, x=stale, b=backup, w=unused-weight-only
Origin codes: i=IGP, e=EGP, ?=incomplete
---------------------------------------------------------------------------------------------------------------------------------------------------------
+--------+------------------------------------+------------------------------------+--------+--------+-------------------------------------------------+
| Status | Network | Next Hop | MED | LocPre | Path Val |
| | | | | f | |
+========+====================================+====================================+========+========+=================================================+
| u*> | 10.1.0.1/32 | 0.0.0.0 | | | i |
| u*> | 10.2.0.1/32 | 2001:db8::12:2 | | | i[64502] |
| u*> | 10.3.0.1/32 | 2001:db8::12:2 | | | i[64502, 64503] |
| u*> | 10.131.0.1/32 | 0.0.0.0 | | | i |
| u*> | 192.0.2.1/32 | 0.0.0.0 | | | i |
+--------+------------------------------------+------------------------------------+--------+--------+-------------------------------------------------+
---------------------------------------------------------------------------------------------------------------------------------------------------------
5 received BGP routes: 5 used, 5 valid, 0 stale
5 available destinations: 0 with ECMP multipaths
---------------------------------------------------------------------------------------------------------------------------------------------------------
On PE-2, the following VPN-IPv4 routes with different IPv6 next-hops are received and used:
A:admin@PE-2# show / network-instance default protocols bgp routes l3vpn-ipv4-unicast summary
---------------------------------------------------------------------------------------------------------------------------------------------------------
Show report for the BGP route table of network-instance "default"
---------------------------------------------------------------------------------------------------------------------------------------------------------
Status codes: u=used, *=valid, >=best, x=stale, b=backup, w=unused-weight-only
Origin codes: i=IGP, e=EGP, ?=incomplete
---------------------------------------------------------------------------------------------------------------------------------------------------------
+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+
| Status | Route | Network | Next Hop | MED | LocPref | Path Val |
| | Distinguisher | | | | | |
+====================+====================+====================+====================+====================+====================+====================+
| u*> | 192.0.2.1:1 | 172.31.0.1/32 | 2001:db8::12:1 | | | i[64501] |
| | 192.0.2.1:1 | 172.31.0.1/32 | 2001:db8::23:6 | | | i[64503, 64502, |
| | | | | | | 64501] |
| u*> | 192.0.2.2:1 | 172.31.0.2/32 | 0.0.0.0 | | | i |
| | 192.0.2.2:1 | 172.31.0.2/32 | 2001:db8::23:6 | | | i[64503, 64502] |
| u*> | 192.0.2.3:1 | 172.31.0.3/32 | 2001:db8::23:2 | | | i[64503] |
| u*> | 192.0.2.3:1 | 172.31.0.3/32 | 2001:db8::23:6 | | | i[64503] |
+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+
---------------------------------------------------------------------------------------------------------------------------------------------------------
6 received BGP routes: 4 used, 4 valid, 0 stale
4 available destinations: 2 with ECMP multipaths
---------------------------------------------------------------------------------------------------------------------------------------------------------
On PE-3, the following label-IPv4 routes with IPv6 next-hop are received and used. Route 10.131.0.1/32 originates from PE-1 and is re-advertised by PE-2 on two eBGP paths, with next-hop addresses 2001:db8::23:1 and 2001:db8::23:5. Route 10.132.0.1/32 originates from PE-2 and is also advertised over these two eBGP paths.
A:admin@PE-3# show / network-instance default protocols bgp routes ipv4-labeled-unicast summary
---------------------------------------------------------------------------------------------------------------------------------------------------------
Show report for the BGP route table of network-instance "default"
---------------------------------------------------------------------------------------------------------------------------------------------------------
Status codes: u=used, *=valid, >=best, x=stale, b=backup, w=unused-weight-only
Origin codes: i=IGP, e=EGP, ?=incomplete
---------------------------------------------------------------------------------------------------------------------------------------------------------
+--------+------------------------------------+------------------------------------+--------+--------+-------------------------------------------------+
| Status | Network | Next Hop | MED | LocPre | Path Val |
| | | | | f | |
+========+====================================+====================================+========+========+=================================================+
| u*> | 10.3.0.1/32 | 0.0.0.0 | | | i |
| u*> | 10.131.0.1/32 | 2001:db8::23:1 | | | i[64502, 64501] |
| u*> | 10.131.0.1/32 | 2001:db8::23:5 | | | i[64502, 64501] |
| u*> | 10.132.0.1/32 | 2001:db8::23:1 | | | i[64502] |
| u*> | 10.132.0.1/32 | 2001:db8::23:5 | | | i[64502] |
| u*> | 10.133.0.1/32 | 0.0.0.0 | | | i |
| | 10.133.0.1/32 | 2001:db8::23:5 | | | i[64502, 64503] |
| u*> | 192.0.2.3/32 | 0.0.0.0 | | | i |
+--------+------------------------------------+------------------------------------+--------+--------+-------------------------------------------------+
---------------------------------------------------------------------------------------------------------------------------------------------------------
8 received BGP routes: 7 used, 7 valid, 0 stale
7 available destinations: 1 with ECMP multipaths
---------------------------------------------------------------------------------------------------------------------------------------------------------
The IPv4 route table on PE-3 includes BGP IPv4 and label-IPv4 routes with IPv6 next-hops, as follows:
A:admin@PE-3# show / network-instance default ipv4 route
=========================================================================================================================================================
IPv4-unicast route table for default network-instance
---------------------------------------------------------------------------------------------------------------------------------------------------------
Flags: > (best), * (unviable), ! (failed)
: L (leaked route from another network-instance)
: B (backup NHG active and displayed)
: S (statistics supported)
: D (dynamic LB), R (resilient LB)
---------------------------------------------------------------------------------------------------------------------------------------------------------
Prefix Route Type Metric Pref Flags Next-Hop(s)
---------------------------------------------------------------------------------------------------------------------------------------------------------
10.1.0.1/32 bgp 0 170 > 2001:db8::23:1(route:local)
2001:db8::23:5(route:local)
10.2.0.1/32 bgp 0 170 > 2001:db8::23:1(route:local)
2001:db8::23:5(route:local)
10.131.0.1/32 bgp-label 0 170 > mpls(2001:db8::23:1, ethernet-1/2.1000, label:20001)
mpls(2001:db8::23:5, ethernet-1/3.1000, label:20001)
10.132.0.1/32 bgp-label 0 170 > mpls(2001:db8::23:1, ethernet-1/2.1000, label:20000)
mpls(2001:db8::23:5, ethernet-1/3.1000, label:20000)
The IPv4 tunnel table on PE-3 shows two BGP IPv4 tunnels with two IPv6 next-hops each, as follows:
A:admin@PE-3# show / network-instance default tunnel-table ipv4
---------------------------------------------------------------------------------------------------------------------------------------------------------
IPv4 tunnel table of network-instance "default"
---------------------------------------------------------------------------------------------------------------------------------------------------------
+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+
| IPv4 Prefix | Tunnel Type | Tunnel ID | FIB | Metric | Preference | Last Update | Backup | Next-hop | Next-hop |
| | | | | | | | Nexthops | (Type) | |
+==============+==============+==============+==============+==============+==============+==============+==============+==============+==============+
| 10.131.0.1/3 | bgp | 262146 | Y | 1000 | 12 | 2026-05- | | 2001:db8::23 | ethernet- |
| 2 | | | | | | 07T10:41:29. | | :1 (mpls) | 1/2.1000 |
| | | | | | | 306Z | | | |
| | | | | | | | | 2001:db8::23 | ethernet- |
| | | | | | | | | :5 (mpls) | 1/3.1000 |
| 10.132.0.1/3 | bgp | 262145 | Y | 1000 | 12 | 2026-05- | | 2001:db8::23 | ethernet- |
| 2 | | | | | | 07T10:41:29. | | :1 (mpls) | 1/2.1000 |
| | | | | | | 306Z | | | |
| | | | | | | | | 2001:db8::23 | ethernet- |
| | | | | | | | | :5 (mpls) | 1/3.1000 |
+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+
---------------------------------------------------------------------------------------------------------------------------------------------------------
2 BGP tunnels, 2 active, 0 inactive
---------------------------------------------------------------------------------------------------------------------------------------------------------
The IPv4 route table for IP-VRF-1 on PE-3 includes BGP VPN-IPv4 routes with IPv6 next-hops, as follows:
A:admin@PE-3# show / network-instance IP-VRF-1 ipv4 route
=========================================================================================================================================================
IPv4-unicast route table for ip-vrf network-instance: IP-VRF-1
---------------------------------------------------------------------------------------------------------------------------------------------------------
Flags: > (best), * (unviable), ! (failed)
: L (leaked route from another network-instance)
: B (backup NHG active and displayed)
: S (statistics supported)
: D (dynamic LB), R (resilient LB)
---------------------------------------------------------------------------------------------------------------------------------------------------------
Prefix Route Type Metric Pref Flags Next-Hop(s)
---------------------------------------------------------------------------------------------------------------------------------------------------------
172.31.0.1/32 bgp-ipvpn 0 170 > 2001:db8::23:1(route:local, label:25000)
2001:db8::23:5(route:local, label:25000)
172.31.0.2/32 bgp-ipvpn 0 170 > 2001:db8::23:1(route:local, label:30000)
2001:db8::23:5(route:local, label:30000)
The reachability between source address 172.31.0.3 and destination 172.31.0.1 can be verified, but the traceroute does not display any address for the intermediate node:
A:admin@PE-3# traceroute 172.31.0.1 network-instance IP-VRF-1 -s 172.31.0.3 -n
Using network instance IP-VRF-1
traceroute to 172.31.0.1 (172.31.0.1), 30 hops max, 60 byte packets
1 * * *
2 172.31.0.1 2.322 ms 2.324 ms 2.298 ms
However, the following traceroute from lo0.1 on PE-3 to lo0.1 on PE-1 fails:
A:admin@PE-3# traceroute 10.1.0.1 network-instance default -s 10.3.0.1 -n
Using network instance default
traceroute to 10.1.0.1 (10.1.0.1), 30 hops max, 60 byte packets
1 * * *
2 * * *
3 * * *
4 * * *
5 * * *
6 * * *^C
traceroute aborted by user
In an IPv6-only network, the IPv6-only interfaces have no IPv4 prefix, as follows:
A:admin@PE-2# show / network-instance default interfaces
=========================================================================================================================================================
Net instance : default
Interface : ethernet-1/2.1000 (int-PE-2-PE-1)
Type : routed
Oper state : up
Ip mtu : 1500
Prefix Origin Status
===============================================================================================
2001:db8::12:2/126 static preferred, primary
fe80::201:2ff:feff:1/64 link-layer preferred
=========================================================================================================================================================
Net instance : default
Interface : ethernet-1/1.1000 (int-PE-2-PE-3_0)
Type : routed
Oper state : up
Ip mtu : 1500
Prefix Origin Status
===============================================================================================
2001:db8::23:1/126 static preferred, primary
fe80::201:2ff:feff:0/64 link-layer preferred
=========================================================================================================================================================
Net instance : default
Interface : ethernet-1/3.1000 (int-PE-2-PE-3_4)
Type : routed
Oper state : up
Ip mtu : 1500
Prefix Origin Status
===============================================================================================
2001:db8::23:5/126 static preferred, primary
fe80::201:2ff:feff:2/64 link-layer preferred
=========================================================================================================================================================
Net instance : default
Interface : lo0.1 (lo0.1-10.2.0.1)
Oper state : up
Prefix Origin Status
===============================================================================================
10.2.0.1/32 static preferred, primary
2001:db8::10:2:0:1/128 static preferred, primary
=========================================================================================================================================================
Net instance : default
Interface : lo0.2 (lo0.2-10.132.0.1)
Oper state : up
Prefix Origin Status
===============================================================================================
10.132.0.1/32 static preferred, primary
2001:db8::10:132:0:1/128 static preferred, primary
=========================================================================================================================================================
Net instance : default
Interface : system0.0 (system0.0)
Oper state : up
Prefix Origin Status
===============================================================================================
192.0.2.2/32 static preferred
2001:db8::2:2/128 static preferred
=========================================================================================================================================================
To allow CPM-originated or terminated packets, such as IPv4 ping or traceroute traffic, the receive-ipv4-check false command is configured in the ip-forwarding context of network-instance default, as follows:
# on all PEs:
enter candidate
network-instance default {
ip-forwarding {
receive-ipv4-check false
The connectivity between the lo0.1 and lo0.2 interfaces can now be verified from PE-3, as follows:
A:admin@PE-3# traceroute 10.1.0.1 network-instance default -s 10.3.0.1 -n
Using network instance default
traceroute to 10.1.0.1 (10.1.0.1), 30 hops max, 60 byte packets
1 10.2.0.1 2.675 ms 2.640 ms 2.623 ms
2 10.1.0.1 2.605 ms 2.587 ms 2.569 ms
A:admin@PE-3# traceroute 10.2.0.1 network-instance default -s 10.3.0.1 -n
Using network instance default
traceroute to 10.2.0.1 (10.2.0.1), 30 hops max, 60 byte packets
1 10.2.0.1 3.691 ms 3.674 ms 3.645 ms
A:admin@PE-3# traceroute 10.131.0.1 network-instance default -s 10.133.0.1 -n
Using network instance default
traceroute to 10.131.0.1 (10.131.0.1), 30 hops max, 60 byte packets
1 10.2.0.1 2.451 ms 2.430 ms 2.401 ms
2 10.131.0.1 2.392 ms 2.378 ms 2.364 ms
A:admin@PE-3# traceroute 10.132.0.1 network-instance default -s 10.133.0.1 -n
Using network instance default
traceroute to 10.132.0.1 (10.132.0.1), 30 hops max, 60 byte packets
1 10.132.0.1 3.277 ms 3.248 ms 3.234 ms
With the ip-forwarding receive-ipv4-check false command, the IPv4 operational state of the interface is considered as up when the IPv6 interface is operationally up. IPv4 packets can be sent and received on the interface when the IPv6 interface is up, even when the IPv4 interface is operationally down.
Conclusion
SR Linux routers can advertise and receive BGP routes for IPv4 destinations with IPv6 next-hops. This feature requires the Extended Next Hop encoding BGP capability in RFC 8950 and is useful in IPv6-only networks or regions.