LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-26-2018, 09:50 AM   #1
triley831
Member
 
Registered: Feb 2017
Posts: 34

Rep: Reputation: Disabled
How to prevent a route being automatically added to an static-IP'd interface


Working with RHEL7 server. We have interfaces configured statically. I have two interfaces configured on the same subnet (mil requirement). A route in the form x.x.x.x 255.255.255.0 ethx is auto-configured on both of these interfaces. I need it only on one of them. So I added DEFROUTE=no to the ifcfg-eth0 config file. Yet if I restart the network or reboot, the route for eth0 is still there.

Shouldn't adding defroute=no prevent that route from being created? Am I missing something?

Thanks...
 
Old 09-27-2018, 09:19 AM   #2
lougavulin
Member
 
Registered: Jul 2018
Distribution: Slackware,x86_64,current
Posts: 279

Rep: Reputation: 100Reputation: 100
You can define static routes in
Code:
/etc/sysconfig/network-scripts/route-interface
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Packet going out of wrong interface due to OS adding cache route - OS trying to route through default route msr1981 Red Hat 1 10-09-2017 05:45 AM
systemd-networkd: prevent default gateway + add static route to dhcp bluedeep Linux - Networking 9 03-11-2016 02:45 PM
pon connects ok to remote VPN but I cant get a route added automatically CADIT Linux - Networking 3 03-08-2010 10:09 AM
how to add static route for loopback interface. UltraSoul Linux - Software 4 04-12-2009 01:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration