From mboxrd@z Thu Jan 1 00:00:00 1970 From: Brian Burch Date: Fri, 20 Dec 2013 18:26:58 +0000 Subject: Re: How to override the default source ipv4 address on packets originating from a router Message-Id: <52B48BF2.7070300@pingtoo.com> List-Id: References: <52B43271.7040807@PingToo.com> In-Reply-To: <52B43271.7040807@PingToo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lartc@vger.kernel.org On 20/12/13 13:11, Anton 'EvilMan' Danilov wrote: > Hello. > What's about 'ip route get from ' command? Thanks very much for responding Anton. By now you have probably read the responses from Joel and Erik, who both state categorically that the source address for packets originating on the host is not selected until /after/ the outbound route has been determined. This fact explains why "ip route get to 163.1.221.67" returns the identical result no matter whether I omit the "from", or use "from 217.154.193.209", or use "from 172.16.101.2". In every case the route returned is "via 172.16.101.1" as expected, but in every case the source address is that of the eth0 interface 172.16.101.2. I have more to say, but will do it by replying directly to Joel and Eric's suggestions. Thanks again, Brian