I have this is my routing table (in that order):
10.3.68.0/22 via 172.16.100.9 dev vlan4 10.3.68.0/22 dev eth3 proto kernel scope link src 10.3.69.254
eth3 has ip
Why does Linux choose to go through the
172.16.100.9 gateway to access the
10.3.68.0/22 subnet (thus not trying direct link)?
I tested with
ip route get 10.3.68.123 for example. It says it will go through
172.16.100.9, and in practice, it does.
It only says that it will try the link local routing when I ask for
10.3.68.0 ("network" address),
10.3.71.254 (broadcast), or
10.3.69.254 (itself). I think this is because these 3 cases are specifically handled by the higher priority
local table (
ip route show table local).
Anyway, why does Linux consider the first route as the higher priority route?