Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.




1875 posts

Uber Geek
+1 received by user: 145

Trusted

Topic # 99982 31-Mar-2012 08:48
Send private message

Folks, my router is set to act as a DHCP server in the usual manner, viz. devices connecting to the network are assigned IP adressess from the stipulated range.

I connect another device where I have set a specific IP address, then naturally the router will assign that when the device comes 'online'.

My question is, what happens in the situation of where, for example, a couple of other devices are connected to the network first, and then the device with the pre-defined IP address is connected?

Presumably the first two devices are assigned IP adresses, say 192.xxx.xx.3 and .4, but then the device with the pre-defined IP address of say 192.xxx.xx.3 attempts to connect.

Does the DHCP server 'shuffle' the devices about, thus assigning the pre-defined device its correct IP address and then re-assigning the other two up the list?

I can see the value of assigning pre-defined devices somewhat high on the IP list, e.g. 192.xxx.xx.25 to overcome any conflicts, and even reserving that address in the router too.

Tks, R.

Create new topic
489 posts

Ultimate Geek
+1 received by user: 98


  Reply # 602810 31-Mar-2012 08:56
Send private message

There's normally two ways to do this.

Method 1 (which I would recommend):
With your DHCP set a range that leaves some IP addresses free.  E.g. Set the range to 192.168.1.2 - 192.168.1.50.  Then with your device that you want to have a fixed IP address use one above that range.  E.g. 192.168.1.51 (or higher).

Method 2
In your DHCP settings you can (depending on your router/software) set a reserved address for the MAC address of the device.  In this case you might choose 192.168.1.10 as the address in the range that you want your device to have.  Your DHCP device will only allocate that IP address to the specified MAC address.  As it happens the device will never ask for it (unless you want it to get its IP address from DHCP but always get the same address) but DHCP wont allocate it either.


Method 1 is probably the easier and its what I do on my LAN as I'm always playing with VMs for various things and therefore always give them address outside of the DHCP range knowing its free (unless of course I've used it for a previous VM).a


Edit: To answer your question about "shuffling" the IP addresses in a conflict...
Sort of.  If you have a device that has a fixed address (I'll use the 192.168.1.10 example again...but with no reservations set) its quite possible that a DHCP assigned device will get the .10 address.  When you then connect your fixed IP device, which also has a .10 address, a IP conflict will be detected.  I'm not too clear what would happen here.  The second device coming on line (so the fixed one) might spot that .10 is in use and therefore not connect.  Or it might bulldoze its way in and the DHCP assigned one spots the conflict so requests a new address.

Use one of the methods above to avoid this :)



1875 posts

Uber Geek
+1 received by user: 145

Trusted

  Reply # 602813 31-Mar-2012 09:09
Send private message

nzkc, thanks for that and yes, I figured methods 1 or 2 would resolve any conflicts.

Howvere, I was just wondering what would happen in the non-specified scenario ... maybe I just have to set up a test and try it out?

R.

 
 
 
 


1621 posts

Uber Geek
+1 received by user: 349

Lifetime subscriber

  Reply # 602824 31-Mar-2012 09:59
Send private message

you can also assign specific ip addresses to a particular MAC address, each device has it's own unique MAC address, so the router will only assign that paericular ip adress to 1 device



1875 posts

Uber Geek
+1 received by user: 145

Trusted

  Reply # 602834 31-Mar-2012 10:21
Send private message

Greg, yup, all known, thanks.

It's the non-specified situation I was wondering about.

R.

489 posts

Ultimate Geek
+1 received by user: 98


  Reply # 602955 31-Mar-2012 16:38
Send private message

Conflicts are detected, how they're handled may depend on the OSes involved.

21709 posts

Uber Geek
+1 received by user: 4483

Trusted
Subscriber

  Reply # 603084 31-Mar-2012 23:18
Send private message

I know that the windows 2003 DHCP server would go thru and make reservations in the range if things conflicted _sometimes_ so that address didnt get dished out, other time it would happily assign an address that I had already put into a printer or something else on the lan making everything really really flakey unless the PC happened to tell me about a confliting IP address, which was not very often.




Richard rich.ms

Create new topic



Twitter »

Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:



Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.


Geekzone Live »

Our community of supporters help make Geekzone possible. Click the button below to join them.

Support Geezone on PressPatron



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.