DHCP

The most important network service to setup is DHCP – Dynamic Host Configuration Protocol. Although the network information can be manually configured on each device  – a “static” connection – the device will immediately stop working if there are any changes to the network, or if the device is taken to a new network. For this reason, devices can be set to “DHCP” mode, in which they will send out a query on the network requesting a Configuration.

The designated DHCP server (in most cases on our firewalls, although an actual server still exists at some locations) will reply with the key pieces info information:

  • An available IP address for the device
  • The subnet mask for the network (so the device knows if an IP is on the same network or not)
  • The IP of the Default Gateway (so the device can route network traffic to that if the destination is not on the same network)

There are additional DHCP settings that can be sent (like the local domain of the network) but those aren’t required.

The DHCP server is responsible for handling its Scope (the IP range that can be handed out, and which should be within the subnet mask), the lease time (how long to keep an IP held for a device that may not still be on the network), and other options. It can also serve as a Relay if there are other DHCP servers on the same network.

Additionally, some IPs should ALWAYS be given to the same device, even if it’s offline and outside the lease time. For those, a DHCP reservation is created, where the device’s MAC address (a globally-unique ID for all pieces of network-capable hardware) is used to make sure that the IP is ALWAYS given to the device and NEVER given to anything else.

DNS

The second most important network service is DNS – the Domain Name Service. As mentioned in an earlier post, computers only know numbers (binary 1’s and 0’s but expressed to humans as IP addresses), whereas humans are better at remembering domain names – google.com, facebook.com, etc. The DNS server is responsible for translating IPs into domain names, and vice versa. DNS is an older protocol, so like others, it has more modern versions with additional security and encryption features, such as DNSSEC and DoH (HTTPS) and DoT (TLS).

Smaller & more local DNS servers will pass the request up the chain, but eventually some server has to be the official Authoritative source for a DNS entry. When managing a domain name, YOU are managing the Authoritative Nameserver, so DNS Records must be added. There are many record types, but the main ones are

  • A (and AAAA for IPv6) – returns an IP address for a given domain name
  • CNAME – Canonical name. returns a different domain name for a given domain name (used, for example, if your private email address is actually hosted by a larger company like Office 365)
  • MX – mail exchange. Returns the A record (required) of the servers that will handle email for the domain.
  • TXT – text records. Used for many things – domain authentication, email authentication checks, proof of domain ownership, and more.
  • NS – NameServer. The official source for DNS records
  • PTR – Pointer. Returns the CNAME for a request. Most commonly used in reverse DNS lookups to determine what the domain name is for a given IP address.

In addition to querying a DNS server, a device can also have a hosts file. This is a file on the device that will keep hardcoded DNS entries if, for example, you want to specify DNS records without having to run a server at all.

NTP

The Network Time Protocol is used by devices to keep their clocks synced to a central authority. We try to avoid using this and just let devices sync to a central authority online somewhere.