You are not logged in.

#1 2022-08-01 10:47:58

Roy Azriel
Member
Registered: 2022-08-01
Posts: 2

Static IP lost after unplugging / plugging Network cable

I am using yocto distro with imx8 from NXP.
network manager is systemd-networkd.
The interface used is based on  Microchip SMSC9512/9514 Fast Ethernet Adapter(USB to Ethernet chip)
I have added a file named 25-wired.network to /etc/systemd/network folder.
the file contains the following lines:
[Match]
Name=eth1
KernelCommandLine=!nfsroot

[Network]
Address=192.168.50.99/24
Gateway=192.168.50.255
DNS=8.8.8.8

[DHCPv4]
UseHostname=false

Machine boots eth1 interface is configured with the static IP as expected.
when I disconnect and connect the network calble the IP of the eth1 is lost.
is there any value I should add to the *.network file for it to set the IP ?

BR,

Roy

Last edited by Roy Azriel (2022-08-01 10:48:29)

Offline

#2 2022-08-01 13:12:57

GeorgeJP
Member
From: Czech Republic
Registered: 2020-01-28
Posts: 186

Re: Static IP lost after unplugging / plugging Network cable

Only archlinux x86_64 supported here ...

BTW - is you router really 192.168.50.255?

Offline

#3 2022-08-01 13:21:33

Roy Azriel
Member
Registered: 2022-08-01
Posts: 2

Re: Static IP lost after unplugging / plugging Network cable

thanks JP.
you are probably right.
this is peer to peer internal connection. no real router.
I have removed the Gateway line. it seems it helped.

Offline

Board footer

Powered by FluxBB