3

I want to set a static IP for a Jetson Nano in my local network. What I've tried:

-- Changing the DHCP on the router.

-- editing /etc/network/interfaces with the following:

auto eth0
iface eth0 inet static
  address 192.168.1.80
  netmask 255.255.255.0
  gateway 192.168.1.1

Both this options doesn't seem to work.

Manzotin
  • 768
  • 1
  • 7
  • 18

2 Answers2

6

It seems the Jetson Nano has an underlying configuration for the network interface of the board.

1) edit /etc/default/networking

sudo vi /etc/default/networking

and set the parameter CONFIGURE_INTERFACES=no

# Set to 'no' to skip interfaces configuration on boot
CONFIGURE_INTERFACES=no

2) Now then the settings in /etc/network/interfaces will work

sudo vi /etc/network/interfaces

auto eth0
iface eth0 inet static
  address 192.168.1.80
  netmask 255.255.255.0
  gateway 192.168.1.1

3) Reboot the board

Dharman
  • 30,962
  • 25
  • 85
  • 135
Manzotin
  • 768
  • 1
  • 7
  • 18
0

TLDR ;

Use nmcli con mod [id] and nmcli con [down up] [id] as root.

eg:

nmcli con show 
nmcli con mod "Wired connection 1" \
  ipv4.addresses "192.168.8.70/24" \
  ipv4.gateway "192.168.8.1" \
  ipv4.dns "8.8.8.8 1.1.1.1" \
  ipv4.dns-search "8.8.4.4" \
  ipv4.method "manual"

(nmcli con down id "Wired connection 1" && nmcli con up id "Wired connection 1")& # or reboot device 

LR ;

Recent Jetsons nano use linux network-manager to manage network interfaces. you have to, either use the UI to modify the settings or use cli as below :

  1. show network connections with : nmcli con show

nmcli con show

  1. Edit or Modify the wired network or your preferred interface with
sudo nmcli con mod "Wired connection 1" \
  ipv4.addresses "192.168.8.70/24" \
  ipv4.gateway "192.168.8.1" \
  ipv4.dns "8.8.8.8 1.1.1.1" \
  ipv4.dns-search "8.8.4.4" \
  ipv4.method "manual"

Edit IPs as suits you and

  1. Down/Up connection or reboot your jetson with :
(nmcli con down id "Wired connection 1" && nmcli con up id "Wired connection 1")&

or just reboot

after that you'll lose access to it and with another terminal you can ping and access your jetson again.

Oussama Boumaad
  • 477
  • 5
  • 9