Table of contents
My Setup:
- RHEL 9 spinning on Vbox with a wireless home router
Steps to Assign Static IP:
Note the IP address that your home router has provided using this command:
nmcli
orip a
.You can view more information from the output of the command below:
nmcli connection show enp0s8
Note IP4.ADDRESS and IP4.GATEWAY assigned.
Update static IP [IP4.ADDRESS noted in step 2] using the command below:
nmcli con mod enp0s8 ipv4.method manual ipv4.addr "192.168.0.108/24"
Check updated setting in below file under ipv4 section:
/etc/NetworkManager/system-connections/enp0s8.nmconnection
Restart network services:
nmcli con down enp0s8
nmcli con up enp0s8
Now check status with command
nmcli:
Try to ssh from mobaxterm or putty:
Voilà!
Revert to Dynamic ip configuration:
Run the following commands:
nmcli con mod enp0s8 ipv4.method auto
nmcli con mod enp0s8 ipv4.address ""
Restart Network Services:
nmcli con down enp0s8
nmcli con up enp0s8
Done!
Examine the ipv4 section of the config file now.
/etc/NetworkManager/system-connections/enp0s8.nmconnection
I hope you found this useful!