stupid question about OSPF cost and route preference

Eugene M. Zheganin emz at norma.perm.ru
Tue Apr 7 16:17:25 CEST 2020


On 07.04.2020 19:06, Ondrej Zajicek wrote:
> On Tue, Apr 07, 2020 at 06:41:37PM +0500, Eugene M. Zheganin wrote:
>> Hello.
>>
>> I have a bunch of birder routers, and the troublesome router is connected to
>> some of them via LAN and to some of them via WAN tunnels.
>>
>> For some reason it always chooses a WAN route, regardless of it's metric:
> Hello
>
> gif1 and vlan57 are in different areas, that is something that is likely
> relevant. What you get from 'show ospf state'?

Here it is:

===Cut===

bird> show ospf state

area 0.0.0.0

         router 192.168.55.254
                 distance 0
                 network 192.168.57.0/24 metric 11
                 stubnet 192.168.55.0/24 metric 11
                 xnetwork 172.16.0.36/30 metric 5111
                 xnetwork 172.16.0.44/30 metric 5111
                 external 0.0.0.0/0 metric2 10000
                 external 10.8.1.0/24 metric2 10000
                 external 10.8.1.1/32 metric2 10000
                 external 10.8.1.2/32 metric2 10000
                 external 10.9.0.0/24 metric2 10000 via 172.16.0.37
                 external 10.95.255.126/32 metric2 10000
                 external 172.16.0.36/30 metric2 10000
                 external 172.16.0.38/32 metric2 10000
                 external 172.16.0.44/30 metric2 10000
                 external 172.16.0.46/32 metric2 10000
                 external 192.168.55.0/24 metric2 10000
                 external 192.168.57.0/24 metric2 10000

         router 192.168.57.23
                 distance 11
                 network 192.168.57.0/24 metric 10

         router 192.168.57.24
                 distance 11
                 network 192.168.57.0/24 metric 10
                 external 0.0.0.0/0 metric2 10000
                 external 192.168.57.0/24 metric2 10000
                 external 192.168.60.1/32 metric2 10000
                 external 192.168.60.2/32 metric2 10000
                 external 192.168.60.3/32 metric2 10000

         router 192.168.57.254
                 distance 11
                 network 192.168.57.0/24 metric 10
                 xnetwork 172.16.0.44/30 metric 5121
                 xnetwork 172.16.0.56/30 metric 5121
                 xnetwork 172.16.0.64/30 metric 5121
                 xrouter 192.168.53.1 metric 10
                 external 0.0.0.0/0 metric2 10000
                 external 10.3.51.0/24 metric2 10000
                 external 10.3.60.0/24 metric2 10000
                 external 10.4.0.41/32 metric2 10000
                 external 10.4.0.42/32 metric2 10000
                 external 10.4.1.41/32 metric2 10000
                 external 10.4.1.42/32 metric2 10000
                 external 10.8.0.1/32 metric2 10000
                 external 10.8.0.2/32 metric2 10000
                 external 10.8.0.0/24 metric2 10000
                 external 10.46.0.0/24 metric2 10000
                 external 10.50.0.0/24 metric2 10000
                 external 10.50.3.0/24 metric2 10000
                 external 10.58.0.0/24 metric2 10000
                 external 10.60.0.0/24 metric2 10000
                 external 10.61.0.0/24 metric2 10000
                 external 10.62.0.0/24 metric2 10000
                 external 10.200.116.0/24 metric2 10000
                 external 10.201.255.1/32 metric2 10000
                 external 10.201.255.237/32 metric2 10000
                 external 10.201.255.238/32 metric2 10000
                 external 90.150.180.21/32 metric2 10000
                 external 172.16.0.5/32 metric2 10000
                 external 172.16.0.6/32 metric2 10000
                 external 172.16.0.57/32 metric2 10000
                 external 172.16.0.58/32 metric2 10000
                 external 172.16.0.67/32 metric2 10000
                 external 172.16.0.68/32 metric2 10000
                 external 172.16.1.1/32 metric2 10000
                 external 185.71.78.61/32 metric2 10000
                 external 185.71.78.62/32 metric2 10000
                 external 192.168.57.0/24 metric2 10000
                 external 192.168.58.1/32 metric2 10000
                 external 192.168.58.3/32 metric2 10000
                 external 192.168.59.0/24 metric2 10000 via 192.168.57.60
                 external 192.168.100.0/24 metric2 10000 via 192.168.57.60

         router 192.168.100.23
                 distance 21
                 network 192.168.100.0/24 metric 10
                 external 192.168.100.0/24 metric2 10000
                 external 192.168.122.0/24 metric2 10000

         router 192.168.100.254
                 distance 11
                 network 192.168.57.0/24 metric 10
                 network 192.168.100.0/24 metric 10
                 external 0.0.0.0/0 metric2 10000
                 external 10.101.0.0/16 metric2 10000
                 external 10.101.6.61/32 metric2 10000
                 external 10.101.6.62/32 metric2 10000
                 external 10.101.6.63/32 metric2 10000
                 external 10.101.21.0/24 metric2 10000
                 external 10.115.0.0/16 metric2 10000
                 external 10.121.10.0/24 metric2 10000
                 external 10.121.13.0/24 metric2 10000
                 external 10.0.0.0/8 metric2 10000 via 192.168.57.254
                 external 46.146.236.39/32 metric2 10000
                 external 46.146.236.53/32 metric2 10000
                 external 90.150.180.20/32 metric2 10000
                 external 109.194.148.199/32 metric2 10000
                 external 109.194.148.200/32 metric2 10000
                 external 109.194.158.2/32 metric2 10000
                 external 172.16.0.69/32 metric2 10000
                 external 172.16.0.70/32 metric2 10000
                 external 192.168.51.0/24 metric2 10000
                 external 192.168.51.1/32 metric2 10000
                 external 192.168.57.0/24 metric2 10000
                 external 192.168.59.0/24 metric2 10000
                 external 192.168.59.1/32 metric2 10000
                 external 192.168.100.254/32 metric2 10000
                 external 192.168.100.0/24 metric2 10000
                 external 192.168.0.0/16 metric2 10000 via 192.168.57.254

         network 192.168.57.0/24
                 dr 192.168.100.254
                 distance 11
                 router 192.168.100.254
                 router 192.168.57.254
                 router 192.168.57.23
                 router 192.168.57.24
                 router 192.168.55.254

         network 192.168.100.0/24
                 dr 192.168.100.254
                 distance 21
                 router 192.168.100.254
                 router 192.168.100.23

