#StackBounty: #linux-kernel #ip #routing Understand when in the day of a life of an ICMP "echo reply" message "ip rule&q…

Bounty: 100

I have a PC with two interfaces: eth0(IP address 192.168.1.16) and eth2(IP address 10.10.10.73). In addition, I have a host route in this PC in main table which says that if destination address is 172.16.1.1, then use eth0 interface.

Now when I send ICMP “echo request” from 172.16.1.1 to 10.10.10.73(eth2 interface), then ICMP “echo reply” is sent out from eth0(I have RPF disabled) using 192.168.1.16 as a source IP. This all is as expected because of this host route.

However, when I add an ip rule with selector from 10.10.10.73 and action lookup test right after rule number 0 and table test contains simply a default route using eth2 interface, then ICMP “echo reply” is sent out from eth2 interface.

I’m confused how can this from 10.10.10.73 selector match. When in the day of a life of an ICMP “echo reply” message the source IP was 10.10.10.73 so that match occurred?


Get this bounty!!!