How do I freeze my route configurations? They always get reconfigured on reboot.
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Slackware 13; Ubuntu Raspberry Pi OS
Posts: 255
Rep:
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.
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?
# 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
Distribution: Slackware 13; Ubuntu Raspberry Pi OS
Posts: 255
Rep:
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.