LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 02-16-2023, 02:06 AM   #1
X1CC
LQ Newbie
 
Registered: Mar 2022
Posts: 6

Rep: Reputation: 0
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.
 
Old 02-17-2023, 11:06 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,153

Rep: Reputation: 1265Reputation: 1265Reputation: 1265Reputation: 1265Reputation: 1265Reputation: 1265Reputation: 1265Reputation: 1265Reputation: 1265
If you want the names and syntax to be correct, I would suggest using the nm-connection-editor GUI instead of editing the files by hand.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get app to use tun0 instead of eno1 Captain Brillo Linux - Networking 2 12-29-2018 09:43 AM
[SOLVED] assigning arrays of constant values to complex struct babbab Programming 6 12-20-2018 03:21 PM
assigning value with read command vs assigning value with = sign bubai70 Linux - Server 1 12-11-2017 10:47 PM
Eth0 is now called eno1 nigelc Linux - Newbie 1 09-14-2014 09:09 AM
Java - Assigning Array Values en masse indienick Programming 11 08-23-2006 12:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 10:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration