+ Post New Thread
Results 1 to 3 of 3
Windows Server 2000/2003 Thread, How to create multiple (hundreds) IP address using script in single Windows Server VM in Technical; Hi All, I'd like to perform database application transactional and concurrent load testing which requires approx. 100 IP address in ...
  1. #1

    Join Date
    May 2009
    Location
    Sydney
    Posts
    282
    Thank Post
    322
    Thanked 3 Times in 3 Posts
    Rep Power
    11

    How to create multiple (hundreds) IP address using script in single Windows Server VM

    Hi All,

    I'd like to perform database application transactional and concurrent load testing which requires approx. 100 IP address in a single host (Windows Server 2003 box) so that one NIC can have multiple IP address.
    Is there any quick way (Powershell / NetSH) to create those IP address in one single box ?

    example:

    Code:
    VM-Simulator1 - 10.2.1.1
    
    10.2.1.2
    10.2.1.3
    10.2.1.4
    10.2.1.5
    .
    .
    .
    10.2.1.102
    Code:
    VM-Simulator2 - 10.2.2.1
    
    10.2.2.2
    10.2.2.3
    10.2.2.4
    10.2.2.5
    .
    .
    .
    10.2.2.102
    i know how to do it in Windows Server 2003 manually one by one but that's too daunting to do it manually.

    Thanks.
    Last edited by albertwt; 9th April 2010 at 03:25 AM.

  2. #2

    Join Date
    Aug 2005
    Location
    London
    Posts
    3,156
    Thank Post
    116
    Thanked 529 Times in 452 Posts
    Blog Entries
    2
    Rep Power
    124

  3. Thanks to srochford from:

    albertwt (22nd April 2010)

  4. #3

    Join Date
    May 2009
    Location
    Sydney
    Posts
    282
    Thank Post
    322
    Thanked 3 Times in 3 Posts
    Rep Power
    11
    Finally I've found what I've been looking for:

    #setup collection of IP address strings, include original IP
    $ips = 1..100 | %{ "10.2.1.$_" }

    #also subnet masks, need as many as IP addresses
    $masks = 1..100 | %{ "255.255.255.0" }

    #get the NIC
    $nic = Get-WMIObject win32_networkadapterconfiguration -computer VM-Simulator1 | where { $_.IPAddress -contains "10.2.1.1" }

    #set addresses
    $nic.EnableStatic($ips,$masks)
    hope this can be helpful for everyone in this forum.

SHARE:
+ Post New Thread

Similar Threads

  1. Tool to bulk create users / create single user easily?
    By reggiep in forum Windows Server 2008
    Replies: 9
    Last Post: 27th May 2010, 12:30 PM
  2. Replies: 0
    Last Post: 24th November 2009, 12:19 PM
  3. Replies: 6
    Last Post: 5th June 2007, 02:35 PM
  4. Multiple MAC Address
    By Nij.UK in forum Hardware
    Replies: 13
    Last Post: 2nd May 2007, 08:01 AM
  5. Multiple People Accessing single file
    By Nij.UK in forum Windows
    Replies: 6
    Last Post: 5th June 2006, 08:52 PM

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

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