Changing RTE IP Address to static
- Connect with RTE via ssh or serial connection.
While using a minicom there is a need to use the USB-UART converter.
The serial connection can be opened by executing the following command:
sudo minicom -D /dev/ttyUSB0 -b 115200
- Check the current IP address of the target network interface:
ip a
Note the exact interface name for later use.
- Navigate to the network configuration files:
cd /etc/systemd/network
- Open the file for the target interface using nano or vim.
If the file does not exist, create one following this scheme:
10-eth0.network, replacingeth0with the interface name
vim 10-eth0.network
- The file content should look as follows. Replace
eth0with the interface name,192.168.X.Xwith desired IP address and set the proper gateway:
[Match]
Name=eth0
[Network]
DHCP=no
Address=192.168.X.X/24
Gateway=192.168.X.X
Save the file and exit the editor.
To return to a DHCP connection, remove the
AddressandGatewayvariables, set theDHCPproperty toyes. Alternatively, delete the entire configuration file.
- Restart the systemd-networkd service:
systemctl restart systemd-networkd
- Verify the new IP address of the interface:
ip a
Note: If
DHCPparameter is not set tonoor the MAC address has a reserved IP, the changes may not be applied.