gre tunnel woes

Andreas Nilsson andrnils at gmail.com
Wed Apr 3 14:51:54 UTC 2013


Hello,

I'm struggling a fair bit with gre tunnels today:

Woe 1:

I'm trying to incorporate my gre tunnels into rc.conf, like

cloned_interfaces="gre1"
ifconfig_gre1="inet 10.0.0.1/30 10.0.0.2 tunnel a.b.c.d e.f.g.h"

but after boot I get:

gre1: flags=9011<UP,POINTOPOINT,LINK0,MULTICAST> metric 0 mtu 1476
        tunnel inet a.b.c.d --> e.f.g.h
        inet 10.0.0.1 --> 10.0.0.2 netmask 0xfffffffc
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>

ie, the tunnel is down. Both "ifconfig gre1 up" and "service netif restart
gre1" brings the tunnel up:

gre1: flags=9051<UP,POINTOPOINT,RUNNING,LINK0,MULTICAST> metric 0 mtu 1476
        tunnel inet a.b.c.d --> e.f.g.h
        inet 10.0.0.1 --> 10.0.0.2 netmask 0xfffffffc
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>


Adding "up" to the interface ifconfig line in rc.conf makes no difference.

So, how do I get the tunnel(s) to start automatically at boot?


Woe 2:

Is there no other way than successfully pinging the remote endpoint to tell
if the tunnel is "up and running" as it should? Quite often I get gre
interfaces that tell me both UP and RUNNING flags from ifconfig, but tunnel
is still down.

Woe 3:

After doing ifconfig greX destroy ; ifconfig greX create , the interface
comes up with the old configuration. Is that really the expected behavior?
I noticed that lagg interfaces does exactly the same thing.

Best regards
Andreas Nilsson


More information about the freebsd-net mailing list