Configuring the PrefVal Attribute
Context
The PrefVal attribute is a Huawei proprietary attribute and is valid only on the device where it is configured. When a BGP routing table contains multiple routes to the same destination, BGP prefers the route with the highest PrefVal.
Procedure
- Run system-view
The system view is displayed.
- Run bgp { as-number-plain | as-number-dot }
The BGP view is displayed.
- Enter the corresponding address family view based on network type to configure BGP devices on networks.
Run ipv4-family { unicast | multicast }
The IPv4 address family view is displayed.
Run ipv6-family [ unicast ]
The IPv6 address family view is displayed.
- Run peer { group-name | ipv4-address | ipv6-address } preferred-value value
The PrefVal attribute is configured for all the routes learned from a specified peer.
By default, the PrefVal of a route learned from a peer is 0.