default local-preference (BGP-IPv6 unicast address family view)

Function

The default local-preference command configures a Local_Pref for BGP routes.

The undo default local-preference command restores the default value.

By default, the Local_Pref of BGP routes is 100.

Format

default local-preference local-preference

undo default local-preference

Parameters

Parameter Description Value
local-preference

Specifies a Local_Pref for BGP routes. The larger the value, the higher the priority.

The value is an integer ranging from 0 to 4294967295.

Views

BGP-IPv6 unicast address family view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
bgp write

Usage Guidelines

Usage Scenario

Local_Pref is used to determine the optimal route for the traffic that leaves an AS. If BGP receives from different IBGP peers multiple routes to the same destination address but with different next hops, it selects the route with the largest Local_Pref value.

Configuration Impact

If the default local-preference command is run more than once, the latest configuration overrides the previous one.

Precautions

The Local_Pref is valid among IBGP peers and is not advertised to other ASs.

Example

# Set the Local_Pref for BGP routes to 200.
<HUAWEI> system-view
[~HUAWEI] bgp 100
[*HUAWEI-bgp] ipv6-family unicast
[*HUAWEI-bgp-af-ipv6] default local-preference 200
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >