Skip to content

Latest commit

 

History

History
101 lines (68 loc) · 1.65 KB

File metadata and controls

101 lines (68 loc) · 1.65 KB
created 2025-12-22
tags
homelab
systemd
networking
linux
aliases
systemd-networkd
networkd configuration
homelab networking

Homelab - systemd-networkd Configuration

Overview

Guide to configuring systemd-networkd for network management in Homelab environments.

Bring USB tethering internet up on Ubuntu minimal using:

  • systemd-networkd
  • systemd-resolved
  • no editor
  • no NetworkManager
  • no ping

Steps

1. Enable USB tethering on your phone

(Android -> USB tethering ON)

Plug the USB cable.

2. Find the USB network interface (no tools needed)

ls /sys/class/net/

You'll see something like:

lo usb0

or:

lo enx...

Remember the interface name (we'll call it USB_IFACE)

3. Create network config WITHOUT an editor

Considering you have installed Alpine, Ubuntu minimal or any other minimal server image

Replace USB_IFACE with your actual interface name.

sudo mkdir -p /etc/systemd/network
sudo sh -c 'cat> /etc/systemd/network/10-usb.network <<EOF
[Match]
Name=USB_IFACE

[Network]
DHCP=yes
EOF'

4. Enable required services (already installed by default)

sudo systemctl enable --now systemd-networkd
sudo systemctl enable --now systemd-resolved

Link DNS resolver:

sudo ln -sf /run/systemd/resolve/stud-resolv.conf /etc/resolv.conf

5. Bring the interface up

sudo networkctl reload
sudo networkctl up USB_IFACE

Check status:

networkctl status USB_IFACE

6. Verify internet WITHOUT ping

Try reaching Ubuntu archive:

getnet hosts archive.ubuntu.com