LinuxQuestions.org
Register a domain and help support LQ
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 04-26-2007, 11:50 AM   #1
Hewson
Member
 
Registered: Feb 2007
Location: /home
Distribution: Kubuntu and CentOS
Posts: 214

Rep: Reputation: 32
persistent static routes, not so persistent


I have observed a strange behavior for my static routes. As of late afternoon my static routes where fine. I came in today and they were gone. I checked uptime. The machine has not rebooted yet all of the routes I had manually configured are gone. Does the kernel after a while reread some file?

Apart from a reboot or some one logging in as root, why else would my static routes disappear from the routing table. (I have 3 network interfaces, all of which are set manually. no DHCP)

Your Thoughts?

-steve

This is on FC6 if that helps at all.
kernel: 2.6.18-1.2798.fc6
 
Old 04-27-2007, 10:14 AM   #2
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,950
Blog Entries: 5

Rep: Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755
What did you do to make them "persistent"?

You can setup routing at command line as you already know with the route command but that doesn't make them "persistent".

I've not seen this dropout myself but my coworker says he has.
If something happened to the interface (e.g. eth1) that you'd tied the route to (e.g. someone did and ifconfig eth1 down then an ifconfig eth1 up) then the route would drop. If the NIC burped on its own you'd have the same issue.

You can insure the routes are reestablished at boot (or restart of networking) by adding to /etc/sysconfig/network-scripts/route-<interface>
(e.g. route-eth1). Example would be:
GATEWAY0=10.0.52.54
NETMASK0=255.0.0.0
ADDRESS0=10.0.0.0

That would be the equivalent of the command line:
route add -net 10.0.0.0 netmask 255.0.0.0 gw 10.0.52.54 metric 1
 
Old 04-27-2007, 10:20 AM   #3
Tap-Out
Member
 
Registered: Oct 2002
Location: Halifax, NS
Distribution: Ubuntu, Mepis, Debian
Posts: 130

Rep: Reputation: 15
I also think there's a way through the command line to make it persistant.

route add -p I believe it is.

As for why they dropped in the first place I'm not sure what would be causing that. Did all of your persistant routes dissapear or just one or two?
 
Old 04-27-2007, 10:46 AM   #4
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,950
Blog Entries: 5

Rep: Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755
"man route" lists no "persistent" option on my FC4 box.

-p on my HP-UX box sets pmtu.
 
Old 04-27-2007, 05:09 PM   #5
Hewson
Member
 
Registered: Feb 2007
Location: /home
Distribution: Kubuntu and CentOS
Posts: 214

Original Poster
Rep: Reputation: 32
bad word 'persistent' i meant just static routes that are manually configured.

e.g /sbin/route add -host 192.168.12.12 gw 192.168.1.1


sorry about the confusion.
 
  


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
persistent static route ANU Linux - Networking 5 04-01-2012 07:23 PM
How does one make a static route persistent in AIX? artasse AIX 2 11-22-2006 02:51 PM
Persistent clipboard? Ander Linux - Newbie 3 05-05-2006 09:54 AM
Question about persistent routes in redhat 9 shrike wensbot Linux - Networking 5 06-03-2003 08:51 AM
Persistent Error hubergeek Linux - Software 2 03-27-2002 12:45 PM


All times are GMT -5. The time now is 08:58 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration