Interface ordering for interfaces that have no prefix #1356

Closed
opened 2025-12-29 16:31:44 +01:00 by adam · 2 comments
Owner

Originally created by @chrisintheshell on GitHub (Oct 26, 2017).

Issue type

[ ] Feature request
[x] Bug report
[ ] Documentation

Environment

  • Python version: 3.5.1
  • NetBox version: 2.2.2

Description

We use Brocade ICX switches, based on FastIron, and the interface names do no have a prefix. Unless you show details of a specific interface using show interfaces ethernet 1/1/1 the interfaces will always be listed based on STACKID/SLOT/PORT and in order (e.g. 1/1/1, 1/1/2, etc..).

In Netbox when I add all these interfaces to a device or device type, I see interfaces which are listed like so:

1/1/1
1/1/10
1/1/11
1/1/12
1/1/13
1/1/14
1/1/15
1/1/16
1/1/17
1/1/18
1/1/19
1/1/2
1/1/20
1/1/21
1/1/22

and so on ... (please see screenshot in the link below)

https://www.dropbox.com/s/weq5bxnlyrrv5em/Screenshot%202017-10-26%2007.20.43.png?dl=0

I would prefer to have them show up in Netbox ordered in sequence (e.g. 1/1/1, 1/1/2 .....1/2/1, 1/2/2, etc...), without having to prefix them with (e.g. "ge-"). In FastIron you don't show inteface using a prefix so it would great if I could list them in Netbox the same way.

Thanks for your help.

Originally created by @chrisintheshell on GitHub (Oct 26, 2017). <!-- Before opening a new issue, please search through the existing issues to see if your topic has already been addressed. Note that you may need to remove the "is:open" filter from the search bar to include closed issues. Check the appropriate type for your issue below by placing an x between the brackets. If none of the below apply, please raise your issue for discussion on our mailing list: https://groups.google.com/forum/#!forum/netbox-discuss Please note that issues which do not fall under any of the below categories will be closed. ---> ### Issue type [ ] Feature request <!-- Requesting the implementation of a new feature --> [x] Bug report <!-- Reporting unexpected or erroneous behavior --> [ ] Documentation <!-- Proposing a modification to the documentation --> <!-- Please describe the environment in which you are running NetBox. (Be sure to verify that you are running the latest stable release of NetBox before submitting a bug report.) --> ### Environment * Python version: 3.5.1 * NetBox version: 2.2.2 <!-- BUG REPORTS must include: * A list of the steps needed to reproduce the bug * A description of the expected behavior * Any relevant error messages (screenshots may also help) FEATURE REQUESTS must include: * A detailed description of the proposed functionality * A use case for the new feature * A rough description of any necessary changes to the database schema * Any relevant third-party libraries which would be needed --> ### Description We use Brocade ICX switches, based on FastIron, and the interface names do no have a prefix. Unless you show details of a specific interface using `show interfaces ethernet 1/1/1` the interfaces will always be listed based on STACKID/SLOT/PORT and in order (e.g. 1/1/1, 1/1/2, etc..). In Netbox when I add all these interfaces to a device or device type, I see interfaces which are listed like so: 1/1/1 1/1/10 1/1/11 1/1/12 1/1/13 1/1/14 1/1/15 1/1/16 1/1/17 1/1/18 1/1/19 1/1/2 1/1/20 1/1/21 1/1/22 and so on ... (please see screenshot in the link below) https://www.dropbox.com/s/weq5bxnlyrrv5em/Screenshot%202017-10-26%2007.20.43.png?dl=0 I would prefer to have them show up in Netbox ordered in sequence (e.g. 1/1/1, 1/1/2 .....1/2/1, 1/2/2, etc...), without having to prefix them with (e.g. "ge-"). In FastIron you don't show inteface using a prefix so it would great if I could list them in Netbox the same way. Thanks for your help.
adam added the type: bug label 2025-12-29 16:31:44 +01:00
adam closed this issue 2025-12-29 16:31:44 +01:00
Author
Owner

@oysteingy commented on GitHub (Oct 27, 2017):

Hi,

Same interface naming standard on Nokia platforms.

I don't have access to Netbox < 2.2 currently, but I do believe that the ordering for these kind of interface names changed with the works done in #1523. Previously, the naming looked more "reasonable"

@oysteingy commented on GitHub (Oct 27, 2017): Hi, Same interface naming standard on Nokia platforms. I don't have access to Netbox < 2.2 currently, but I do believe that the ordering for these kind of interface names changed with the works done in #1523. Previously, the naming looked more "reasonable"
Author
Owner

@MeisiCB commented on GitHub (Mar 7, 2018):

Is it normal that the Interface Ordering "Name (alphabetically)" is not ordering by Name in the Device View? It's actual ordering by the Chars from the Interfacename until the first Number.

querysets.py
TYPE_RE = r"SUBSTRING({} FROM '^([^0-9]+)')"

The name "ge-1 b" results in _type "ge-"

@MeisiCB commented on GitHub (Mar 7, 2018): Is it normal that the Interface Ordering "Name (alphabetically)" is not ordering by Name in the Device View? It's actual ordering by the Chars from the Interfacename until the first Number. querysets.py TYPE_RE = r"SUBSTRING({} FROM '^([^0-9]+)')" The name "ge-1 b" results in _type "ge-"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1356