Directly connect to Jetson TX2 over Ethernet

Been looking at some tutorials online, but they haven’t been very helpful or worked.

All I’m trying to do is access the Jetson from a laptop directly through an ethernet cable. But so far the farthest I can get is the ability to ping the Jetson IP, but then the SSH connection is refused. If I connect the Jetson to a network, then I can SSH into it fine; it’s just that the eventual use case will be in the field where it will not have an existing internet connection we can use to connect to it, so a direct line would be necessary.

Are you connecting directly without a switch? If so, then you need a cross over cable. Auto detect for cross over is not implemented.

Yes, trying to connect directly without a switch. Would a crossover cable be all that would be needed, or would I still be to do all the IP assignment stuff too?

All ethernet ports require either a manual address assignment or a DHCP assignment. If you use the “nm-connection-editor” (with sudo…interfaces identified via MAC address, and this can be viewed with “ifconfig”), then this is fairly trivial, but it must be done. Between that and using a crossover cable networking should succeed. Depending on the end user software there might still be more code for you to deal with, but the networking specific to the Jetson and host would now be ready.

I am trying to accomplish the same thing but I am getting Network unreachable by the host. I have been referring to some forums:

https://devtalk.nvidia.com/default/topic/1031542/how-to-set-manual-ip-address-on-the-tx2/

I have the setting where I think they are right but I am not having much luck on just a simple ping. Any thoughts would be so greatly appreciated!

On your host PC and on the Jetson, what is the output of these commands:

ifconfig
route

Also mention if wired ethernet is connected to the Jetson, or just USB.

Note I have never tried to do this before.

On Ubuntu PC:
user@Surface-Pro-3:~$ ifconfig
enx00e04c318fc6: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 00:e0:4c:31:8f:c6 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

enxc0335e7491ed: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 198.168.2.1 netmask 255.255.255.0 broadcast 198.168.2.255
inet6 fe80::22d:8a98:bef1:2e66 prefixlen 64 scopeid 0x20
ether c0:33:5e:74:91:ed txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 3 bytes 186 (186.0 B)
TX errors 1450 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 1000 (Local Loopback)
RX packets 262995 bytes 18711382 (18.7 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 262995 bytes 18711382 (18.7 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

user@Surface-Pro-3:~$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
link-local 0.0.0.0 255.255.0.0 U 1000 0 0 enxc0335e7491ed
198.168.2.0 0.0.0.0 255.255.255.0 U 100 0 0 enxc0335e7491ed

On TX2:

tx2@tx2:~$ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.2.2 netmask 255.255.255.0 broadcast 192.168.2.255
inet6 fe80::204:4bff:fedf:fbe2 prefixlen 64 scopeid 0x20
ether 00:04:4b:df:fb:e2 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 176 bytes 16152 (16.1 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 41

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 1 (Local Loopback)
RX packets 195 bytes 17389 (17.3 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 195 bytes 17389 (17.3 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

rndis0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 02:72:9a:44:2a:35 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

usb0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 02:72:9a:44:2a:37 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlan0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 00:04:4b:df:fb:e0 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

tx2@tx2:~$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default _gateway 0.0.0.0 UG 0 0 0 eth0
link-local 0.0.0.0 255.255.0.0 U 1000 0 0 eth0
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0

edited the /etc/network/interfaces.d/eth0:

auto eth0
iface eth0 inet static
address 192.168.2.2
netmask 255.255.255.0
network 192.168.2.0
broadcast 198.168.2.255
gateway 192.168.2.1

and added to /etc/network/interfaces
source interfaces.d/eth0

I feel my routes on tx2 is wrong. I am not sure, this is a really inexperienced area for me.

Thanks so much for taking the time!!!

Looks like the PC/Surface Pro 3 has two wired ethernets possible. Only one has an address, “enxc0335e7491ed”, at “192.168.2.1”. The route is capable of communicating with anything in the “192.168.2.x” address range.

The Jetson uses address “192.168.2.2”, and uses the same route and netmask. This should work between 192.168.2.1 and 192.168.2.2, barring exceptions for firewalls or filtering routers.

The original poster could ping. From the Jetson can you “ping 192.168.2.1”? From the PC, can you “ping 192.168.2.2”? This should work even if ssh fails. If this does not work, then it is probably a setting in the router preventing communications.

From the surface pinging 192.168.2.2 I get:
connect: Network is unreachable

***Note:This surface has been connected to a RasPi through Ethernet.

From the TX2 pinging 192.168.2.1 I get:

tx2@tx2:ping 192.168.2.1
PING 192.168.2.1 (192.168.2.1) 56(84) bytes of data.
From 192.168.2.2 icmp_seq=1 Destination Host Unreachable
From 192.168.2.2 icmp_seq=2 Destination Host Unreachable
From 192.168.2.2 icmp_seq=3 Destination Host Unreachable
From 192.168.2.2 icmp_seq=4 Destination Host Unreachable
From 192.168.2.2 icmp_seq=5 Destination Host Unreachable
^C
— 192.168.2.1 ping statistics —
7 packets transmitted, 0 received, +5 errors, 100% packet loss, time 6077ms
pipe 3

If at the time of your test the route and ifconfig had the same IP address and route as what you originally posted, then either there is a network failure, or else the router/switch setup is blocking the communications.

In terms of an ethernet port which gets its IP address over DHCP, I would have to conclude that some basic physical setup is guaranteed to function correctly. In the case of a statically assigned address, then it becomes possible that cabling could be an issue, but not necessarily.

For a case of “directly connecting” (the original post of the thread mentioned this, but I don’t know in your case), and the two computers are directly cabled together without any intervening switch or router, then there is need of a “crossover cable” (some network devices auto detect and switch when there is a direct connect, but I believe in this case the crossover cable would be required). Are you connecting the two directly with a cable and no intervening switch or router?

If there is a switch or router, and ping fails like this, then I’d have to conclude something in that path is filtering the traffic out.

Thank you so much! Problem fixed! Much much appreciated.

Can you share how you solved the problem? I want to connect my Jetson Nano to a windows PC using direct ethernet cable without router or something. If possible, I want to wake the PC up using Jetson Nano via Wake On Lan.

I can’t help much with the Windows side, but it sounds like you simply need to statically assign an address. What else is on that network? Are Windows and the Jetson connecting with a switch and other things are on the switch? Is it just a cable and no switch and no other network components? The former might have issues if there are conflicts, the latter won’t have any conflicts (though you might need to use a crossover cable).

FYI, WOL typically has some “magic bytes”. There are some tools available on Ubuntu for this, although writing such a program should also be simple. Examples can be seen on the Jetson via “apt search wake-on-lan”, e.g., “etherwake” or (literally) the program “wakeonlan”.

Note that it isn’t supported to wake the Jetson with WOL, but it shouldn’t be a problem to wake the Windows box from Linux.