give_jetson_a_static_ip_address
If you plug a jetson nano's ethernet port into a home or school network, it will use DHCP to get assigned an IP address so you can download packages with apt and manage your code with git. But on the robot at competition there is no DHCP server (unless you're on the field) so its convenient to give it a static robot IP address. Here's how.
Nvidia's current linux for Jetson is based on Ubuntu 18, “Bionic Beaver,” but it does its networking
the old way, using /etc/network/interfaces.
To give your jetson a static IP, while also having it try to use DHCP, change /etc/network/interfaces to look like this:
# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
# lines below here added to get both a DHCP address
# and a FRC team-specific static address.
# Adjust the 10.TE.AM.* address on eth0:0 for your team and network
auto lo eth0 eth0:0
iface lo inet loopback
iface eth0 inet dhcp
iface eth0:0 inet static
address 10.47.95.20
netmask 255.255.255.0
give_jetson_a_static_ip_address.txt · Last modified: 2020/03/11 17:05 by tell
