Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a straightforward home network setup where everything is routed via the broadband router. I have a Windows 7 box and a Gentoo linux (currently) livecd box connected via power over ethernet to the router. In the process of installing linux on that box permanently, working via cli over SSH from Windows. At the start, about 5 days ago, when I ran /etc/init.d/sshd start on the livecd I could connect to it via Windows 7 using the hostname 'livecd'. Yesterday my putty client wouldn't find the box until I pinged it first using it's IP address.

Today the ping-then-putty didn't work so I had to enter in the IP address into putty instead of hostname. I'm not that concerned but I do want to know the reason behind not finding/resolving the hostname - am I right in thinking it's a DHCP issue somewhere?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Accessing by hostname depends on DNS or some other form of name resolution (usually NetBIOS or mDNS).

Many home routers act as DHCP+DDNS servers, with a DNS zone named home. or local. or similar being hosted by the router itself, and automatically updated whenever a DHCP request is made. (This of course requires that the DHCP request include the system's hostname.)

If your Gentoo system has been running for a long time and if the router has been restarted since, it is possible that the router forgot all leases and the corresponding DDNS entries. (Mine does that.) It could also be that the lease simply expired and Gentoo didn't renew it.

Make sure you have a DHCP client running (either dhcpcd or dhclient). If it is, tell it to renew the DHCP lease (dhcpcd -n eth0) or just restart the client entirely.


The other common option is local name resolution, usually either NetBIOS used by Windows or mDNS in Linux/BSD. For either, the Gentoo system would have to have the appropriate server running (Samba nmbd or Avahi avahi-daemon respectively). This is convenient, but very unlikely to be related to your current problem, since they would have required prior configuration.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.