6

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.

6 Answers 6

4

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.

4

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
3

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.

1

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?

1

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.

1
  • Using .local is a bad choice, as it's used for Bonjour's multi-cast DNS.
    – Phil P
    Jan 15, 2011 at 8:51
0

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .