The internal network core

Any working network needs some setup and configuration to be operative. The first thing every network needs are addresses. Those can be assigned statically, dinamically or a mix of both.

Addresses

While running a fully static network is simple enough, today's WiFi networking where devices like phones, tablets and laptops come and go make a fully static network outdated and limited.

At the same time, a fully dynamic network might be overkill as at least some devices are not mobile and will most probably never need to change address. Good examples are IoT devices, smart appliances, TV boxes, webcams and such.

The protocol behind a dynamic or mixed network is a DHCP server (see here) or the Dynamic Host Configuration Protocol which is how your devices will automatically get an IP address when they connect to your home network. Also additional information will be passed to the device, like gateway address and DNS server.

Names resolution

Another critical service for any network that is also connected to the internet is being capable to resolve domain names to network addressed, otherwise you would not be able to navigate or actually do anything meaningful on the internet.

The protocol behind names resolution it a DNS srver (see here).

The The DNS (Domain Name System) is how names are converted to addresses on the internet. Historically one of the oldest Internet Services still in use today, it suffers from a lot of drawbacks and issues, specially on the privacy side of things. The original plain-text protocol (on port 53, UDP) has been extended over the years with a few improvements like DNS over TLS (DoT) and DNS over HTTPS (DoH). Both the new extensions provide more privacy, as the requests are encrypted your ISP and middleman cannot snoop every website you visit, and more robustness as, paired with DNSSEC, it is now more difficult to feed you malicious DNS responses and redirect your traffic to bad websites (think of malaware and such).

Internet Routing

Now that a device in your network has an address and knows how to translate a name to the address of a destination server, all you need is a proper network routing to allow your devices to connect to those servers.

This is done via an ISP (Internet Service Provider) that connects your home network trough a gateway of some sort, to the internet. For added resillience, you might want to have more than one ISP so that is the primary goes down, the other one will take over and keep your home reachable.

While it doesn't matter if you have one or more ISPs (the “default” routing will always be over one ISP at a time), having more than one requires advanced configuration to operate correctly and switch when nedded (see here).

Legacy

At first i have been using DNSmasq, which is a seemingly easy approach to both DNS and DHCP for the home network. After a lengthly and annoying debugging session with Android devices i found out that DNS has evolved a lot and DNSMasq is today a bit outdated.

I decided then to go straight to the Gentoo standard DHCP server and Unbound DNS resolver/forwarder, and i couldn't be happier.

For future reference, the older DNSMasq information has been moved to a separate page (see here)