LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 11-06-2004, 06:38 AM   #1
brynjarh
Member
 
Registered: May 2004
Location: Iceland
Distribution: Ubuntu Dapper Drake
Posts: 172

Rep: Reputation: 30
How do I freeze my route configurations? They always get reconfigured on reboot.


Every time I reboot I need to do..
Code:
route del default
route add -net fjoltengi netmask 255.255.255.255 gateway 10.9.12.1 eth0
..so that my route configurations are correct. It would be nice if I wouldn't have to do this every time I reboot.

So how do I freeze my route configurations so that they do not change on reboot? I can't seam to find any information on how to do it. :/
 
Old 11-06-2004, 06:41 AM   #2
n0sr
Member
 
Registered: Sep 2004
Location: 127.0.0.1
Distribution: Slackware 13; Ubuntu Raspberry Pi OS
Posts: 255

Rep: Reputation: 34
If you have /etc/rc.d/rc.local you can add those commands into this file and they will run as the very last thing in the system startup process.
If you wanted to add them in with the rest of the networking inititlization, you can add them into /etc/rc.d/rc.inet1 at the end of the file.
 
Old 11-06-2004, 08:08 AM   #3
brynjarh
Member
 
Registered: May 2004
Location: Iceland
Distribution: Ubuntu Dapper Drake
Posts: 172

Original Poster
Rep: Reputation: 30
There is no /etc/rc.d/rc.local or /etc/rc.d/rc.inet1, I'm using Debian.

Anyway that doesn't really sound like a solution, more of a workaround. What I would really like to do is to define my routing configuration and keep them that way, it sounds logical to me that I should be able to configure my routing and keep that configuration, I don't really grasp why the routing should be reconfigured on reboot.

Is there no way to define the routing without having to do it every time you reboot?
 
Old 11-06-2004, 08:21 AM   #4
Wordan
Member
 
Registered: Aug 2003
Distribution: Debian
Posts: 53

Rep: Reputation: 15
Im having a problem keeping my gateway

I found this file, I havent restarted yet to find out if it fixed my problem

/etc/network/interfaces

I know little about route, or what your command does, so this probably isnt what your looking for

Last edited by Wordan; 11-06-2004 at 08:26 AM.
 
Old 11-06-2004, 09:06 AM   #5
brynjarh
Member
 
Registered: May 2004
Location: Iceland
Distribution: Ubuntu Dapper Drake
Posts: 172

Original Poster
Rep: Reputation: 30
Wordan, could I see your /etc/networks/interfaces file so I can see how you changed it to have a specific gateway?

It might be what I'm looking for, I don't know, does ifconfig use this file at boot time? If not then what?
 
Old 11-06-2004, 10:25 AM   #6
Wordan
Member
 
Registered: Aug 2003
Distribution: Debian
Posts: 53

Rep: Reputation: 15
Debian woody
Code:
# The loopback interface
auto lo
iface lo inet loopback

# The first network card - this entry was created during the Debian installation# (network, broadcast and gateway are optional)
auto eth0
iface eth0 inet static
        address 192.168.0.5
        netmask 255.255.255.0
        network 192.168.0.0
        broadcast 192.168.0.255
        gateway 192.168.0.253
I think this is the right thing
see ~$ man interfaces

I just changed the gateway line

Last edited by Wordan; 11-06-2004 at 10:29 AM.
 
Old 11-06-2004, 10:38 AM   #7
Wordan
Member
 
Registered: Aug 2003
Distribution: Debian
Posts: 53

Rep: Reputation: 15
route add -net fjoltengi netmask 255.255.255.255 gateway 10.9.12.1 eth0

what does this do?
 
Old 11-06-2004, 08:17 PM   #8
n0sr
Member
 
Registered: Sep 2004
Location: 127.0.0.1
Distribution: Slackware 13; Ubuntu Raspberry Pi OS
Posts: 255

Rep: Reputation: 34
Sorry, but each time your system boots, it has to re-configure your network interfaces and set up the routing. Unfortunately your startup scripts don't set them up correctly. So it may appear to be a kluge fix, but it is how every system (including non-linux) does it.

I'm not a Debian user, but I believe the default file that sets up the network is /etc/init.d/network

You should be able to add your route commands to the end of this file.
 
  


Reply



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
default route has to be set evey reboot? lucktsm Linux - Networking 3 11-28-2005 05:07 PM
Wireless connection must be reconfigured at each reboot broggyr Linux - Wireless Networking 10 06-28-2005 07:26 PM
Freeze on reboot with no keyboad installed! CTRLBREAK Fedora 7 06-02-2005 11:04 AM
route settings get changed after reboot brynjarh Linux - Newbie 1 07-08-2004 01:03 PM
reboot freeze Orion224 Linux - General 2 06-05-2002 12:30 AM

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

All times are GMT -5. The time now is 09:16 AM.

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