Default l2tp gateway not work for lan clients

I have a dell r720 server which have 4 ethernet cards. I used two of them as docker macvlan and installed openwrt in docker.
Also I have installed xl2tpd. In openwrt server, it works all fine, I could successfully download all kinds of data. But it seems the default gateway not work for LAN clients, in LAN clients I could ping other websites successfully but couldn't download any data.
The default gateway is like this:

root@OpenWrt:/etc/config# ip route show
default via dev l2tp-vpn via dev eth1 dev l2tp-vpn scope link  src dev eth1 scope link  src dev br-lan scope link  src

If I add default WAN gateway , the LAN clients could get data but not through the l2tp service.
The /etc/config/network is

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr ''
        option netmask ''

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0'
        option proto 'static'
        option netmask ''
        option ip6assign '60'
        option ipaddr ''

config interface 'wan'
        option ifname 'eth1'
        option ip6assign '60'
        option proto 'static'
        option ipaddr ''
        option netmask ''
        option gateway ''
        option broadcast ''
        list dns ''

config interface 'vpn'
        option ifname 'vpn1'
        option proto 'l2tp'
        option username '-----'
        option password '-----'
        option server ''
        option ipv6 'auto'
        option mtu '1428'

Can anyone help me about this problem? Thanks!

Is it a dns issue, or remote sites are resolved fine?
Successfully reaching a site but not downloading something big sounds like MTU issue. Is the 1428 value 100% correct?

1 Like

Thanks a lot! I think MTU is indeed where went wrong. After setting the LAN MTU to 1200, I could download files, although webpages still won't load.

You'll need to set it properly on both ends of the tunnel.
Search here or online for methods to calculate the correct MTU.
Make sure you set the MTU of the tunnel to the same as wan interface and start testing.

1 Like

Thanks. I nearly find out the main reasons. The macvlan interface for WAN automatically lower its MTU to 1280 once the openwrt container start (even if I create the network with explicit MTU option), and could not be changed upwards. I have to lower both MTU of LAN in openwrt docker and local MTU to 1200 to successfully get access to internet. But this is so complicated, every device need to first ajust its MTU. I think I have to find out why macvlan automatically lower wan MTU.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.