Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JunOS get_interfaces is reporting physical-interface MTU on logical-interfaces #2164

Open
TomCos opened this issue Jan 30, 2025 · 1 comment

Comments

@TomCos
Copy link
Contributor

TomCos commented Jan 30, 2025

The logical-interface MTU is being ignored when get_interfaces returns data. Example:
`
user@device> show configuration | display set | match et-0/0/1 | match mtu

set interfaces et-0/0/1 mtu 9192
set interfaces et-0/0/1 unit 0 family inet mtu 9100
`

Python code to replicate:
junos.get_interfaces()

Incorrect results returned example:
`
et-0/0/1': {'is_up': True, 'is_enabled': True, 'description': 'interface_desc', 'last_flapped': 7251020.0, 'mac_address': 'XX:XX:XX:XX:XX:XX', 'speed': 40000.0, 'mtu': 9192},

'et-0/0/1.0': {'is_up': True, 'is_enabled': True, 'description': 'interface_desc', 'last_flapped': 7251022.0, 'mac_address': 'XX:XX:XX:XX:XX:XX', 'speed': 40000.0, 'mtu': 9192},
`

The second entry in the results is the logical interface, however as you can see, the MTU is incorrectly display 9192, as opposed to 9100.

@amylieb
Copy link

amylieb commented Feb 2, 2025

So - the problem is that junos allows you to set per-address family MTUs on the logical interfaces, eg:

set interfaces et-0/0/1 mtu 9192
set interfaces et-0/0/1 unit 0 family inet mtu 9100
set interfaces et-0/0/1 unit 0 family inet6 mtu 9000
set interfaces et-0/0/1 unit 0 family iso mtu 8000

In an instance like this, which MTU is correct? I've proposed a change that uses the smallest one, but you could easily convince me that keeping the physical mtu as the value here is better.

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

No branches or pull requests

2 participants