Support : Knowledge base

Knowledge Base

Welcome to OPAL-RT’s Knowledge Base

OPAL-RT offers a repository of support information for optimal use of its technology.

Loading…

Please note that OPAL-RT knowledge base is not fully optimized for mobile platforms.

For optimal experience, use a desktop computer.

Reference Number: AA-01470// Views: AA-01470// Created: 2018-04-19 14:45:13// Last Updated: 2022-01-08 22:19:45
HowTo
How to Enable DHCP on My Real-Time Simulator?

Introduction:

DHCP is a protocol that uses a server to assign IP addresses automatically to the client who joins the network.

All OPAL-RT simulators are delivered with fixed IP addresses, not DHCP. The IP address can be found in the System Description Document that is inside the white binder delivered with the simulator.


Procedure (For RT-LAB and HYPERSIM, opalrtlinux3 and redhat):


WARNINGS
 

1) When set to DHCP, it is not possible to do a direct connection between the Windows computer and the simulator (there are no DHCP server in a direct connection that attributes addresses).

2) It is also common that IT departments block unknown MAC Addresses to get an IP address in a company's network. Contact your IT Department for more information.

3) A screen with VGA cable and a keyboard might be required to find the IP address assigned by the DHCP server.

4) DHCP server usually reserves the IP address to a MAC address for a limited time (which depends on the configuration of the DHCP server). It is recommended to contact the IT Department with the MAC address of the simulator, so that they reserve the IP address indefinitely for the simulator.


1. Make sure you are connected to the target directly or through a switch. If you are unsure of how to configure your Windows PC or are experiencing difficulties, consult this KB article (AA-01230).

2. Connect to the target using an SSH tool such as MobaXterm. Follow this KB article learn how to install and use MobaXterm (AA-01044). As a recall, the username and password to connect to the simulator is in the System Description Document.


NOTE


If the operating system of the simulator is "opalrtlinux3 (64 bit)", follow step 3. The default port is usually "eno1".

If the operating system of the simulator is "redhat (32 bit)", follow step 4. The default port is usually "eth0".

This information can be found in the System Description Document of the simulator.


-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

3. [For "opalrtlinux3" only] In MobaXterm, type the command: and write down somewhere the answer. It is usually "rtserver" (case sensitive).

4. Then, type the command:

At the interface of interest (typically 'eno1'), write down somewhere the MAC Address (HW Address in the screenshot below) and then type 'DHCP' to set the port as DHCP.





IMPORTANT: After completing the steps in the opal_network_configurator, it will automatically restart the network services. At this point, the MobaXterm connection will be lost. This is normal. We need to connect the simulator to the network and a new IP address will be assigned. Go to step 10.


-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


5. [For "redhat" only]: Using MobaXterm, type the command and write down the answer somewhere. It is usually "RTServer" (case sensitive). 

6. Using MobaXterm, type in the following command: /etc/sysconfig/network-scripts/ifcfg-eth0>. You should see some text appear in the command window. We will need to change this text to enable the DHCP protocol.

7. Refer to the green text below to spot any discrepancies between your text and the one shown here. DO NOT CHANGE YOUR "HWADDR". LEAVE IT AS IS.

7a.You will notice those 2 lines might be missing: BOOTPROTO="dhcp" and  DHCP_HOSTNAME="RTServer". If so, Add them. If they are present but different, change them.

7b. You can remove IPADDR, GATEWAY and NETMASK lines completely. Those will be assigned with DHCP.

7c. Write down somewhere the MAC Address (HWADDR) of your ethernet port.

# Please read /usr/share/doc/initscripts-*/sysconfig.txt
# for the documentation of these parameters.
TYPE=Ethernet
DEVICE=eth0
HWADDR=ab:cd:ef:12:34:56
BOOTPROTO=dhcp
DHCP_HOSTNAME="RTServer"
ONBOOT=yes
USERCTL=no
IPV6INIT=yes
PEERDNS=yes

8. To make sure to save your changes before leaving the nano editor, press Ctrl-X to leave, then 'Y' to confirm and finally press enter to confirm the name. 

9. To make sure the changes are taken into consideration by the system, type the following command: service network restart.

IMPORTANT: After step 9, the MobaXterm connection will be lost. This is normal. We need to connect the simulator to the network and a new IP address will be assigned. Go to step 10.


-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


10. You might not be able to communicate with the target anymore. Connect your target to your network and let the DHCP server assign an IP address to the simulator.

11. Connect your Host PC to the same network (i.e. revert the changes done in step 1).

 

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


How to Find the IP Address after Changing to DHCP [Both RT-LAB and HYPERSIM]?

NOTE: Start by confirming that the proper ethernet port is connected to the network and reboot the simulator to be sure.

[For RT-LAB only] Option 0 is, after a short moment, to press on "Discover Targets" to detect all targets on the network.

[Both RT-LAB and HYPERSIM] Option 1 is to contact the IT Department with the MAC address that was written down previously and ask them to check the DHCP server.

[Both RT-LAB and HYPERSIM] Option 2 is to use the host name found previously and type it in a command prompt. If there are more than one OPAL-RT Simulator, it might return the wrong IP address.



[Both RT-LAB and HYPERSIM] Option 3 is to connect a screen and a keyboard to the simulator to find the IP Address. For "redhat", follow KB article for   AA-01176. For "opalrtlinux3", log in to the simulator and type <ifconfig> in the terminal.


-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


11. [For HYPERSIM only] There is one extra step to do for HYPERSIM. Connect using MobaXterm to the simulator again (using the new IP address).

12. Type the command and update the IP address in that file.

13. Press CTRL + X and then 'Y' to save and close the file and reboot the simulator by typing .


-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


14. You are done! Open the OPAL-RT software and add a new target with the new IP address.


15. If you are encountering any issues, do not hesitate to contact the technical support via: https://www.opal-rt.com/contact-technical-support/