BGP labeled unicast¶
The BGP labeled unicast address-family helps in establishing an MPLS path between BGP peers. A given prefix entering the network will be assigned a label that will be exchanged with remote entry. That MPLS path can then be used to create other services like L3VPN services.
The chapter discusses eBGP and iBGP use cases. It also clarifies how to
connect IPv6 networks to an MPLS IPv4 based backbone, by using the 6pe
solution depicted in RFC 4798. Each use case will be based on unique
examples.
functionality.
EBGP connection¶
EBGP between two devices¶
The following example illustrates a border router directly connected to an external BGP peer. A label is allocated and is exchanged along with the shared prefix.
rt1
rt1 running config# / vrf main interface loopback loop1 ipv4 address 172.16.1.1/32
rt1 running config# / vrf main interface physical eth2 port pci-b0s5
rt1 running config# / vrf main interface physical eth2 ipv4 address 192.168.1.1/24
rt1 running config# / vrf main routing bgp as 65500
rt1 running config# / vrf main routing bgp neighbor 192.168.1.2 remote-as 65501
rt1 running config# / vrf main routing bgp neighbor 192.168.1.2 address-family ipv4-unicast enabled false
rt1 running config# / vrf main routing bgp neighbor 192.168.1.2 address-family ipv4-labeled-unicast enabled true
rt1 running config# / vrf main routing bgp address-family ipv4-unicast network 172.16.1.1/32
rt1 running network 172.16.1.1/32# / vrf main routing bgp ebgp-requires-policy false
rt2
rt2 running config# / vrf main interface loopback loop1 ipv4 address 172.16.2.2/32
rt2 running config# / vrf main interface physical eth2 port pci-b0s5
rt2 running config# / vrf main interface physical eth2 ipv4 address 192.168.1.2/24
rt2 running config# / vrf main routing bgp as 65501
rt2 running config# / vrf main routing bgp neighbor 192.168.1.1 remote-as 65500
rt2 running config# / vrf main routing bgp neighbor 192.168.1.1 address-family ipv4-unicast enabled false
rt2 running config# / vrf main routing bgp neighbor 192.168.1.1 address-family ipv4-labeled-unicast enabled true
rt2 running config# / vrf main routing bgp address-family ipv4-unicast network 172.16.2.2/32
rt2 running network 172.16.2.2/32# / vrf main routing bgp ebgp-requires-policy false
Consequently, an LSP is established between both devices. This peering is often used between operators. Actually, each operator has its constraints, and configuring an IGP between two operators may not be possible.
The show bgp ipv4 labeled-unicast prefix
command shows the received label
from the 192.168.1.2
peer, which is the 3
value (the implicit-null
value).
.. rubric:: rt1
rt1> show bgp ipv4 labeled-unicast prefix 172.16.2.2/32
BGP routing table entry for 172.16.2.2/32, version 2
Local label: 16
Paths: (1 available, best #1, table default, vrf (null))
Advertised to non peer-group peers:
192.168.1.2
65501
192.168.1.2 from 192.168.1.2 (172.16.2.2)
Origin IGP, metric 0, valid, external, best (First path received)
Remote label: 3
Last update: Wed Jul 10 11:51:28 2024
Note
The implicit-null
label is part of the special purpose labels defined by a
value ranging betwen 0 and 15. The implicit-null
value has no meaning from
the dataplane perspective, as the outgoing IP packets following the route
are sent non encapsulated. However, this value is exchanged in the control
plane messages, and is generally used to reach IP addresses that are either
directly connected or routable in the next router.
The show ipv4-routes
command shows the labeled route used to reach the 172.16.2.0/24
.
rt1
rt1> show ipv4-routes to 172.16.2.2/32
Routing entry for 172.16.2.2/32
Known via "bgp", distance 20, metric 0, best
Last update 00:00:02 ago
* 192.168.1.2, via eth2, label implicit-null, weight 1
The show mpls fec table
command shows the FEC entry created by BGP when
installing the labeled route. The forwarding Equivalent Class entry helps in
keeping the relationship between a given prefix and incoming traffic entering
the device that receives this prefix. A local label associated to the prefix
is locally allocated by BGP.
rt1
rt1> show mpls fec table
172.16.2.2/32
Label: 16
Client list: bgp(fd 30)
The below figure illustrates the case where the FEC entry created by the
rt1
device creates an MPLS entry. This entry is used by MPLS packets
coming with the label 16
. Because the nexthop and the MPLS label are
changed when the rt1
device re-advertises the update from the rt2
device, a possible peer located on the left of the rt1
device may receive
that update, and may send packets encapsulated with the 16
value.
The FEC entry created on the rt1
device will help in switching those
packets to the nexthop associated to the 172.16.2.2/32
prefix. The MPLS
entry could be created since the labeled BGP route to reach the 172.16.2.2/32
prefix could be installed, and the nexthop has been resolved.
rt1
rt1> show mpls table
Inbound Label Type Nexthop Outbound Label
--------------------------------------------------
16 BGP 192.168.1.2 implicit-null
EBGP across multiple devices¶
A chain of connected eBGP peerings can be created to establish an LSP along the path between all the eBGP devices. The following drawing extends the above topology with two extra devices.
The configuration of the rt1
, rt2
, rt3
and rt4
devices is given below.
rt1
rt1 running config# / vrf main interface loopback loop1 ipv4 address 172.16.1.1/32
rt1 running config# / vrf main interface physical eth2 port pci-b0s5
rt1 running config# / vrf main interface physical eth2 ipv4 address 192.168.1.1/24
rt1 running config# / vrf main routing bgp as 65500
rt1 running config# / vrf main routing bgp neighbor 192.168.1.2 remote-as 65501
rt1 running config# / vrf main routing bgp neighbor 192.168.1.2 address-family ipv4-unicast enabled false
rt1 running config# / vrf main routing bgp neighbor 192.168.1.2 address-family ipv4-labeled-unicast enabled true
rt1 running config# / vrf main routing bgp address-family ipv4-unicast network 172.16.1.1/32
rt1 running network 172.16.1.1/32# / vrf main routing bgp ebgp-requires-policy false
rt2
rt2 running config# / vrf main interface loopback loop1 ipv4 address 172.16.2.2/32
rt2 running config# / vrf main interface physical eth2 port pci-b0s5
rt2 running config# / vrf main interface physical eth2 ipv4 address 192.168.1.2/24
rt2 running config# / vrf main interface physical eth1 port pci-b0s4
rt2 running config# / vrf main interface physical eth1 ipv4 address 192.168.2.2/24
rt2 running config# / vrf main routing bgp as 65501
rt2 running config# / vrf main routing bgp neighbor 192.168.1.1 remote-as 65500
rt2 running config# / vrf main routing bgp neighbor 192.168.1.1 address-family ipv4-unicast enabled false
rt2 running config# / vrf main routing bgp neighbor 192.168.1.1 address-family ipv4-labeled-unicast enabled true
rt2 running config# / vrf main routing bgp address-family ipv4-unicast network 172.16.2.2/32
rt2 running network 172.16.2.2/32# / vrf main routing bgp neighbor 192.168.2.3 remote-as 65502
rt2 running network 172.16.2.2/32# / vrf main routing bgp neighbor 192.168.2.3 address-family ipv4-unicast enabled false
rt2 running network 172.16.2.2/32# / vrf main routing bgp neighbor 192.168.2.3 address-family ipv4-labeled-unicast enabled true
rt2 running network 172.16.2.2/32# / vrf main routing bgp ebgp-requires-policy false
rt3
rt3 running config# / vrf main interface loopback loop1 ipv4 address 172.16.3.3/32
rt3 running config# / vrf main interface physical eth1 port pci-b0s4
rt3 running config# / vrf main interface physical eth1 ipv4 address 192.168.2.3/24
rt3 running config# / vrf main interface physical eth2 port pci-b0s5
rt3 running config# / vrf main interface physical eth2 ipv4 address 192.168.3.3/24
rt3 running config# / vrf main routing bgp as 65502
rt3 running config# / vrf main routing bgp neighbor 192.168.2.2 remote-as 65501
rt3 running config# / vrf main routing bgp neighbor 192.168.2.2 address-family ipv4-unicast enabled false
rt3 running config# / vrf main routing bgp neighbor 192.168.2.2 address-family ipv4-labeled-unicast enabled true
rt3 running config# / vrf main routing bgp neighbor 192.168.3.4 remote-as 65503
rt3 running config# / vrf main routing bgp neighbor 192.168.3.4 address-family ipv4-unicast enabled false
rt3 running config# / vrf main routing bgp neighbor 192.168.3.4 address-family ipv4-labeled-unicast enabled true
rt3 running config# / vrf main routing bgp address-family ipv4-unicast network 172.16.3.3/32
rt3 running network 172.16.3.3/32# / vrf main routing bgp ebgp-requires-policy false
rt4
rt4 running config# / vrf main interface loopback loop1 ipv4 address 172.16.4.4/32
rt4 running config# / vrf main interface physical eth2 port pci-b0s5
rt4 running config# / vrf main interface physical eth2 ipv4 address 192.168.3.4/24
rt4 running config# / vrf main routing bgp as 65503
rt4 running config# / vrf main routing bgp neighbor 192.168.3.3 remote-as 65502
rt4 running config# / vrf main routing bgp neighbor 192.168.3.3 address-family ipv4-unicast enabled false
rt4 running config# / vrf main routing bgp neighbor 192.168.3.3 address-family ipv4-labeled-unicast enabled true
rt4 running config# / vrf main routing bgp address-family ipv4-unicast network 172.16.4.4/32
rt4 running network 172.16.4.4/32# / vrf main routing bgp ebgp-requires-policy false
The 172.16.4.4/32
prefix from rt4
is being allocated by the implicit-null
label, and is sent to the 192.168.3.3
peer.
rt4
rt4> show bgp ipv4 labeled-unicast prefix 172.16.4.4/32
BGP routing table entry for 172.16.4.4/32, version 1
Local label: 3
Paths: (1 available, best #1, table default, vrf (null))
Advertised to non peer-group peers:
192.168.3.3
Local
0.0.0.0 from 0.0.0.0 (172.16.4.4)
Origin IGP, metric 0, weight 32768, valid, sourced, local, best (First path received)
Last update: Tue Jul 9 15:07:41 2024
The rt3
device receives the prefix, and allocates the 18
label for that
prefix, which will be sent to the remote rt2
device instead of the initial
implicit-null
label.
rt3
rt3> show bgp ipv4 labeled-unicast prefix 172.16.4.4/32
BGP routing table entry for 172.16.4.4/32, version 4
Local label: 18
Paths: (1 available, best #1, table default, vrf (null))
Advertised to non peer-group peers:
192.168.2.2 192.168.3.4
65503
192.168.3.4 from 192.168.3.4 (172.16.4.4)
Origin IGP, metric 0, valid, external, best (First path received)
Remote label: 3
Last update: Tue Jul 9 15:07:42 2024
Also, the rt3
device installs an MPLS entry so that incoming MPLS traffic
with the 18
label value will be popped and headed to the 192.168.3.4
ip
address.
rt3
rt3> show mpls table 18
Local label: 18 (installed)
type: BGP remote label: 3 distance: 20
via 192.168.3.4 dev eth2 (installed)
The rt2
device will receive the 172.16.4.4/32
prefix with the 18
label value allocated
by the rt3
neighbor. Similarly, the 18
label is locally allocated, and an MPLS entry
is created to as to pop and switch incoming packets with the 18
label value to the 192.168.3.3
IP address.
rt2
rt2> show bgp ipv4 labeled-unicast prefix 172.16.4.4/32
BGP routing table entry for 172.16.4.4/32, version 4
Local label: 18
Paths: (1 available, best #1, table default, vrf (null))
Advertised to non peer-group peers:
192.168.1.1 192.168.2.3
65502 65503
192.168.2.3 from 192.168.2.3 (172.16.3.3)
Origin IGP, valid, external, best (First path received)
Remote label: 18
Last update: Tue Jul 9 15:07:41 2024
rt2> show mpls table 18
Local label: 18 (installed)
type: BGP remote label: 18 distance: 20
via 192.168.2.3 dev eth1 (installed)
The rt1
device receives the incoming BGP update, and performs the same
operations. The IP route installed to reach the 172.16.4.4/32
prefix will be
appended with the 18
label value, and will be sent to the 192.168.1.2
ip
address.
rt1
rt1> show ipv4-routes to 172.16.4.4
Routing entry for 172.16.4.4/32
Known via "bgp", distance 20, metric 0, best
Last update 00:00:05 ago
* 192.168.1.2, via eth2, label 18, weight 1
An LSP path has been forged to send traffic from the rt1
device to the rt4
by appending the 18
label value. Then, switch operations are performed on the
next devices to head traffic directly to the rt4
device.
L3VPN service over EBGP¶
Labeled eBGP helps in conveying L3VPN traffic, originating from the vrf1
L3VRF. Actually, L3VPN uses MPLS labels to encapsulate VPN traffic,
and needs an MPLS backbone to convey it; the labels from the labeled-unicast
address-family are used to forge an MPLS layer that can be used as an MPLS
backbone. The below configuration creates an eBGP peering between two devices.
The loopback source and destination IP addresses are exchanged by the
labeled-unicast
address-family, and are used to establish the VPNv4 session.
See also
More information about L3VPN configuration: BGP L3VPN
rt1
rt1 running config# / vrf main interface loopback loop1 ipv4 address 172.16.1.1/32
rt1 running config# / vrf main interface physical eth2 port pci-b0s5
rt1 running config# / vrf main interface physical eth2 ipv4 address 192.168.1.1/24
rt1 running config# / vrf main routing bgp as 65500
rt1 running config# / vrf main routing bgp neighbor 192.168.1.2 remote-as 65501
rt1 running config# / vrf main routing bgp neighbor 192.168.1.2 address-family ipv4-unicast enabled false
rt1 running config# / vrf main routing bgp neighbor 192.168.1.2 address-family ipv4-labeled-unicast enabled true
rt1 running config# / vrf main routing bgp address-family ipv4-unicast network 172.16.1.1/32
rt1 running network 172.16.1.1/32# / vrf main routing bgp neighbor 172.16.2.2 remote-as 65501
rt1 running network 172.16.1.1/32# / vrf main routing bgp neighbor 172.16.2.2 ebgp-multihop 2
rt1 running network 172.16.1.1/32# / vrf main routing bgp neighbor 172.16.2.2 update-source loop1
rt1 running network 172.16.1.1/32# / vrf main routing bgp neighbor 172.16.2.2 address-family ipv4-unicast enabled false
rt1 running network 172.16.1.1/32# / vrf main routing bgp neighbor 172.16.2.2 address-family ipv4-vpn enabled true
rt1 running network 172.16.1.1/32# / vrf main routing bgp ebgp-requires-policy false
rt1 running network 172.16.1.1/32# / vrf main l3vrf vrf1 table-id 10
rt1 running network 172.16.1.1/32# / vrf main l3vrf vrf1 interface physical eth1 port pci-b0s4
rt1 running network 172.16.1.1/32# / vrf main l3vrf vrf1 interface physical eth1 ipv4 address 172.16.10.1/24
rt1 running network 172.16.1.1/32# / vrf main l3vrf vrf1 routing bgp address-family ipv4-unicast
rt1 running ipv4-unicast# / vrf main l3vrf vrf1 routing bgp address-family ipv4-unicast l3vpn export route-distinguisher 65500:1
rt1 running ipv4-unicast# / vrf main l3vrf vrf1 routing bgp address-family ipv4-unicast l3vpn export route-target 11:22
rt1 running ipv4-unicast# / vrf main l3vrf vrf1 routing bgp address-family ipv4-unicast l3vpn import route-target 11:22
rt1 running ipv4-unicast# / vrf main l3vrf vrf1 routing bgp address-family ipv4-unicast l3vpn import vpn true
rt1 running ipv4-unicast# / vrf main l3vrf vrf1 routing bgp address-family ipv4-unicast l3vpn export vpn true
rt1 running ipv4-unicast# / vrf main l3vrf vrf1 routing bgp address-family ipv4-unicast l3vpn export label 300
rt1 running ipv4-unicast# / vrf main l3vrf vrf1 routing bgp address-family ipv4-unicast redistribute connected
rt2
rt2 running config# / vrf main interface loopback loop1 ipv4 address 172.16.2.2/32
rt2 running config# / vrf main interface physical eth2 port pci-b0s5
rt2 running config# / vrf main interface physical eth2 ipv4 address 192.168.1.2/24
rt2 running config# / vrf main routing bgp as 65501
rt2 running config# / vrf main routing bgp neighbor 192.168.1.1 remote-as 65500
rt2 running config# / vrf main routing bgp neighbor 192.168.1.1 address-family ipv4-unicast enabled false
rt2 running config# / vrf main routing bgp neighbor 192.168.1.1 address-family ipv4-labeled-unicast enabled true
rt2 running config# / vrf main routing bgp address-family ipv4-unicast network 172.16.2.2/32
rt2 running network 172.16.2.2/32# / vrf main routing bgp ebgp-requires-policy false
rt2 running network 172.16.2.2/32# / vrf main routing bgp neighbor 172.16.1.1 remote-as 65500
rt2 running network 172.16.2.2/32# / vrf main routing bgp neighbor 172.16.1.1 ebgp-multihop 2
rt2 running network 172.16.2.2/32# / vrf main routing bgp neighbor 172.16.1.1 update-source loop1
rt2 running network 172.16.2.2/32# / vrf main routing bgp neighbor 172.16.1.1 address-family ipv4-unicast enabled false
rt2 running network 172.16.2.2/32# / vrf main routing bgp neighbor 172.16.1.1 address-family ipv4-vpn enabled true
rt2 running network 172.16.2.2/32# / vrf main l3vrf vrf1 table-id 10
rt2 running network 172.16.2.2/32# / vrf main l3vrf vrf1 interface physical eth1 port pci-b0s4
rt2 running network 172.16.2.2/32# / vrf main l3vrf vrf1 interface physical eth1 ipv4 address 172.16.20.2/24
rt2 running network 172.16.2.2/32# / vrf main l3vrf vrf1 routing bgp address-family ipv4-unicast
rt2 running ipv4-unicast# / vrf main l3vrf vrf1 routing bgp address-family ipv4-unicast l3vpn export route-distinguisher 65501:1
rt2 running ipv4-unicast# / vrf main l3vrf vrf1 routing bgp address-family ipv4-unicast l3vpn export route-target 11:22
rt2 running ipv4-unicast# / vrf main l3vrf vrf1 routing bgp address-family ipv4-unicast l3vpn import route-target 11:22
rt2 running ipv4-unicast# / vrf main l3vrf vrf1 routing bgp address-family ipv4-unicast l3vpn import vpn true
rt2 running ipv4-unicast# / vrf main l3vrf vrf1 routing bgp address-family ipv4-unicast l3vpn export vpn true
rt2 running ipv4-unicast# / vrf main l3vrf vrf1 routing bgp address-family ipv4-unicast l3vpn export label 600
rt2 running ipv4-unicast# / vrf main l3vrf vrf1 routing bgp address-family ipv4-unicast redistribute connected
After peering, the rt1
device receives BGP update from the 172.16.20.0/24
network with the 600
label.
rt1> show bgp ipv4 vpn prefix 172.16.20.0/24
BGP routing table entry for 65501:1:172.16.20.0/24, version 1
not allocated
Paths: (1 available, best #1)
Advertised to non peer-group peers:
172.16.2.2
65501
172.16.2.2 from 172.16.2.2 (172.16.2.2)
Origin incomplete, metric 0, valid, external, best (First path received)
Extended Community: RT:11:22
Remote label: 600
Last update: Wed Jul 10 11:53:05 2024
The L3VPN route is installed, because there was a labeled route between the rt1
.
That labeled route was the labeled-unicast
route coming from the rt2
device and
using the implicit-null
label. The L3VPN route appended that labeled route to
its own VPN label. (the implicit-null/600
label stack indicates that VPN packets
will be sent out encapsulated with the 600
value).
rt1> show ipv4-routes l3vrf vrf1
Codes: K - kernel route, C - connected, S - static, R - RIP,
O - OSPF, I - IS-IS, B - BGP, N - NHRP, T - Table
> - selected route, * - FIB route, r - rejected, b - backup
L3VRF vrf1:
K>* 0.0.0.0/0 [255/8192] unreachable (ICMP unreachable), 00:00:12
C>* 172.16.10.0/24 is directly connected, eth1, 00:00:12
B> 172.16.20.0/24 [20/0] via 172.16.2.2 (l3vrf default) (recursive), label 600, weight 1, 00:00:02
* via 192.168.1.2, eth2 (l3vrf default), label implicit-null/600, weight 1, 00:00:02
3 routes displayed.
eBGP can be used on multi-hop constraints, where the L3VPN networks are not directly connected. In that case, a chain of eBGP connections can be used to establish an LSP along the path between all the eBGP devices.
See also
RFC 4364 section
10.c
using the eBGP redistribution of labeled IPv4 routes.
IBGP connection¶
Labeled iBGP peering can be also configured to connect two remote networks. In that case, iBGP is configured as a route reflector: labeled iBGP routes reflect labeled routes to the remote network.
IBGP between two devices¶
The following configuration illustrates a basic iBGP peering between two devices. To simplify BGP peering between the two loopback addresses of the two nodes, a static route has been used instead of an IGP.
rt1
rt1 running config# / vrf main routing static ipv4-route 172.16.1.2/32 next-hop 192.168.1.2
rt1 running config# / vrf main interface loopback loop1 ipv4 address 172.16.1.1/32
rt1 running config# / vrf main interface physical eth2 port pci-b0s5
rt1 running config# / vrf main interface physical eth2 ipv4 address 192.168.1.1/24
rt1 running config# / vrf main routing bgp as 65500
rt1 running config# / vrf main routing bgp neighbor 172.16.1.2 remote-as 65500
rt1 running config# / vrf main routing bgp neighbor 172.16.1.2 update-source loop1
rt1 running config# / vrf main routing bgp neighbor 172.16.1.2 address-family ipv4-unicast enabled false
rt1 running config# / vrf main routing bgp neighbor 172.16.1.2 address-family ipv4-labeled-unicast enabled true
rt1 running config# / vrf main routing bgp neighbor 172.16.1.2 address-family ipv4-labeled-unicast route-reflector-client true
rt1 running config# / vrf main routing bgp neighbor 172.16.1.2 address-family ipv4-labeled-unicast nexthop-self force true
rt1 running config# / vrf main routing bgp address-family ipv4-unicast network 172.16.1.1/32
rt2
rt2 running config# / vrf main routing static ipv4-route 172.16.1.1/32 next-hop 192.168.1.1
rt2 running config# / vrf main interface loopback loop1 ipv4 address 172.16.1.2/32
rt2 running config# / vrf main interface physical eth2 port pci-b0s5
rt2 running config# / vrf main interface physical eth2 ipv4 address 192.168.1.2/24
rt2 running config# / vrf main routing bgp as 65500
rt2 running config# / vrf main routing bgp neighbor 172.16.1.1 remote-as 65500
rt2 running config# / vrf main routing bgp neighbor 172.16.1.1 update-source loop1
rt2 running config# / vrf main routing bgp neighbor 172.16.1.1 address-family ipv4-unicast enabled false
rt2 running config# / vrf main routing bgp neighbor 172.16.1.1 address-family ipv4-labeled-unicast enabled true
rt2 running config# / vrf main routing bgp neighbor 172.16.1.1 address-family ipv4-labeled-unicast route-reflector-client true
rt2 running config# / vrf main routing bgp neighbor 172.16.1.1 address-family ipv4-labeled-unicast nexthop-self force true
rt2 running config# / vrf main routing bgp address-family ipv4-unicast network 172.16.1.2/32
Note
For simplifications, some static routes have been configured to replace an IGP that is usually requested.
The BGP route learned on the rt2
node can be propagated to other iBGP
peerings connected behind the rt2
device. The local label value computed
by rt2
will be used by the BGP node consecutive to the rt2
to send
traffic to the 172.16.1.1
address.
rt2
rt2> show bgp ipv4 labeled-unicast prefix 172.16.1.1/32
BGP routing table entry for 172.16.1.1/32, version 2
Local label: 16
Paths: (1 available, best #1, table default, vrf (null))
Advertised to non peer-group peers:
172.16.1.1
Local
172.16.1.1 from 172.16.1.1 (172.16.1.1)
Origin IGP, metric 0, localpref 100, valid, internal, best (First path received)
Remote label: 3
Last update: Wed Jul 10 09:53:30 2024
IBGP across multiple devices¶
Labeled iBGP peering is used for inter-area routing to establish a unique LSP across multiple domains. For instance, an operator network can be split up between access, aggregation, and core network. Each domain uses its own IGP because the operator wants to maintain those domains isolated. Only a few addresses are shared between the various domains.
The labeled iBGP peering sits on top of those IGPs and creates BGP peering between the nodes located at the border of each domain.
For instance, on the below configuration, the rt3
device shares its
loopback address between the two domains connected to it. This sharing
permits BGP to propagate prefixes from rt4
to the rt1
device and vice-versa.
rt1
rt1 running config# / vrf main interface loopback loop1 ipv4 address 172.16.1.1/32
rt1 running config# / vrf main interface physical eth2 port pci-b0s5
rt1 running config# / vrf main interface physical eth2 ipv4 address 192.168.1.1/24
rt1 running config# / vrf main routing mpls fec resolve-via-network true
rt1 running config# / vrf main routing bgp as 65500
rt1 running config# / vrf main routing bgp address-family ipv4-unicast network 172.16.1.1/32
rt1 running network 172.16.1.1/32# / vrf main routing bgp neighbor 172.16.1.3 remote-as 65500
rt1 running network 172.16.1.1/32# / vrf main routing bgp neighbor 172.16.1.3 update-source loop1
rt1 running network 172.16.1.1/32# / vrf main routing bgp neighbor 172.16.1.3 address-family ipv4-unicast enabled false
rt1 running network 172.16.1.1/32# / vrf main routing bgp neighbor 172.16.1.3 address-family ipv4-labeled-unicast enabled true
rt1 running network 172.16.1.1/32# / vrf main routing bgp neighbor 172.16.1.3 address-family ipv4-labeled-unicast route-reflector-client true
rt1 running network 172.16.1.1/32# / vrf main routing bgp neighbor 172.16.1.3 address-family ipv4-labeled-unicast nexthop-self force true
rt1 running network 172.16.1.1/32# / vrf main routing bgp neighbor 172.16.1.4 remote-as 65500
rt1 running network 172.16.1.1/32# / vrf main routing bgp neighbor 172.16.1.4 update-source loop1
rt1 running network 172.16.1.1/32# / vrf main routing bgp neighbor 172.16.1.4 address-family ipv4-unicast enabled true
rt1 running network 172.16.1.1/32# / vrf main routing ospf router-id 172.16.1.1
rt1 running network 172.16.1.1/32# / vrf main routing ospf network 172.16.1.1/32 area 0
rt1 running network 172.16.1.1/32# / vrf main routing ospf network 192.168.1.0/24 area 0
rt1 running network 172.16.1.1/32# / vrf main routing ospf passive-interface loop1
rt1 running network 172.16.1.1/32# / vrf main routing mpls ldp router-id 172.16.1.1
rt1 running network 172.16.1.1/32# / vrf main routing mpls ldp address-family ipv4 discovery transport-address 172.16.1.1
rt1 running network 172.16.1.1/32# / vrf main routing mpls ldp address-family ipv4 interface eth2
rt2
rt2 running config# / vrf main interface loopback loop1 ipv4 address 172.16.1.2/32
rt2 running config# / vrf main interface physical eth2 port pci-b0s5
rt2 running config# / vrf main interface physical eth2 ipv4 address 192.168.1.2/24
rt2 running config# / vrf main interface physical eth1 port pci-b0s4
rt2 running config# / vrf main interface physical eth1 ipv4 address 192.168.2.2/24
rt2 running config# / vrf main routing ospf router-id 172.16.1.2
rt2 running config# / vrf main routing ospf network 172.16.1.2/32 area 0
rt2 running config# / vrf main routing ospf network 192.168.1.0/24 area 0
rt2 running config# / vrf main routing ospf network 192.168.2.0/24 area 0
rt2 running config# / vrf main routing ospf passive-interface loop1
rt2 running config# / vrf main routing mpls ldp router-id 172.16.1.2
rt2 running config# / vrf main routing mpls ldp address-family ipv4 discovery transport-address 172.16.1.2
rt2 running config# / vrf main routing mpls ldp address-family ipv4 interface eth1
rt2 running interface eth1# / vrf main routing mpls ldp address-family ipv4 interface eth2
rt3
rt3 running config# / vrf main interface loopback loop1 ipv4 address 172.16.1.3/32
rt3 running config# / vrf main interface physical eth1 port pci-b0s4
rt3 running config# / vrf main interface physical eth1 ipv4 address 192.168.2.3/24
rt3 running config# / vrf main interface physical eth2 port pci-b0s5
rt3 running config# / vrf main interface physical eth2 ipv4 address 192.168.3.3/24
rt3 running config# / vrf main routing mpls fec resolve-via-network true
rt3 running config# / vrf main routing bgp as 65500
rt3 running config# / vrf main routing bgp neighbor 172.16.1.1 remote-as 65500
rt3 running config# / vrf main routing bgp neighbor 172.16.1.1 update-source loop1
rt3 running config# / vrf main routing bgp neighbor 172.16.1.1 address-family ipv4-unicast enabled false
rt3 running config# / vrf main routing bgp neighbor 172.16.1.1 address-family ipv4-labeled-unicast enabled true
rt3 running config# / vrf main routing bgp neighbor 172.16.1.1 address-family ipv4-labeled-unicast route-reflector-client true
rt3 running config# / vrf main routing bgp neighbor 172.16.1.1 address-family ipv4-labeled-unicast nexthop-self force true
rt3 running config# / vrf main routing bgp neighbor 172.16.1.4 remote-as 65500
rt3 running config# / vrf main routing bgp neighbor 172.16.1.4 update-source loop1
rt3 running config# / vrf main routing bgp neighbor 172.16.1.4 address-family ipv4-unicast enabled false
rt3 running config# / vrf main routing bgp neighbor 172.16.1.4 address-family ipv4-labeled-unicast enabled true
rt3 running config# / vrf main routing bgp neighbor 172.16.1.4 address-family ipv4-labeled-unicast route-reflector-client true
rt3 running config# / vrf main routing bgp neighbor 172.16.1.4 address-family ipv4-labeled-unicast nexthop-self force true
rt3 running config# / vrf main routing ospf router-id 172.16.1.3
rt3 running config# / vrf main routing ospf network 172.16.1.3/32 area 0
rt3 running config# / vrf main routing ospf network 192.168.2.0/24 area 0
rt3 running config# / vrf main routing ospf passive-interface loop1
rt3 running config# / vrf main routing mpls ldp router-id 172.16.1.3
rt3 running config# / vrf main routing mpls ldp address-family ipv4 discovery transport-address 172.16.1.3
rt3 running config# / vrf main routing mpls ldp address-family ipv4 interface eth1
rt3 running interface eth1# / vrf main routing isis instance 1 area-address 49.0123.6452.1973.00
rt3 running interface eth1# / vrf main routing isis instance 1 is-type level-1
rt3 running interface eth1# / vrf main routing isis instance 1 segment-routing enabled true
rt3 running interface eth1# / vrf main routing isis instance 1 segment-routing label-blocks srgb lower-bound 18000 upper-bound 19000
rt3 running interface eth1# / vrf main routing isis instance 1 segment-routing prefix-sid-map 172.16.1.3/32 sid-value 33
rt3 running interface eth1# / vrf main routing isis instance 1 segment-routing prefix-sid-map 172.16.1.3/32 last-hop-behavior no-php
rt3 running interface eth1# / vrf main routing interface loop1 isis area-tag 1
rt3 running interface eth1#! / vrf main routing interface loop1 isis ipv4-routing true
rt3 running interface eth1# / vrf main routing interface loop1 isis passive true
rt3 running interface eth1# / vrf main routing interface eth2 isis ipv4-routing true
rt3 running interface eth1#! / vrf main routing interface eth2 isis area-tag 1
rt4
rt4 running config# / vrf main interface loopback loop1 ipv4 address 172.16.1.4/32
rt4 running config# / vrf main interface physical eth2 port pci-b0s5
rt4 running config# / vrf main interface physical eth2 ipv4 address 192.168.3.4/24
rt4 running config# / vrf main routing mpls fec resolve-via-network true
rt4 running config# / vrf main routing bgp as 65500
rt4 running config# / vrf main routing bgp address-family ipv4-unicast network 172.16.1.4/32
rt4 running network 172.16.1.4/32# / vrf main routing bgp neighbor 172.16.1.3 remote-as 65500
rt4 running network 172.16.1.4/32# / vrf main routing bgp neighbor 172.16.1.3 update-source loop1
rt4 running network 172.16.1.4/32# / vrf main routing bgp neighbor 172.16.1.3 address-family ipv4-unicast enabled false
rt4 running network 172.16.1.4/32# / vrf main routing bgp neighbor 172.16.1.3 address-family ipv4-labeled-unicast enabled true
rt4 running network 172.16.1.4/32# / vrf main routing bgp neighbor 172.16.1.3 address-family ipv4-labeled-unicast route-reflector-client true
rt4 running network 172.16.1.4/32# / vrf main routing bgp neighbor 172.16.1.3 address-family ipv4-labeled-unicast nexthop-self force true
rt4 running network 172.16.1.4/32# / vrf main routing bgp neighbor 172.16.1.1 remote-as 65500
rt4 running network 172.16.1.4/32# / vrf main routing bgp neighbor 172.16.1.1 update-source loop1
rt4 running network 172.16.1.4/32# / vrf main routing bgp neighbor 172.16.1.1 update-source loop1
rt4 running network 172.16.1.4/32# / vrf main routing bgp neighbor 172.16.1.1 address-family ipv4-unicast enabled true
rt4 running network 172.16.1.4/32# / vrf main routing isis instance 1 area-address 49.0123.6452.1974.00
rt4 running network 172.16.1.4/32# / vrf main routing isis instance 1 is-type level-1
rt4 running network 172.16.1.4/32# / vrf main routing isis instance 1 segment-routing enabled true
rt4 running network 172.16.1.4/32# / vrf main routing isis instance 1 segment-routing label-blocks srgb lower-bound 18000 upper-bound 19000
rt4 running network 172.16.1.4/32# / vrf main routing isis instance 1 segment-routing prefix-sid-map 172.16.1.4/32 sid-value 44
rt4 running network 172.16.1.4/32# / vrf main routing isis instance 1 segment-routing prefix-sid-map 172.16.1.4/32 last-hop-behavior no-php
rt4 running network 172.16.1.4/32# / vrf main routing interface loop1 isis area-tag 1
rt4 running network 172.16.1.4/32#! / vrf main routing interface loop1 isis ipv4-routing true
rt4 running network 172.16.1.4/32# / vrf main routing interface loop1 isis passive true
rt4 running network 172.16.1.4/32# / vrf main routing interface eth2 isis ipv4-routing true
rt4 running network 172.16.1.4/32#! / vrf main routing interface eth2 isis area-tag 1
On the rt1
device, the labeled route to the 172.16.1.4/32
prefix is
learned from the rt4
device, via the rt3
device.
rt1
rt1> show bgp ipv4 prefix 172.16.1.4/32
BGP routing table entry for 172.16.1.4/32, version 2
Local label: 144
Paths: (2 available, best #2, table default, vrf (null))
Advertised to non peer-group peers:
172.16.1.3
Local
172.16.1.4 (inaccessible) from 172.16.1.4 (172.16.1.4)
Origin IGP, metric 0, localpref 100, invalid, internal
Last update: Tue Jul 9 15:04:44 2024
Local
172.16.1.3 (metric 20) from 172.16.1.3 (172.16.1.4)
Origin IGP, metric 0, localpref 100, valid, internal, best (First path received)
Originator: 172.16.1.4, Cluster list: 172.16.1.3
Remote label: 80
Last update: Tue Jul 9 15:04:43 2024
rt1
will resolve the path to the 172.16.1.4/32
prefix by appending
the 80
label value with the 17
label value used in the first OSPF
domain.
rt1
rt1> show ipv4-routes to 172.16.1.4
Routing entry for 172.16.1.4/32
Known via "bgp", distance 200, metric 0, best
Last update 00:00:03 ago
172.16.1.3 (recursive), label 80, weight 1
* 192.168.1.2, via eth2, label 17/80, weight 1
On the rt2
device, the 17
label value is popped from packets from rt1
heading to the rt4
device. The remaining MPLS packet has the 80
label
value which will be replaced on the rt3
device by using the following
switching entry:
rt3
rt3> show mpls table 80
Local label: 80 (installed)
type: SR (IS-IS) remote label: 18044 distance: 150
via 192.168.3.4 dev eth2 (installed)
The 80
label value is generated by BGP to re-advertise the 172.16.1.4/32
prefix to the rt1
device. BGP created a FEC entry to handle return traffic
from the rt1
to the rt4
device.
rt3
rt3> show mpls fec table
172.16.1.1/32
Label: 81
Client list: bgp(fd 29)
172.16.1.4/32
Label: 80
Client list: bgp(fd 29)
Without the mpls fec resolve-via-network true
command, the MPLS entry
would have not been created, as by default, a BGP route has to be selected
to resolve that FEC entry. The below dump shows that the BGP route
heading to the 172.16.1.4/32
IP address has not been selected, and the
IS-IS route has been selected instead.
rt3
rt3> show ipv4-routes
Codes: K - kernel route, C - connected, S - static, R - RIP,
O - OSPF, I - IS-IS, B - BGP, N - NHRP, T - Table
> - selected route, * - FIB route, r - rejected, b - backup
L3VRF default:
B 172.16.1.1/32 [200/0] via 172.16.1.1 inactive, label implicit-null, weight 1, 00:00:06
O>* 172.16.1.1/32 [110/20] via 192.168.2.2, eth1, label 16, weight 1, 00:00:12
O>* 172.16.1.2/32 [110/10] via 192.168.2.2, eth1, label implicit-null, weight 1, 00:00:12
O 172.16.1.3/32 [110/0] is directly connected, loop1, weight 1, 00:01:02
C>* 172.16.1.3/32 is directly connected, loop1, 00:01:04
B 172.16.1.4/32 [200/0] via 172.16.1.4 inactive, label implicit-null, weight 1, 00:00:27
I>* 172.16.1.4/32 [115/20] via 192.168.3.4, eth2, label 18044, weight 1, 00:00:28
O>* 192.168.1.0/24 [110/20] via 192.168.2.2, eth1, label implicit-null, weight 1, 00:00:12
O 192.168.2.0/24 [110/10] is directly connected, eth1, weight 1, 00:01:02
C>* 192.168.2.0/24 is directly connected, eth1, 00:01:04
I 192.168.3.0/24 [115/20] via 192.168.3.4, eth2 inactive, weight 1, 00:00:28
C>* 192.168.3.0/24 is directly connected, eth2, 00:01:04
7 routes displayed.
Note
The fec resolve-via-network
command can be also used for eBGP peerings, but its
usage is limited, as an eBGP priority has a default distance
set to 20
whereas
an IGP like IS-IS has a default distance
value set to 115
.
See also
draft-ietf-mpls-seamless-mpls-07, chapter 4.5, Inter-Domain Routing
Connecting IPv6 islands over IPv4 MPLS using IPv6 PEs (6pe
)¶
6pe
stands for IPv6 Provider Edge router, and defines an approach where the
PEs are able to convey IPv6 traffic over an MPLS IPv4 based network.
The ISPs may use that solution to extend their network with IPv6 addresses
on the CPEs devices, without having to change their core network configuration.
See also
RFC 4798: Connecting IPv6 Islands over IPv4 MPLS Using IPv6 Provider Edge Routers
IPv4 mapped IPv6 addresses¶
This approach requires using IPv4 mapped IPv6 addresses. The address representation is based on an IPv4 address, which is mapped into the IPv6 address scope.
This addressing scheme is used to convey IPv6 traffic over interfaces that are
only IPv4 capable. In the 6pe
case, when forwarding IPv6 traffic to the
connected IPv4 mapped IPv6 address, the link resolution will be done on the
corresponding IPv4 address.
The 6pe
approach¶
From the control plane perspective, the BGP labeled unicast address-family is used to exchange IPv6 prefixes along with a label value. The next hop exchanged is a forged IPv4 mapped IPv6 address bound to the IPv4 address of the BGP speaker. From the data plane perspective, the ingress PE uses the IPv4 part of the received next hop, to figure out where to forward IPv6 traffic to.
The following example illustrates two PEs devices connected to an MPLS IPv4
based network. The rt1
and rt4
devices are dual stack based, and are able to
convey IPv6 traffic over the existing IPv4 network.
The rt1
and rt4
devices advertise IPv6 prefixes along with the IPv6
explicit-null
label value. To transmit an IPv4 mapped IPv6 address in the
BGP update, the loop1
interfaces of both BGP speakers must only be
configured with the original IPv4 address of the BGP instances.
Note
Because the IPv6 traffic must be MPLS encapsulated through all the LSP,
the BGP label value can not be implicit-null
. That would imply that some
IPv6 traffic might have to be processed on the penultimate router of the
backbone. It is the reason why the IPv6 explicit-null
label value is used.
rt1
rt1 running config# / vrf main interface physical eth2 port pci-b0s5
rt1 running config# / vrf main interface physical eth2 ipv4 address 192.168.0.1/24
rt1 running config# / vrf main interface physical eth2 ipv6 address ::ffff:192.168.0.1/120
rt1 running config# / vrf main interface physical eth1 port pci-b0s4
rt1 running config# / vrf main interface physical eth1 ipv6 address fd00:100::1/64
rt1 running config# / vrf main interface loopback loop1 ipv4 address 198.51.100.1/32
rt1 running config# / vrf main routing interface loop1 isis area-tag 1
rt1 running config#! / vrf main routing interface loop1 isis ipv4-routing true
rt1 running config#! / vrf main routing interface eth2 isis area-tag 1
rt1 running config#! / vrf main routing interface eth2 isis ipv4-routing true
rt1 running config#! / vrf main routing bgp as 65500
rt1 running config#! / vrf main routing bgp router-id 198.51.100.1
rt1 running config#! / vrf main routing bgp address-family ipv6-unicast network fd00:100::/64
rt1 running network fd00:100::/64#! / vrf main routing bgp neighbor 198.51.100.4 remote-as 65500
rt1 running network fd00:100::/64#! / vrf main routing bgp neighbor 198.51.100.4 update-source loop1
rt1 running network fd00:100::/64#! / vrf main routing bgp neighbor 198.51.100.4 address-family ipv4-unicast enabled false
rt1 running network fd00:100::/64#! / vrf main routing bgp neighbor 198.51.100.4 address-family ipv6-labeled-unicast enabled true
rt1 running network fd00:100::/64#! / vrf main routing bgp address-family ipv6-labeled-unicast label explicit-null
rt1 running network fd00:100::/64#! / vrf main routing isis instance 1 is-type level-2
rt1 running network fd00:100::/64# / vrf main routing isis instance 1 area-address 49.0000.0007.e901.1111.00
rt1 running network fd00:100::/64# / vrf main routing isis instance 1 traffic-engineering ipv4-router-address 198.51.100.1
rt1 running network fd00:100::/64# / vrf main routing isis instance 1 segment-routing enabled true
rt1 running network fd00:100::/64# / vrf main routing isis instance 1 segment-routing label-blocks srgb lower-bound 1000 upper-bound 2000
rt1 running network fd00:100::/64# / vrf main routing isis instance 1 segment-routing label-blocks srlb lower-bound 31000 upper-bound 31999
rt1 running network fd00:100::/64# / vrf main routing isis instance 1 segment-routing msd node-msd 8
rt1 running network fd00:100::/64# / vrf main routing isis instance 1 segment-routing prefix-sid-map 198.51.100.1/32 sid-value 11
rt2
rt2 running config# / vrf main interface physical eth2 port pci-b0s5
rt2 running config# / vrf main interface physical eth2 ipv4 address 192.168.0.2/24
rt2 running config# / vrf main interface physical eth1 port pci-b0s4
rt2 running config# / vrf main interface physical eth1 ipv4 address 192.168.1.2/24
rt2 running config# / vrf main interface loopback loop1 ipv4 address 198.51.100.2/32
rt2 running config# / vrf main routing interface loop1 isis area-tag 1
rt2 running config#! / vrf main routing interface loop1 isis ipv4-routing true
rt2 running config#! / vrf main routing interface eth2 isis area-tag 1
rt2 running config#! / vrf main routing interface eth2 isis ipv4-routing true
rt2 running config#! / vrf main routing interface eth1 isis area-tag 1
rt2 running config#! / vrf main routing interface eth1 isis ipv4-routing true
rt2 running config#! / vrf main routing isis instance 1 is-type level-2
rt2 running config# / vrf main routing isis instance 1 area-address 49.0000.0007.e901.2222.00
rt2 running config# / vrf main routing isis instance 1 traffic-engineering ipv4-router-address 198.51.100.2
rt2 running config# / vrf main routing isis instance 1 segment-routing enabled true
rt2 running config# / vrf main routing isis instance 1 segment-routing label-blocks srgb lower-bound 1000 upper-bound 2000
rt2 running config# / vrf main routing isis instance 1 segment-routing label-blocks srlb lower-bound 30000 upper-bound 30999
rt2 running config# / vrf main routing isis instance 1 segment-routing msd node-msd 8
rt2 running config# / vrf main routing isis instance 1 segment-routing prefix-sid-map 198.51.100.2/32 sid-value 22
rt3
rt3 running config# / vrf main interface physical eth1 port pci-b0s4
rt3 running config# / vrf main interface physical eth1 ipv4 address 192.168.1.3/24
rt3 running config# / vrf main interface physical eth2 port pci-b0s5
rt3 running config# / vrf main interface physical eth2 ipv4 address 192.168.2.3/24
rt3 running config# / vrf main interface loopback loop1 ipv4 address 198.51.100.3/32
rt3 running config# / vrf main routing interface loop1 isis area-tag 1
rt3 running config#! / vrf main routing interface loop1 isis ipv4-routing true
rt3 running config#! / vrf main routing interface eth1 isis area-tag 1
rt3 running config#! / vrf main routing interface eth1 isis ipv4-routing true
rt3 running config#! / vrf main routing interface eth2 isis area-tag 1
rt3 running config#! / vrf main routing interface eth2 isis ipv4-routing true
rt3 running config#! / vrf main routing isis instance 1 is-type level-2
rt3 running config# / vrf main routing isis instance 1 area-address 49.0000.0007.e901.3333.00
rt3 running config# / vrf main routing isis instance 1 traffic-engineering ipv4-router-address 198.51.100.3
rt3 running config# / vrf main routing isis instance 1 segment-routing enabled true
rt3 running config# / vrf main routing isis instance 1 segment-routing label-blocks srgb lower-bound 1000 upper-bound 2000
rt3 running config# / vrf main routing isis instance 1 segment-routing label-blocks srlb lower-bound 32000 upper-bound 32999
rt3 running config# / vrf main routing isis instance 1 segment-routing msd node-msd 8
rt3 running config# / vrf main routing isis instance 1 segment-routing prefix-sid-map 198.51.100.3/32 sid-value 33
rt4
rt4 running config# / vrf main interface physical eth2 port pci-b0s5
rt4 running config# / vrf main interface physical eth2 ipv4 address 192.168.2.4/24
rt4 running config# / vrf main interface physical eth2 ipv6 address ::ffff:192.168.2.4/120
rt4 running config# / vrf main interface physical eth1 port pci-b0s4
rt4 running config# / vrf main interface physical eth1 ipv6 address fd00:200::4/64
rt4 running config# / vrf main interface loopback loop1 ipv4 address 198.51.100.4/32
rt4 running config# / vrf main routing interface loop1 isis area-tag 1
rt4 running config#! / vrf main routing interface loop1 isis ipv4-routing true
rt4 running config#! / vrf main routing interface eth2 isis area-tag 1
rt4 running config#! / vrf main routing interface eth2 isis ipv4-routing true
rt4 running config#! / vrf main routing bgp as 65500
rt4 running config#! / vrf main routing bgp router-id 198.51.100.4
rt4 running config#! / vrf main routing bgp address-family ipv6-unicast network fd00:200::/64
rt4 running network fd00:200::/64#! / vrf main routing bgp neighbor 198.51.100.1 remote-as 65500
rt4 running network fd00:200::/64#! / vrf main routing bgp neighbor 198.51.100.1 update-source loop1
rt4 running network fd00:200::/64#! / vrf main routing bgp neighbor 198.51.100.1 address-family ipv4-unicast enabled false
rt4 running network fd00:200::/64#! / vrf main routing bgp neighbor 198.51.100.1 address-family ipv6-labeled-unicast enabled true
rt4 running network fd00:200::/64#! / vrf main routing bgp address-family ipv6-labeled-unicast label explicit-null
rt4 running network fd00:200::/64#! / vrf main routing isis instance 1 is-type level-2
rt4 running network fd00:200::/64# / vrf main routing isis instance 1 area-address 49.0000.0007.e901.4444.00
rt4 running network fd00:200::/64# / vrf main routing isis instance 1 traffic-engineering ipv4-router-address 198.51.100.4
rt4 running network fd00:200::/64# / vrf main routing isis instance 1 segment-routing enabled true
rt4 running network fd00:200::/64# / vrf main routing isis instance 1 segment-routing label-blocks srgb lower-bound 1000 upper-bound 2000
rt4 running network fd00:200::/64# / vrf main routing isis instance 1 segment-routing label-blocks srlb lower-bound 33000 upper-bound 33999
rt4 running network fd00:200::/64# / vrf main routing isis instance 1 segment-routing msd node-msd 8
rt4 running network fd00:200::/64# / vrf main routing isis instance 1 segment-routing prefix-sid-map 198.51.100.4/32 sid-value 44
The rt1
device receives the IPv6 prefix from rt4
with the ::ffff:c633:6404
next
hop. This is an IPv4 mapped IPv6 address whose IPv4 address is 198.51.100.4
.
rt1
rt1> show bgp ipv6
BGP table version is 2, local router ID is 198.51.100.1, vrf id 0
Default local pref 100, local AS 65500
Status codes: s suppressed, d damped, h history, * valid, > best, = multipath,
i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> fd00:100::/64 :: 0 32768 i
*>ifd00:200::/64 ::ffff:c633:6404
0 100 0 i
Displayed 2 routes and 2 total paths
The rt1
device is able to resolve the next hop reachility over the ipv4
network by using
the 198.51.100.4
address. The resulting recursive route uses the 192.168.0.2
next hop
IP address. Because rt1
has an ipv4 mapped IPv6 address derived from the 192.168.0.0/24
network, the associated BGP IPv6 network can be resolved using a recursive route with the
::ffff:c0a8:2
IPv6 address.
rt1
rt1> show ipv4-routes to 198.51.100.4
Routing entry for 198.51.100.4/32
Known via "isis", distance 115, metric 40, best
Last update 00:00:04 ago
* 192.168.0.2, via eth2, label 1044, weight 1
rt1> show bgp nexthop-cache
Current BGP nexthop cache:
198.51.100.4 valid [IGP metric 40], #paths 0, peer 198.51.100.4
gate 192.168.0.2, if eth2
Last update: Tue Jul 9 15:06:30 2024
::ffff:c633:6404 valid [IGP metric 0], #paths 1
gate ::ffff:c0a8:2, if eth2
Last update: Tue Jul 9 15:06:32 2024
The resulting IPv6 route is a labeled IPv6 route whose recursive route uses the
::ffff:c0a8:2
next hop IPv6 address. An intermediate route marked 6
is created,
and reuses the same label value as the matching labeled IPv4 route.
rt1
rt1> show ipv6-routes
Codes: K - kernel route, C - connected, S - static, R - RIPng,
O - OSPFv3, I - IS-IS, B - BGP, N - NHRP, T - Table,
> - selected route, * - FIB route, r - rejected, b - backup
L3VRF default:
C>* ::ffff:192.168.0.0/120 is directly connected, eth2, 00:00:51
6>* ::ffff:198.51.100.4/128 [1/0] via ::ffff:192.168.0.2, eth2, label 1044, weight 1, 00:00:03
C>* fd00:100::/64 is directly connected, eth1, 00:00:52
B> fd00:200::/64 [200/0] via ::ffff:198.51.100.4 (recursive), label ipv6-explicit-null, weight 1, 00:00:03
* via ::ffff:192.168.0.2, eth2, label 1044/ipv6-explicit-null, weight 1, 00:00:03
C * fe80::/64 is directly connected, eth1, 00:01:41
C * fe80::/64 is directly connected, eth2, 00:01:42
C>* fe80::/64 is directly connected, fptun0, 00:01:42
5 routes displayed.