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.

On my Windows7, when I get into the properties of My Computer, I can see that my computer name is compname123. It seems that when I ping or connect (say remote access) to this computer from another computer, I can just write in the hostname compname123 without having to write the IP address. In this sense, the compname123, which is a computer name, is almost like a meaningful hostname that will resolve to the IP address automatically.

But is this really a hostname?

I notice that sometimes when the IP changes, I will not be able to connect from another computer using the computer name for a while. Somehow, though, the computer name will automatically reflect the new IP after some time.

Is my computer name a hostname? Can I even say I want my computer name to be stuck to a certain IP, especially in the case when I'm going to use a static IP? If so, how can I do this?

share|improve this question
3  
Do you know much about DNS... –  Dave May 22 at 7:51

1 Answer 1

up vote 12 down vote accepted

is this really a hostname?

The windows computer name is distinct but can, in some circumstances, act as a DNS hostname.

Windows has it's own traditional system of naming which is not DNS. This allows windows computers to communicate by name over TCP/IP even when a DNS server is not present. See NetBIOS naming services.

However when a Windows client obtains an IP-address from a Windows DHCP server in a Windows domain, typically the client computer name is then registered as a host name in the DNS service.

So the computer name isn't really a hostname until it has been registered as such with a naming service.

when the IP changes, I will not be able to connect from another computer using the computer name for a while.

Look up ARP caching.

Open a command prompt and enter arp -a and arp -?.

I want my computer name to be stuck to a certain IP,

Use a DHCP reservation in your DHCP server (based on MAC-address of primary network interface).

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.