| | 57 | === Multihomed hosts === |
| | 58 | |
| | 59 | Linux doesn't allow setting more than one route with the same metric that point to the same network. To work around this issue and still have kind of deterministic setup we recommend setting up the routes like this: |
| | 60 | |
| | 61 | {{{ |
| | 62 | ip route add 169.254.0.0/16 dev realtek0 metric $((1000 + `cat /sys/class/net/realtek0/ifindex`)) scope link |
| | 63 | ip route add default dev realtek0 metric $((1000 + `cat /sys/class/net/realtek0/ifindex`)) scope link |
| | 64 | }}} |
| | 65 | |
| | 66 | This will make sure that each route will get its own unique metric and the routes don't conflict anymore. Of course, you may reach ipv4ll adresses only on one of those interface at a time, the one one with the lowest ifindex. |
| | 67 | |