How to configure a Linux machine that has a global IP address so it can also talk to link-local devices on that network:
Before: No route to link-local destinations is defined:
[root@Rose ~]# route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 206.111.147.146 * 255.255.255.255 UH 0 0 0 eth1 206.111.147.144 * 255.255.255.240 U 0 0 0 eth1 127.0.0.0 * 255.0.0.0 U 0 0 0 lo default router.bolo.net 0.0.0.0 UG 0 0 0 eth1
And ping to a link-local address fails:
[root@Rose ~]# ping stylus900.local. PING stylus900.local (169.254.0.124) from 206.111.147.146 : 56(84) bytes of data. --- stylus900.local ping statistics --- 3 packets transmitted, 0 packets received, 100% packet loss
Now, add the route:
[root@Rose ~]# route add -net 169.254.0.0/16 dev eth1
Now the route to link-local destinations is in the table:
[root@Rose ~]# route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 206.111.147.146 * 255.255.255.255 UH 0 0 0 eth1 206.111.147.144 * 255.255.255.240 U 0 0 0 eth1 169.254.0.0 * 255.255.0.0 U 0 0 0 eth1 127.0.0.0 * 255.0.0.0 U 0 0 0 lo default router.bolo.net 0.0.0.0 UG 0 0 0 eth1
And ping to a link-local address succeeds:
[root@Rose ~]# ping stylus900.local. PING stylus900.local (169.254.0.124) from 206.111.147.146 : 56(84) bytes of data. 64 bytes from 169.254.0.124: icmp_seq=0 ttl=255 time=6.2 ms 64 bytes from 169.254.0.124: icmp_seq=1 ttl=255 time=3.5 ms 64 bytes from 169.254.0.124: icmp_seq=2 ttl=255 time=6.9 ms --- stylus900.local ping statistics --- 3 packets transmitted, 3 packets received, 0% packet loss round-trip min/avg/max = 3.5/5.5/6.9 ms