NICs and Names

Learn about host names, DNS, FQDN, NICs, segmenting high volume traffic, handling production traffic, and configuration for multiple production interfaces.

Host names

One of the great misunderstandings in networking is about the hostname of a machine. That’s because hostname can be defined in two distinct ways.

First, a hostname is the name an operating system uses to identify itself. This is what you see when you run the hostname command. The administrator of the machine can set that hostname and the default search domain. Together, the concatenation of the hostname and search domain is called the fully qualified domain name (FQDN).

The second definition of hostname pertains to the external name of the system. Other computers expect to connect to the target machine using that hostname. When a program tries to connect to a particular hostname, it resolves that name via DNS. DNS resolves the desired name, maybe through a recursive query up to higher authorities, and ultimately returns an IP address.

DNS and FQDN

Did you spot the discrepancy? There’s no guarantee that the machine’s own FQDN matches the FQDN that DNS has for its IP address. In other words, a machine may have its FQDN set to spock.example.com but have a DNS mapping as mail.example.com and www.example.com. The fundamental disconnect is that a machine uses its hostname to identify the whole machine, while a DNS name identifies an IP address. Multiple DNS names can resolve to the same IP address.

For load-balanced services, a DNS name can also resolve to multiple IP addresses. That means that DNS name to IP address is a many-to-many relationship. But the machine still acts as if it has exactly one hostname. Many utilities and programs assume that the machine’s self-assigned FQDN is a legitimate DNS name that resolves back to itself. This is largely true for development machines and largely untrue for production services.

NICs

There’s another many-to-many relationship in the mix as well. A single machine may have multiple network interface controllers (NICs). If we run “ifconfig” on a Linux or Mac machine, or “ipconfig” on a Windows machine, we’ll probably see several NICs listed. Each NIC can be attached to a different network. Each active NIC gets an IP address on its particular network. This is called multihoming. Nearly every server in a data center will be multihomed. A dev box usually has multiple NICs for the sake of mobility. One will be a wired Ethernet port (for those desktops or laptops that have wired Ethernet). Another NIC will be for Wi-Fi. Both of those have physical hardware handling them. A loopback NIC is a virtual device. It handles good old 127.0.0.1.

Multihomed data centers

Data center machines are multihomed for different purposes. They enforce security by separating administration and monitoring onto a different network.

Get hands-on with 1400+ tech skills courses.