Skip to content

[Enhancement] Add MTU support for Loopback, VLAN, Port-Channel, and Tunnel interfaces #441

@aitestino

Description

@aitestino

Summary

The provider currently only supports interface-level mtu configuration for Ethernet interfaces. However, the Cisco IOS-XE YANG model (Cisco-IOS-XE-interfaces.yang) shows that Loopback, VLAN, Port-Channel, and Tunnel interfaces also support interface-level MTU configuration via the interface-common-grouping.

Current State

Supported:

  • iosxe_interface_ethernet - has mtu attribute (gen/definitions/interface_ethernet.yaml:32)

Not Supported:

  • iosxe_interface_loopback - missing mtu attribute
  • iosxe_interface_vlan - missing mtu attribute
  • iosxe_interface_port_channel - missing mtu attribute
  • iosxe_interface_tunnel - missing mtu attribute

Note: These interfaces currently only expose protocol-specific MTU options (ipv6/mtu for all types, ip/mtu for tunnels), but not the interface-level mtu leaf.

Desired State

Add the interface-level mtu attribute to all interface types, matching what's available in the YANG model:

- yang_name: mtu
  example: 1500

YANG Model Reference

The interface-common-grouping in Cisco-IOS-XE-interfaces.yang (line 3868) defines:

leaf mtu {
  description "Set the interface Maximum Transmission Unit (MTU)";
  type uint16 {
    range "64..18000";
  }
}

This grouping is used by:

  • list Loopback (uses interface-common-grouping)
  • list Vlan (uses interface-common-grouping)
  • list Port-channel (uses interface-common-grouping)
  • list Tunnel (uses interface-common-grouping)
  • list GigabitEthernet (uses interface-common-grouping) ✅ already implemented

Use Case

Users need to configure MTU on non-Ethernet interfaces for various networking scenarios:

  • Loopback interfaces with jumbo frames for internal routing
  • VLAN interfaces (SVIs) with custom MTU for inter-VLAN routing
  • Port-channel interfaces with adjusted MTU for link aggregation
  • Tunnel interfaces with optimized MTU for overlay networks

Proposed Changes

Update the following provider definition files to add the mtu attribute:

  1. gen/definitions/interface_loopback.yaml
  2. gen/definitions/interface_vlan.yaml
  3. gen/definitions/interface_port_channel.yaml
  4. gen/definitions/interface_tunnel.yaml

Each should include:

- yang_name: mtu
  example: 1500

This would bring these interfaces to feature parity with the Ethernet interface implementation.

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions