+ Post New Thread
Results 1 to 7 of 7
Wireless Networks Thread, Changing IP Scope in Technical; OK - so we have run out of IP addresses in our current scope (provided by the LEA) and have ...
  1. #1
    limbo's Avatar
    Join Date
    Aug 2005
    Location
    Birmingham
    Posts
    460
    Thank Post
    2
    Thanked 41 Times in 36 Posts
    Rep Power
    25

    Changing IP Scope

    OK - so we have run out of IP addresses in our current scope (provided by the LEA) and have got to move over to a whole new, wider scope as soon as the LEA can come up with it (several weeks of waiting so far).

    Alll our client machines are DHCP so that side of it is pretty easy, and our dozen or so servers are all static and should be farily easy to update (all our scripts use names rather than IP addresses).

    I have switched off the IP Addresses of all the Cisco kit we have (switches and wireless access points) - we can manage with console cables until we get a chance to reassign these.

    Our external web addresses, router and proxy server are all controlled by the LEA so that is out of my hands.

    So the only nightmare is the printers, which are all on reservations on the DHCP box with shared queues on one of the servers. I am resigned to the fact this is going to have to happen manually (unless anyone has any good ideas!).

    Can anyone think of anything I might have forgotten to account for?

  2. #2

    Join Date
    Jan 2006
    Posts
    143
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: Changing IP Scope

    You can script DHCP reservations - I did this for our Wireless Access Points. Can dig out an example script if you want.

  3. #3
    limbo's Avatar
    Join Date
    Aug 2005
    Location
    Birmingham
    Posts
    460
    Thank Post
    2
    Thanked 41 Times in 36 Posts
    Rep Power
    25

    Re: Changing IP Scope

    That script would be useful - if I can read out the reservations then I can at least read them back in with an easy cross-reference to the new scope easily.

    Thanks

  4. #4

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,808
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: Changing IP Scope

    Code:
    netsh dump > dhcpcfg.txt
    Trim all the cruft out you don't care about. Search and replace with your favorite text editor to suit. Then on your new server:

    Code:
    netsh exec dhcpcfg.txt

  5. #5
    limbo's Avatar
    Join Date
    Aug 2005
    Location
    Birmingham
    Posts
    460
    Thank Post
    2
    Thanked 41 Times in 36 Posts
    Rep Power
    25

    Re: Changing IP Scope

    Thanks - I shall give that a try when I am back in the office on Friday.

  6. #6

    Join Date
    Jan 2006
    Posts
    143
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: Changing IP Scope

    This is the script that I used to add our new wireless access points. It's a cmd file which relies on two external text files for input - they should be saved in the same folder as the cmd file. The first (servers.txt) lists the IP addresses of your DHCP servers, because you'll want to make the reservations on all of them; we have two. The second (wapmacs.txt) lists the details of the objects for which you want to make a reservation. It will need to contain as tab separated values the IP address you want to reserve for the object, the MAC address of the object, the name of the object and (optionally) a description for the object.

    Code:
    @echo off
    
    FOR /F %%b IN (%~dp0servers.txt) DO @call :perserver %%b
    
    goto :EOF
    
    :perserver
    
    FOR /F "delims=," %%c IN (%~dp0WAPMACs.txt) DO call :listit %1 %%c
    goto :EOF
    
    :listit
    echo %*
    pause
    echo %1 + %2 + %3 + %4
    ::netsh dhcp server %1 scope xx.xx.xxx.0 add reservedip %2 %3 %4
    echo netsh dhcp server %1 scope xx.xx.xxx.0 add reservedip %2 %3 %4
    
    pause
    goto :EOF
    NOTE: as it stands, this code will simply echo the parameters it finds and the netsh command it creates; it won't do anything, it's in test mode. To use it in anger you'll need to uncomment the netsh line and comment the echoes and pauses below :listit. Use it at your own risk - I won't be responsible for consequences.

    Examples of the content of the accompanying files:

    Code:
    WAPMACS.txt
    
    xxx.xxx.xxx.105	00156CD656B0	WirelessAP29 	"Wireless Access Point"
    xxx.xxx.xxx.106	00156CD656B1	WirelessAP30 	"Wireless Access Point"
    xxx.xxx.xxx.107	00156CD656B2	WirelessAP31 	"Wireless Access Point"
    Code:
    servers.txt
    
    xx.xx.xxx.14
    xx.xx.xxx.15

  7. #7
    tosca925's Avatar
    Join Date
    Aug 2005
    Location
    Midlands
    Posts
    1,547
    Thank Post
    4
    Thanked 4 Times in 4 Posts
    Rep Power
    22

    Re: Changing IP Scope

    Excellent scripting

SHARE:
+ Post New Thread

Similar Threads

  1. Science Scope Datadisc PT
    By atfnet in forum Educational Software
    Replies: 2
    Last Post: 17th December 2008, 10:39 AM
  2. Increase the existing DCHP scope.
    By leon in forum Wireless Networks
    Replies: 6
    Last Post: 20th September 2007, 03:53 PM
  3. Changing IP scope
    By Oops_my_bad in forum Windows
    Replies: 3
    Last Post: 9th July 2007, 09:27 PM
  4. Help in changing live DHCP Scope
    By tosca925 in forum Windows
    Replies: 8
    Last Post: 13th June 2007, 12:00 PM
  5. Science Scope Datadisk
    By atfnet in forum Educational Software
    Replies: 4
    Last Post: 25th May 2007, 07:08 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •