Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Computing > NZ Computing > DHCP assigning IP to others.

Reply
Thread Tools

DHCP assigning IP to others.

 
 
cowboyz
Guest
Posts: n/a
 
      01-04-2004
How does a host computer decide who gets what IP.


I ask because of the following.

For about a month or more I have had an Xbox hooked into my PC. The PC is
host and Xbox set to obtain IP automatically. Sometimes the Xbox is off,
sometimes the PC is off. Doesn't matter which order you turn them on the IP
of the Xbox is always 192.168.0.38

That was until I wrote an automatic script to fetch my saved games off the
xbox. Next reboot the xbox was on 192.168.0.12

No big deal to get around it I set the Xbox to static IP but I was wondering
how XP decides who gets what IP. If the Xbox had a different IP every day
I could understand it. But then again, why isn't the Xbox allocated
192.168.0.2? I would think that when assigning IP address's it would ping
the next in queue and if no reply then give out that one.

Is this a reasonable question or just one of those things we accept and move
on?



 
Reply With Quote
 
 
 
 
Dave Taylor
Guest
Posts: n/a
 
      01-04-2004

> No big deal to get around it I set the Xbox to static IP but I was
> wondering how XP decides who gets what IP. If the Xbox had a
> different IP every day I could understand it. But then again, why
> isn't the Xbox allocated 192.168.0.2? I would think that when
> assigning IP address's it would ping the next in queue and if no reply
> then give out that one.
>
> Is this a reasonable question or just one of those things we accept
> and move on?
>
>
>
>

It is microsoft, move along, nothing to see....

The IP address was assigned using DHCP. If you do an ipconfig /all in a
command window, (start, run, cmd, enter, ipconfig /all, enter) you will
see a line listing the lease time. This is the amount of time that the
DHCP server (your router, ISP whatever) has allocated for the MAC address
of the XP machine. Windows does strange things, like randomize the next
IP assigned, in its DHCP server.( A psuedo-security feature) In you
situation you are better off with a staticly assigned IP for the Xbox.
Never ever write scripts based on IP addresses in a DHCP environment if
at all possible, as you have noticed.
Ciao, Dave
 
Reply With Quote
 
 
 
 
Enkidu
Guest
Posts: n/a
 
      01-04-2004
On Mon, 5 Jan 2004 08:50:35 +1300, "cowboyz" <(E-Mail Removed)> wrote:

>How does a host computer decide who gets what IP.
>
>
>I ask because of the following.
>
>For about a month or more I have had an Xbox hooked into my PC. The PC is
>host and Xbox set to obtain IP automatically. Sometimes the Xbox is off,
>sometimes the PC is off. Doesn't matter which order you turn them on the IP
>of the Xbox is always 192.168.0.38
>
>That was until I wrote an automatic script to fetch my saved games off the
>xbox. Next reboot the xbox was on 192.168.0.12
>
>No big deal to get around it I set the Xbox to static IP but I was wondering
>how XP decides who gets what IP. If the Xbox had a different IP every day
>I could understand it. But then again, why isn't the Xbox allocated
>192.168.0.2? I would think that when assigning IP address's it would ping
>the next in queue and if no reply then give out that one.
>

It can't do that because the PC that is currently leased that address
might be off, but may come on again before the lease expires. If it
just pinged and gave out the address, then when the PC came on line
there would be an IP address conflict. So it must give out an unleased
address. Again it doesn't ping becuse it knows that there should be no
machine likely to come on with that address.

Sorry, I don't know the algorithm that is used!
>
>Is this a reasonable question or just one of those things we accept and move
>on?
>

There may be something on it on the Internet I guess. Tried a Google?

Cheers,

Cliff

--

Christmas comes but once a year, thank the gods. I don't think
that I could cope with twice.
 
Reply With Quote
 
T.N.O.
Guest
Posts: n/a
 
      01-04-2004
Enkidu wrote:
> Again it doesn't ping becuse it knows that there should be no
> machine likely to come on with that address.


Also, if your machine is set not to reply to echo requests(pings) then
it wont respond to pings(obviously) and the dhcp server would try to
hand out that IP, and that aint gonna work.

 
Reply With Quote
 
XPD
Guest
Posts: n/a
 
      01-04-2004

"cowboyz" <(E-Mail Removed)> wrote in message
news:bt9qqc$b5m$(E-Mail Removed)...
> How does a host computer decide who gets what IP.
>

http://searchnetworking.techtarget.c...213894,00.html

Maybe of some help


 
Reply With Quote
 
Enkidu
Guest
Posts: n/a
 
      01-04-2004
On Mon, 05 Jan 2004 10:03:57 +1300, "T.N.O." <(E-Mail Removed)> wrote:

>Enkidu wrote:
>> Again it doesn't ping becuse it knows that there should be no
>> machine likely to come on with that address.

>
>Also, if your machine is set not to reply to echo requests(pings) then
>it wont respond to pings(obviously) and the dhcp server would try to
>hand out that IP, and that aint gonna work.
>

Yeah, but there's no good reason not to respond to pings on a network.

Cheers,

Cliff
--

Christmas comes but once a year, thank the gods. I don't think
that I could cope with twice.
 
Reply With Quote
 
cowboyz
Guest
Posts: n/a
 
      01-04-2004

