Skip to content

fix(iosxr): configure L2 and L3 MTU for different interface types#375

Open
sven-rosenzweig wants to merge 1 commit into
mainfrom
fix/mtu
Open

fix(iosxr): configure L2 and L3 MTU for different interface types#375
sven-rosenzweig wants to merge 1 commit into
mainfrom
fix/mtu

Conversation

@sven-rosenzweig
Copy link
Copy Markdown
Contributor

Due to IOS-XR MTU inheritance behavior for subinterfaces and bundle members, the following rules are sufficient for our use case:

  • Physical interface: Configure L2 MTU and, if an IP address is present, configure L3 MTU.
  • Bundle interface: Configure only the L2 MTU.
  • Bundle member interface (physical): Do not configure MTU settings directly. L2 MTU is inherited from the bundle interface, and L3 MTU is configured on the corresponding subinterface.
  • Subinterface (physical or bundle): Configure only the L3 MTU, using a default value of 1500 bytes.

In this commit, we assume a default L3 MTU of 1500 bytes. Cisco IOS-XR automatically adds:

  • 4 bytes for 802.1Q encapsulation
  • 8 bytes for 802.1ad (Q-in-Q) encapsulation

This allows subinterfaces to operate correctly with the default L3 MTU.

Official Cisco documentation:
https://www.cisco.com/c/de_de/support/docs/ios-nx-os-software/ios-xr-software/116350-trouble-ios-xr-mtu-00.html

Due to IOS-XR MTU inheritance behavior for subinterfaces and bundle
members, the following rules are sufficient for our use case:

- Physical interface:
  Configure L2 MTU and, if an IP address is present, configure L3 MTU.
- Bundle interface:
  Configure only the L2 MTU.
- Bundle member interface (physical):
  Do not configure MTU settings directly.
  L2 MTU is inherited from the bundle interface, and L3 MTU is
  configured on the corresponding subinterface.
- Subinterface (physical or bundle):
  Configure only the L3 MTU, using a default value of 1500 bytes.

In this commit, we assume a default L3 MTU of 1500 bytes.
Cisco IOS-XR automatically adds:
- 4 bytes for 802.1Q encapsulation
- 8 bytes for 802.1ad (Q-in-Q) encapsulation

This allows subinterfaces to operate correctly with the default L3 MTU.

Official Cisco documentation:
https://www.cisco.com/c/de_de/support/docs/ios-nx-os-software/ios-xr-software/116350-trouble-ios-xr-mtu-00.html

Signed-off-by: Sven Rosenzweig <sven.rosenzweig@sap.com>
@github-actions
Copy link
Copy Markdown

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/ironcore-dev/network-operator/internal/provider/cisco/iosxr 41.20% (+1.28%) 👍

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/ironcore-dev/network-operator/internal/provider/cisco/iosxr/intf.go 64.71% (ø) 68 44 24
github.com/ironcore-dev/network-operator/internal/provider/cisco/iosxr/provider.go 29.11% (+1.78%) 158 (-3) 46 (+2) 112 (-5) 👍

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/ironcore-dev/network-operator/internal/provider/cisco/iosxr/intf_test.go
  • github.com/ironcore-dev/network-operator/internal/provider/cisco/iosxr/provider_test.go

@sven-rosenzweig sven-rosenzweig marked this pull request as ready for review May 27, 2026 11:22
@sven-rosenzweig sven-rosenzweig requested a review from a team as a code owner May 27, 2026 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant