< Home

Configuring Preferred Values for BGP Routes

After the PrefVals of BGP routes are set, the route with the greatest PrefVal is selected when multiple routes to the same destination exist in the BGP routing table.

Context

If a peer is configured with a preferred value, all routes learned from the peer have the preferred value. When multiple routes to the same address prefix exist, the route with the greatest preferred value is selected.

Procedure

  1. Access the system view.

    system-view

  2. Access the BGP view.

    bgp { as-number-plain | as-number-dot }

  3. Set the PrefVal is set for a peer.

    peer { group-name | ipv4-address } preferred-value value

    By default, the original PrefVal of the route learned from a peer is 0.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >