Using IP aliasing a linux box has bound multiple ip addresses from the same subnet on the same NIC. So ifconfig shows up device eth0 with , eth0:1 with and eth0:2 with .
How does Linux determine the IP source address used for outgoing ip traffic? Is there a way to define what source IP address certain outgoing traffic should use?
255.255.255.255
for the IPs you don't want to be used as source addresses. That will make them seem "further" from the default gateway (and other machines on that subnet) and so they won't be preferred. See hereip route replace default via GATEWAY.IP.GOES.HERE src SOURCE.IP.GOES.HERE