Which IP addresses can I use for a home network?

Normally I set up my computers at home using DHCP. It works, it’s easy, no issues. The problem now is that one of them is a server, and it needs to have a consistent IP address. DHCP was working just fine, and reassigning the same address for the last 6 months, but apparently that was just lucky, and my luck ran out. After I rebooted the router it decided to give the server a different IP, which broke a bunch of things and made me unhappy.

Since it doesn’t need to be dynamic, I figure I can give the server a static IP. But how do I know what to give it? And is it just as simple as setting it on the server, or do I have to tell the router about it somehow?

(Bonus question: is there some way to fix this using some kind of local DNS?)

It should be possible to just setup the DHCP settings in the router to reserve a specific address for the server, based on the MAC address of the network card, which will be unique for the server. On my wireless router I can open a web browser to 192.168.0.1 (the router’s address) and configure it there. You’ll need to check the documentation for your router to see how to configure the DHCP settings.

You can get the MAC address of the server by opening a command prompt window and typing “ipconfig /all”. The “Physical Address” is the MAC address, a set of 6 hexadecimal numbers. On Unix systems ‘ifconfig’ should show the MAC address for each interface.

If you just set an IP on the server, you need to make sure the DHCP won’t assign that same address to another machine. So you have to get into the DHCP configuration either way.

If it’s a small network, I wouldn’t bother with DNS. Setting up ‘hosts’ files on each machine is easier if you just want to use a name instead of the IP.

Most DHCP servers in consumer routers default to a /24 network (net mask 255.255.255.0) such as 192.168.0.x or 192.168.1.x. If you check the DHCP settings, you will probably find that it allocates only a subset of the 254 available addresses (excluding 0, the “broadcast” address, and the address assigned to the router itself, typically 1) in a /24 net, typically 100-150. This leaves the balance of the range available for static allocation to servers and devices.

As for DNS, unless you go to the trouble of running a DNS server (both Linux/BSD and Windows have easy to use servers that you can use), the simplest solution is just to modify your hosts file (/dev/hosts on Unix/Linux/BSD, %SystemRoot%\system32\drivers\etc\hosts on Windows) to statically name the server.

Must be brain-lock after the holidays. I meant /etc/hosts, not /dev/hosts.

Cool, so I can just move the DHCP starting address and then use addresses that are below that… works for me.