Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Apr 2013 16:51:53 +0200
From:      Andreas Nilsson <andrnils@gmail.com>
To:        FreeBSD Net <freebsd-net@freebsd.org>
Subject:   gre tunnel woes
Message-ID:  <CAPS9%2BSvcTUQo-O8AefjwpHGKPXwne%2BiWM9P4D4uF-NO8zdt8xw@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPS9%2BSvcTUQo-O8AefjwpHGKPXwne%2BiWM9P4D4uF-NO8zdt8xw>