Moving to Wicked w/ DHCP

I’m on the latest version of TW and I’m moving to Wicked from NetworkManager but I hit a small issue.

I can get the network working using StaticIP after setting the default route.
What I can’t seem to get to work is DHCP. Do I need a local dhcp service like dhcpd installed and running? I was hoping wicked would be able to just work

You do not explain HOW you are doing this.

Wicked seems to be deprecated, but earlier one could use YaST and then simply check a box for DHCP usage.

Hi @hcvv
To be specific, I first installed wicked using Zypper.

The following 2 NEW packages are going to be installed:
  wicked wicked-service

I then went to yast (System/NetworkSettings) to complete the configuration, removing NetworkManager as the default Network Setup Method.

Then still in yast I went to Overview and Edit to update the config on my NIC and set it to DHCP. That failed, so I then set it to static IP, failed again. Curious what was going on I realized the default route might not be set, so I went back into yast and set the StaticIP then configured the default route under Routes.

Eureka we have network connectivity!

So StaticIP works fine, DHCP on the other hand continues to fail even if I set the Default Route. Default Route has to be set again because yast erases all config when switching from static to DHCP.

I’m thinking the system might not have a way to manage DHCP, like I don’t have any dhcp service installed by default, and honestly thinking back to my RedHat experience I can’t recall if that’s required or if the system should just be able to negotiate for a DHCP address.

My current config file.

/etc/sysconfig/network/ifcfg-enp8s0
DEVICE='enp8s0'
ONBOOT='yes'
TYPE='ethernet'
USERCTL='no'
IPADDR='192.168.1.101/24'
BOOTPROTO='static'
STARTMODE='auto'

Looking online I see wicked was deprecated but that doesn’t mean that wicked is dead right? I still see releases shipping: Release wicked-0.6.70 · openSUSE/wicked · GitHub

That is only needed if you want to run a DHCP server. And you don’t (at least that is not part of your request). You want to run a DHCP client (at the moment your NIC is started) to ask IP address, default route, etc. from a DHCP server that is running somewhere in your LAN (often on the router).

Yes exactly, thank you for the sanity check :laughing: I was starting to second guess everything.

That said I must be missing something in the config. It’s definitely not seeing my dhcp host for whatever reason.

@PeterChz it’s deprecated in Tumbleweed, but still supported in the Leap release. I suspect there are some items needed but not provided in Tumbleweed. The switch to NetworkMznager was awhile ago, look at using nmcli or nmtui to configure if needed.

May be. You neither show your config nor any logs from wicked so it is rather hard to even start guessing.

I just tested this in a Tumbleweed VM.

I first installed “wicked”, which pulled in two other packages.

I then use Yast → System → Network Settings
where I switched to using “wicked”. I configured the network device “enp1s0” to use DHCP.

I then rebooted, to be sure that I wasn’t using something left over from NetworkManager. The system did received an IP address via DHCP. And I’m now updating Tumbleweed using that network connection. It seems to be working fine.

It has been a few weeks since I last tried this, but I’m pretty sure that if you install Tumbleweed to use a generic desktop, then it defaults to using “wicked” – probably because “Icewm” does not have any NetworkManager support builtin.

A bit ironic … I’ve been using TW for a long time and historically prefer wicked. All four of my machines use it, all using static IPs and custom DHCP servers.

When I get back home in a bit, I’ll provide my settings.

Why did I write “ironic”? Because I’ve been contemplating switching from wicked to NetworkManager :slight_smile: (but wicked simply works for me!).

Ooops - sorry, I wrote “custom DHCP”, but I meant “custom DNS” (I used to use my own DHCP servers, but stopped using them) - so not sure if any of this will help.

Here’s the screenshots using Yast2 - hopefully, they will be aid in your troubleshooting. If I missed anything, let us know:

net1
.
net2
.
net3

Thank you all for the helpful replies. And for the screenshots @myswtest!

I tried out a few things, but something @nrickert said stuck in my mind. There was a mention of rebooting. I’m pretty sure I rebooted at least once in this journey, but for good measure I went into yast set everything to DHCP and rebooted.

It came back up and just worked:laughing:

Now, I did restart the wicked service during my testing but I guess to get things rolling the system needed a full reboot.
Go figure.
I may jump over to Leap just cause it seems like it may be a better fit for my needs. :slight_smile:

This issue aside, switching to wicked was a super easy transition and maintaining networking via config files just clicks for me after many years of managing headless RHEL servers.

Thanks again!

2 Likes

@PeterChz Just to clarify, NetworkManager connections are no different than the old ifconfig files, in fact easier to manage from the command line as there is just one text file for the connection…

I can also confirm, that after this reboot I can flip to StaticIP and back to DHCP without any issues.
There must have been something still hanging in the mix after moving to Wicked and a reboot sorted that out.

A bonus lesson through the process was finding how easy it is to add Bridges and other networking features through Yast. Very cool!

1 Like

No I understand that, I’ve used nmcli somewhat as well. It might just be an old dog - new tricks situation.

For my laptop I just leave NetworkManager installed this change is more purpose driven, and I feel more comfortable with wicked and configs in this case.

2 Likes

Dumb question on my part … why would you want to flip-flop from staticIP to DHCP and vice versa ?

(Sidenote: we only use staticIP for all the machines on our local home network, mostly for security reasons)

Just a question. Having fixed IP address, etc. There is no need for a NM client available to the end-user. Is it easy to avoid having NM applet in the desktops?

Polkit could be configured to prevent user changes if desired.

Users should of course never be able to change (when not on a moveable computer like a laptop), but they should not have the icon (why presentingg an icon with which they can do nothing?).

I see no problem with having a NM frontend visible for network status purposes. (Even Windows does that.)

In any case the administrator could choose to leave the frontend components uninstalled?
https://wiki.archlinux.org/title/NetworkManager#Front-ends