Static IP change often

I have set a static IP on Jetson Nano and communicate with other PCs over Ethernet.

But often the static ip is turned off and the ethernet connection doesn’t work.
If you go into setting-network-wired-option and check the ipv4 settings tab, the method is changed to automatic (DHCP).
Also, if you check " sudo nm-connection-editor", there is a new ethernet in ethernet (other than the one I set a static IP for)

And this phenomenon often occurs when changing the sd card to another one.
When there are two sd cards with good Ethernet communication (fixed IP is set), this phenomenon often occurs when using ‘A sd card’ and then replacing it with ‘B sd card’.

Why is this happening?
I always have to use a static IP.
(The IP should never be changed. If the IP is changed, Ethernet communication is not possible.)
please help me
thank you.


If I understand correctly, you are trying with the same nano with the same MAC adress but configured with different static IP via the SD card Image.

Yes, that’s right.
I used the same jetson nano and the mac address is the same.
The sd card image is the same.
but the ip is different (not always, but often causes problems)

I am successfully able to use a static IP for over an year now. This is how I did it on Jetson Xavier and accompanying systems.

Change your /etc/network/interfaces to

# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

and create (if not already existing), the eth0 file in the interfaces.d directory. The eth0 file is defined as

auto eth0
iface eth0 inet static

In my case, I have set my static IP to

1 Like

If the MAC address is different, won’t it get a static IP?
If I set a static IP in ‘A jetson nano’ and insert this SD card into ‘B jetson nano’, can I not use the static IP set in ‘A jetson nano’?

In other words, even if the same sd card is used (even if the same image is used), if the MAC address is different (the device is different), do I have to set the static IP again?

Just wondr if there is a mac conflict in your router which will lead to different IP address.
Otherwise I think it should be the same if the two SD Image have the same static IP config.

yeah true. @_JJANG automatic IP assigning is done by the DHCP, and you are explicitly turning it OFF to assign a static IP via this script. So, yes, its independent of the MAC address in this case.

Thank you.
Thanks I solved the problem :)

Cool. Just as a warning, this method might stop your Jetson from reaching the internet, so you can have problems updating/installing packages. In that case, just comment out

source-directory /etc/network/interfaces.d

and restart your device. Both these funcnalities are mutually exclusive… I still getting my head around this.