I am trying to enable the 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:
layerscape:/ # ifconfig lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope: Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 TX bytes:0 eth5 Link encap:Ethernet HWaddr 00:04:9f:04:4d:51 inet addr:10.193.20.44 Bcast:10.193.20.255 Mask:255.255.255.0 inet6 addr: fe80::204:9fff:fe04:4d51/64 Scope: Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:10951 errors:0 dropped:0 overruns:0 frame:0 TX packets:24 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:985384 TX bytes:2400 Memory:1aea000-1aeafff And "ping -I eth5 10.193.20.64" can work: layerscape:/ # ping -I eth5 10.193.20.254 PING 10.193.20.254 (10.193.20.254) from 10.193.20.44 eth5: 56(84) bytes of data. 64 bytes from 10.193.20.254: icmp_seq=1 ttl=255 time=6.86 ms 64 bytes from 10.193.20.254: icmp_seq=2 ttl=255 time=2.30 ms However, "ping 10.193.20.64" fails with: layerscape:/ # ping 10.193.20.64 connect: Network is unreachable And here is my route information: layerscape:/ # route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 10.193.20.254 0.0.0.0 UG 0 0 0 eth5 10.193.20.0 0.0.0.0 255.255.255.0 U 0 0 0 eth5 layerscape:/ # ip route list default via 10.193.20.254 dev eth5 10.193.20.0/24 dev eth5 proto kernel scope link src 10.193.20.44 layerscape:/ # ip link list 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ether 00:04:9f:04:4d:4c brd ff:ff:ff:ff:ff:ff 3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ether 00:04:9f:04:4d:4d brd ff:ff:ff:ff:ff:ff 4: eth2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ether 00:04:9f:04:4d:4e brd ff:ff:ff:ff:ff:ff 5: eth3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ether 00:04:9f:04:4d:4f brd ff:ff:ff:ff:ff:ff 6: eth4: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ether 00:04:9f:04:4d:50 brd ff:ff:ff:ff:ff:ff 7: eth5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000 link/ether 00:04:9f:04:4d:51 brd ff:ff:ff:ff:ff:ff 8: eth6: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ether 00:04:9f:04:4d:52 brd ff:ff:ff:ff:ff:ff 9: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/sit 0.0.0.0 brd 0.0.0.0 10: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN mode DORMANT group default qlen 1000 link/ether 00:0e:8e:5a:8d:7a brd ff:ff:ff:ff:ff:ff Please help see why "ping <ip>" fails, and why packets cannot go out without specified ethx? Thank you. -- -- unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting --- You received this message because you are subscribed to the Google Groups "android-porting" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-porting+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.