public icon indicating copy to clipboard operation
public copied to clipboard

/interfaces/interface/config/mtu type uint16 not compatible with default Linux configuration

Open gmathon-ovh opened this issue 7 years ago • 7 comments

Hi,

Default loopback interface MTU is set to 64*1024 (65536) in linux kernel since 2012. Openconfig defines /interfaces/interface/config/mtu as a uint16, so max value is 65535 (matching maximum IPvX datagram total length?): https://github.com/openconfig/public/blob/0c955cd2a4d0e0e78e20fe8146fe3e6d4cfda9bc/release/models/interfaces/openconfig-interfaces.yang#L335

When you try to store default linux loopback config following this model, it will fail because the value don't fit uint16 type.

Should the type be changed to allow higher values, or the default MTU default configuration decreased?

gmathon-ovh avatar Feb 16 '18 09:02 gmathon-ovh

Hi,

Apologies, we'd missed this issue. I've opened an internal issue tracking this fix. I don't see a problem with it given that Linux has this implementation, but we'll discuss and push an update.

Thanks, r.

robshakir avatar Mar 28 '18 19:03 robshakir

Any updates on this?

It is still in the latest openconfig-if-ip.yang model.

There is no limitation in the MTU size in "RFC 791: Internet Protocol"

precla avatar Oct 05 '23 06:10 precla

Hi @precla, thanks for the reference and ping on this.

Rob raised a proposal to the internal OpenConfig operators group back in 2018, but it quickly became stale.

What do you think about this update? Look good?

    type uint32 {
      range 1..65536;
    }

dplore avatar Oct 11 '23 05:10 dplore

Hi @dplore and thanks for the reply!

I'd say that from a Linux point of view it looks good. Considering that only the loopback can have 65536. Whereas all other interfaces can have max 65535.

In the current openconfig-if-ip.yang model there is a minimum of 68, which is also the minimum for IPv4.

Keep that for the range or go with new minimum 1?

    type uint32 {
      range 68..65536;
    }

Loopback and other interfaces in Linux can not have a minimum less than 68: #define ETH_MIN_MTU 68 /* Min IPv4 MTU per RFC791 */ https://elixir.bootlin.com/linux/v6.5.7/source/include/uapi/linux/if_ether.h#L40

precla avatar Oct 11 '23 05:10 precla

Thanks for catching the issue with the min value; yes, we'll use the realistic minimum of 68 as you suggest.

Would you like to submit a pull request to make the change? Or if you prefer, I can do it for you.

dplore avatar Oct 11 '23 15:10 dplore

Added it. I hope the revision is ok?

I just signed the Google CLA, takes some time until it gets green light? edit: CLA passed after re-scan initiated

precla avatar Oct 11 '23 19:10 precla

This issue is stale because it has been open 180 days with no activity. If you wish to keep this issue active, please remove the stale label or add a comment, otherwise will be closed in 14 days.

github-actions[bot] avatar Jun 26 '24 02:06 github-actions[bot]