What Should I know About The RHCSA Exam
RHCSA 8 Exam Practice question 2
Configure your Host Name, IP Address, Gateway and DNS.
Host name: station.domain40.example.com
IP Address: 172.24.40.40/24
The question is based On The Network Configuration & Management In The RHCSA, 8 Course on this website. If you have gone through this course, solving this wouldn’t be a problem.
How To Set Static IP In Red Hat
How To Rename A Hostname In Red Hat
There are different ways this can be done.
You can directly edit the NIC/connection configuration file
you can use the nmtui utility.
We are going to use the first method.
1 Verify the NICs on the system, and the active connection
[root@Tekneed ~]# ip a 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel
[root@Tekneed ~]# nmcli conn show NAME UUID TYPE DEVICE ens33 0078b8a6-36af-44cf-8d06-0dc9e5a7835c ethernet ens33 virbr0 c4227486-e596-4dd9-b76f-08a25fa9ab9c bridge virbr0
you can see that the active connection and device is enss3.
2. configure the network by editing the ens33 device in “/etc/sysconfig/network-scripts” file
[root@Tekneed ~]# vi /etc/sysconfig/network-scripts/ifcfg-ens33
TYPE="Ethernet" BOOTPROTO="none" NAME="ens33" IPADDR=172.24.40.40 PREFIX=24 GATEWAY=172.24.40.1 DNS1=172.24.40.1 UUID="0078b8a6-36af-44cf-8d06-0dc9e5a7835c" DEVICE="ens33" ONBOOT="yes"
NB: You can leave every parameter you see in the scripts, but just make sure that the parameters above are included.
3. Restart the NIC and network manager service
[root@Tekneed ~]# nmcli conn down ens33;nmcli conn up ens33
[root@Tekneed ~]# systemctl restart NetworkManager
NB: sometimes, the changes may not take effect, use the command,
[root@Tekneed ~]# ifdown ens33
[root@Tekneed ~]# ifup ens33
4. Verify the new IP address
Verify the default gateway
[root@Tekneed ~]# ip route default via 172.24.40.1 dev ens33 proto static metric 100
Verify the DNS
[root@Tekneed ~]# cat /etc/resolv.conf # Generated by NetworkManager nameserver 172.24.40.1
5. Now set the new hostname
[root@Tekneed ~]# vi /etc/hostname
6. Restart the systemd-hostnamed service
[root@Tekneed ~]# systemctl restart systemd-hostnamed.service
7. Verify the new hostname
[root@Tekneed ~]# hostname station.domain40.example.com
nmcli conn show
nmcli conn down ens33;nmcli conn up ens33
systemctl restart NetworkManager
vi /etc/hostname (station.domain40.example.com)
systemctl restart systemd-hostnamed.service
You can also watch the Video on RHCSA 8 Exam Practice Question 2 by clicking the link below.
Your feedback is welcomed. If you love others, you will share with others
Hello Oluwatomisin, how do get to see some of the practice questions, I enrolled for Ex200v8 exam and I will like to get my hands on as many questions as possible to practice. Thanks
Hello Eragbai, for now, we try as much as possible to release at least one question and answer per week because of the videos. As time goes by, we will increase our pace. Thanks.
During my exam, ifup and ifdown were not installed.
# rpm -qf /usr/sbin/ifup
But NetworkManager package was installed.
I think if you want ifup and ifdown to be installed, you should install network-scripts package (setup a repository, maybe RHSM, and check with [root@base-server ~]# dnf provides /usr/sbin/ifup).
Yeah, ifup and ifdown is outdated and may not be installed by default in the exam VM even though it is installed on the real RHEL 8. Alternatively, using nmcli or the GUI will suffice. (https://tekneed.com/network-management-in-linux-explained-with-examples/). Trust your exam was good!!
ifup and ifdown command did not work but I restarted my server and everything was fine. thanks. I passed my exam.
You don’t have to use my method, you can use nmcli or GUI method. (https://tekneed.com/network-management-in-linux-explained-with-examples/). The most important thing is getting the job done. Congratulations Junior!!
Hi Site Owner,
How can i get the access for protected questions
During exam EX200 they prefer you use nmcli, or they let you choiche hwta is your preferred method?
You can use any method. The most important thing is getting the job done but I will advise you learn at least two methods. The nmtui method is also a great and straight forward method (https://tekneed.com/network-management-in-linux-explained-with-examples/#set-a-static-ip-address-in-rhel-7-and-rhel-8-using-nmtui)