Oracle Linux Add route delete route default gateway


You can Change default gateway and routing settings like below.

You can add default gateway to the linux like below.

route add default gw


If you want to delete default gateway you can execute like following script.

route delete default gw eth1


You can add routing and gateway settings like below.

route add -net gw

Or if you want to do permanent routing, you can create route file like below.

[root@deveci02 ~]#
[root@deveci01 network-scripts]# cat route-eth1 via dev eth1 via dev eth0


If you create routing file like above then you can restart network service like below.

[root@deveci01 network-scripts]# service network restart


then Routing will be like below.

[root@deveci01 network-scripts]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default UG 0 0 0 eth0
link-local * U 0 0 0 ibbond0 * U 0 0 0 eth0 * U 0 0 0 ibbond0 * U 0 0 0 veth1 UG 0 0 0 veth1 UG 0 0 0 eth1 * U 0 0 0 eth1


Do you want to learn Linux System Administration for Beginners, then read the following articles.

 219 views last month,  4 views today

Mehmet Salih Deveci

I am Founder of SysDBASoft IT and IT Tutorial and Certified Expert about Oracle & SQL Server database, Goldengate, Exadata Machine, Oracle Database Appliance administrator with 10+years experience.I have OCA, OCP, OCE RAC Expert Certificates I have worked 100+ Banking, Insurance, Finance, Telco and etc. clients as a Consultant, Insource or Outsource.I have done 200+ Operations in this clients such as Exadata Installation & PoC & Migration & Upgrade, Oracle & SQL Server Database Upgrade, Oracle RAC Installation, SQL Server AlwaysOn Installation, Database Migration, Disaster Recovery, Backup Restore, Performance Tuning, Periodic Healthchecks.I have done 2000+ Table replication with Goldengate or SQL Server Replication tool for DWH Databases in many clients.If you need Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS Consultancy and Training you can send my email adress                                                                                                                                                                                                                                                 -Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS ve linux Danışmanlık ve Eğitim için a mail atabilirsiniz.

Leave a Reply