1

Does anyone know how to create a .reg registry script that will add a second IP address to a machine that is called 127.0.0.2 ?

Here is the "manual" method:

  1. Go to the Control Panel > Network
    Connections Right click on the Local Area Connection (or whichever network connection you want to add the 2nd IP Address) and click Properties
  2. Click on Internet Protocol (TCP/IP) in the
    connection box and click properties Enter the first IP address in the
    properties box
  3. Click Advanced
  4. Click Add under the IP Addresses box and enter the information for the 2nd IP Address
  5. Close all the boxes
12

You're not going to want to do this with direct manipulation of the registry. You're much better off using the netsh command to make these kinds of changes.

Assuming the NIC is named "Local Area Connection", you can do netsh interface ip "Local Area Connection" x.x.x.x y.y.y.y where x.x.x.x is the IP address and y.y.y.y is the subnet mask.

  • +1 Wish I could agree more... – squillman Jan 20 '10 at 23:26
  • ahh... i should have thought of that! thanks. ;-) – djangofan Jan 21 '10 at 17:59
1

Late, I know, but I think djangofan want something like that :

    netsh interface ip set address "Local Area Connection" static 192.168.0.110 255.255.255.0 192.168.0.5

    netsh interface ipv4 add address "Local Area Connection" 172.21.1.10 255.255.0.0 172.21.1.254

and the result :

Carte Ethernet Connexion au réseau local :

   Suffixe DNS propre à la connexion. . . :
   Adresse IPv4. . . . . . . . . . . . . .: 172.21.1.10
   Masque de sous-réseau. . . . . . . . . : 255.255.0.0
   Adresse IPv4. . . . . . . . . . . . . .: 192.168.0.110
   Masque de sous-réseau. . . . . . . . . : 255.255.255.0
   Passerelle par défaut. . . . . . . . . : 192.168.0.5
                                       172.21.1.254
  • Thank you. So long ago that I don't remember why I asked the question. – djangofan May 3 '16 at 16:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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