I'm having a difficult time configuring the IP address of an interface in a Fedora 32 in a LXD container.

The configuration for eth0 in /etc/sysconfig/network-scripts/:
# cat ifcfg-eth0
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=no
IPV6_DEFROUTE=no
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=eth0
DEVICE=eth0
ONBOOT=yes
IPADDR=192.168.20.43
PREFIX=24
GATEWAY=192.168.20.1
IPV6_DISABLED=yes
DNS1=192.168.20.1
DNS2=75.75.75.75
DNS3=8.8.8.8
HWADDR=00:16:3e:d1:ea:86

When I start the container, eth0 gets two IP addresses. One is the IP specified in the ifcfg-eth0 file. The other is a DHCP address. I'm assuming that NetworkManager is getting the DHCP address.

I tried adding NMCONTROLLED=no to the ifcfg, but I get the same double IP assignment.

I've tried removing the ifcfg-eth0 file and configuring the interface using nmcli as described here:
https://linuxconfig.org/how-to-configure-static-ip-address-on-fedora-31

That doesn't work. When the container restarts, a new eth0 is created with a different UUID.

Any suggestions would be appreciated.

--
Michael Eager
_______________________________________________
users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]

Reply via email to