Mac – How should I reserve IP addresses for the home LAN

ip addresslanmac addressnetworkingsubnet

My Netgear router supports MAC-based IP reservation, and I'm setting up my very first home LAN where I want multiple Ubuntu servers to be given dedicated IP addresses. This is a consumer-grade router, and because of some other constraints, this MAC-based IP binding is definitely the best solution for getting "dedicated" IPs.

My router's IP address is 192.168.1.1. I'm wondering:

  • What should my subnet mask be?
  • What should my 5 Ubuntu server IPs be?

Since I've never done this before, I'm 95% confident that I am on the right track but wanted to be sure before I started assigning things and making decisions.

Since this is a home LAN I really don't have a need for multiple subnets, so to me, a subnet mask of 255.255.255.0 should do the trick for my 5 servers.

From there I was thinking about just going sequentially, so: 192.168.1.2192.168.1.6.

Is there a "better" mask I should be using? "Better" IP addresses? This is sort of a "best practices" question for someone whose done this more than once. I guess what I'm asking is: does my design stink, and if so, why (what should I be doing different)? Thanks in advance!

Best Answer

What I do is limit the dhcp range in the router to the first 50 ip addresses, then assign static ip's to my servers outside this range, this prevents collisions on the network.

192.168.1-2 to 192.168.1.50 is the dhcp range, then I start static ip's at 51 and above for servers.

triple 255 is fine.

Further explanation.

Benefit of narrowed dhcp range, you may have devices or other PC's on the network you did not or cannot hard address, to they will depend on the router to assign them an ip address using dhcp, so you have to limit the router on how many it can hand out, leaving the rest of them for hard addressing by you. Some routers by default have a narrowed dhcp range, some do not, you have to look in the routers firmware and make changes if necessary.

This way devices that use dhcp can never get any of your hard addresses outside the narrowed dhcp range you set up in the router, collisions could happen if you don't narrow the range and one of your hard addressed servers is turned off and another device starts up and the router hands it the ip address the server had before it was shut down, then you start the server, it tries to connect to the router using its hard address (not dhcp) and the router says no, someone else has this ip.

Hard addressing (assigned ips) is done in the PC/Server operating System network adapter settings, not on the router, at least this is how I do it.

Related Question