I am currently studying for the RHCSA and my practice exams are asking me to configure the IP address, gateway ip address and nameserver ip.
What are the commands for achieving this and/or what are the manual ways of achieving this. Or is just best doing it with nmcli only?
Thank you for your help.
I had network config issues while taking ex200 exam.
I used the exam provided addresses for ip dns, gateway, nameserver and netmask but I was unable to connect my VM1 and VM2 via nmcli
tools. All address entries were correct but the VMs failed to connect with this error "172.24.1.10 icmp_seq=1 Destination Host Unreachable"
I have done a couple online research but I truly don't know what I am missing or getting wrong. I have tried re-create the error on my home lab
but I failed. Can you help, please?
Hi @Boda ,
Please verify the network configuration with the objective. Try to troubleshoot /edit any wrong or missed part of network configuration.
You can use several commands to check the current config or status of your network settings :
Command | Purpose |
---|---|
nmcli dev status |
Show the NetworkManager status of all network interfaces. |
nmcli con show |
List all connections. |
nmcli con show |
List the current settings for the connection name. |
nmcli con mod |
Modify the connection name. |
nmcli con reload |
Reload the configuration files, after manual file editing. |
nmcli con up |
Activate the connection name. |
nmcli dev status &
nmcli dev show
will show you the state of the desired connection and the network settings like : ( example)
IP4.ADDRESS[1]: 172.25.250.10/24 IP4.GATEWAY: 172.25.250.254 IP4.ROUTE[1]: dst = 172.25.250.0/24, nh = 0.0.0.0, mt = 100 IP4.ROUTE[2]: dst = 0.0.0.0/0, nh = 172.25.250.254, mt = 100 IP4.DNS[1]: 172.25.250.220 IP4.SEARCHES[1]: lab.example.com
Match the settings with the objective and try to find out the error or issue. Also check the
ipv4.method & connection.autoconnect
and then try to ping the DNS / Gateway server. if everything is correctly set , this ping should get pong.
DONT forget to restart / reload your connection if you edit any network configuration.
Hello Boda,
I may have to ask you a series of questions through multiple posts. I'll begin with this question: When you configured your IP address information for your 2 VMs, did you verify that you ethernet interfaces, on both VMs, were in an "up" state?
Thanks for your reply, yes, I did "nmcli con show --active" on VM1 and it showed "name and device" like "device = enp and virbr0" Name " enp and virb". when i tried to configure the connection by using " nmcli con modify " then i tried to write enp then press tab to continue the name of the connection but failed when i tried to use virb then press tab it worked.
I tried to write " nmcli con modify enp0s03 ipv4.addresses "ip address" but failed. I don't know, what is the mistake? can you help me?
Note: when I started the exam " I did " status, console, shutdown and rebuild" on VM1 "
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.