OCI: How to Configure Static Routes at Boot Time in Oracle Linux
APPLIES TO
Oracle Cloud Infrastructure - Version N/A and later
Linux x86-64
GOAL
This document describes how to configure static routes at boot time in Oracle Linux.
SOLUTION
For Oracle Linux 7 instances using the classic network service and not Network Manager:
1) Create the Static Route File
Create or edit the file /etc/sysconfig/network-scripts/route-ensX
. Replace ensX
with the actual network device name. The name route-ensX
tells the system these routes are associated with the ensX
interface. For the sake of this example we will assume the routing is being configured for ens4
:
$ sudo vi /etc/sysconfig/network-scripts/route-ens4