Dhcp server in tumbleweed

what’s the simplest way to setup a dhcp server in tumbleweed? is that a feature contained in either systemd or networkManager?

i know it’s available in dnsmasq, tho i also see concerns about enabling dnsmasq and subsequent interactions others have stumbled over so i thought it might be worth asking.

i also see it’s available in several other packages in the repos, but so far i have no idea which path is best to take.

my purpose for it is merely to channel all traffic on my lan thru a box that can thus fuss with qdisc et al.

Documentation (also applicable for Tumbleweed):

What DHCP has to do with it? Point default route at this box on each host, you do not need DHCP for that.

This can be a language problem. All traffic on the LAN is just on the LAN, peer to peer. You can not let it go “through a box”. And for traffic going out of the LAN, see what @arvidjaar says.

It is also not clear what the present situation is. Are you using no DHCP at all on the LAN and are all boxes configured with fixed IP/Netmask, default route and DNS servers? Or are you using a DHCP server on the LAN and want to remove that and switch the service to a one of the other boxes which runs openSUSE?

impractical for mobiles et al

right, the centurylink c3000a modem dhcp doesn’t have an option to merely change the gateway.

@gregrwm the modem ip address is the gateway? So your want to do some sort of QoS, traffic snooping etc?

right, QoS, eg qdisc experimenting

@gregrwm probably better to find a router than you can run openwrt on and play with that… else look at setting your router in bridge mode and serving up everything on a dedicated system that can serve up both ethernet and wifi access…

If your only experimenting then maybe a couple of virtual machines and test between them.

You did not describe your environment so I had no way to guess it.

no (depending on what you call “systemd” of course)

NetworkManager supports using DHCP for address configuration of internal systems in “connection sharing” mode which implements exactly your requirement “to channel all traffic on my lan thru a box”. Of course you may have some other additional requirements that are not fulfilled by it.

“Best” is in the eyes of beholder. But the obvious answer is - use DHCP server (package dhcp-server) if you need DHCP server.

Thank you all for your replies. The path i took was: Give a static ip to the box to become the new gateway, and tell it to forward traffic to the modem’s gateway address:

nmcli con mod enxx ipv4.method manual ipv4.addr gw4 ipv4.dns,

Setup forwarding on gateway, modify /etc/sysctl.d/70-yast.conf:

net.ipv4.ip_forward = 1

Setup dhcp in dnsmasq, append to /etc/dnsmasq.conf:


Disable dhcp on the WAN modem (on the c3000a in particular, couldn’t do that until first disabling wifi, then disable dhcp, then reenable wifi).

Enable forwarding and dhcp on gateway:

sysctl -p /etc/sysctl.conf
firewall-cmd             --add-service=dhcp --permanent
firewall-cmd --zone=public --add-masquerade --permanent
systemctl reload firewalld
systemctl enable --now dnsmasq

As a result iftop can now show all traffic through the gateway, and tc and iptables can prioritize or limit certain traffic.