Oracle Linux Add route & Delete route Default Gateway

You can Change default gateway and routing settings. I will explain Oracle Linux Add route & Delete route Default Gateway in this post.

 

Linux Add route delete route default gateway

 

Add & Delete default gateway 

You can add default gateway to the linux like below.

route add default gw 192.168.163.1

 

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

route delete default gw 192.168.163.1 eth1

 

 

Add route & Delete route

You can add routing and gateway settings like below.

route add -net 192.168.63.0/24 gw 192.168.163.1

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

[root@deveci02 ~]#
[root@deveci01 network-scripts]# cat route-eth1
192.168.63.0/24 via 192.168.163.1 dev eth1
192.168.161.0/24 via 192.168.161.1 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 192.168.161.1 0.0.0.0 UG 0 0 0 eth0
link-local * 255.255.0.0 U 0 0 0 ibbond0
192.168.161.0 * 255.255.255.0 U 0 0 0 eth0
192.168.16.0 * 255.255.255.0 U 0 0 0 ibbond0
192.168.18.0 * 255.255.255.0 U 0 0 0 veth1
192.168.19.0 192.168.18.1 255.255.255.0 UG 0 0 0 veth1
192.168.63.0 192.168.163.1 255.255.255.0 UG 0 0 0 eth1
192.168.163.0 * 255.255.255.0 U 0 0 0 eth1


 

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

About 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 [email protected].-                                                                                                                                                                                                                                                 -Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS ve linux Danışmanlık ve Eğitim için  [email protected] a mail atabilirsiniz.

Leave a Reply

Your email address will not be published. Required fields are marked *