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 IIS7 on my computer, and I can access it through other computers in my house on the same network through my computer's IP address - 192.168.1.10x Instead of typing in http : //192.168.1.10x/ I want to be able to go to http : //somename/

I know you can change the hosts file to add it but I'd have to do that on each computer and I'd still have to type in the IP to access it from my iPod/Wii... etc.

share|improve this question

migrated from serverfault.com Jan 15 '11 at 10:48

This question came from our site for professional system and network administrators.

6 Answers 6

For "most clients", you can avoid using a DNS server setup, by using mDNS, which is used for names advertised by machines on the network. Think P2P. Very little security, so a name can be spoofed, but MacOSX and most consumer *nix flavours will support it out of the box. If you call the server "fred" then it can be reached as "fred.local", and you can even put "local" in your DNS search path, which any home router will support doing.

Apple call it Bonjour, and they have a Windows version. On Linux, the most common implementation is Avahi.

I doubt mDNS will work with a Wii, it should work with an iPod.

The more reliable approach is to use regular DNS, but if you're using a regular consumer home router then it probably does not support delegating a domain to your control, so you'll need to switch from using the DNS service of the router to another DNS server on your network. That DNS traffic will then have to pass through the NAT (assuming that you're using NAT, but your IP address examples imply you are), which will probably undo any security and increase the state association load on the router -- for cheap routers, this could be problematic.

IF you have a Linux/BSD-based Router, then things improve, as you can probably put stuff into a DNS service on the Router. For instance, many such things use dnsmasq, which makes this very easy. So the most reliable approach may be to install something like dd-wrt on your Router and then configure entries for hostnames to IP addresses in that.

share|improve this answer

Yes, you have to change the hosts file on each computer.

Alternatively, you can run your own DNS server, but you also need to change the DNS settings on each computer.

Do you suggest any new way of doing this?

share|improve this answer

You will have to configure DNS at some point if you want it to work at all different devices. The usual strategy is that you setup your own DNS server, make sure all devices in your local network connects to this, then you add a new zone with the names of the devices you want. Traditionally you add something like .local to the names to ensure you don't get a name collision.

It is possible to have devices register themselves in DNS when they are turned on, or to let the DHCP server do it. This is called "Dynamic DNS", and is specified in RFC 2136.

A more hacky solution is to register a normal domain name and then point subdomains to your (private) ip addresses. It will work just fine.

share|improve this answer
    
Using .local is a bad choice, as it's used for Bonjour's multi-cast DNS. –  Phil P Jan 15 '11 at 8:51

this can be done without a DNS server using the broadcast names (the machines name) so you could type http://mypc/ from within your network

Majority of routers have DHCP and their own DNS servers so you most likely have a DNS server already.

share|improve this answer

Change names of the machines. I did this 2 minutes ago, and it worked. Start menu -> Computer -> Properties -> Advanced system settings -> Computer Name -> Change...

Restart the machine

share|improve this answer

If the machines on you LAN run a modern operating system, then you just have to type

http://machine_name.local

to access it. don't forget the .local suffix.

To get the name from the IP, use

avahi-resolve-address IP
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.