skip to content

Search

Home Lab: IP addresses and naming conventions

2 min read

IP addresses, domain names and naming conventions for the lab

IP addresses and server names

At the server level - in order to be able to SSH into the servers - super short, but also meaningful names are used.

Instead of setting up static IP addresses (one by one on each server), let’s use our router’s DHCP capabilities to assign IP addresses to the servers, and stick to them (aka “DHCP reservation”). I call it “pinning” a MAC address to an IP address.

Here is my setup:

ServerIP AddressArchitectureOS
rpi4-01192.168.0.41ARMUbuntu 24.04.3 LTS
rpi4-02192.168.0.42ARMUbuntu 24.04.3 LTS
rpi5-01192.168.0.51ARMUbuntu 24.04.3 LTS
zima-01192.168.0.91x86Ubuntu 24.04.3 LTS

To make life easier, add these entries to your ~/.ssh/config file:

# Global settings
Host *
    ServerAliveInterval 60
    ServerAliveCountMax 3
    TCPKeepAlive yes
    Compression yes
 
# Server-specific settings
Host rpi4-01
    HostName 192.168.0.41
    User akora
    IdentityFile ~/.ssh/homelab_ed25519
    StrictHostKeyChecking accept-new
    ServerAliveInterval 60
    ServerAliveCountMax 3
 
Host rpi4-02
    HostName 192.168.0.42
    User akora
    IdentityFile ~/.ssh/homelab_ed25519
    StrictHostKeyChecking accept-new
    ServerAliveInterval 60
    ServerAliveCountMax 3
 
Host rpi5-01
    HostName 192.168.0.51
    User akora
    IdentityFile ~/.ssh/homelab_ed25519
    StrictHostKeyChecking accept-new
    ServerAliveInterval 60
    ServerAliveCountMax 3
 
Host zima-01
    HostName 192.168.0.91
    User akora
    IdentityFile ~/.ssh/homelab_ed25519
    StrictHostKeyChecking accept-new
    ServerAliveInterval 60
    ServerAliveCountMax 3

This way, a simple SSH would look like:

ssh rpi4-01

Domain names

Try to secure a short domain name for the lab. You will type it quite often.

For me this is l4n.io.

I have it configured on Cloudflare, and I use Cloudflare’s DNS for the lab.

Over the past few weeks I went through two experiments: one with super short, abbreviated subdomain names and finally, I settled for a mostly non-abbreviated, but still short set of subdomain names.

Iteration one: Abbreviated subdomain names

Super short names, the goal is to limit it to 2, maximum 3 characters if possible.

ServiceHostURL
Portainerrpi4-02pt.l4n.io
Portainer Agentrpi4-01, rpi5-01, zima-01N/A
Twingate Connectorrpi4-02, zima-01N/A
Nginx Proxy Managerrpi4-02npm.l4n.io
Uptime Kumarpi4-02up.l4n.io
Nutify (RPI4)rpi4-02ups-rpi4.l4n.io
Nutify (Zima)zima-01ups-zima.l4n.io
Homepagezima-01home.l4n.io
Docker Socket ProxyAllN/A
WatchtowerAllN/A
Giteazima-01git.l4n.io
Pi-holerpi5-01ph.l4n.io
n8nrpi5-01n8n.l4n.io
Vaultwardenzima-01vw.l4n.io
Syncthingrpi5-01sync.l4n.io

Iteration two: Non-abbreviated subdomain names

More human-readable names, but still not overwhelmingly long.

ServiceURL
Portainerportainer.l4n.io
Traefiktraefik.l4n.io
Homepagehome.l4n.io
Giteagit.l4n.io
n8nn8n.l4n.io
Syncthingsync.l4n.io
Dozzledozzle.l4n.io
SFTPGosftpgo.l4n.io

…and even some network equipment got their names following this pattern:

DeviceURL
Routerrouter.l4n.io
NASnas.l4n.io

Routing (& HTTPS)

Traefik is used for routing and HTTPS. The main benefit is, that I’ve got Traefik configured with a wildcard certificate (for *.l4n.io), any new services will automatically get set up properly.