From 363d454c9a159d1fcc9835dbb94c8ddb689001c3 Mon Sep 17 00:00:00 2001 From: Sam Estep Date: Mon, 20 Jul 2026 21:10:25 +0000 Subject: [PATCH] Ignore DHCP-supplied DNS search domains on Ubuntu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The host's vmnet DHCP server relays the Mac's own resolver search domains (e.g. stale *.cmu.edu entries) into the Tart Linux VM. Ubuntu appends them to public names like github.com, and if any points at an unreachable resolver, every lookup — including `git pull` — stalls for ten seconds. Document a netplan drop-in that disables use of those domains, complementing the existing /etc/hosts local-hostname fix. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01FBtLdhjCVy3hFe1ofzUAgv --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 3c5e049..3925e86 100644 --- a/README.md +++ b/README.md @@ -203,6 +203,21 @@ Avoid ten-second hangs by enabling Ubuntu to resolve the local hostname: echo "127.0.1.1 $(hostname)" | sudo tee -a /etc/hosts ``` +Avoid another class of ten-second hangs by telling Ubuntu to ignore the DNS search domains it gets over DHCP. The host's `vmnet` DHCP server relays the Mac's own resolver search domains (e.g. leftover `*.cmu.edu` entries from a network the laptop was once on) into the VM, and Ubuntu appends them to public names like `github.com`; if any of those domains points at an unreachable resolver, every lookup stalls for ten seconds. Drop them: + +```sh +sudo tee /etc/netplan/60-no-search-domains.yaml <<'EOF' >/dev/null +network: + version: 2 + ethernets: + all: + dhcp4-overrides: + use-domains: false +EOF +sudo chmod 600 /etc/netplan/60-no-search-domains.yaml +sudo netplan apply +``` + Next, install Nix: ```sh