Set static IP on jetson nano

I need to set static IP address on Jetson nano. I have edited /etc/network/interfaces

auto eth0
iface eth0 inet static
  address 192.168.1.192
  netmask 255.255.255.0
  gateway 192.168.1.255

Currently eth0 is disabled:

#cat /run/network/ifstate
lo=lo

But it fails to go up:

#ifup eth0
RTNETLINK answers: File exists
Failed to bring up eth0

how can I fix this?

Important note: I need to set static ip from command line.

Hi

Could you try to restart the network server and try again?

/etc/init.d/networking restart

Also you may need to add the dns server:

dns-nameservers x.x.x.x

/etc/init.d/networking restart fails, because it calls ifup, which fails.

Try to instead set this up via the application “nm-connection-editor” (use “sudo nm-connection-editor”, and if you don’t have this, then “sudo apt-get install network-manager-gnome”). You’d use the MAC address to identify the device if you have more than one possible device (see “ifconfig” output for MAC addresses).

GUI interface is also broken, it doesn’t allow to change IP address.
I’ve found a rootcause and walkaround by the way. All the utils are broken because they try to use ifup and ifdown scripts, which also fail because dhclient is running. To kill dhclient, you have to run it dhclient -r as root.

I’m getting the same issue, and it looks like sudo dhclient -r doesn’t fix it for me.

Just to clarify, running sudo ifdown eth0, editing /etc/network/interfaces to:

auto eth0
iface eth0 inet static
  address 192.168.1.50
  netmask 255.255.255.0
  gateway 192.168.1.255

Running sudo ifup eth0 results in:

RTNETLINK answers: File exists
Failed to bring up eth0.

You were able to fix this with sudo dhclient -r?

Jetson network subsystem is broken. I.e. you have remove network manager with systemctl in order to fix it. And write your own, which will use dhcpclient and ifup. Don’t expect files like /etc/network/interfaces to work.

i managed to do it,
first we need to go to “/etc/default/networking” and change the parameter “CONFIGURE_INTERFACES” to “no”

CONFIGURE_INTERFACES=no

then the configuration in “/etc/network/interfaces” works.

auto eth0
iface eth0 inet static
  address 192.168.1.180
  netmask 255.255.255.0
  gateway 192.168.1.1
1 Like

I just installed the latest JetBot image jetbot-041_nano-4gb-jp441.zip and was able to set a static ip via the NetworkManager CLI as such:

Note: This was after connecting the WiFi to a router via the Ubuntu GUI.

List available connections:
nmcli d wifi list
IN-USE SSID MODE CHAN RATE SIGNAL BARS SECURITY
* MySSID Infra 11 130 Mbit/s 60 ▂▄▆_ WPA2

Set Static IP for the WiFi connection:
sudo nmcli con mod "MySSID" ipv4.addr "192.168.2.203/24" gw4 "192.168.2.1" ipv4.dns "8.8.8.8,8.8.4.4" ipv4.method "manual"

Reboot the Nano.

After this, the IP was set to the static IP I set.