TCP socket programming by eth1(ping test)
Posted: Tue Feb 11, 2020 1:05 am
Hello..
I use the Nano-PI Neo with 2 ethernet interface, eth0 / eth1(usb to ethernet).
The ping test using eth0 is ok.
But the ping test using the eth1 is fail
And the ping test on my pc(10.10.0.173) is ok, to 10.10.0.176(eth1)
What I should check to debug the eth1 ping test fail.
I want to use the eth1 for a TCP client.
Thanks.
I use the Nano-PI Neo with 2 ethernet interface, eth0 / eth1(usb to ethernet).
root@E3-RDP:~# ifconfig
eth0 Link encap:Ethernet HWaddr ae:a1:99:48:86:79
inet addr:10.10.0.171 Bcast:10.10.0.255 Mask:255.255.255.0
inet6 addr: fe80::aca1:99ff:fe48:8679/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:532 errors:0 dropped:0 overruns:0 frame:0
TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:36510 (36.5 KB) TX bytes:972 (972.0 B)
Interrupt:114
eth1 Link encap:Ethernet HWaddr 00:0e:c6:87:72:01
inet addr:10.10.0.176 Bcast:10.10.0.255 Mask:255.255.255.0
inet6 addr: fe80::20e:c6ff:fe87:7201/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:94 (94.0 B)
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:16436 Metric:1
RX packets:44 errors:0 dropped:0 overruns:0 frame:0
TX packets:44 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3336 (3.3 KB) TX bytes:3336 (3.3 KB)
The ping test using eth0 is ok.
root@E3-RDP:~# ping 10.10.0.173
PING 10.10.0.173 (10.10.0.173) 56(84) bytes of data.
64 bytes from 10.10.0.173: icmp_seq=1 ttl=128 time=2.40 ms
64 bytes from 10.10.0.173: icmp_seq=2 ttl=128 time=0.327 ms
64 bytes from 10.10.0.173: icmp_seq=3 ttl=128 time=0.459 ms
64 bytes from 10.10.0.173: icmp_seq=4 ttl=128 time=0.727 ms
64 bytes from 10.10.0.173: icmp_seq=5 ttl=128 time=0.403 ms
64 bytes from 10.10.0.173: icmp_seq=6 ttl=128 time=0.528 ms
^C
--- 10.10.0.173 ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5000ms
rtt min/avg/max/mdev = 0.327/0.808/2.406/0.725 m
But the ping test using the eth1 is fail
root@E3-RDP:~# ping -I eth1 10.10.0.173
PING 10.10.0.173 (10.10.0.173) from 10.10.0.176 eth1: 56(84) bytes of data.
From 10.10.0.176 icmp_seq=1 Destination Host Unreachable
From 10.10.0.176 icmp_seq=2 Destination Host Unreachable
From 10.10.0.176 icmp_seq=3 Destination Host Unreachable
From 10.10.0.176 icmp_seq=4 Destination Host Unreachable
From 10.10.0.176 icmp_seq=5 Destination Host Unreachable
From 10.10.0.176 icmp_seq=6 Destination Host Unreachable
^C
--- 10.10.0.173 ping statistics ---
7 packets transmitted, 0 received, +6 errors, 100% packet loss, time 6007ms
pipe 3
And the ping test on my pc(10.10.0.173) is ok, to 10.10.0.176(eth1)
C:\Users\andy>ping 10.10.0.176
PING 10.10.0.176 (10.10.0.176) 56(84) bytes of data.
64 bytes from 10.10.0.176: icmp_seq=1 ttl=128 time=2.40 ms
64 bytes from 10.10.0.176: icmp_seq=2 ttl=128 time=0.327 ms
64 bytes from 10.10.0.176: icmp_seq=3 ttl=128 time=0.459 ms
64 bytes from 10.10.0.176: icmp_seq=4 ttl=128 time=0.727 ms
64 bytes from 10.10.0.176: icmp_seq=5 ttl=128 time=0.403 ms
64 bytes from 10.10.0.176: icmp_seq=6 ttl=128 time=0.528 ms
What I should check to debug the eth1 ping test fail.
I want to use the eth1 for a TCP client.
Thanks.