Hi @slim ,
I’m not sure if you’ll get an answer to this issue on the Mabox forum.
So I’ll share a ChatGPT-generated response based on your question, along with my personal perspective.
Personally, I don’t fully understand the systemd setup for auto DHCP.
I believe NetworkManager handles that, and its default setting is auto DHCP.
(See the AI-generated answer below.)
ANSWER AI following your question with systemd.
It looks like your system is not correctly handling its network configuration,
likely due to an issue with systemd-networkd or a misconfigured route.
Here are a few solutions to reset and fix the issue:
Solution 1: Restart systemd-networkd and Reapply Configuration
-
Ensure systemd-networkd is enabled and running:
sudo systemctl restart systemd-networkd
sudo systemctl restart systemd-resolved
-
Check if it’s running properly:
systemctl status systemd-networkd
systemctl status systemd-resolved
-
Flush old routes and addresses:
sudo ip addr flush dev enp2s0
sudo ip route flush table main
sudo systemctl restart systemd-networkd
Solution 2: Manually Set a Static Metric (Lower than 1024)
The metric 1024 on enp2s0
might be causing routing issues. Try setting a lower metric:
-
Modify your network configuration file /etc/systemd/network/10-enp2s0.network
:
[Match]
Name=enp2s0
[Network]
DHCP=yes
RouteMetric=100
-
Restart networking:
sudo systemctl restart systemd-networkd
Solution 3: Ensure Proper Gateway Configuration
From your route -FC
output, it seems like your default gateway is missing. You may need to add it manually:
sudo ip route add default via 192.168.1.1 dev enp2s0
To make this permanent, update your network config:
[Network]
DHCP=yes
Gateway=192.168.1.1
Restart networking:
sudo systemctl restart systemd-networkd
Solution 4: Check systemd-networkd Lease
If using DHCP, check your current lease:
sudo journalctl -u systemd-networkd --no-pager | grep DHCP
If it looks incorrect, you can clear and renew the lease:
sudo rm /var/lib/systemd/networks/*
sudo systemctl restart systemd-networkd
Solution 5: Disable Conflicting Services
Ensure NetworkManager
or other networking tools are not interfering with systemd-networkd
:
sudo systemctl disable --now NetworkManager
Then restart systemd-networkd
:
sudo systemctl restart systemd-networkd
Solution 6: Full Network Reset
If none of the above work, you can fully reset network settings:
sudo systemctl stop systemd-networkd
sudo rm -rf /etc/systemd/network/*
sudo rm -rf /var/lib/systemd/networks/*
sudo systemctl restart systemd-networkd
Then recreate /etc/systemd/network/10-enp2s0.network
and restart.
After these steps, test connectivity with PING:
NETWORKMANGER (explained)
Question: *User uses manjaro openbox with networkmanager. *
Is it true networkmanager is set to auto dhcp as default so no need for systemd file.
Answer: Yes, that’s correct! NetworkManager is set to use DHCP automatically by default, so you don’t need a systemd network configuration file (like /etc/systemd/network/10-enp2s0.network
).
Why?
- NetworkManager manages DHCP on its own.
- It automatically assigns an IP when the interface is brought up.
- If a
systemd-networkd
config exists, it might conflict with NetworkManager.
How to Fix Conflicts?
Since you have a systemd network file, it’s best to remove or disable systemd-networkd
and let NetworkManager handle everything.
-
Disable and stop systemd-networkd
:
sudo systemctl disable --now systemd-networkd
-
Ensure NetworkManager is running:
sudo systemctl enable --now NetworkManager
-
Delete the old systemd config (if not needed):
sudo rm /etc/systemd/network/10-enp2s0.network
-
Restart the network interface:
nmcli device reapply enp2s0
or:
sudo systemctl restart NetworkManager
-
Check your IP:
ip a show enp2s0
After this, NetworkManager will handle the DHCP automatically without interference from systemd-networkd. 
Good luck with bfinding the solution…
