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 serverb machine as the student user.
Switch to the root user.
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:0b MAC 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.
The name of your connection might vary according to the course platform and hardware in use.
The solution assumes that the interface name is eth0 and that the connection name is System eth0.
Locate the current connection name (such as System eth0 or Wired connection 1) that is associated with the interface in the table.
Use the located connection name to replace System eth0 throughout 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 eth0
Create the lab connection profile based on the table information in the instructions.
Associate the profile with your network interface, as listed in the output of the previous ip link command.
[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/24 IP address.
Configure the hosts file so that you can reference the 10.0.1.1 IP address with the private name.
Reboot the system.
Verify that the serverb machine is initialized.
[student@workstation ~]$ ping -c3 serverb
PING 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 msThis concludes the section.