Sign up here and you can log into the forum!

Strange networking issue (can ping, cannot telnet/ssh/ftp)

General WDLXTV forum

Strange networking issue (can ping, cannot telnet/ssh/ftp)   

Postby damjanev » Sat Jan 09, 2016 4:55 pm

Hi there.

I joined the WDLXTV club quite late :-| Is there anyone listening to this frequency?

After many years of owning a Gen1, i finally decided to use WDLXTV, mostly for the networking part, in order to upload new content to the HDD without disconnecting it from the player.

Flashed the firmware without any issues. The USB Ethernet device (ASIX based) didn't want to cooperate at first, but after using asix-gigabit-drivers.app.bin it started blinking. DHCP lease was obtained from the router (confirmed, it reports a hostname of wdtv). Next step: ping. It works, huraaay. Next step: telnet. The screen is cleared, indicating that the connection is established, but no login prompt. Same with ftp. It says connected, but does not continue.

Code: Select all
C:\Users\damjanev>ftp 192.168.100.11
Connected to 192.168.100.11.
   ...some time passes by, then:
Connection closed by remote host.


Installed dropbear-ssh.app.bin, but no progress. Similar behavior.

Fired up Wireshark to sniff on the network traffic between my laptop and the wdtv. The ICMP (ping) traffic appears normal, and so is the ARP traffic. For the TCP traffic (FTP, Telnet, SSH), the 3-way handshake completes without problem, but the subsequent traffic is sent by the wdtv, captured on the network sniff, but is doesn't reach the client application. The receipt of the packet isn't ACKed, so the WDTV is re-transmiting it.

The same behavior is seen using two different Windows computers (Windows 8 laptop and Windows 7 desktop) as well as iOS (iPhone) telnet/ssh clients.

Here is the text export of the network capture of one FTP session.

Code: Select all
No.     Time           Source                Destination           Protocol Length Info
     14 35.157278000   192.168.100.6         192.168.100.11        TCP      66     57358→21 [SYN] Seq=0 Win=8192 Len=0 MSS=1460 WS=1 SACK_PERM=1

Frame 14: 66 bytes on wire (528 bits), 66 bytes captured (528 bits) on interface 0
Ethernet II, Src: IntelCor_5e:ac:54 (80:19:34:5e:ac:54), Dst: AsixElec_8f:0f:eb (00:0e:c6:8f:0f:eb)
Internet Protocol Version 4, Src: 192.168.100.6 (192.168.100.6), Dst: 192.168.100.11 (192.168.100.11)
Transmission Control Protocol, Src Port: 57358 (57358), Dst Port: 21 (21), Seq: 0, Len: 0

No.     Time           Source                Destination           Protocol Length Info
     15 35.162196000   192.168.100.11        192.168.100.6         TCP      66     21→57358 [SYN, ACK] Seq=0 Ack=1 Win=5840 Len=0 MSS=1460 SACK_PERM=1 WS=4

Frame 15: 66 bytes on wire (528 bits), 66 bytes captured (528 bits) on interface 0
Ethernet II, Src: AsixElec_8f:0f:eb (00:0e:c6:8f:0f:eb), Dst: IntelCor_5e:ac:54 (80:19:34:5e:ac:54)
Internet Protocol Version 4, Src: 192.168.100.11 (192.168.100.11), Dst: 192.168.100.6 (192.168.100.6)
Transmission Control Protocol, Src Port: 21 (21), Dst Port: 57358 (57358), Seq: 0, Ack: 1, Len: 0

No.     Time           Source                Destination           Protocol Length Info
     16 35.162461000   192.168.100.6         192.168.100.11        TCP      54     57358→21 [ACK] Seq=1 Ack=1 Win=8192 Len=0

Frame 16: 54 bytes on wire (432 bits), 54 bytes captured (432 bits) on interface 0
Ethernet II, Src: IntelCor_5e:ac:54 (80:19:34:5e:ac:54), Dst: AsixElec_8f:0f:eb (00:0e:c6:8f:0f:eb)
Internet Protocol Version 4, Src: 192.168.100.6 (192.168.100.6), Dst: 192.168.100.11 (192.168.100.11)
Transmission Control Protocol, Src Port: 57358 (57358), Dst Port: 21 (21), Seq: 1, Ack: 1, Len: 0

No.     Time           Source                Destination           Protocol Length Info
     17 35.178271000   192.168.100.11        192.168.100.6         FTP      252    Response: 220---------- Welcome to Pure-FTPd ----------

Frame 17: 252 bytes on wire (2016 bits), 252 bytes captured (2016 bits) on interface 0
Ethernet II, Src: AsixElec_8f:0f:eb (00:0e:c6:8f:0f:eb), Dst: IntelCor_5e:ac:54 (80:19:34:5e:ac:54)
Internet Protocol Version 4, Src: 192.168.100.11 (192.168.100.11), Dst: 192.168.100.6 (192.168.100.6)
Transmission Control Protocol, Src Port: 21 (21), Dst Port: 57358 (57358), Seq: 1, Ack: 1, Len: 198
File Transfer Protocol (FTP)
    220---------- Welcome to Pure-FTPd ----------\r\n
    220-You are user number 1 of 50 allowed.\r\n
    220-Local time is now 23:59. Server port: 21.\r\n
    220 You will be disconnected after 15 minutes of inactivity.\r\n

No.     Time           Source                Destination           Protocol Length Info
     18 38.180031000   192.168.100.11        192.168.100.6         FTP      252    [TCP Retransmission] Response: 220---------- Welcome to Pure-FTPd ----------

Frame 18: 252 bytes on wire (2016 bits), 252 bytes captured (2016 bits) on interface 0
Ethernet II, Src: AsixElec_8f:0f:eb (00:0e:c6:8f:0f:eb), Dst: IntelCor_5e:ac:54 (80:19:34:5e:ac:54)
Internet Protocol Version 4, Src: 192.168.100.11 (192.168.100.11), Dst: 192.168.100.6 (192.168.100.6)
Transmission Control Protocol, Src Port: 21 (21), Dst Port: 57358 (57358), Seq: 1, Ack: 1, Len: 198
File Transfer Protocol (FTP)
    220---------- Welcome to Pure-FTPd ----------\r\n
    220-You are user number 1 of 50 allowed.\r\n
    220-Local time is now 23:59. Server port: 21.\r\n
    220 You will be disconnected after 15 minutes of inactivity.\r\n

No.     Time           Source                Destination           Protocol Length Info
     19 44.180208000   192.168.100.11        192.168.100.6         FTP      252    [TCP Retransmission] Response: 220---------- Welcome to Pure-FTPd ----------

Frame 19: 252 bytes on wire (2016 bits), 252 bytes captured (2016 bits) on interface 0
Ethernet II, Src: AsixElec_8f:0f:eb (00:0e:c6:8f:0f:eb), Dst: IntelCor_5e:ac:54 (80:19:34:5e:ac:54)
Internet Protocol Version 4, Src: 192.168.100.11 (192.168.100.11), Dst: 192.168.100.6 (192.168.100.6)
Transmission Control Protocol, Src Port: 21 (21), Dst Port: 57358 (57358), Seq: 1, Ack: 1, Len: 198
File Transfer Protocol (FTP)
    220---------- Welcome to Pure-FTPd ----------\r\n
    220-You are user number 1 of 50 allowed.\r\n
    220-Local time is now 23:59. Server port: 21.\r\n
    220 You will be disconnected after 15 minutes of inactivity.\r\n


Any ideas?
damjanev
n00b
 
Posts: 12
Joined: Sat Jan 09, 2016 8:34 am
Location: Skopje, Macedonia

Re: Strange networking issue (can ping, cannot telnet/ssh/ft   

Postby mad_ady » Wed Jan 13, 2016 1:26 am

Yup, we're still here (what's left of us) :)

I don't have a Gen1, but based on your capture, I'd say it works correctly. I don't know why the traffic doesn't reach your client application - looks like a windows issue to me. You should try a different client system (e.g. FTP/shell from a phone) or boot a linux live CD on your PC and try again.
User avatar
mad_ady
Developer
 
Posts: 4520
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: Strange networking issue (can ping, cannot telnet/ssh/ft   

Postby damjanev » Wed Jan 13, 2016 2:19 am

mad_ady wrote:Yup, we're still here (what's left of us) :)

I don't have a Gen1, but based on your capture, I'd say it works correctly. I don't know why the traffic doesn't reach your client application - looks like a windows issue to me. You should try a different client system (e.g. FTP/shell from a phone) or boot a linux live CD on your PC and try again.


Yes, based on the network capture, the wdtv sends replies and should work. The problem is that those replies are not ACKed and not received by the application (ftp client), so the TCP stack on the wdtv retransmits until the connection timeouts. I tried with a phone with same results, but no network capture is available on iOS (telnet/ssh).

I will try with a Live CD Linux and provide feedback.
damjanev
n00b
 
Posts: 12
Joined: Sat Jan 09, 2016 8:34 am
Location: Skopje, Macedonia

Re: Strange networking issue (can ping, cannot telnet/ssh/ft   

Postby mad_ady » Wed Jan 13, 2016 2:29 am

Don't do the packet capture on the phone - just try to connect - but I expect it doesn't work by your account. It's indeed strange. Can you share a pcap file?
User avatar
mad_ady
Developer
 
Posts: 4520
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: Strange networking issue (can ping, cannot telnet/ssh/ft   

Postby damjanev » Thu Jan 14, 2016 3:27 pm

Update.
Tried both telnet and ssh from the iPhone. No response.
Booted Ubuntu off a USB and did telnet, ftp and ping. Same result as on Windows. Responds to ping, applications connect but don't get the responses.

Code: Select all
ubuntu@ubuntu:~$ telnet 192.168.100.11
Trying 192.168.100.11...
Connected to 192.168.100.11.
Escape character is '^]'.
^]

telnet> quit
Connection closed.
ubuntu@ubuntu:~$ ftp 192.168.100.11
Connected to 192.168.100.11.
^C
ubuntu@ubuntu:~$ ping 192.168.100.11
PING 192.168.100.11 (192.168.100.11) 56(84) bytes of data.
64 bytes from 192.168.100.11: icmp_seq=1 ttl=64 time=4.49 ms
64 bytes from 192.168.100.11: icmp_seq=2 ttl=64 time=4.09 ms
64 bytes from 192.168.100.11: icmp_seq=3 ttl=64 time=4.05 ms
64 bytes from 192.168.100.11: icmp_seq=4 ttl=64 time=4.12 ms
64 bytes from 192.168.100.11: icmp_seq=5 ttl=64 time=4.29 ms
^C
--- 192.168.100.11 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4005ms
rtt min/avg/max/mdev = 4.051/4.211/4.495/0.184 ms
ubuntu@ubuntu:~$


I have .pcap file available. Is there a way to post it as an attachment in the forum?

Do you think that this network card will have better driver suport? (http://www.anhoch.com/product/37843/usb-to-rj-45-fast-ethernet-adapter-nic-u2). It's RTL8152 based.
damjanev
n00b
 
Posts: 12
Joined: Sat Jan 09, 2016 8:34 am
Location: Skopje, Macedonia

Re: Strange networking issue (can ping, cannot telnet/ssh/ft   

Postby mad_ady » Fri Jan 15, 2016 12:14 am

I have no idea what's going on... You can try to upload the pcap to a file sharing site such as mega or mediafire.

I think there was a way for Gen1 to run commands at startup from a file on the USB and log the output so that you can investigate them - but I don't know how. Maybe a seasoned Gen1 user can help...

If you can run commands on the Gen1, try the following:
Code: Select all
sleep 30
ifconfig -a >> /tmp/mnt/usb/your-usb-uuid/network-log.txt
route -n  >> /tmp/mnt/usb/your-usb-uuid/network-log.txt
arp -an >> /tmp/mnt/usb/your-usb-uuid/network-log.txt
netstat -tpan >>/tmp/mnt/usb/your-usb-uuid/network-log.txt
ps -ef >> /tmp/mnt/usb/your-usb-uuid/network-log.txt


Replace /tmp/mnt/usb/your-usb-uuid/network-log.txt with the correct path to your usb device
User avatar
mad_ady
Developer
 
Posts: 4520
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: Strange networking issue (can ping, cannot telnet/ssh/ft   

Postby damjanev » Fri Jan 15, 2016 2:26 am

The .pcap file is on Google Drive, shared to anyone with a link. https://drive.google.com/file/d/0B8vetTmkeZp-bUtBcGgtV042bmM/view?usp=sharing

I believe that i can run commands on startup through the S00custom-options. It might run them too early in the post boot process, but i'll give it a try. Others require access to the root filesystem (/conf) which i don't have without telnet/ssh/ftp. I wouldn't bet too much on the information from the commands bellow. IP address is known (dhcp assigned), routing table is irrelevant for devices on the same subnet, arp information for my laptop should be OK since the packets reach the network interface. Errors on the interface (from ifconfig) might be useful though.

I might also try to connect the laptop on the wired port of my home router. Currently, only the wdtv is on the wire and all other devices are on WiFi (laptop, desktop, phone).

Alternatively, i can try with some USB wireless adapters i have lying around, but the support for them seem more shaky than what i currently have
- Linksys WUSB54GC v2 - rtl8187 based, USB\VID_1737&PID_0073. More info at https://wikidevi.com/wiki/Linksys_WUSB54GC_v2
- Netgear WG111v2 - rtl8187 based, USB\VID_0846&PID_6A00. More info at https://wikidevi.com/wiki/Netgear_WG111v2_(revision_2)
damjanev
n00b
 
Posts: 12
Joined: Sat Jan 09, 2016 8:34 am
Location: Skopje, Macedonia

Re: Strange networking issue (can ping, cannot telnet/ssh/ft   

Postby damjanev » Fri Jan 15, 2016 3:01 am

This forum post looks like a description (in less details) of the same issue i have. http://forum.wdlxtv.com/viewtopic.php?f=28&t=3757#p49170

The described solution seems like a new network adapter. Or does it mean that he used the USB1 port (on the side) for the network adapter? I have no other interpretation of the part (changed from USB2 to USB1). The user Joost has been inactive from 2011 :-|

Either way, i will test it with the other USB port.
damjanev
n00b
 
Posts: 12
Joined: Sat Jan 09, 2016 8:34 am
Location: Skopje, Macedonia

Re: Strange networking issue (can ping, cannot telnet/ssh/ft   

Postby mad_ady » Fri Jan 15, 2016 3:46 am

I've looked over the capture, and I can't see anything wrong with the WDTV's replies... Indeed, your PC doesn't respond to packets after the handshake and ultimately sends a FIN (strange thing - the WDTV sends the login prompt after your PC sends FIN, but it might have been in transit). I'd say there's something wrong in your TCP stack, but it happens on multiple OSes and devices, so it can't be. Can you describe your network setup? Does the router do anything fancy? Packet inspection/firewall over LAN?

I'd say - try with a cable between your PC and WDTV and run a simple DHCP server on your PC (such as this: http://tftpd32.jounin.net/). This way you can isolate the network from the equation.
User avatar
mad_ady
Developer
 
Posts: 4520
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: Strange networking issue (can ping, cannot telnet/ssh/ft   

Postby damjanev » Fri Jan 15, 2016 4:37 am

Nothing fancy on my network. Huawei ONT/router from my provider acting as a WiFi access point, DHCP server and Internet gateway. No firewall or inspection functionalities on the LAN side.

I have several options to test during the weekend:

- play with the USB port on the wdtv for the network adapter
- use wired connection for both the laptop and the wdtv
- use direct connection with dhcp server on the laptop
- try the WiFi adapters
damjanev
n00b
 
Posts: 12
Joined: Sat Jan 09, 2016 8:34 am
Location: Skopje, Macedonia

Next

Return to Discussion

Who is online

Users browsing this forum: No registered users and 2 guests