Power & Source of Big Ideas

TCP socket programming by eth1(ping test)

Moderators: chensy, FATechsupport

Hello..

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.
Hello..
I have checked the followings.

ping 10.10.0.x and arp -a on the nanopi side

root@E3-RDP:/home/aircleaner/src/mbtcp_adt# arp -a
? (10.10.0.1) at 90:9f:33:a8:20:14 [ether] on eth0
? (10.10.0.175) at <incomplete> on eth1
? (10.10.0.186) at 60:a4:4c:35:1a:dd [ether] on eth0
? (10.10.0.173) at 28:d2:44:57:88:1a [ether] on eth0
? (10.10.0.173) at <incomplete> on eth1


In the case of the ping test by eth1, the other party's mac address is 'incomplete'.

And arp -a on the pc side

C:\Users\andy>arp -a
IP MAC ADDR Type
10.10.0.1 90-9f-33-a8-20-14 dynamic
10.10.0.171 ae-a1-99-48-86-79 dynamic
10.10.0.176 ae-a1-99-48-86-79 dynamic
10.10.0.186 60-a4-4c-35-1a-dd dynamic


The mac address is the same, IP 10.10.0.171 and 10.10.0.176

What should I check for debugging this problem?

Thanks

Who is online

In total there are 11 users online :: 0 registered, 0 hidden and 11 guests (based on users active over the past 5 minutes)
Most users ever online was 5185 on Wed Jan 22, 2020 1:44 pm

Users browsing this forum: No registered users and 11 guests