I have a strange problem.
One of my routers seems to prefer OSPF route over /32 static interface route. I have such route configured
ip route 172.20.240.19 255.255.255.255 GigabitEthernet0/1/0.225
but sh ip route 172.20.240.19 shows:
Routing entry for 172.20.240.16/29
Known via "ospf 1", distance 110, metric 200
Tag 99, type extern 2, forward metric 1
Last update from 172.20.0.7 on FastEthernet0/0.215, 00:22:32 ago
Routing Descriptor Blocks:
* 172.20.0.7, from 172.20.254.7, 00:22:32 ago, via FastEthernet0/0.215
Route metric is 200, traffic share count is 1
Route tag 99
What could cause this ?
Is it possible that static routes without concrete next hop are not preferred over shorter prefixes received from OSPF ?
when you configure a static route specifying a LAN interface as outgoing interface you are relying on proxy-arp on the other routers in the LAN segment.
proxy-arp is the willingness to answer an ARP request for an ip address that is not part of the IP subnet.
if the router cannot find a valid IP next-hop and MAC address it cannot send valid frames out the interface and so it cannot use the static route.
you can check the other routers using
sh ip int typex/y | incr proxy
there is a line that tells you if the proxy ARP is enabled or not.
Hope to help