General Information
Routing IP traffic and creating static routes.
The following virtual machines will be used:
Finding help in this section.
man nmcli-examples
Ensure IP Forwarding is enabled if using router like functionality
# Persistent Change that takes place upon system boot vim /etc/sysctl.d/overrides.conf net.ipv4.ip_forward = 1
Show Route Table
ip route show
Creating a persistent static route.
Interface specific route using nmcli.
nmcli con mod enp0s3 +ipv4.routes 216.58.219.0/24
nmcli con up enp0s3
ip route show
nmtui
systemctl restart network
ip route show
Note: This method is considered “legacy”, but if it works, that is all that matters on the exam.
vim /etc/sysconfig/static-routes # Minimal route entry any net 216.58.217.0/24 gw 192.168.1.254 # Can also specify a device to use for the route any net 216.58.217.0/24 gw 192.168.1.254 dev eth0 # Can also specify a route metric any net 216.58.217.0/24 gw 192.168.1.254 dev eth0 metric 110
systemctl restart network
ip route show