Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I had setup a small application that uses WMI to setup a nic with multiple IPs. Does someone know of a better way of doing this once we start unsing thousands of IPs on a single nic? I amnot much of a network engineer or DNS guy. I want to mkae it easy for someone to import the IPs all at once.

share|improve this question
4  
Why do you need thousands of IP addresses assigned to a single NIC? –  Zoredache Oct 6 '10 at 21:40
1  
Are you a sysadmin at a mental hospital? I'm dying to find out why you think you want to do this? If I remember correctly W2K8 can only have 255 NICs/IPs. –  Chopper3 Oct 6 '10 at 22:12
    
Sounds a little crazy to need thousands of IP's against a single NIC. Looking forward to finding out the reasoning behind this too. –  chunkyb2002 Oct 6 '10 at 22:15
1  
@Chopper & @Zoredache, considering he's asked questions about multiple IPs for IIS in the past, I'm thinking this is for some really misconfigured IIS installation. –  Chris S Oct 6 '10 at 22:17
    
@Chris, maybe one IP per image/file :) –  Chopper3 Oct 6 '10 at 22:19
show 3 more comments

2 Answers

Something like this might work for you, especially the for loop at the bottom.

http://www.nthelp.com/w2k3/to_add_a_bunch_of_ip_addresses.htm

netsh in ip add address "Local Area Connection" 10.0.0.2 255.0.0.0
netsh in ip add address "Local Area Connection" 10.0.0.3 255.0.0.0
netsh in ip add address "Local Area Connection" 10.0.0.4 255.0.0.0

- or - 

for  /L %a in (1,1,254) do netsh in ip add address "Local Area Connection" 10.0.0.%a 255.255.255.0

Also, remember to use two percent signs instead of just one inside of a batch file.

share|improve this answer
add comment

Right, thanks for the clarification. Firstly there's absolutely no reason to have a single IP per website (use virtual sites in your web server of choice) and even if you did want to you should just let your router do the 2000-into-1-or-more (called NATing by the way) thing anyway. I can't stress this enough but you need a designer/sysadmin to do this for you if you're at this stage, I mean no offence but the two skill sets are wildly different.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.