Configuring static network routes

In some cases, it is required to set static routes on your system. As static routes are not natively supported in kickstart, this is not covered in this recipe.

How to do it…

Add static routes to both the 192.168.0.0/24 and 192.168.1.0/24 networks via 10.0.0.1.

Configuring static network routes using nmcli

Here's what you need to do:

  1. Set the route using the following command:
    ~]# nmcli connection modify eth0 ipv4.routes "192.168.0.0/24 10.0.0.1,192.168.1.0/24 10.0.0.1"
    
  2. Now, execute the following command line to verify the configuration:
    ~]# nmcli connection show eth0
    

    Here is an example output of the preceding commands:

Configuring network routes using nmtui

Here are the steps for this recipe:

  1. Launch nmtui, select the ...

Get Red Hat Enterprise Linux Server Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.