Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Linux host and couple of routerboadrs. I created a GRE tunnel, but Linux does not answer keepalive packages. Then router mark gre connection as unreachable, so I cant send to Linux host from router subnet. If linux sends something into tunnel (ping, etc.) - RouterOS mark connection as reacheble. Second and next packages routed nicely until one minute idle (no traffic).

Tunnel in linux a make in this way:


ip tunnel add ${dev} mode gre remote ${remote} ttl 255
ip addr add peer dev ${dev}
ip link set ${dev} up
ip route add ${network} dev ${dev}

And ip l:

14: gre21: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1476 qdisc noqueue state UNKNOWN 
    link/gre peer

How to set state "running"?

How to keep alive tunnel? Ping in cron?

share|improve this question

This is not exactly a direct answer to the GRE tunnel keepalive, however you may find it easier to use the MikroTik EoIP option to a linux server as this has been ported and allows tunnel ID and keepalive in a similar fashion (also handles fragmentation for any size link).

share|improve this answer
"1 core load 70%, bandwidth 54+58(TX/RX) Mbps" - is bad performance result. – eri Nov 14 '13 at 12:42

crontab -e

*/1 * * * * ping -c 69

Its works for me, are simple keep pinging alive.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.