area 0.0.0.1

         router 192.168.55.254
                 distance 0
                 stubnet 172.16.0.36/30 metric 5111
                 stubnet 172.16.0.44/30 metric 5111
                 xnetwork 172.16.0.56/30 metric 5132
                 xnetwork 172.16.0.64/30 metric 5132
                 xnetwork 192.168.55.0/24 metric 11
                 xnetwork 192.168.57.0/24 metric 11
                 xnetwork 192.168.100.0/24 metric 21
                 xrouter 192.168.53.1 metric 21
                 xrouter 192.168.57.23 metric 11
                 xrouter 192.168.57.24 metric 11
                 xrouter 192.168.57.254 metric 11
                 xrouter 192.168.100.23 metric 21
                 xrouter 192.168.100.254 metric 11
                 external 0.0.0.0/0 metric2 10000
                 external 10.8.1.0/24 metric2 10000
                 external 10.8.1.1/32 metric2 10000
                 external 10.8.1.2/32 metric2 10000
                 external 10.9.0.0/24 metric2 10000 via 172.16.0.37
                 external 10.95.255.126/32 metric2 10000
                 external 172.16.0.36/30 metric2 10000
                 external 172.16.0.38/32 metric2 10000
                 external 172.16.0.44/30 metric2 10000
                 external 172.16.0.46/32 metric2 10000
                 external 192.168.55.0/24 metric2 10000
                 external 192.168.57.0/24 metric2 10000

other ASBRs

         router 192.168.53.1
                 external 0.0.0.0/0 metric2 10000
                 external 8.8.4.4/32 metric2 10000
                 external 10.95.255.254/32 metric2 10000
                 external 77.88.8.1/32 metric2 10000
                 external 80.78.96.1/32 metric2 10000
                 external 172.16.0.44/30 metric2 10000
                 external 172.16.0.45/32 metric2 10000
                 external 172.16.0.57/32 metric2 10000
                 external 172.16.0.56/30 metric2 10000
                 external 172.16.0.64/30 metric2 10000
                 external 192.168.53.0/24 metric2 10000
                 external 192.168.53.1/32 metric2 10000
                 external 192.168.53.10/32 metric2 10000
                 external 192.168.55.0/24 metric2 10000 via 172.16.0.46

===Cut===


> Where (which area) is
> 192.168.57.254?
It's in area 0, the "gw" router and 192.168.57.254 are connected via 
vlan interface over a 100 Mbit/s link.
> How internal routes for 192.168.57.254 looks if you
> enable/disable gif1?

Pretty much identical, because "gw" is locally connected to 192.168.57.0/24:


===Cut===

[root at gw /usr/local/etc]# birdc
BIRD 1.6.6 ready.
bird> show route for 192.168.57.254
192.168.57.0/24    dev vlan57 [direct1 2020-04-04] * (240)
                    dev vlan57 [ospfv4 18:26:04] I (150/11) 
[192.168.100.254]
[root at gw /usr/local/etc]# ifconfig gif1 down
[root at gw /usr/local/etc]# birdc
BIRD 1.6.6 ready.
bird> show route for 192.168.57.254
192.168.57.0/24    dev vlan57 [direct1 2020-04-04] * (240)
                    dev vlan57 [ospfv4 18:26:05] I (150/11) 
[192.168.100.254]

===Cut===


Thanks.

Eugene.



More information about the Bird-users mailing list