I am trying to enable Ethernet on my Android-7.1.2. Now, it can acquire ip address from DHCP server. ifconfig shows that the Ethernet port can receive lots of packets, but just sends a few out, as below:

  eth5      Link encap:Ethernet  HWaddr 00:04:9f:04:4d:51

  inet addr:  Bcast:  Mask:

  inet6 addr: fe80::204:9fff:fe04:4d51/64 Scope: Link


  RX packets:10513 errors:0 dropped:0 overruns:0 frame:0

  TX packets:22 errors:0 dropped:0 overruns:0 carrier:0

  collisions:0 txqueuelen:1000

  RX bytes:926773 TX bytes:2204


And ping -I eth5 can work:

layerscape:/ # ping -I eth5

PING ( from eth5: 56(84) bytes of data.

64 bytes from icmp_seq=1 ttl=64 time=0.345 ms

64 bytes from icmp_seq=2 ttl=64 time=0.354 ms

However, ping fails with:

layerscape:/ # ping

connect: Network is unreachable

And here is my route:

layerscape:/ # route -n

Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface   U     0      0        0 eth5

What am I losing?


Finally found the solution for this issue:

layerscape:/ # ip rule add from all lookup main pref 0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.