Configuring conversion from BGP IPv4 unicast routes to labeled routes can ensure that traffic is forwarded along a specified LSP.
On the network shown in Figure 1, an IBGP peer relationship and an MPLS LSP are established between the user device and DeviceA. It is required that traffic from DeviceB to the user device be forwarded along the MPLS LSP.
To meet this requirement, DeviceA and DeviceB need to be enabled to send or receive labeled routes, and DeviceA needs to be enabled to convert BGP IPv4 unicast routes to labeled routes and allocate MPLS labels using a route-policy. Then, DeviceA can convert the IPv4 public network unicast route (1.1.1.0/24 in this example) learned from the user device to a labeled route and advertise the labeled route to DeviceB. After traffic from DeviceB reaches DeviceA, DeviceA performs the POPGO action. Specifically, DeviceA removes the BGP label, adds an LSP label, and forwards the traffic to the user device along the MPLS LSP.
After configuring conversion from BGP IPv4 unicast routes to labeled routes, verify the configuration.
Run the display bgp routing-table label [ statistics ] command to check labeled route information in the BGP routing table.