Hi,
How i can modify weight route from :
show ip route
To configure prefered route, or this is not the good way to configure prefered route.
If a check documentation i can see different way to modify route :
https://docs.vyos.io/en/equuleus/configuration/protocols/bgp.html
- Weight checkPrefer higher local weight routes to lower routes.
- Local preference checkPrefer higher local preference routes to lower.
- Local route checkPrefer local routes (statics, aggregates, redistributed) to received routes.
- AS path length checkPrefer shortest hop-count AS_PATHs.
Thanks.
I recommend to use “local-preference”
You need create a prefix-list (not necessary) , route-map
set desired “local-pref” for match prefix-list
Permit/deny others prefixes
Attach route-map to neighbor for “import”
My configuration.
GNS 3 LAB :
CONFIGURATION EXTRACT :
set policy prefix-list AS67690-OUT rule 1 action ‘permit’
set policy prefix-list AS67690-OUT rule 1 ge ‘24’
set policy prefix-list AS67690-OUT rule 1 prefix ‘0.0.0.0/0’
set policy route-map AS67690-OUT rule 1 action ‘permit’
set policy route-map AS67690-OUT rule 1 match ip address prefix-list ‘AS67690-OUT’
set policy route-map AS67690-OUT rule 1 set local-preference ‘60000’
set policy route-map AS67690-OUT rule 1 set metric ‘60000’
set policy route-map AS67690-OUT rule 1 set weight ‘60000’
set protocols bgp 67690 neighbor 102.102.102.5 address-family ipv4-unicast route-map import ‘AS67690-OUT’
set protocols bgp 67690 neighbor 105.105.105.8 address-family ipv4-unicast route-map import ‘AS67690-OUT’
Router Connected to this one :