OpenWrt Forum Archive

Topic: GRETAP potential issues

The content of this topic has been archived on 3 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,

I think the gretap setup in network config is not quite right or at least doesnt match the docs.  I'm using a build from late November 2016, DD (Bleeding Edge, 50013).  What I'm looking to achieve is disable DF bit being set and disable MTU Path Discovery, or nopmtudisc, on GRETAP interfaces.

When I use this config:

config interface 'gretap_NAT1'
        option ipaddr '172.21.0.26'
        option peeraddr '172.21.0.24'
        option network 'br0'
        option mtu      '1500'
        option df       '0'   #Note: I also tried false
        option zone     'vpls'
        option proto 'gretap'

I get this in perpetuity:

Sat Dec 10 04:42:25 2016 daemon.notice netifd: gretap_NAT1 (31042): Command failed: Unknown error
Sat Dec 10 04:42:25 2016 daemon.notice netifd: Interface 'gretap_NAT1' is now down
Sat Dec 10 04:42:25 2016 daemon.notice netifd: Interface 'gretap_NAT1' is setting up now

When I do this the interface works, but it sets the DF bit which is not desirable for this setup:

config interface 'gretap_NAT1'
        option ipaddr '172.21.0.26'
        option peeraddr '172.21.0.24'
        option network 'br0'
        option mtu      '1500'
        option df       '1'  #Note: Commenting this out or using 'true' have the same effect.
        option zone     'vpls'
        option proto 'gretap'

I followed the documentation for these commands.  Even when this is commented out however, the bit is not set.  I checked the packets(tcpdump > wireshark).   I would also note that the current config options dont seem to have the same abilities as ip link/tunnel.  For example this setup works without using the network config:

ip link add br0 type bridge
ip link del gretap1
ip link add gretap1 type gretap local 172.21.0.26 remote 172.21.0.24 nopmtudisc
ip link set gretap1 mtu 1500
ip link set gretap1 up
ip link set gretap1 master br0
ip link set br0 up
ip addr add 172.24.24.26/24 dev br0

I didnt see an option for nopmtudisc, which if it's not set, it drops packets in this case above 1380.  I think this option needs to be added.  Thanks.

CB

Then catch event in /etc/hotplug.d/iface
Bad idea to write in /etc/init.d
On interface up change ip link parameters

(Last edited by bolvan on 11 Dec 2016, 09:53)

The discussion might have continued from here.