Stephanie is a RHEL Syadmin at Google:
- Her RHEL Server: RHEL_Server_071
- Her username: firstname.lastname@example.org
- Her professional standard: Linux professionals must NEVER run Linux commands as root
- Her credentials: CompTIA Linux+, currently studying for her LFCS certification
- Her task: Statically route IP traffic
To help Dr. Murphy to prepare for her LFCS exam, Google has assigned her to teach a class on statically routing IP traffic on RHEL. Please generate and explain a group of commands that Stephanie can teach the class to help both her and them to master this LFCS objective.
Certainly! Here's a group of commands that Dr. Stephanie Murphy can teach her class to help them master the objective of statically routing IP traffic on RHEL (Red Hat Enterprise Linux):
View the current routing table:
- ip route show
- Add a static route:
- ip route add <destination_network> via <gateway_ip> dev <interface>
<destination_network>: The network address or subnet you want to route.
<gateway_ip>: The IP address of the next hop or gateway.
<interface>: The network interface through which the traffic should be routed.
- Delete a static route:
- ip route del <destination_network> via <gateway_ip> dev <interface>
- Make a static route persistent:
- Edit the network configuration file:
- sudo vi /etc/sysconfig/network-scripts/route-<interface>
<interface>with the actual network interface name, such as
- Add the static route in the format:
- <destination_network>/<subnet_mask> via <gateway_ip>
- Save and exit the file.
- Reload the network configuration:
- sudo systemctl restart network
By explaining and demonstrating these commands, Dr. Murphy can guide her class in effectively configuring and managing static routes on RHEL. It's worth noting that certain commands may require administrative privileges, so Dr. Murphy should emphasize the importance of running Linux commands as a regular user whenever possible and switching to root only when necessary.