Discussion Locked

How to add many IP's to a NIC in NT/2k?

0 helpful
9 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I would like to add a large number of IP addresses to 3 NIC's in an NT box. There are about 700 IP's to add. Unfortunately this is an inherited machine, and needs to be run in this crazy multihomed manner :-(
I would imagine this can be done via a batch file/script, to edit the registry or add routes?

Many Thanks,

Matt Day

9 replies

by bhrdwh

Hi, right click your Network Neighbourhood, click "Protocols" - "TCP/IP" Properties -Choose the "Adapter" (NIC1,2 or 3) -"Advanced" - Add more IPs in "IP Addresses". You need to add max 256 IP for one NIC Adapter.
akash

by mattd2

I know how to do this, the question is about adding many (700!) addresses to a NIC. imagine adding 700 IP, and 700 subnet masks like this! It would take me two days!There are 3 NIC's in the machine.
By the way there is no problem with adding this many addresses, we have two machines running like this already. I need to migrate the setup to a new (higher spec) server, hence my question.

by pherr

The above answer is correct, execpt that you should not enter in more than 5 ip's in this manor. The rest should be added in the registry.

by mattd2

What I need to know is how to script the process of adding these addresses, as there are so many of them.

by ippacket

Yes, It can be done with a script along with REG.exe from the win NT resource kit.
You mentioned the same IP address configured on a similar NT machine. If this is correct, you can export and then import the specific keys from HKLM to the new machine. Only the specific key.

by mattd2

Thanks, we're getting somewhere now....
Can you help me with the script at all?
And also, will importing the key from the other machine have any issues with MAC addresses? I take it the addresses are applied to an interface number here, with no relation to hardware address? Actually I would rather do this with a script, as there are some changes as well, and we'll have to do this again in the future, with different subnets. Some help with the script would be much appreciated - thanks again'ippacket'!

by ippacket

The simplest way to accomplish this is to export the specific keys containing the values (ip and SNM) from both machines. Then edit then .reg file you have just created, it?s ASCII text. It is as simple as cut and paste. When you have completed that, type REGEDIT /S filename.REG at they c prompt or you can then import them by hand.
Be sure you have a backup copy and a copy for editing.
I understand your need for simplifying this process to use time and time again, however, creating a script to add these values will be not only convoluted but time consuming. Writing and maintaining it would involve maintaining a text file of IP addresses a step you will have accomplished in the previous paragraph. If you were to create a script, you will need to specify each Hkey string and value. I believe export/import is a less time consuming safer solution to your problem.

You will not have any problem with MACs.

This discussion is closed to new replies.