Assigning static IP in Fedora 35, values in eno1.nmconnection is ignored- why?
Installed Fedora 35.
I tried to set static IP as follows.
In the /etc/NetworkManager/system-connections/eno1.nmconnection, I have the following entries:
[connection]
id=eno1
uuid=xxx
type=ethernet
autoconnect-priority=-999
interface-name=eno1
permissions=
onboot=yes
bootproto=none
[ethernet]
mac-address-blacklist=
[ipv4]
dns-search=
IPADDR=172.17.0.31
PREFIX=24
DNS1=172.16.0.1;
GATEWAY=172.17.0.254
DOMAIN=my FQDN
method=manual
[ipv6]
addr-gen-mode=eui64
dns-search=
method=auto
*************
But when I run ifconfig, I see that I am getting a dynamic IP like this:
[root@momo3 ~]# ifconfig
eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.17.64.54 netmask 255.255.0.0 broadcast 172.17.255.255
*************
I am getting class B netmask (255.255.0.0), ignoring my setting (PREFIX=24).
I want and need the server to have a static IP (172.17.0.31 in this case).
Can someone please point me to a right direction?
Also, do I need a semicolon after the DNS1 value?
Note: My other server which does give me a static IP also has DNS1 and gateway values as above, so I assume DNS1 and gateway values are correct.
Note2: I restarted server multiple time, so any "junk" setting should have been flushed.
I also did:
sudo systemctl restart NetworkManager
and
nmcli networking off/on
multiple times.
Last edited by X1CC; 02-21-2023 at 12:15 AM.
|