Martin, if you do not have a nat, it wont replace the source address. you are getting the standard behaviour as far as I know. regards, 2017-06-15 11:02 GMT-03:00 Martin T <m4rtntns@xxxxxxxxx>: > Hi, > > I have a server with two networks interfaces: eth0(IPv4 address > 10.10.10.73) and eth1(IPv4 address 192.168.1.16). In addition, there > is a following static route in this server "main" table: > > # ip route show 172.16.0.0/24 > 172.16.0.0/24 via 192.168.1.252 dev eth1 src 192.168.1.16 > # > > Now when I send an ICMP "echo request" message from 172.16.0.0/24 > network to IP address 10.10.10.73, then it is sent out via eth1 > interface because of this static route. According to "ip route get > 172.16.0.0" the source IP should be 192.168.1.16. However, when I > tcpdump ICMP traffic on eth1 interface, then I can see that source IP > is actually 10.10.10.73. Why is that so? When I read the > http://linux-ip.net/html/routing-saddr-selection.html, then it says > that "kernel will use the src hint from the chosen route path" which > in this case is 192.168.1.16. Or is the first rule that if it is a > reply package, then source IP is always the one which initial package > was addressed to? > > > thanks, > Martin > -- > To unsubscribe from this list: send the line "unsubscribe lartc" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe lartc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html