RHCSA 8 Exam Practice Question 2 (Network Management In Linux)

What Should I know About The RHCSA Exam

RHCSA 8 Exam Practice question 2

Question

Configure your Host Name, IP Address, Gateway and DNS.

Host name: station.domain40.example.com

IP Address: 172.24.40.40/24

Gateway: 172.24.40.1

DNS/nameserver: 172.24.40.1

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.

RHCSA, 8 Course

Network Management In Red Hat

How To Set Static IP In Red Hat

How To Rename A Hostname In Red Hat

Ask Your Questions

Answer

There are different ways this can be done.

You can directly edit the NIC/connection configuration file

you can use the nmcli utility

you can use the nmtui utility.

you can use the GUI

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
RHCSA 8 exam practice question 2

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 
station.domain40.example.com

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

Solution Summary

ip a

nmcli conn show

vi /etc/sysconfig/network-scripts/ifcfg-ens33

nmcli conn down ens33;nmcli conn up ens33

systemctl restart NetworkManager

ifdown ens33

ifup ens33

ip a

ip route

cat /etc/resolv.conf

vi /etc/hostname (station.domain40.example.com)

systemctl restart systemd-hostnamed.service

hostname

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

10 Comments

  1. 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.

  2. During my exam, ifup and ifdown were not installed.
    # rpm -qf /usr/sbin/ifup
    NetworkManager-1.22.8-4.el8.x86_64
    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).

Leave a Reply

Your email address will not be published.


*