From 15939950d95736cd8af341ce29b8c884578e2651 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reynir=20Bj=C3=B6rnsson?= Date: Tue, 10 Nov 2020 12:03:14 +0100 Subject: [PATCH] Write Using DHCP --- First attempt/Using DHCP | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/First attempt/Using DHCP b/First attempt/Using DHCP index 1844f0c..b83aab5 100644 --- a/First attempt/Using DHCP +++ b/First attempt/Using DHCP @@ -4,4 +4,21 @@ author: reynir --- # Using DHCP for the unikernels -TBD... +Setting up a simple DHCP server for the bridge was fairly simple using systemd-networkd. +It's as simple as adding `DHCPServer=true` in the `.network` file for the bridge. +It is possible to configure more options under the `[DHCPServer]` section. + +While DHCP *does* work, I *did* have problems using Canopy. +The unikernel would crash with an exception caused by DNS failing to resolve the hostname for the git repository. +The problem was especially evident with the default DNS resolver of anycast.censurfridns.dk as well as Google's 8.8.8.8. +With the ISPs DNS resolver it worked *most* of the time. +It seems the unikernel waits no more than *five seconds* for the hostname to resolve, or fetching the git repository. +Browsing the code, it was not immediately obvious where the five seconds is coming from or how to change it. + +When it crashes it seems it took a bit longer than usual to get a lease through DHCP. +A possible contributing factor is that systemd-networkd creates with `no-carrier`. +A workaround mentioned in the corresponding [issue](https://github.com/systemd/systemd/issues/9252) suggests creating a configured dummy interface. +When there's already a running unikernel connected to the bridge it forces systemd-networkd to configure the bridge. +However, this does not seem to remove the problem entirely. + +More investigation is required...