Page 1 of 1 1
Topic Options
#25031 - 2002-07-13 05:09 AM Reconfig clients... static IP > DHCP Reservations RFC
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
I've finally convinced my co-workers that DHCP Reservations are the way to go and now I have to walk the talk. To begin with, I will script only the Win2k clients.

I have an MDB with all computer names, IPs, MAC addresses, and comments I can export to an INI file. I figure to use KiX to to pull this info and DHCPCMD.EXE to assign the reservations. That part seems straight forward enough.

By Task Scheduling NETSH.EXE, I can overcome the security obstacle. The problem is timing. If I run it when users have connections open, they abort. I've been looking at task schedule options. I can schedule a task to run once and delete itself or I can schedule it to run on logon but then there's no option to delete itself.

I guess I need to script the Task and have the last line delete the task.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#25032 - 2002-07-13 05:21 AM Re: Reconfig clients... static IP > DHCP Reservations RFC
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Les, I understand the reservered DHCP address and the automated method to assign them, but I am lost when you hit your third paragraph. Could you elaborate so that I know what it is I am missing?
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#25033 - 2002-07-13 05:22 AM Re: Reconfig clients... static IP > DHCP Reservations RFC
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Why reserve for clients? You really only need to reserve those that require a predefined address.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#25034 - 2002-07-13 05:39 AM Re: Reconfig clients... static IP > DHCP Reservations RFC
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
NetSh is built-in to Win2k and allows one to change IP properties from the CL or script. TechNet article Q257748 explains it. I need a delivery mechanism with enough rights to invoke it. Thats where Task Scheduler comes in. With the JT.EXE util, one can script a task and push it to the remote computer. I did a test scheduling the CL command "netsh interface ip set address "Local Area Connection" dhcp". It worked as expected but aborted open connections to host systems. Therefor, I need a way to schedule it when no apps are open... like during logon. Not sure though what it will do to the logon process. Perhaps "When my computer starts" would be a better time. Haven't tried "One time only" with a back-dated time to see if it would still pick it up.

I'm not sure how the "Delete the task if it is not scheduled to run again" works... if it would remove the task or not. That's where I came up with a brain fart to script the deletion.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#25035 - 2002-07-13 05:47 AM Re: Reconfig clients... static IP > DHCP Reservations RFC
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
I would script the change not using Netsh. That you would not interfere with the user - the change would not take affect immediately. You could request a restart or simply wait for one. The computers would then show up as they naturally restart.

[ 13 July 2002, 05:51: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#25036 - 2002-07-13 05:49 AM Re: Reconfig clients... static IP > DHCP Reservations RFC
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Just caught your second question. I believe you answered yourself.

Most of my client IPs are DHCP assigned from a pool. Only those that need static IPs for other host systems get fixed addresses. I always wanted to use DHCP Reservations for them but lost out to co-workers... until now.

I blew up my WINS db the other day and to mitigate, tossed in a few 'A' records in my DNS. That worked for all my DHCP clients but the ones with static IPs were missing the DNS Suffix setting so it didn't help them.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#25037 - 2002-07-13 05:57 AM Re: Reconfig clients... static IP > DHCP Reservations RFC
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Yeah, I thought of using the procedure outlined in Q194407, which requires a reboot. I still need to proxy it with Task Scheduler because most of these machines don't run a logon script. A lot of them don't logoff or reboot either.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#25038 - 2002-07-13 06:00 AM Re: Reconfig clients... static IP > DHCP Reservations RFC
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
I would use an Admin script to remotely stage the DHCP change.

Don't you have scheduled server maintenance windows where you could schedule a reboot via change control?

[ 13 July 2002, 06:01: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#25039 - 2002-07-13 06:06 AM Re: Reconfig clients... static IP > DHCP Reservations RFC
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Yes, once a year, on Labour Day. We run 24/7/364. You're right... I could remote reg edit them with an admin script.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#25040 - 2002-07-13 06:13 AM Re: Reconfig clients... static IP > DHCP Reservations RFC
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
We reserve 1 weekend a month where Ops has the right to perform changes/maintenance with proper change control notification (not that changes occur every month).

If that is your schedule, then stage it now. If a server crashes, it comes up GOLD. Otherwise, wait for Labour day.

[ 13 July 2002, 06:14: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
Page 1 of 1 1


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

Who's Online
0 registered and 927 anonymous users online.
Newest Members
JimDunn, fgarcia, Viginette, ManuvdWielNL, Sir_Barrington
17890 Registered Users

Generated in 0.065 seconds in which 0.03 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