Configuring IP addresses

 



Overview

 

When you create and start the network, the simulator will dynamically configure the specified IP address of the devices in your system. For example, if you create a network with IP address 200.201.202.1 to 200.201.202.10, the IP address will be dynamically configured in the system when each agent instance is started. This facility is supported in Windows NT, 2000, XP,  Linux OS, when the system is started with Admin user access.

 

NOTE: Do not assign addresses that are already used by existing devices in your network.  The IP addresses you give to the simulated devices must be unique within the network on which the simulation is running.

 

Creating and Deleting Virtual IPs from a batch/shell script

 

To create virtual IPs from a batch/shell script:

Syntax: CreateVIP.bat <Starting IP Address> <No. of IP Addresses to be created>

Example: CreateVIP.bat 192.168.1.1 100

 

To delete virtual IPs from a batch/shell script:

Syntax: DeleteVIP.bat <Starting IP Address> <No. of IP Addresses to be deleted>

Example:DeleteVIP.bat 192.168.1.1 100

 

Manual Configuration of Virtual IP address

 

The links given below will guide you to  configure the virtual ip address, manually. Select the appropriate links based on the OS used.

Create the Virtual ip address for Windows 7:

 

The procedure to configure multiple virtual IP addresses in Windows 7 is given below. This procedure can be performed only by an user with admin privilege.   

    1. Start ---> ControlPanel --->Network and Internet -->Network Connections --> Local Area Connection

    2. Right click the "Local Area Connection" and select the Properties Menu.

    3. Select "Internet Protocol Version 4 (TCP/IPv4)" and click the "Properties".

    4. Select the "Use the following IP address" radio button.

    5. Enter the IpAddress and Subnet mask and click "OK" button.

    6. Re-start the system for the changes to take effect.

 

Configuring Virtual IP Address in Windows NT

 

The procedure to configure multiple virtual IP addresses in Windows NT is given below. This procedure can be performed only by an user with admin privilege.   

    1. Click on the Start Menu on the Taskbar and choose Control Panel.

    2. Double-click Network among the components displayed in the Control Panel. This opens up a Network dialog with 5 tabs.

    3. Choose the Protocols tab and click on TCP / IP Protocol from listed protocols.

    4. Click on Properties button when TCP / IP Protocol is selected.

    5. This brings up the Microsoft TCP / IP properties dialog ; choose IP Address tab.

    6. Click the Advanced button ; this will bring the Advanced IP addressing with the Adapter Name shown above the configured IP addresses in your system.

    7. Click Add to display the TCP/ IP Address dialog. Specify IP Address and the corresponding Subnet Mask.

    8. Re-start the system for the changes to take effect.

Configuring Virtual IP Address in Windows XP/2000/ ME/2003

 

The procedure to configure virtual IP addresses in bulk under Windows XP/2000/ME is given below. This procedure can be performed only by an user with admin privilege.   

    1. Click on the Start Menu and choose Settings.

    2. Among the listed items select Network and Dial-up connections.

    3. Select Local area connection from the items under Network and Dial-up connections ; this opens with the general information on Local area connection status.

    4. Click on the Properties button. The Local area connection properties dialog opens listing all the protocols.

    5. Choose Internet Protocol ( TCP / IP ) and click on the Properties button.

    6. The Internet Protocol TCP / IP Properties dialog is invoked. Click on the Advanced button at the bottom of the dialog.  The Advanced TCP / IP settings dialog displays all the configured IP addresses in your system.

    7. Click Add button next to the displayed IP addresses to add an IP address with a corresponding sub-net mask.

    8. You will have to re-start the system for the changes to take effect.

 

Configuring Virtual IP Address in bulk under Windows 2000

 

The procedure to configure virtual IP addresses in bulk under Windows 2000 is given below. This procedure can be performed only by an user with admin privilege.       

    1. Select Start ->Run and type regedt32 in the run dialog ( or you can type it on the DOS prompt) .

    2. This will bring up the Registry Editor - HKEY_LOCAL_MACHINE on Local Machine screen.

    3. Choose the HKEY_LOCAL_MACHINE on the tree displayed on the left hand side.

    4. Choose the path : HKEY_LOCAL_MACHINE -> System -> CurrentControlSet -> Services > NetBT -> Parameters -> Interfaces. Here, you will find a series of Tcpip_{labels} under Interfaces, an example is shown below:    Tcpip_{2B34C0C3_FCA8_486C_8559_989429901786}

    5. Select all the Tcpip_{labels} listed to check if the right hand side data content which has Netbios Options:REG_DWORD :0x1 and make a note of this Tcpip_{ label } .

    6. Search for this label under  HKEY_LOCAL_MACHINE ->System -> CurrentControlSet -> Services -> Tcpip -> Parameters -> Interfaces. Here, you will find the same Tcpip_{label } (that you had noted down in point 5). When you select this, the right side data content will display IP address and properties.

    7. Double click on the IP address field . This opens a Multi-String editor where the virtual IP addresses you want have to be keyed in. You can cut and paste to minimise the time for large number of IPs .

    8. When you have finished entering the IP addresses, select the subnetmask field ( 255.255.255.0) in the right hand side. This opens a Multi-String editor where the subnetmask you want have to be keyed in. Enter the same number of subnetmasks(255.255.255.0) as the number of IPs.

    9. You will have to re-start the system for the changes to take effect.

    10. Now you should be able to ping these virtual IP addresses. Also, make sure that there are no conflicts in the network ( i.e the virtual IP you have configured is not already being used by some other user).

Configuring Virtual IP Address in Windows in DHCP mode

 

The procedure to configure virtual IP addresses in windows with DHCP mode is the same as Configuring Virtual IP Address in bulk under Windows 2000.

 

 

Configuring Virtual IP Address in Linux

    1. Invoke the linuxconf tool. ( type linuxconf in the shell prompt and press Enter ). For starting this tool you have to be logged in as Super user.

    2. In the displayed menu, select the menu item : IP Aliases for virtual hosts and press Enter. This will display the two interfaces eth0 and lo. (Ethernet interfaces in Linux are called by such names as eth0 and eth1)

    3. Select eth0 and press Enter. This will show all the IP aliases configured for the selected interface.

    4. In the field IP alias or range, enter the desired IP address or the range with a corresponding Netmask.

      Example

      IP alias or range : 177.177.177.1-25
      Netmask : 255.255.255.0

  1. Note:

    1. These commands have to be executed with the super user privilege.

    2. You will have to re-start the system for the changes to take effect.

    3. When you are configuring a large number of IP address, it might take a long time to boot up.

Using the following command, we can configure Virtual IPs in the Linux box at run-time without re-booting the machine or re-starting the network.

 

/sbin/ip addr add 172.19.1.2/32 dev eth0

/sbin/ip addr add 172.19.1.3/32 dev eth0

 

The same interfaces can be made down by using the following command.

 

/sbin/ip addr del 172.19.1.2/32 dev eth0

/sbin/ip addr del 172.19.1.3/32 dev eth0

 

  1. Note:

    1. These commands have to be executed with the super user privilege.

    2. It can be used in versions up to 7.2

    3. The configurations will not be available when you re-start your system.