Got it

Change PrefVal of Specific Routes

Created: Aug 18, 2020 15:29:26Latest reply: Aug 19, 2020 01:21:46 340 3 1 0 0
  Rewarded HiCoins: 0 (problem resolved)

Hi,


Is it possible to change preference value of specific routes (e.g.:only default route) via route policy instead of applying preference value per peer (that changes preference value of all routes from that peer)?


i_f15.gif

Featured Answers

Best answer

Recommended answer

Herediano
Created Aug 18, 2020 17:30:45

Hi,

You can use a route-policy that matches the routes you want with an ip-prefix:
https://support.huawei.com/enterprise/en/doc/EDOC1100127058/c2e927da/optional-configuring-an-if-match-clause
https://support.huawei.com/enterprise/en/doc/EDOC1100127058?section=j0gh

ip ip-prefix example index 10 permit x.x.x.x x
route-policy example permit node 10
if-match ip ip-prefix example
apply pref/localpref x
route-policy example permit node 20 "required to allow other routes that doesn't matched with the ip-prefix"

bgp x
peer x.x.x.x route-policy example inbound

Instead of the PrefVal I suggest you to use the local preference value so the change could be propagated to the IBGP peers as well.
View more
  • x
  • convention:

All Answers
Hello User. We are reviewing your question and we will answer you shortly. Thanks.
View more
  • x
  • convention:

Hi,

You can use a route-policy that matches the routes you want with an ip-prefix:
https://support.huawei.com/enterprise/en/doc/EDOC1100127058/c2e927da/optional-configuring-an-if-match-clause
https://support.huawei.com/enterprise/en/doc/EDOC1100127058?section=j0gh

ip ip-prefix example index 10 permit x.x.x.x x
route-policy example permit node 10
if-match ip ip-prefix example
apply pref/localpref x
route-policy example permit node 20 "required to allow other routes that doesn't matched with the ip-prefix"

bgp x
peer x.x.x.x route-policy example inbound

Instead of the PrefVal I suggest you to use the local preference value so the change could be propagated to the IBGP peers as well.
View more
  • x
  • convention:

Hi,

Currently, the peer route-policy command cannot be used to apply a route-policy to set preferences for BGP routes.
You can use the preference command +  route-policy to set preferences only for the routes received from peers, which meet the matching rules. The routes that do not meet the rules use the default preference.

For details,  please refer to:https://support.huawei.com/hedex/hdx.do?docid=EDOC1100101074&id=EN-US_CLIREF_0177115909&lang=en

View more
  • x
  • convention:

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.