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.
I'm running a 2.4 Linux kernel on a Linksys router (OpenWRT), and need to set up a GRE tunnel from this box to a Cisco router. I've installed the kernel package on the Linky. ip tunnel mytunnel mode gre local 1.2.3.4 remote 2.3.4.5 ttl 32 (etc etc) works just fine.
Here's my problem: the IP address on my DSL line changes about every 2 days. With this configuration, the GRE tunnel goes down until I manually update the config on both ends.
Is there any way to use an interface name or DNS name instead of an IP for the "remote" subcommand? (Analagous to "ip unnumbered int vlan1" on a Cisco box?)
Barring that, is there a way to get Linux to:
a) Notice a changed IP (maybe a cron job to whatismyip.com or something.)
b) Automagically reconfigure its GRE tunnel whenever it decides its IP address has changed?
I can use tcl/expect on a server in the LAN to go update the Cisco. Any way to get the Linksys to do the job by itself?
I'm running a 2.4 Linux kernel on a Linksys router (OpenWRT), and need to set up a GRE tunnel from this box to a Cisco router. I've installed the kernel package on the Linky. ip tunnel mytunnel mode gre local 1.2.3.4 remote 2.3.4.5 ttl 32 (etc etc) works just fine.
Here's my problem: the IP address on my DSL line changes about every 2 days. With this configuration, the GRE tunnel goes down until I manually update the config on both ends.
Is there any way to use an interface name or DNS name instead of an IP for the "remote" subcommand? (Analagous to "ip unnumbered int vlan1" on a Cisco box?)
Barring that, is there a way to get Linux to:
a) Notice a changed IP (maybe a cron job to whatismyip.com or something.)
Yes.
b) Automagically reconfigure its GRE tunnel whenever it decides its IP address has changed?
Yes.
I can use tcl/expect on a server in the LAN to go update the Cisco. Any way to get the Linksys to do the job by itself?
On Debian, there is a directory called /etc/ppp, in this directory are two other directories, ip-up.d and ip-down.d. There are man pages for this stuff but to cut to the chase, anytime that PPPd brings up the ppp interface, all the scripts in /etc/ppp/ip-up.d will be run in lexical order, write a bash with a name such that it is run after all the other scipts in this directory to bring up your tunnel.
Wirte a bash script to bring down the tunnel and delete the tunnal with an appropriate name to run after all the scripts in the /etc/ppp/ip-down.d directory.
Now, these ppp entries "may" be particular to Debian but each distro will have equivalent things so just look around your directories, you find what you need.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.