Page 1 of 1 1
Topic Options
#101957 - 2003-06-06 09:29 PM How to re-discover DHCP server
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Anyone know how to dynamically re-discover the DHCP server under NT ? Without going into alot of detail (now) ... our wkstns are set to DHCP but because its not connected to the network, the DHCP address gets set to 255.255.255.255. I want to issue some kind of commandline tool that will re-discover it ... any ideas ?

-Network Dummy

btw - ipconfig /release /renew doesn't cut it. Im trying to renew the lease over VPN - which correct me if i'm wrong, may or may not be possible.

[ 06. June 2003, 21:32: Message edited by: Shawn ]

Top
#101958 - 2003-06-06 09:31 PM Re: How to re-discover DHCP server
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
That is how DHCP works.. by broadcasting to 255.255.255.255 and waiting for a response.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#101959 - 2003-06-06 09:35 PM Re: How to re-discover DHCP server
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Googling for HOW DHCP WORKS will turn up a bunch of hits like this one.

http://www.intranetjournal.com/articles/200004/im_dhcpb.html
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#101960 - 2003-06-06 09:38 PM Re: How to re-discover DHCP server
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
OK.. after I post my answer you changed the question. [Confused]

sorry
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#101961 - 2003-06-06 09:45 PM Re: How to re-discover DHCP server
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Not really changed. When i said "set to 255.255.255.255" i didn't mean broadcast that mask, I meant like in ipconfig /all example:

code:
Ethernet adapter El90x1:

Description . . . . . . . . : 3Com 3C90x Ethernet Adapter
DHCP Enabled. . . . . . . . : Yes
IP Address. . . . . . . . . : 0.0.0.0
Subnet Mask . . . . . . . . : 0.0.0.0
Default Gateway . . . . . . :
DHCP Server . . . . . . . . : 255.255.255.255

Q. How does one dynamically get the DHCP server back in business.

Top
#101962 - 2003-06-06 09:50 PM Re: How to re-discover DHCP server
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Sorry bud... no experience with VPN. I suspect the VPN endpoint serves up your IP for you. Not DHCP in the standard sense... more like the way RAS or PPPOE serves up IPs.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#101963 - 2003-06-06 09:59 PM Re: How to re-discover DHCP server
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Ja, i have very little experience with VPN as well. Thing is, static IP's on the wkstn would solve alot of the problems with this particular subset of wkstns here (home workers) - for some reason, I'm getting alot of push-back from other internal groups to get them static ips assigned.

And yeah, VPN assigns a virtual type ip from the VPN pool, but that doesn't help the local wkstn physical adapter to get a lease.

This whole business I am involved is much to long of a story to go into in detail, other than the desired effect that when a user logs in and gets the "unable to find DHCP server message" (because the lease expired) to simply click a desktop icon that will run a job to renew the lease while they are VPN'd - but sadly, the DHCP server ip is already set to this "bad value" prior to them logiging into VPN.

-Shawn

Top
#101964 - 2003-06-06 10:29 PM Re: How to re-discover DHCP server
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
If you have a client on a standard LAN and need to perform those tasks you would use ipconfig.
code:
c:\data\scripts>ipconfig /?

Windows 2000 IP Configuration


USAGE:
ipconfig [/? | /all | /release [adapter] | /renew [adapter]
| /flushdns | /registerdns
| /showclassid adapter
| /setclassid adapter [classidtoset] ]

adapter Full name or pattern with '*' and '?' to 'match',
* matches any character, ? matches one character.
Options
/? Display this help message.
/all Display full configuration information.
/release Release the IP address for the specified adapter.
/renew Renew the IP address for the specified adapter.
/flushdns Purges the DNS Resolver cache.
/registerdns Refreshes all DHCP leases and re-registers DNS names
/displaydns Display the contents of the DNS Resolver Cache.
/showclassid Displays all the dhcp class IDs allowed for adapter.
/setclassid Modifies the dhcp class id.

The default is to display only the IP address, subnet mask and
default gateway for each adapter bound to TCP/IP.

For Release and Renew, if no adapter name is specified, then the IP address
leases for all adapters bound to TCP/IP will be released or renewed.

For SetClassID, if no class id is specified, then the classid is removed.

