zephyriot / zep-jira14

0 stars 0 forks source link

echo_client display port unreachable #1347

Closed nashif closed 7 years ago

nashif commented 7 years ago

Reported by jiequan wu:

Configuration

x86 Bug detailed description =================== Echo_client doesn't response ipv4 ping request affer enable ipv4 Steps to Reproduce ================== 2. cd samples/net/echo_client 3. Enable ipv4 and disable ipv6 prj_arduino_101.conf: CONFIG_NET_IPV4=y CONFIG_NET_IPV6=n 4. make pristine && make BOARD=arduino_101 flash 5. Connect Arduino to the LAN with ENC28J60 6. Set ipv4 address on Ubuntu $ sudo ifconfig eth1 192.0.2.2 7. open serial port 8. ping 192.0.2.1 Expected Result ============= Echo_client can response ipv4 ping request affer enable ipv4 Actual Result ========== Echo_client doesn't response ipv4 ping request affer enable ipv4 (Imported from Jira ZEP-1476)
nashif commented 7 years ago

by jiequan wu:

nashif commented 7 years ago

by Tomasz Bursztyka:

If you wish to test ping on ipv4 do not use echo-client. Better use dhcpv4-client actually. Have you followed: https://wiki.zephyrproject.org/view/Enc28j60_controller ?

That said, I don't get enc28j60 working for now on a101.

nashif commented 7 years ago

by Tomasz Bursztyka:

Please change your title, it's not an IPv4/net stack issue. It's ENC28J60 which does not work.

I tried dhcpv4-client on frdm-k64, it got an ip, and ping works perfectly fine there.

Same setup just does not work on enc28j60. It' takes ages for a101 to printout anything, and basically it does not TX anything (wireshark shows nothing), and thus never receives anything either.

Adding Juan Manuel Cruz Alcaraz to take a look at his driver.

nashif commented 7 years ago

by jiequan wu:

Today,I test echo_client again. The ping ipv4 is ok. But wireshark shows port unreachbale(192.0.2.2->192.0.2.1).The wireshark file is attached.

nashif commented 7 years ago

by jiequan wu:

commit id :91fd2929f47d3f29dbedbe57209bf9ea0b1fdd6f && branch :net

nashif commented 7 years ago

by Flavio Santes:

I just tested the dns_client app with IPv4 on A101/ENC, the dns_client is just another "test-case for the IP stack". The app is working fine on top of master and net branches.

The test scenario was: 1) the dns_client app sending queries to the DNS server and 2) a Linux host pinging the A101/ENC and answering the DNS queries concurrently.

Wireshark output looks fine and so far I don't observe any issue.

However, I will conduct some stress tests on the dns_client app to discard any issues with the ENC driver.

nashif commented 7 years ago

by jiequan wu:

I also test dns_client with ipv4 on A101/ENC28J60 is ok. And wireshark shows "MDNS" protocol,which is normal?

But test the echo_client with ipv4 on A101/ENC28J60 shows log below: [echo-client] [INF] udp_sent: IPv4: sent 636 bytes [echo-client] [ERR] wait_reply: wait_reply returned on time out [echo-client] [DBG] send_ipv4: (0xa80072c0): Waited 636 bytes but did not receive them. [echo-client] [DBG] send_ipv4: (0xa80072c0): Waiting IPv4 packet [echo-client] [INF] udp_sent: IPv4: sent 90 bytes [echo-client] [ERR] wait_reply: wait_reply returned on time out [echo-client] [DBG] send_ipv4: (0xa80072c0): Waited 90 bytes but did not receive them. [echo-client] [DBG] send_ipv4: (0xa80072c0): Waiting IPv4 packet [echo-client] [INF] udp_sent: IPv4: sent 640 bytes [echo-client] [ERR] wait_reply: wait_reply returned on time out [echo-client] [DBG] send_ipv4: (0xa80072c0): Waited 640 bytes but did not receive them. [echo-client] [DBG] send_ipv4: (0xa80072c0): Waiting IPv4 packet [echo-client] [INF] udp_sent: IPv4: sent 758 bytes And ping IPV4 is ok. The wireshark shows port unreachable.

nashif commented 7 years ago

by Flavio Santes:

In Wireshark, decode UDP port 5353 as "DNS" otherwise it is interpreted as Multicast DNS.

nashif commented 7 years ago

by Tomasz Bursztyka:

ipv4 ping works.

echo_client alone is obviously not going to work: it needs echo_server running on another end. Which end, if present and if not running echo_server is going to reply "port unreachable" through icmpv4. This is fully nominal.

Thus, do we still have valid bug here or not? I don't think so.

nashif commented 7 years ago

by Mark Linkmeyer:

Correcting the priority field