Network Manager not opening? How to set static IP address for Ethernet port?(13.2 KDE 64 bit)

Hello,

I am lately having trouble setting up the Ethernet port. I tried setting it up in /etc/sysconfig/network, but NetworkManager.Service seems to be over-riding any changes that I make.

When I tried to open this “NetworkManager” via terminal, or from quicklaunch, I get no response. Furhtermore, YAST Network management seems to be disabled/overridden.

For the time being, I am setting ifconfig manually

ifconfig enp0s25 192.168.0.1

which needs to be ran each time. Could someone help me with this please? This is important to me because I am using ethernet port to communicate with FPGA board ATLYS, and I am constantly running into communication errors due to this

Thank you.

I guess you are confusing things.

You either use wicked or NetworkManager. And you set that in YaST > Network > Network Devices.

When you choose NetworkManager, YaST is of no further use for configuring the network and I also assume (editing manually) the ifconfig-* files are useless because NM does not use them.

When you choose wicked, you can use YaST to fill in all the needed parameters. They end up in several configuration files like the ifconfig-* files and others. You can of course edit all those file manually when you know what you are doing.

Hello hcvv,

could you point me to the right direction for finding out how to use NetworkManager to set a static IP address for a Ethernet port please?

Thank you.

I use wicked for setting static IP addresses, because I see no need for NM when having always the same IP address from boot to shutdown.

I have no experience in using NM, I have not even installed it.

But as I understand correctly, you could make a connection “system” (or similar wording) to have it connected from boot (and not from GUI login as is where NM is invented for).

But I have no doubt others with NM experience will join this thread.

I am referring to the following:
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Networking_Guide/sec-Using_the_NetworkManager_Command_Line_Tool_nmcli.html#sec-Configuring_Static_Routes_Using_nmcli

I may have more troubleshooting to do in the future FYI.

Unfortunately, what has been suggested in the link above did not work.
In particular, following

nmcli connection add type ethernet con-name *connection-name* ifname *interface-name* ip4 *address* gw4 *address*
nmcli con add type ethernet con-name itsdaq ifname enp0s25 ip4 10.20.30.40/24 gw4 10.20.30.40

enp0s25 is my ethernet port.

After reboot, I still get:

enp0s25   Link encap:Ethernet  HWaddr 28:D2:44:18:4C:C9            UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:20 Memory:f2500000-f2520000 

in ifconfig.

Could someone help with this please?

  1. Verify or set Network Manager to manage your network settings. In a default installation, openSUSE installs, but <disables> Network Manager(If you see a Networking icon in your Desktop panel, it’ll probably say “Network disabled” or similar) so if you don’t modify the default setting, then you would manually configure in YaST or modify the network interface text files as you’ve described. So, from your Desktop application launch button, you should open your menu, look for and launch the following and select “Network Manager Service” from the dropdown menu
    YaST > System > Network Settings > Global Options tab (leftmost)

  2. Depending on your Desktop, you may see a Networking icon in your Desktop panel (aka taskbar). Rt-click it, and instead of saying “Networking disabled” you should now be able to “Edit Connections.” Click on that, and you should now be able to modify an existing connection or create a new, configuring static settings for your network interface (or many will allow the connection to be configured as a DHCP client).

Ordinarily,
People should only rarely use nmcli instead of the GUI tools.

TSU

Ummmh … nope, not necessarily. All of the last 3 installs I did of 42.2 installed and set Network Manager to work by default. All were laptop, though, with wireless cards, so perhaps it factors the presence of a wireless card in when it selects the default – I don’t know, never really watched for it.

To the OP:
But, as tsu2 says, it would be a good idea to go into Yast and check that Network Manager Service is selected:

So, from your Desktop application launch button, you should open your menu, look for and launch the following and select “Network Manager Service” from the dropdown menu
YaST > System > Network Settings > Global Options tab (leftmost)

Also in there, this:

When you choose NetworkManager, YaST is of no further use for configuring the network

is mostly correct. However, you can make some changes in there, even with NetworkManager in control: For example, you can set or change your Hostname and/or Domain Name, and a few other items. Things you cannot change in the YaST2 Network Settings are (likely) greyed out.

And, this, from tsu2, is correct, how to set static IP in NetworkManager:

  1. Depending on your Desktop, you may see a Networking icon in your Desktop panel (aka taskbar). Rt-click it, and instead of saying “Networking disabled” you should now be able to “Edit Connections.” Click on that, and you should now be able to modify an existing connection or create a new, configuring static settings for your network interface (or many will allow the connection to be configured as a DHCP client).

Well, along with the advice already given…

  1. You should check that NM is active and that wicked is not
sudo systemctl status NetworkManager
sudo systemctl status wicked

This can be configured in YaST as already explained.

  1. With respect to the connection you’ve created you can check/edit that graphically (NM connection editor) or examine /etc/NetworkManager/system-connections/itsdaq (based on the name of the connection you created already)

  2. In an effort to assist I did the following (appropriate for my network)

nmcli con add type ethernet con-name test ifname eth0 ip4 192.168.1.100/24 gw4 192.168.1.1

which resulted in the following connection being created (/etc/NetworkManager/system-connections/test) and containing


[connection]
id=test
uuid=ec1c60df-89e1-4a37-a2b0-50f243aee154
type=ethernet
interface-name=eth0
permissions=
secondaries=

[ethernet]
mac-address-blacklist=

[ipv4]
address1=192.168.1.100/24,192.168.1.1
dns-search=
method=manual

[ipv6]
dns-search=
method=auto

Restarting NetworkManager with

sudo systemctl restart NetworkManager

yielded a working connection (I didn’t bother assigning DNS for this test)


ip add
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:36:86:14 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.100/24 brd 192.168.1.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:fe36:8614/64 scope link 
       valid_lft forever preferred_lft forever
dean@linux-kgxs:~> ip route
default via 192.168.1.1 dev eth0  proto static  metric 100 
192.168.1.0/24 dev eth0  proto kernel  scope link  src 192.168.1.100  metric 100

Hope this is of help.