You are not logged in.

#1 2024-12-19 10:27:34

xεn0η
Member
Registered: 2024-12-19
Posts: 4

[SOLVED] (DHCP) Default Gateway not being applied

Hello everyone,
I recently switched DHCP server from my internet router to the built-in DHCP server in Technitium DNS Server (yes it says DNS but also provides DHCP). It works pretty well on all devices except my Arch Linux machine. When checking journalctl, it does receive the default gateway address:

systemd-networkd[588]: enp39s0: DHCPv4 address 192.168.178.118/24, gateway 192.168.178.1 acquired from 192.168.178.10

But when looking up the routes via "ip route show", the expected line "default via 192.168.178.1 dev enp39s0" is missing. Adding the default route manual via sudo ip route add default via 192.168.178.1 works flawlessly.
I can't figure out why the default route isn't set.

Any help is appreciated. Thank you!

Last edited by xεn0η (2024-12-19 22:09:34)

Offline

#2 2024-12-19 21:44:48

-thc
Member
Registered: 2017-03-15
Posts: 1,066

Re: [SOLVED] (DHCP) Default Gateway not being applied

What do your "/etc/systemd/network/*" files look like?

Offline

#3 2024-12-19 21:46:36

xεn0η
Member
Registered: 2024-12-19
Posts: 4

Re: [SOLVED] (DHCP) Default Gateway not being applied

-thc wrote:

What do your "/etc/systemd/network/*" files look like?

Very basic:

[Match]
Name=enp39s0

[Network]
DHCP=yes

Offline

#4 2024-12-19 22:00:15

-thc
Member
Registered: 2017-03-15
Posts: 1,066

Re: [SOLVED] (DHCP) Default Gateway not being applied

O.K. - I found hints that an additional route ("classless static route") advertised by the DHCP server can cause this. Double-check your DHCP server configuration.

Offline

#5 2024-12-19 22:08:40

xεn0η
Member
Registered: 2024-12-19
Posts: 4

Re: [SOLVED] (DHCP) Default Gateway not being applied

-thc wrote:

O.K. - I found hints that an additional route ("classless static route") advertised by the DHCP server can cause this. Double-check your DHCP server configuration.

Yes! That's it! I had indeed an additional static route in my DHCP config (on purpose tho). I removed the config and now Arch linux sets the default gateway automatically again.

Thank you so much!

Offline

Board footer

Powered by FluxBB