# config router access-listIn the above example, same route 10.10.10.0/24 is being received from two BGP peers and administrative distance being set is different.
edit "int-routes"
# config rule
edit 1
set prefix 10.10.10.0 255.255.255.0
set exact-match enable
end
end
# config router BGP
# config admin-distance
edit 1
set neighbour-prefix 192.168.79.254 255.255.255.255
set route-list "int-routes"
set distance 110
next
edit 2
set neighbour-prefix 192.168.239.254 255.255.255.255
set route-list "int-routes"
set distance 120
end
end
# get router info BGP network 10.10.10.0/24As can be seen from the above output, the second route is selected as the best.
BGP routing table entry for 10.10.10.0/24
65002 65002 65002 65001
192.168.79.254 from 192.168.79.254 (1.1.1.1)
Origin IGP metric 10, localpref 99, valid, external
Community: 3257:2170
Last update: Wed Jun 24 14:07:38 2020
65000 65000 65001
192.168.239.254 from 192.168.239.254 (2.2.2.1)
Origin IGP metric 10, localpref 100, valid, external, best
Last update: Wed Jun 24 14:07:40 2020
# get router info routing-table details | grep 10.10.The route selection process is as follow:
B 10.10.10.0/24[120/10] via 192.168.239.254, ext_vpn
Related Articles
Troubleshooting Tip: To prefer the specific OSPF route over EBGP
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.