all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* dhcp-client default gateway with multiple interfaces, race condition?
@ 2024-06-14 16:34 Richard Sent
  2024-06-14 18:10 ` Felix Lechner via
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Sent @ 2024-06-14 16:34 UTC (permalink / raw)
  To: help-guix

Hi Guix!

I'm having trouble where my virtual private server (VPS) [1] has
incorrect routing information configured. From a recovery console:

--8<---------------cut here---------------start------------->8---
root@droplet-base ~# ip route
default dev eth1
10.108.0.0/20 dev eth1 proto kernel scope link src 10.108.0.2
157.245.0.0/20 dev eth0 proto kernel scope link src <public_ip_address>
--8<---------------cut here---------------end--------------->8---

From above, the default gateway isn't pointing towards the
internet-routable gateway (157.245.0.1). If I were to manually run $ ip
route replace default default via 157.245.0.1, I can reach public
addresses again (e.g. $ ping 8.8.8.8).

This error seems to occur randomly on reboot, maybe 4/5 times. My guess
is there is some sort of race condition in the DHCP configuration that
causes eth1 to be set as the default gateway.

I believe I could resolve this by changing dhcp-client-service-type to

--8<---------------cut here---------------start------------->8---
(service dhcp-client-service-type ;make droplet know its own ip
         (dhcp-client-configuration
         (interfaces '("eth0"))))
--8<---------------cut here---------------end--------------->8---

i.e. only listen on eth0 and give up on configuring the private IP range
on eth1 entirely. I haven't tested this to confirm yet, but will
shortly.

However, I don't want to remove the private IP range entirely. From what
I read, it may be possible to configure isc-dhcp to set "nogateway" for
a specific interface. However, it looks like this isn't possible in Guix
at present. Is there another method to resolve my issue? Or is my fancy
theory about race-conditions in dhcp configuration inaccurate and
something else is to blame?

Thanks.

[1]: https://git.sr.ht/~freakingpenguin/rsent/tree/edde39fbb0585db243ac5369548867bbdc765fe8/item/rsent/system/digitalocean.scm
[2]: https://unix.stackexchange.com/a/333610
-- 
Take it easy,
Richard Sent
Making my computer weirder one commit at a time.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-06-14 20:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-14 16:34 dhcp-client default gateway with multiple interfaces, race condition? Richard Sent
2024-06-14 18:10 ` Felix Lechner via
2024-06-14 18:55   ` Richard Sent
2024-06-14 20:14     ` Richard Sent

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.