RHCSA Rapid Track
Course update
An updated version of this course is available that uses a newer version of Red Hat Enterprise Linux in the lab environment. Therefore, the RHEL 9.0 version of the lab environment will retire on December 31, 2024. Please complete any work in this lab environment before it is removed on December 31, 2024. For the most up-to-date version of this course, we recommend moving to the RHEL 9.3 version.
In this lab, you configure networking settings on a Red Hat Enterprise Linux server.
Outcomes
Configure two static IPv4 addresses for the primary network interface.
As the student user on the workstation machine, use the lab command to prepare your system for this exercise.
This command prepares your environment and ensures that all required resources are available.
[student@workstation ~]$ lab start net-review
Instructions
Log in to the
serverbmachine as thestudentuser. Switch to therootuser.Create a connection with a static network configuration by using the settings in the table.
Parameter Setting Connection name lab Interface name enX (might vary; use the interface with the 52:54:00:00:fa:0bMAC address)IP address 172.25.250.11/24 Gateway address 172.25.250.254 DNS address 172.25.250.254 Determine the interface name and the current active connection's name.
Important
The name of your connection might vary according to the course platform and hardware in use. The solution assumes that the interface name is
eth0and that the connection name isSystem eth0. Locate the current connection name (such asSystem eth0orWired connection 1) that is associated with the interface in the table. Use the located connection name to replaceSystem eth0throughout this exercise if different.[root@serverb ~]#
ip link1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2:eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000 link/ether52:54:00:00:fa:0bbrd ff:ff:ff:ff:ff:ff altname enp0s3 altname ens3 [root@serverb ~]#nmcli con show --activeNAME UUID TYPE DEVICESystem eth05fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03 ethernet eth0Create the
labconnection profile based on the table information in the instructions. Associate the profile with your network interface, as listed in the output of the previousip linkcommand.[root@serverb ~]#
nmcli con add con-name lab ifnameeth0type ethernet \ipv4.method manual ipv4.dns 172.25.250.254 \ipv4.addresses 172.25.250.11/24 ipv4.gateway 172.25.250.254Connection 'lab' (d5b4815d-231b-43c0-8565-445e3a07b97a) successfully added.
Configure the new connection to start automatically. Other connections should not start automatically.
Modify the new connection to use also the
10.0.1.1/24IP address.Configure the
hostsfile so that you can reference the10.0.1.1IP address with theprivatename.Reboot the system.
Verify that the
serverbmachine is initialized.[student@workstation ~]$
ping -c3 serverbPING serverb.lab.example.com (172.25.250.11) 56(84) bytes of data. 64 bytes from serverb.lab.example.com (172.25.250.11): icmp_seq=1 ttl=64 time=0.478 ms 64 bytes from serverb.lab.example.com (172.25.250.11): icmp_seq=2 ttl=64 time=0.504 ms 64 bytes from serverb.lab.example.com (172.25.250.11): icmp_seq=3 ttl=64 time=0.513 ms --- serverb.lab.example.com ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 78ms rtt min/avg/max/mdev = 0.478/0.498/0.513/0.023 ms
This concludes the section.