#20393: netifd fails set MTU on VLAN devices
-------------------------+----------------------------------
 Reporter:  stintel      |      Owner:  developers
     Type:  defect       |     Status:  new
 Priority:  normal       |  Milestone:  Chaos Calmer (trunk)
Component:  base system  |    Version:  Trunk
 Keywords:               |
-------------------------+----------------------------------
 When changing the MTU for a VLAN interface in /etc/config/network, the MTU
 is never actually set. Tried both old and new style config
 (https://lists.openwrt.org/pipermail/openwrt-
 devel/2014-September/027941.html).

 Old:
 {{{
 config interface 'mgmt'
         option ifname 'eth0.51'
         option mtu '9000'
         option proto 'static'
         option ipaddr '192.168.51.254'
         option netmask '255.255.255.0'
         option ip6assign '64'
         option ip6hint '51'
 }}}

 New:
 {{{
 config device 'eth0.51'
         option type '8021q'
         option ifname 'eth0'
         option name 'eth0.51'
         option vid '51'
         option mtu '9000'

 config interface 'mgmt'
         option ifname 'eth0.51'
         option proto 'static'
         option ipaddr '192.168.51.254'
         option netmask '255.255.255.0'
         option ip6assign '64'
         option ip6hint '51'
 }}}

 With either of the above configurations, running {{{ ifdown mgmt; ifup
 mgmt }}} will not change the MTU for eth0.51:
 {{{
 root@ar0:~# ip link show dev eth0.51
 48: eth0.51@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue
 state UP mode DEFAULT group default
     link/ether 04:18:d6:31:38:b3 brd ff:ff:ff:ff:ff:ff
 }}}

 Changing the MTU manually doesn't work either:
 {{{
 root@ar0:~# ip link set mtu 9000 dev eth0.51
 RTNETLINK answers: Numerical result out of range
 }}}

 This is because the MTU of the master interface is still on 1500. When I
 manually change the MTU of the master interface first, I can change the
 MTU of the VLAN interface as well:
 {{{
 root@ar0:~# ip link set mtu 9000 dev eth0.51
 root@ar0:~# ip link show dev eth0.51
 48: eth0.51@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc noqueue
 state UP mode DEFAULT group default
     link/ether 04:18:d6:31:38:b3 brd ff:ff:ff:ff:ff:ff
 }}}

 Once the MTU for the master interface is on 9000, both the old and new
 style configuration as shown above work fine. When running {{{ ifdown
 mgmt; ifup mgmt }}} afterwards, the eth0.51 interface comes back up with
 MTU 9000.

 Netifd should check the MTU of the master interface and change it if
 needed, before trying to set the MTU of the VLAN interface.

--
Ticket URL: <https://dev.openwrt.org/ticket/20393>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets

Reply via email to