bestroute nexthop-priority

Function

The bestroute nexthop-priority command configures a device to select a route with a higher priority after the route learned by VPNv4 or VPNv6 is advertised to a private 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

Indicates the IPv4 next hop type.

-

ipv6

Indicates the IPv6 next hop type.

-

Views

BGP-VPN instance IPv4 address family view, BGP-VPN instance IPv6 address family view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
bgp write

Usage Guidelines

Usage Scenario

On networks 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 VPNv4 to preferentially select the route with an IPv4 next-hop address after the route is advertised to a private network.
<HUAWEI> system-view
[~HUAWEI] bgp 100
[~HUAWEI-bgp] ipv4-family vpn-instance vrf1
[~HUAWEI-bgp-vrf1] bestroute nexthop-priority ipv4
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >