The segment-routing ipv6 apply-sid per-nexthop pop-go command configures a device to allocate SIDs based on the next hop for IPv4 unicast routes received by IPv4 neighbors of the public network.
The undo segment-routing ipv6 apply-sid per-nexthop pop-go command restores the default configuration.
By default, a device is not configured to allocate SIDs based on the next hop for IPv4 unicast routes received by IPv4 neighbors of the public network.
Usage Scenario
In public IPv4 over SRv6 BE/SRv6 TE Policy scenarios, a SID is allocated to each instance by default. That is, the same SID is assigned to BGP public IPv4 routes. After traffic arrives at a PE, the PE searches the public IP routing table for an entry and uses the entry to forward the traffic to a CE. To properly use network resources and reduce network congestion, run the segment-routing ipv6 apply-sid per-nexthop pop-go command to assign a SID to each next hop of a BGP unicast route received by the IPv4 neighbor of the public network so that traffic is forwarded through different next hops.
Prerequisites
The locator command has been run to define a SID node route locator.
<HUAWEI> system-view [~HUAWEI] segment-routing ipv6 [*HUAWEI-segment-routing-ipv6] locator a ipv6-prefix 2001:db8::1 64 [*HUAWEI-segment-routing-ipv6-locator] quit [*HUAWEI-segment-routing-ipv6] quit [*HUAWEI] bgp 100 [*HUAWEI-bgp] ipv4-family unicast [*HUAWEI-bgp-af-ipv4] segment-routing ipv6 locator a [*HUAWEI-bgp-af-ipv4] segment-routing ipv6 apply-sid per-nexthop pop-go