Networking Forums

Networking Forums > Wireless Networking > Wireless Internet > determine IP r without DHCP

Reply
Thread Tools Display Modes

determine IP r without DHCP

 
 
rmc
Guest
Posts: n/a

 
      05-15-2006, 07:37 AM
Hi,

I'm running linux on my laptop but my dhcp client doesn't always works
when connecting to a hotspot.

Is there an easy way to determine the IP range and gateway of the
connected hotspot without DHCP so I can setup my static IP accordingly?

tried kismet but that doesn't show the IP range with or without the
"wepkey=$B:S:S:I,$wephexkey" option. Also ethereal only shows ARP
packets....

The alternative now is to dual-boot into XP to see the correct values
but that's always a hassle.

regards,

rmc
 
Reply With Quote
 
 
 
 
Derek Broughton
Guest
Posts: n/a

 
      05-15-2006, 12:17 PM
rmc wrote:

> I'm running linux on my laptop but my dhcp client doesn't always works
> when connecting to a hotspot.
>
> Is there an easy way to determine the IP range and gateway of the
> connected hotspot without DHCP so I can setup my static IP accordingly?
>
> tried kismet but that doesn't show the IP range with or without the
> "wepkey=$B:S:S:I,$wephexkey" option. Also ethereal only shows ARP
> packets....
>
> The alternative now is to dual-boot into XP to see the correct values
> but that's always a hassle.


I think you're going at this from the wrong direction. XP isn't setting
static IPs either - it just has a DHCP client with the correct
configuration. So you need to establish what gets set up differently
between Linux & Windows, then make sure that your Linux dhcp client (which
one are you using) is set up correctly. ime, the only thing I've needed to
play with is forcing it to send a hostname to the DHCP server (not likely
an issue with a hotspot). I'm pretty sure figuring out why your DHCP
client isn't working will be easier than any method of manually setting a
static IP (especially one that won't interfere with operation of the
hotspot).
--
derek
 
Reply With Quote
 
Moe Trin
Guest
Posts: n/a

 
      05-16-2006, 12:45 AM
On Mon, 15 May 2006, in the Usenet newsgroup alt.internet.wireless, in article
<fdW9g.72264$(E-Mail Removed)>, rmc wrote:

>I'm running linux on my laptop but my dhcp client doesn't always works
>when connecting to a hotspot.


1. What distribution/release?
2. What DHCP client?
3. What other network setup on the system?
4. What firewall rules in place _before_ getting a DHCP lease? After?

Find out why your client isn't working. Faking it isn't going to be the
right solution.

>Is there an easy way to determine the IP range and gateway of the
>connected hotspot without DHCP so I can setup my static IP accordingly?


Sniffing may tell you what is going on - but how do you know what static
address to choose? What you think might be unused could be idling while
the user is getting another cup of coffee or what-ever.

>tried kismet but that doesn't show the IP range with or without the
>"wepkey=$B:S:S:I,$wephexkey" option. Also ethereal only shows ARP
>packets....


IN THEORY, you can guess what the network range and mask are by noting the
range of addresses seen - whether ARP, or DHCP requests, or what-ever.
You may or may not get it right.

>The alternative now is to dual-boot into XP to see the correct values
>but that's always a hassle.


and runs into the same problem - is the address you guess going to be
available or not. When you reboot, one of the things you are doing is
telling the DHCP server that you don't need that address any more, and
it _could_ be allocated to another.

Find out why your DHCP client isn't working, and fix that. Then you won't
need to guess.

Old guy
 
Reply With Quote
 
David Taylor
Guest
Posts: n/a

 
      05-16-2006, 06:53 AM
> available or not. When you reboot, one of the things you are doing is
> telling the DHCP server that you don't need that address any more, and
> it _could_ be allocated to another.


Actually, it's the opposite. When you reboot, XP issues a DHCPRequest
thus telling the DHCP server that you *need* that IP address. A DHCP
Release is not issued during a reboot.

David.
 
Reply With Quote
 
Derek Broughton
Guest
Posts: n/a

 
      05-16-2006, 12:22 PM
David Taylor wrote:

>> available or not. When you reboot, one of the things you are doing is
>> telling the DHCP server that you don't need that address any more, and
>> it _could_ be allocated to another.

>
> Actually, it's the opposite. When you reboot, XP issues a DHCPRequest
> thus telling the DHCP server that you *need* that IP address. A DHCP
> Release is not issued during a reboot.


"need"? I'm not an expert but it's more along the lines of "want", isn't
it?

From my log:
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 5
DHCPOFFER from 192.168.22.1
DHCPREQUEST on eth1 to 255.255.255.255 port 67
DHCPACK from 192.168.22.1

at that point, the DHCP server said, "yes, here's your old IP of
192.168.22.105 back". I think the DHCP server can also say DHCPNAK ("that
IP is not currently available") at which point your client either gives up,
or says "OK, give me anything you've got"
--
derek
 
Reply With Quote
 
David Taylor
Guest
Posts: n/a

 
      05-17-2006, 08:15 AM
> "need"? I'm not an expert but it's more along the lines of "want", isn't
> it?


Yeah ok, request that IP address.
>
> From my log:
> DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 5
> DHCPOFFER from 192.168.22.1
> DHCPREQUEST on eth1 to 255.255.255.255 port 67
> DHCPACK from 192.168.22.1
>
> at that point, the DHCP server said, "yes, here's your old IP of
> 192.168.22.105 back". I think the DHCP server can also say DHCPNAK ("that
> IP is not currently available") at which point your client either gives up,
> or says "OK, give me anything you've got"


What log is that from? Router or PC? PC running what because that's a
complete DHCP address allocation? If that's linux then the behaviour is
different to the NT OS.

Yes the DHCP server can Nack the DHCP request but the circumstances
would be for a wrong subnet request as the most likely candidate at
which point the whole DHCP process starts again.

All I was pointing out is that when XP starts, because it already has an
address, it issues a DHCPRequest. There's a sublety in that if the
machine has not been rebooted and needs to renew the address then it's a
directed packet to the DHCPServer requesting the same IP address at 50%
and then 87.5% of the lease time. However, if the machine is rebooted,
XP still performs a DHCPRequest of the same IP address but this time as
an IP broadcast. This is so that if the machine has moved and the
subnet is now invalid, any DHCP server can nack the request and then XP
moves to a DHCPDiscover.

If the machine has no valid address for the subnet then if it has moved,
it cannot inform the original DHCP server that it is releasing the
address, it can only obtain a new one from the new location.

David.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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
Howto determine if a system is using DHCP or STATIC IP shcodip Linux Networking 8 03-21-2007 03:21 AM
how to determine the wwn name. Spin Windows Networking 4 09-19-2006 11:25 AM
How do I determine which eth i/f is which? delphinuscadmus@yahoo.com Linux Networking 3 03-26-2006 08:33 AM
how to determine the dhcp servers within the network OM Windows Networking 1 11-24-2005 11:09 AM
How to determine if my NIC's are up? dkelly6@nospam.gmail.com Linux Networking 5 11-03-2005 07:45 AM



1 2 3 4 5 6 7 8 9 10 11