Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
windows:adding-ips-quickly [2010-06-18 14:46:23]
garrett.plasky
windows:adding-ips-quickly [2011-08-10 13:51:19]
garrett.plasky Approved
Line 1: Line 1:
 ====== Adding IPs Quickly to a Windows Server ====== ====== Adding IPs Quickly to a Windows Server ======
-Adding a single IP to a windows server is simple enough but when you need to add say 16 IPs, the process can become tedious. Below is a command you can run from the command line to add IPs quickly to a Windows server((This has been tested and works in all versions of Windows Server 2000, 2003, and 2008.))). The command could easily be used in a batch script to add hundreds of IPs if necessary. The below command adds the IP address of 192.168.1.2 with the netmask of 255.255.255.0 to the "Local Area Connection"​ interface:+Adding a single IP to a windows server is simple enough but when you need to add say 16 IPs, the process can become tedious. Below is a command you can run from the command line to add IPs quickly to a Windows server((This has been tested and works in all versions of Windows Server 2000, 2003, and 2008.)). The command could easily be used in a batch script to add hundreds of IPs if necessary. The below command adds the IP address of 192.168.1.2 with the netmask of 255.255.255.0 to the "Local Area Connection"​ interface:
  
-<code console>> netsh interface ip add address "Local Area Connection"​ 192.168.1.2 255.255.255.0</​code>+<sxh shell>netsh interface ip add address "Local Area Connection"​ 192.168.1.2 255.255.255.0</​sxh>
  
 If you wanted to add a range say from 192.168.1.2 through 192.168.1.254 you could do: If you wanted to add a range say from 192.168.1.2 through 192.168.1.254 you could do:
  
-<code console>> FOR /L %I IN (2,1,254) DO netsh interface ip add address "Local Area Connection"​ 192.168.1.%I 255.255.255.0</​code>+<sxh shell> FOR /L %I IN (2,1,254) DO netsh interface ip add address "Local Area Connection"​ 192.168.1.%I 255.255.255.0</​sxh>
  
  
 {{tag>​how-to windows}} {{tag>​how-to windows}}