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)?
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.
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.
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.
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."