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 Create Network Route Rule Persistent Across OS Reboot Or Network Service Restart
APPLIES TO
Oracle Cloud Infrastructure
Linux x86-64
GOAL
To create Network Route rule configuration to be persistent across Linux OS reboot.
Route rule temporarily added by executing below command. But this rule will disappear after a OS reboot or network service restart.
$ ip route add 1.0.0.xx/3x via 1x9.1xx.0.xx9 src 1x9.0.8x.x0 $ ip route add <Destination-Subnet> via <Gateway-IP-Of-Source> src <Source-IP-Address>
SOLUTION
1) Create a route file (route-ens3:0) under the directory /etc/sysconfig/network-scripts and add the route rules in it as below
$ vi /etc/sysconfig/network-scripts/route-ens3:0 $ cat /etc/sysconfig/network-scripts/route-ens3:0 1.0.0.xx/3x via 1x9.1xx.0.xx9 src 1x9.0.8x.x0 $
Tagged:
1