+ Post New Thread
Results 1 to 9 of 9
Scripts Thread, Staticly assign IP in Coding and Web Development; hi there can anyone help me with a script to assign an static ip address. ideally a way i could ...
  1. #1
    tri_94's Avatar
    Join Date
    Feb 2007
    Location
    Lincolnshire
    Posts
    117
    Thank Post
    2
    Thanked 2 Times in 2 Posts
    Rep Power
    17

    Staticly assign IP

    hi there can anyone help me with a script to assign an static ip address.

    ideally a way i could set the subnet mask and default gateway and define the first three fields for the ip. eg 192.168.0 so prompt for the last field.

    thanks
    nick

  2. #2
    Mcshammer_dj's Avatar
    Join Date
    Feb 2007
    Location
    Portsmouth
    Posts
    928
    Thank Post
    35
    Thanked 160 Times in 129 Posts
    Rep Power
    93
    why would you need a script to apply a static IP address??

  3. #3

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,689
    Thank Post
    334
    Thanked 515 Times in 483 Posts
    Rep Power
    179
    Code:
    netsh int ip set address name="Local Area Connection" source=static addr=1.1.1.1 mask=2.2.2.2 gateway=3.3.3.3
    If you want IP prompted, just add an input box and use that var instead of setting it above.

    Steve

  4. #4
    tri_94's Avatar
    Join Date
    Feb 2007
    Location
    Lincolnshire
    Posts
    117
    Thank Post
    2
    Thanked 2 Times in 2 Posts
    Rep Power
    17
    i have a batch of over 50 to staticly assign for licenseing for some software

  5. #5

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,689
    Thank Post
    334
    Thanked 515 Times in 483 Posts
    Rep Power
    179
    Quote Originally Posted by tri_94 View Post
    i have a batch of over 50 to staticly assign for licenseing for some software
    Name and shame the software!

    Steve

  6. #6
    tri_94's Avatar
    Join Date
    Feb 2007
    Location
    Lincolnshire
    Posts
    117
    Thank Post
    2
    Thanked 2 Times in 2 Posts
    Rep Power
    17
    "Autodata"

  7. #7
    Mcshammer_dj's Avatar
    Join Date
    Feb 2007
    Location
    Portsmouth
    Posts
    928
    Thank Post
    35
    Thanked 160 Times in 129 Posts
    Rep Power
    93
    can't you use dhcp and mac address filter them?

  8. #8
    tri_94's Avatar
    Join Date
    Feb 2007
    Location
    Lincolnshire
    Posts
    117
    Thank Post
    2
    Thanked 2 Times in 2 Posts
    Rep Power
    17
    would i not have to set res for each that way?

  9. #9

    Join Date
    Jun 2010
    Location
    England
    Posts
    735
    Thank Post
    89
    Thanked 52 Times in 46 Posts
    Rep Power
    35
    Quote Originally Posted by tri_94 View Post
    would i not have to set res for each that way?
    Yeh but probably better to do it this way then a script. Shouldn't take to long , 5 - 10 mins.
    Open up DHCP and the correct scope. Then you can right click the correct entry's and select set as reservation ( says something like that )

SHARE:
+ Post New Thread

Similar Threads

  1. DHCP vs Static IP
    By LCPSWolf in forum Wireless Networks
    Replies: 14
    Last Post: 11th June 2008, 05:53 PM
  2. cisco adsl router with bt business + 5 static IPs
    By RabbieBurns in forum Hardware
    Replies: 4
    Last Post: 19th May 2008, 12:08 PM
  3. mixed up IP address assignment
    By z4ydi in forum Network and Classroom Management
    Replies: 16
    Last Post: 9th May 2008, 07:05 PM
  4. DHCP or Static IPs?
    By woody in forum Wireless Networks
    Replies: 13
    Last Post: 22nd November 2006, 01:20 PM
  5. Static IP's for your switches
    By tosca925 in forum How do you do....it?
    Replies: 2
    Last Post: 21st November 2006, 08:03 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
  •