bestroute nexthop-priority (BGP-IPv4 unicast address family view)

Function

The bestroute nexthop-priority command configures a device to select a IPv4 or IPv6 route with a higher priority after the route learned by IPv4 is advertised to a public network.

The undo bestroute nexthop-priority command restores the default setting.

By default, BGP selects routes based on the default route selection rules and does not compare next hop types.

Format

bestroute nexthop-priority { ipv4 | ipv6 }

undo bestroute nexthop-priority { ipv4 | ipv6 }

undo bestroute nexthop-priority

Parameters

Parameter Description Value
ipv4

Next hop preferred IPv4 route.

-

ipv6

Next hop preferred IPv6 route.

-

Views

BGP-IPv4 unicast address family view, BGP view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
bgp write

Usage Guidelines

Usage Scenario

In a global IPv4 over SRv6 BE scenario where IPv4 and IPv6 services coexist, a device may have two routes with the same prefix but different next hops. The next hop of one route uses an IPv4 address, and that of the other route uses an IPv6 address. To enable the device to preferentially select a route with an IPv4 or IPv6 next hop address, run the bestroute nexthop-priority command.

Example

# Configure IPv4 to preferentially select the route with an IPv4 next-hop address after the route is advertised to a public network.
<HUAWEI> system-view
[~HUAWEI] bgp 100
[*HUAWEI-bgp] ipv4-family unicast
[*HUAWEI-bgp-af-ipv4] bestroute nexthop-priority ipv4
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >