>_ IzzyLab

Topic breakdown

Before the system goes to ask a DNS server for a name, it looks at the local resolver — and /etc/hosts usually comes first in the name resolution order (nsswitch.conf). This lets you hard-bind a hostname to a specific IP without any DNS: one line of the form "address space name". It's better to check resolution via getent hosts rather than ping, because getent shows exactly the result of the resolver working across all sources, and lines in /etc/hosts are matched top to bottom by the first match — a conflicting entry higher up can override the correct one below.

What's checked

  1. payments.internal resolves to 127.0.0.1
  2. There's one entry for the name

What it looks like