Examples:
> ipconfig ... Show information.
> ipconfig /all ... Show detailed information
> ipconfig /renew ... renew all adapaters
> ipconfig /renew EL* ... renew adapters named EL....
> ipconfig /release *ELINK?21* ... release all matching adapters,
eg. ELINK-21, myELELINKi21adapter.

VPN complicates things a somewhat.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#101965 - 2003-06-07 07:36 PM Re: How to re-discover DHCP server
kholm Offline
Korg Regular
*****

Registered: 2000-06-19
Posts: 714
Loc: Randers, Denmark
Shawn

I believe that the best solution for you is you let the routers for the remote desktops act as DHCP server.

If you can configure the remote routers over the net it would be easy, otherwise you have to ask the users to bring in the router in and configure it inhouse.

If the router acts as DHCP server you will have gotten a lease before the VPN software/hardware is activated.

-Erik

Top
#101966 - 2003-06-07 07:51 PM Re: How to re-discover DHCP server
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Erik,

We went through a prototype phase for these "home worker" machines. With two variants:

1) One wkstn used a router to connect to DSL modem

2) One wkstn used a direct connect to DSL modem and PPP software driver.

They "the customer" along with some of "our" people (not me) made the descision to not use the router ... why ? I have not idea why. It also meant that we had to install a software firewall to protect the machine.

The root of the problem is that until the machine is connected to VPN, and because its still set to DHCP (which is how these machine are set in the office) ... the wkstn acts REALLY, REALLY sluggish during bootup, and during the initial login. In fact, because the bootup is so slow, things actually break (ie, startup tasks and services not starting properly) not all the time, but alot of times.

Once the machine is logged into VPN (after the second user logon for proper domain login &scripts) - the wkstn seems to pick-up steam.

The long part of this story is that we have tons of custom software on the wkstn (written by us) that is VERY network sensitive, therefore the hesitation to change anything. But, because we dont have a router serving-up IPs to the wkstn, I think I HAVE to convince the "customer" and "our guys" that going static IP is the only way to fix this.

In fact, I going to setup one of these wkstns on Monday and I am going to "slip-in" the static ip assignment and not tell anyone - if it breaks something, can always change back. If it works, we're laughing !

-Shawn

[ 07. June 2003, 19:52: Message edited by: Shawn ]

Top
#101967 - 2003-06-07 08:48 PM Re: How to re-discover DHCP server
Raceeend Offline
Starting to like KiXtart

Registered: 2002-05-09
Posts: 129
Loc: The Netherlands
When i work at home i also use VPN to connect it's over a cable connections but that can't that different. In my case the Cisco vpn concentrator acts as DHCP server but it is also possible to let the normal NT dhcp server give out ip addresses, then on the vpn concentrator DHCP forwarding must be activated. This option i do use for dail-up connections which works fine.

VPN uses UDP port 500 so your users be able to go through that port on there home adsl modem and laptop.
_________________________
regards, Martijn

Top
#101968 - 2003-06-07 10:38 PM Re: How to re-discover DHCP server
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
At home I have a D-Link Router/Gateway with DHCP server. I boot up and get an IP from the D-Link. I then VPN to a Cisco VPN concentrator which gives me another DHCP address. The local client is 192.168.0.102 then that gets nat'ed and the Cisco gives my VPN tunnel another IP that is internal to our corproate network.

