Skip to Content
Red Hat Enterprise Linux Server Cookbook
book

Red Hat Enterprise Linux Server Cookbook

by William Leemans
December 2015
Intermediate to advanced
250 pages
4h 41m
English
Packt Publishing
Content preview from Red Hat Enterprise Linux Server Cookbook

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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

CentOS 7 Server Deployment Cookbook

CentOS 7 Server Deployment Cookbook

Timothy Boronczyk

Publisher Resources

ISBN: 9781784392017