Knowledge Base

Welcome to OPAL-RT’s Knowledge Base

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

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

For optimal experience, use a desktop computer.

Reference Number: AA-00785 // Views: 13418 // Created: 2011-11-17 05:00:00 // Last Updated: 2020-04-06 17:50:13
HowTo
How To: Change IP address or IP mask on a RedHat target through telnet


How To: Change IP address or IP mask on a Redhat target through telnet & mobaXterm

Please note that it is easier to change IP address and IP mask in RedHat GUI: https://www.opal-rt.com/support-knowledge-base/?article=AA-01176

 

Warning:  wrongly changed IP or mask may leave the target not connectable through telnet


Note: To copy/paste on the telnet you can do a Ctrl+C of the commands of this article and copy using the click of the mouse wheel on the telnet window

 

1- Open a telnet session on RT-LAB. You can follow this article : https://www.opal-rt.com/support-knowledge-base/?article=AA-00786

Login and Password is the same one that you have on your binder ( usually Login: root / Password: oprt935$ or redhat)


2- Type "vi /etc/sysconfig/network-scripts/ifcfg-ethX" 

where X is a number (eg. eth0)


3- You should have a page like this



4- Modidy the IP address higlighted on the previous image. Here the command that you will need to use to work with the vi pannel:

Move the cursor to the IPADDR line

Type "x" to delete the part that you want to modify

Type "i" to insert the new IP address

Click on escape "Esc" to stop the insert

Type ":wq" to save the file and quit or ":q!" to quit without saving





 

5- Then restart the target

Type:   " /etc/init.d/network restart "


6- You can try to ping the new target using a cmd window


Here are the same steps if you want to use mobaXterm :




















Please make sure to also update the \etc\hosts file if you're using Hypersim or wireshark.