[ 08. June 2003, 01:46: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#101969 - 2003-06-07 11:09 PM Re: How to re-discover DHCP server
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Shawn,

Howard is correct in that ANY DHCP VPN solution will alter your current IP to that of the connection point. That is how they work.

However, I thought you did Desktop Application delivery/solution providing work!. This is a LAN/WAN Network Engineers problem, not your area of support. It IS NOT a desktop issue (unless you have messed up the VPN software), it should be up to your Network Engineering group to make this work.

If you are stuck with it then you need to supply a LOT more technical information as to what equipment and methods you're using. We may be able to help you troubleshoot through it, but as I said, it should not really be on your plate of tasks. Do you even have Admin rights to setup/modify your Network Topology stuff?

Top
#101970 - 2003-06-09 09:52 AM Re: How to re-discover DHCP server
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Your PC will broadcast for an IP address. That is the way DHCP works. If it doesn't get a response, it doesn't get an address.

This means that you must have something on it's LAN that will give a DHCP address.

All is not lost though [Smile]

What you need to do is configure the router to proxy the request for you. On IOS (Cisco) this parameter you are looking for is "ip helper-address" and is defined on the LAN interface.

Set this to the IP address of your DHCP server, and away you go - don't forget to define a DHCP range that matches the LAN interface of the router.

Of course, the router needs to be able to talk to your DHCP server, so if the VPN tunnel is created on demand it needs to be done quickly enough so that the client doesn't time-out.

Top
#101971 - 2003-06-09 02:09 PM Re: How to re-discover DHCP server
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
I love this board ...

Ok, I think you guys have a handle on the issue and I'm about to take some of this great information (and some info that Erik provided to me personally) back to our networks guys ... but before I do, I need to understand something.

Martijn (raceeend) comment "the vpn concentrator DHCP forwarding must be activated" and Richard's comment "What you need to do is configure the router to proxy the request for you. On IOS (Cisco) this parameter you are looking for is "ip helper-address" and is defined on the LAN interface".

Are these saying the same thing or two different things ?

Top
#101972 - 2003-06-09 03:44 PM Re: How to re-discover DHCP server
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Same thing - I hadn't spotted it in Martijn's post.

You will find the facility called "DHCP forwarding", "DHCP Relay", "DHCP Proxy" depending on the hardware that is supplying the service.

The Lord alone knows why Cisco call it an "ip helper".

Top
#101973 - 2003-06-09 03:59 PM Re: How to re-discover DHCP server
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
ja - one of the things I did, when i got that annoying "Cannot find DHCP server" dialog on bootup, was to click "NO" to the message that said "Do you want to see this message again" type thing.

What I think happens, if you say "YES", is that NT will attempt to contact the DHCP server at certain intervals (dont know what the interval is).

This afternoon when I'm setting up this machine, I'm going to let NT retry as much as it wants - hoping by a long-shot that once VPN is connected, it will discover the DHCP server on it own. Maybe the network guys already have this setting turned on (I dont know) ... just a long shot.

Will advise, but I still need this info to recycle with the network dudes.

-Shawn

Top
#101974 - 2003-06-09 04:57 PM Re: How to re-discover DHCP server
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
If you have a DHCP address your machine will periodically attempt to renew the address from the server it was leased from.

The renewal happens when the DHCP client starts, or at half the lease period. IIRC it will contact the server directly, so a client with a reasonable lease time (say 30 days) should never actually lose it's lease as each time it is renewed it will get another 30 days.

You will only get problems if your lease is revoked or expired. This can happen when:
  • It is manually revoked on the server
  • It is manually released by the client (ipconfig /release)
  • The DHCP server is not contactable when the client tries top renew it at the lease half-life, or the client is switched off.
Once the lease is gone (or if this is a client which has no lease) you will get problems.
This is because the DHCP request is a local broadcast - until it gets the DHCP information the client will not have any routing/gateway information, and will not in any case know what the IP addres of the DHCP server is.

As it is a local broadcast it will not be propogated across the WAN - unless you are operating in a bridged mode.

Your router/concentrator will see the broadcast, and relay or proxy the request directly to the DHCP server. It will add information about the LAN address that the request was relayed from, which will allow the DHCP server to identify which address pool to allocate the IP address from. The response packet is send back to the router, which directs it to the client.

Imagine trying to get some advice about a leak from a plumber at the other end of the 'phone. You cannot use the phone because you are too far away from it and are anyway holding on to the leaky pipe. Your long suffering partner (who told you to call a professional) relays the information across the 'phone.

No matter how loud or how frequently you shout you will never hear an answer - you need the relay to do it for you.

Top
#101975 - 2003-06-10 10:50 AM Re: How to re-discover DHCP server
masken Offline
MM club member
*****

Registered: 2000-11-27
Posts: 1222
Loc: Gothenburg, Sweden
yeah, why Cisco calls it "IP helper".. only Cisco knows. But Shawn, have you tried specifying the virtual VPN adapter in a "ipconfig /renew [adapter]" command?

Edit
Of course Richard H. is right... your routing end must be aware of the DHCP server...


[ 10. June 2003, 11:10: Message edited by: masken ]
_________________________
The tart is out there

Top
Page 1 of 1 1


Moderator:  Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1024 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.197 seconds in which 0.101 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org