LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   ip tunnel (https://www.linuxquestions.org/questions/linux-networking-3/ip-tunnel-875699/)

swlnx 04-18-2011 02:33 PM

ip tunnel
 
Hi I'm having a strange issue.

I have 2 linux servers in different locations.
I need to setup a ip tunnel. I follow this steps on both servers:

Server1:

ip tunnel add tun0 mode ipip local IP_Server1 remote IP_Server2 dev ethX
ip l s tun0 up
ip a a 10.10.10.1 peer 10.10.10.2 dev tun0

Server2:

ip tunnel add tun0 mode ipip local IP_Server2 remote IP_Server1 dev ethX
ip l s tun0 up
ip a a 10.10.10.2 peer 10.10.10.1 dev tun0

After creating the tunnel everything is ok, but after a time(maybe some hours), I can't ping the other end of the tunnel (ping to IP_Server1 and IP_Server2 is ok all the time; the connection to internet is very reliable). I have tried "ipip" and "gre" mode, but same result.

If I ping from two servers the other end of the tunnel, the connection is again established for some hours and ping is working in both directions.(if I ping only from one side the ping is not working)

How can I resolve this issue for no longer having to log on both servers to ping the other end of the tunnel? If I use an crondjob to ping the other end of the tunnel at 2 hours everything is working fine for weeks, but I need other solution.

ButterflyMelissa 04-18-2011 02:50 PM

Hmm, TTL? Can you stretch the TTL?

I came accross this: http://linux-ip.net/gl/ip-tunnels/node5.html - but I guess you've already seen this...

Thor

swlnx 04-18-2011 03:24 PM

I have modified TTL from inherited to 64 and 255 and the same issue appear.

ButterflyMelissa 04-18-2011 09:58 PM

By the way, I think your approach is the right one: pinging to keep the tunnel "alive", see this (perhaps not fully related) article:
http://www.watchguard.com/help/Small...N/configv8.htm

Quote from the article

Quote:

To help keep the VPN tunnel open when there is no communication across it, enter the IP address of a computer at the other end of the tunnel as the echo host. The Firebox® X Edge will send a ping once a minute to the specified host
So, what's better that an occasional ping?

Thor

swlnx 04-19-2011 05:35 AM

If you or others find any other solution please let me know. Thanks

ButterflyMelissa 04-19-2011 10:08 AM

Hmm,

Okay, you may need the TCP keepalive feature - read this http://tldp.org/HOWTO/TCP-Keepalive-HOWTO/overview.html and http://tldp.org/HOWTO/TCP-Keepalive-...keepalive.html to use it...

This thread is in my watch list...

Thor


All times are GMT -5. The time now is 06:10 AM.