luci icon indicating copy to clipboard operation
luci copied to clipboard

luci-mod-network: confusing MTU settings on PPPoE connection.

Open timur-davletshin opened this issue 2 years ago • 11 comments

DISTRIB_TARGET='x86/geode'
DISTRIB_ARCH='x86'
DISTRIB_DESCRIPTION=openwrt-23.05 branch (git-23.357.58018-024e7ab)/OpenWrt 23.05.2 (r23630-842932a63d)

Generally there two ways to set up MTU. One is in the Devices tab (Luci UI) and the other one is in the Interfaces tab (I'm talking about PPPoE connection).

They correspond to respective parts of the configuration file: /etc/config/network:

config interface 'wan'
	option proto 'pppoe'
	option device 'eth0'
...
	option mtu '1492'

config device
	option name 'pppoe-wan'
	option mtu '1492'

Actual behavior:

Only MTU in device section (or Devices tab) will actually apply to PPPoE connection. The other one in interface does nothing. Check can be done by ifconfig or directly via Luci UI.

Expected behavior:

Remove duplicating (and non-functioning) MTU settings in PPPoE interface settings (Interfaces tab).

Note: I'm not talking about physical interface (eth0 in this example), only about pppoe-wan.

timur-davletshin avatar Jan 03 '24 10:01 timur-davletshin

Interface mtu option should translate to pppd mtu/mru cli arguments.

jow- avatar Jan 04 '24 22:01 jow-

The word 'should' is doing a lot of lifting here.

systemcrash avatar Jan 05 '24 13:01 systemcrash

Shouldn't proto_pppoe_setup()call to ppp_generic_setup() pass mtu also?

https://github.com/openwrt/openwrt/blob/f1de1a090fadc74504b3ee1b5bcb914c9110bc6f/package/network/services/ppp/files/ppp.sh#L219-L242

systemcrash avatar Jan 05 '24 20:01 systemcrash

@jow-: for pppoe "should" is false. The MTU option needs to apply to the 'ethernet' interface responsible for the connection, if there is one.

The manpages for the pppoe.so module list zero (direct) options for MTU. https://www.man7.org/linux/man-pages/man8/pppd.8.html#PPPOE_OPTIONS

So two solutions here seem evident: either a) delete the GUI option, or b) remap it so that it applies to the underlying interface (less trivial).

Closed by 995d3a1801cf3b850e8c7c35937fbdd0526ff53e

systemcrash avatar Apr 16 '24 15:04 systemcrash

See also https://github.com/openwrt/openwrt/pull/15176

systemcrash avatar Apr 16 '24 16:04 systemcrash