Thomas (boggyb) wrote,

  • Music:

"I'm localhost!" "No, I'm localhost!"

The other day, support managed to find a network with what appears to be several devices all claiming that they're called "localhost".

They were trying to track down some routing issue or other, and the output from the route command was looking something like:

Destination     Gateway         Genmask         Iface    localhost   eth1    localhost   eth2
default         eth0

Naturally, you assume that you've screwed up your network setup, formed of a maze of twisty little ifcfg-eth0 files. Except on the actual server some of the network interfaces were bonded together, several VLANs were in use, and there was a bridge interface as well somewhere (I forget the actual layout and addresses, so this example has been rather simplified). Anyway, as part of trying to track it down someone tried removing the default interface, and got a routing table something like this:

Destination     Gateway         Genmask         Iface   eth1   eth2

Naturally, you assume that the network scripts are doing weird and unhelpful things. And so you spend ages poking things in an attempt to make sense of the output without managing to make any headway.

Eventually someone tried running "route -n" instead of plain "route", and got this:

Destination     Gateway         Genmask         Iface   eth1   eth2         eth0


It turned out that if you asked the DNS server on that network to do a reverse lookup for, say,, it told you that that the hostname for that address was "localhost". As was the hostname for, or for several other addresses.

Tags: computing, fail, nablopomo, networks

  • Post a new comment


    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 1 comment