"Dave Taylor" <(E-Mail Removed)> wrote in message
news:Xns9467625CCBEE0daveytaynospamplshot@202.20.9 3.13...
>
> > No big deal to get around it I set the Xbox to static IP but I was
> > wondering how XP decides who gets what IP. If the Xbox had a
> > different IP every day I could understand it. But then again, why
> > isn't the Xbox allocated 192.168.0.2? I would think that when
> > assigning IP address's it would ping the next in queue and if no reply
> > then give out that one.
> >
> > Is this a reasonable question or just one of those things we accept
> > and move on?
> >
> >
> >
> >

> It is microsoft, move along, nothing to see....
>
> The IP address was assigned using DHCP. If you do an ipconfig /all in a
> command window, (start, run, cmd, enter, ipconfig /all, enter) you will
> see a line listing the lease time. This is the amount of time that the
> DHCP server (your router, ISP whatever) has allocated for the MAC address
> of the XP machine.



Oh. That makes sense.

>Windows does strange things, like randomize the next
> IP assigned, in its DHCP server.( A psuedo-security feature)


Not a particularly good security feature but .....

>In you
> situation you are better off with a staticly assigned IP for the Xbox.


I came to that conclusion too.

> Never ever write scripts based on IP addresses in a DHCP environment if
> at all possible, as you have noticed.
> Ciao, Dave



 
Reply With Quote
 
cowboyz
Guest
Posts: n/a
 
      01-04-2004
Enkidu wrote:
> On Mon, 5 Jan 2004 08:50:35 +1300, "cowboyz" <(E-Mail Removed)> wrote:
>
>> How does a host computer decide who gets what IP.
>>
>>
>> I ask because of the following.
>>
>> For about a month or more I have had an Xbox hooked into my PC. The
>> PC is host and Xbox set to obtain IP automatically. Sometimes the
>> Xbox is off, sometimes the PC is off. Doesn't matter which order
>> you turn them on the IP of the Xbox is always 192.168.0.38
>>
>> That was until I wrote an automatic script to fetch my saved games
>> off the xbox. Next reboot the xbox was on 192.168.0.12
>>
>> No big deal to get around it I set the Xbox to static IP but I was
>> wondering how XP decides who gets what IP. If the Xbox had a
>> different IP every day I could understand it. But then again, why
>> isn't the Xbox allocated 192.168.0.2? I would think that when
>> assigning IP address's it would ping the next in queue and if no
>> reply then give out that one.
>>

> It can't do that because the PC that is currently leased that address
> might be off, but may come on again before the lease expires. If it
> just pinged and gave out the address, then when the PC came on line
> there would be an IP address conflict.



Why is that? If PC1 was hosting at x.x.x.1 and PC2 was on and got assigned
x.x.x.2 and PC3 was x.x.x.3 and then pc2 and pc3 were turned off and pc 3
was turned on pc1 would ping x.x.x.2 to find it doesn't exist and allocate
x.x.x.2 to pc3. When pc2 gets turned on pc1 would ping x.x.x.2 to get a
reply so ping x.x.x.3 to get no reply so pc2 would become x.x.x.3.

Seems logical.
The only thing holding up this theroy is leases. But if there were no
leases it would work fine.

>So it must give out an unleased
> address. Again it doesn't ping becuse it knows that there should be no
> machine likely to come on with that address.
>
> Sorry, I don't know the algorithm that is used!
>>
>> Is this a reasonable question or just one of those things we accept
>> and move on?
>>

> There may be something on it on the Internet I guess. Tried a Google?
>
> Cheers,
>
> Cliff



 
Reply With Quote
 
cowboyz
Guest
Posts: n/a
 
      01-04-2004
T.N.O. wrote:
> Enkidu wrote:
>> Again it doesn't ping becuse it knows that there should be no
>> machine likely to come on with that address.

>
> Also, if your machine is set not to reply to echo requests(pings) then
> it wont respond to pings(obviously) and the dhcp server would try to
> hand out that IP, and that aint gonna work.


I didn't think that machines firewalled would respond in dhcp environment
anyway (excluding host). Completely untested but I didn't think it would
work.



 
Reply With Quote
 
cowboyz
Guest
Posts: n/a
 
      01-04-2004
XPD wrote:
> "cowboyz" <(E-Mail Removed)> wrote in message
> news:bt9qqc$b5m$(E-Mail Removed)...
>> How does a host computer decide who gets what IP.
>>

>

http://searchnetworking.techtarget.c...213894,00.html
>
> Maybe of some help


ta. explains the concept of a lease. which seems to me like the concept of a
lawyer. (If it weren't for lawyers, we wouldn't need lawyers)



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Assigning methods to objects, and assigning onreadystatechange to an XMLHttpRequest -- an inconsistency? weston Javascript 1 09-22-2006 09:33 AM
Wireless DHCP clients cannot obtain an IP address from the DHCP se =?Utf-8?B?SGVpbkQ=?= Wireless Networking 0 01-08-2006 03:41 PM
configuring Cisco Router to preventing assigning DHCP address Rami Rosen Cisco 13 10-24-2004 01:46 PM
ASSIGNING A STATIC IP ADDRESS IN A DHCP NETWORK =?Utf-8?B?RlJBTlo=?= MCSE 8 04-16-2004 02:35 AM
if Active Directory no DHCP? or: Where ist my DHCP Ingo Hauf Computer Support 2 10-18-2003 02:25 PM



Advertisments