OCI: How to Configure Static Routes at Boot Time in Oracle Linux — Cloud Customer Connect
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register
Note!! Please register for a free account to access the full content and also to participate in Q&A in the community

OCI: How to Configure Static Routes at Boot Time in Oracle Linux

edited Aug 12, 2025 7:35AM in 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

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!