Wierd dual ethernet ping problem

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Not sure if this is a kernel issue (might be Buildroot ?), but it seems quite fundamental, so here goes:-

On our embedded Linux platform (roughly based on the NGW100 dev kit), we have 2 ethernet ports (eth0 and eth1). These are configured (via /etc/network/interfaces) as follows:-

auto lo eth0 eth1
iface lo inet loopback
iface eth0 inet static
address 10.0.101.2
netmask 255.255.0.0
gateway 10.0.0.1
iface eth1 inet static
address 169.254.9.1
netmask 255.255.0.0
gateway 169.254.0.1

If I connect a cable *only* to eth0, from within the unit I can ping the router (10.0.0.1) and I can't ping anything on the 169.254 subnet, as I would expect (since there's no cable connected to eth1).

*BUT* from my PC (running Ubuntu), I can ping the embedded unit on either 10.0.101.2 *or* 169.254.9.1, !?!?!?!

Surely I shouldn't be able to do that ?

Using wireshark, I can see that the ping to the 169.254 address is getting replies from eth0, since the mac address in the ping reply packet matches eth0.

Here's the routing table, if that helps.

# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         169.254.0.1     0.0.0.0         UG    0      0        0 eth1
0.0.0.0         10.0.0.1        0.0.0.0         UG    0      0        0 eth0
10.0.0.0        0.0.0.0         255.255.0.0     U     0      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth1

If I change the eth1 ip to (say) 111.111.111.111, then the crossover ping stops.

Can you shed any light on this ?

Is it something to do with the magic "169.254" local ip address range ?

Cheers
Mark J.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Mark,

I am having the same problem. I would like to know if you resolved it and may I know how?.

Regards,

john

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

mpfjackson wrote:
[...]
If I change the eth1 ip to (say) 111.111.111.111, then the crossover ping stops.

Can you shed any light on this ?

Is it something to do with the magic "169.254" local ip address range ?

Cheers
Mark J.

Take a look at https://en.wikipedia.org/wiki/Li...

I'm not an expert on link-local addresses but I suspect there's a conflict here.

From the article:
"RFC 3927 warns against the simultaneous use of addresses of different scope,[3] such as configuring link-local addresses as well as globally routable addresses on the same host"