Could you help me please realize which route will be choose for IP 10.1.1.1 and explain why.
Routing entry for 10.1.1.0/24
Known via “ospf 999”, distance 110, metric 20, type extern 2, forward metric 101
Last update from 172.16.0.5 on Vlan4090, 04:20:16 ago
Routing Descriptor Blocks:
172.16.0.5, from 192.168.1.1, 04:20:16 ago, via Vlan4090
Route metric is 20, traffic share count is 1
172.16.0.4, from 192.168.1.1, 04:20:16 ago, via Vlan4090
Route metric is 20, traffic share count is 1
Routing entry for 10.1.1.0/25
Known via “bgp 12345”, distance 20, metric 0
Tag 54321, type external
Last update from 172.16.55.5 7w0d ago
Routing Descriptor Blocks:
172.16.55.5, from 192.168.10.99, 7w0d ago
Route metric is 0, traffic share count is 1
AS Hops 1
Route tag 54321
MPLS label: none
This is because the AD (Administrative distance) which is called “Distance” in Router OS is lower in the BGP route so it over rules the OSPF routes . The administrative distances is per default set in stone by the RFC.
Like a static router has an AD of 1 And a directly connected has an AD of 0.
Edit: 10.1.1.0/25 is a more specific route in the BGP table. The most specfic route will always be chosen over any other route.
Though both routes will still be active.