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: Ubuntu 9.10, Red Hat WS 4, CentOS, OpenBSD, and all windows flavs
Posts: 20
Rep:
Routes not persistent
Hello,
I have a ubuntu 10.04.1 install with openvpn, so I have some routes in my /etc/networking/interface file. But for what ever reason when it boots the routes don't come up and I have to restart the networking before they come up. Once I do that all is well. Any idea's why it's doing that?
The routes are for which interfaces, standard ethernet or the openvpn tap/tun interface?
scheidel21, of course you can that's what the whole up thing is for in interfaces, you can use it to run any arbitrary thing you want conditioned on the interface coming up or down as the case may be.
excerpt from man interfaces
Quote:
pre-up command
Run command before bringing the interface up. If this command fails then ifup aborts, refraining from marking the
interface as configured, prints an error message, and exits with status 0. This behavior may change in the future.
up command
post-up command
Run command after bringing the interface up. If this command fails then ifup aborts, refraining from marking the inter-
face as configured (even though it has really been configured), prints an error message, and exits with status 0. This
behavior may change in the future.
down command
pre-down command
Run command before taking the interface down. If this command fails then ifdown aborts, marks the interface as decon-
figured (even though it has not really been deconfigured), and exits with status 0. This behavior may change in the
future.
post-down command
Run command after taking the interface down. If this command fails then ifdown aborts, marks the interface as deconfig-
ured, and exits with status 0. This behavior may change in the future.
Last edited by estabroo; 09-02-2010 at 04:47 PM.
Reason: added smal excerpt from man interfaces
I forgot all about the pre-up/down and up/down syntax for the interfaces file, I never had a need for them. That said perhaps he should make sure he is using this syntaxt and that he is using the post-up option.
Distribution: Ubuntu 9.10, Red Hat WS 4, CentOS, OpenBSD, and all windows flavs
Posts: 20
Original Poster
Rep:
Thanks guys for the help. estabroo was right on just reading the man file. I added the up and down commands in my config and they come up as they should. I though I tried that at one point but I don't think ubuntu can handle 192.168.1.1/16, instead i had to give it the full netmask. IE 192.168.1.1 255.255.255.0.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.