Mixed DHCP/static IP addressing easy to set up?

I have a Linksys WRT54G wi-fi router which until recently I have been using with its default DHCP settings. Over the weekend, I discovered that two of my projects (setting up a PC running Ubuntu as a backup server using Samba and setting up remote desktop access from Windows XP to Ubuntu) require* that I switch over to fixed IP addresses. However, I want to continue using DHCP on my laptop, assuming that otherwise I will not be able to easily access public wi-fi locations when away from home.

My router’s DHCP server configuration lets me specify at which address to begin DHCP service, so it seems to me that all I have to do is assign the other devices static addresses, then make the next address the DHCP starting point. That is, if my router is going to be and I have 5 other devices that need static addresses, that uses up through, and I can tell my router to start using for DHCP.

Is it really that simple?

  • I recognize that technically “require” may be too strong a word, but suffice it to say that my beginner level of expertise with Linux obliges me to consider this a requirement. :slight_smile:


If you want to complicate things more, and your linux box is going to be on all the time, you might want to set it to hand out DHCP addresses instead. You can set dhcpd to give the same PCs the same addresses each time, and give unknown PCs addresses in a different range (which I do to separate out strange wireless users from my own hardware).

Edit: This is good 'cause all your hardware gets set to DHCP regardless, and is managed centrally, instead of futzing with Control panels and such if you want to switch something around.

I have my Linux box set up to hand out specific IP addresses to specific computers using DHCP, like Nanoda describes. For computers that aren’t specified, it hands out addresses between and It’s actually very simple to set up – you just put a few sections in your dhcpd.conf file telling it the MAC address for each static IP computer, and the IP address you want that computer assigned.

I also have a Linksys WRT54G router, and using some third-party firmware, it can do the same thing, handing out specific IP addresses to specific computers (well, when I say “specific computers” I mean “specific network cards,” since it works by MAC address, which is basically the serial number of the card) and handing out sequential addresses to other computers. Unfortunately, the firmware I used doesn’t seem to work on the newst models of the WRT54G, but the new Belkin and D-Link routers that I’ve bought have this capability built in, so I’ve switched to those brands.

Anyway, if you need any help with the specifics, just ask.

Yep. It’s pretty much that simple.

Alternate technique.

Configure your DHCP service to start and with a pool size of 50. Set the subnet mask to Then assign your static devices starting at

This way you should have plenty of room for expansion. If you grow beyond this, then you’re to the point you’ll really need to learn some of the rules of TCP/IP.

Thanks, everyone, I really appreciate the suggestions.

I may at some point let my Linux box hand out DHCP assignments, but if I do, I’ll probably wait until I’m using it as a Primary Domain Controller … if I ever really need to do that. It’s just me and my 4 desktops and my 1 laptop, so I really don’t need too much in the way of complexity.

I’ll tackle this little project tonight and report back my results!