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 exercise, you manually modify network configuration files and ensure that the new settings take effect.
Outcomes
Configure additional network addresses on each system.
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-edit
Instructions
On the
workstationmachine, use thesshcommand to log in to theserveramachine as thestudentuser.[student@workstation ~]$
ssh student@servera...output omitted... [student@servera ~]$Locate network interface names with the
ip linkcommand.Important
Network interface names are determined by their bus type and the detection order of devices during boot. Your network interface names might vary according to the course platform and hardware in use.
Locate the network interface name that is associated with the Ethernet address on your system. Record or remember this name, and use it to replace the
enplaceholder in subsequent commands. The active connection is calledXWired connection 1, and the configuration is in the/etc/NetworkManager/system-connections/"Wired connection 1.nmconnection"file.[student@servera ~]$
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/ether 52:54:00:00:fa:0a brd ff:ff:ff:ff:ff:ff altname enp0s3 altname ens3 [student@servera ~]$nmcli con show --activeNAME UUID TYPE DEVICE Wired connection 1 a98933fa-25c0-36a2-b3cd-c056f41758fe ethernet eth0 [student@servera ~]$ls /etc/NetworkManager/system-connections/'Wired connection 1.nmconnection'On the
serveramachine, switch to therootuser, and then edit the/etc/NetworkManager/system-connections/"Wired connection 1.nmconnection"file to add the10.0.1.1/24address.Use the
sudo -icommand to switch to therootuser.[student@servera ~]$
sudo -i[sudo] password for student:student[root@servera ~]#Edit the configuration file. Add the
10.0.1.1/24address as the second address below the first address in the file.[root@servera ~]#
vim /etc/NetworkManager/system-connections/"Wired connection 1.nmconnection"...output omitted... [ipv4] address1=172.25.250.10/24,172.25.250.254 address2=10.0.1.1/24 ...output omitted...
Activate the new network address with the
nmclicommand.Reload the configuration changes for NetworkManager to read the changes.
[root@servera ~]#
nmcli con reloadActivate the connection with the changes.
[root@servera ~]#
nmcli con up "Wired connection 1"Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/2)
Verify that the new IP address is assigned successfully.
[root@servera ~]#
ip -br addr show eth0eth0: UP 172.25.250.10/2410.0.1.1/24fe80::6fed:5a11:4ad4:1bcf/64Return to the
workstationmachine as thestudentuser.[root@servera ~]#
exitlogout [student@servera ~]$exitlogout Connection to servera closed. [student@workstation ~]$On the
serverbmachine, edit the/etc/NetworkManager/system-connections/"Wired connection 1.nmconnection"file to add an address of10.0.1.2/24and load the new configuration.Log in to the
serverbmachine as thestudentuser and switch to therootuser.[student@workstation ~]$
ssh student@serverb...output omitted... [student@serverb ~]$sudo -i[sudo] password for student:student[root@serverb ~]#Edit the configuration file. Add the
10.0.1.2/24address as the second address below the first address in the file.[root@serverb ~]#
vim /etc/NetworkManager/system-connections/"Wired connection 1.nmconnection"address1=172.25.250.11/24,172.25.250.254 address2=10.0.1.2/24Reload the configuration changes for NetworkManager to read the changes.
[root@serverb ~]#
nmcli con reloadActivate the connection with the changes.
[root@serverb ~]#
nmcli con up "Wired connection 1"Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/2)Verify that the new IP address is assigned successfully.
[root@serverb ~]#
ip -br addr show eth0eth0 UP 172.25.250.11/2410.0.1.2/24fe80::6be8:6651:4280:892c/64
Test connectivity between the
serveraandserverbmachines by using the new network addresses.From the
serverbmachine, ping the new address of theserveramachine.[root@serverb ~]#
ping -c3 10.0.1.1PING 10.0.1.1 (10.0.1.1) 56(84) bytes of data. 64 bytes from 10.0.1.1: icmp_seq=1 ttl=64 time=1.30 ms 64 bytes from 10.0.1.1: icmp_seq=2 ttl=64 time=0.983 ms 64 bytes from 10.0.1.1: icmp_seq=3 ttl=64 time=0.312 ms --- 10.0.1.1 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2003ms rtt min/avg/max/mdev = 0.312/0.864/1.297/0.410 msReturn to the
workstationmachine as thestudentuser.[root@serverb ~]#
exitlogout [student@serverb ~]$exitlogout Connection to serverb closed. [student@workstation ~]$Access the
serveramachine as thestudentuser to ping the new address of theserverbmachine.[student@workstation ~]$
ssh student@servera ping -c3 10.0.1.2PING 10.0.1.2 (10.0.1.2) 56(84) bytes of data. 64 bytes from 10.0.1.2: icmp_seq=1 ttl=64 time=0.876 ms 64 bytes from 10.0.1.2: icmp_seq=2 ttl=64 time=0.310 ms 64 bytes from 10.0.1.2: icmp_seq=3 ttl=64 time=0.289 ms --- 10.0.1.2 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2047ms rtt min/avg/max/mdev = 0.289/0.491/0.876/0.271 ms
This concludes the section.