I have noticed for example when looking at a Cisco 6509 switch/router and clicking on the ports tab that my ports are sorted by the ifIndex number.
Usually, when you look on the switch/router by issuing for example ‘show ip int br’ or ‘show int status’ they are listed ‘naturally/alphabetically’.
What we also need to keep in mind is that ports should be sorted by module, see slot3 & 4 in the example below.
In my example, my switch/router has a Sup720, a 24x1GB line card and a 8 x10GB line card.
srp#sh int status Port Name Status Vlan Duplex Speed Type Gi3/1 to c6k disabled 1 auto auto No Transceiver Gi3/2 to c6k disabled 1 a-full a-1000 No Transceiver Gi3/3 disabled routed auto auto No Transceiver Te3/4 disabled routed full 10G No Connector Te3/5 core-srp connected routed full 10G 10Gbase-LR Gi4/1 to c6k disabled 1 auto auto No Transceiver Gi4/2 to c6k disabled 1 auto auto No Transceiver Gi4/3 disabled routed auto auto No Transceiver Te4/4 core-srp connected routed full 10G 10Gbase-LR Te4/5 disabled routed full 10G No Connector Gi7/1 sw1 connected trunk full 1000 1000BaseLH Gi7/2 sw1 connected trunk full 1000 1000BaseLH Gi7/3 sw1 connected trunk full 1000 1000BaseLH Gi7/4 sw1 connected trunk full 1000 1000BaseLH Gi7/5 srp connected trunk full 1000 1000BaseLH Gi7/6 sw3 connected trunk full 1000 1000BaseLH Gi7/7 sw8 connected trunk full 1000 1000BaseLH Gi7/8 sw4 connected trunk full 1000 1000BaseLH Gi7/9 sw1 connected trunk full 1000 1000BaseLH Gi7/10 sw39 connected trunk full 1000 1000BaseLH Gi7/11 sw1 connected trunk full 1000 1000BaseLH Gi7/12 sw1 connected trunk full 1000 1000BaseLH Gi7/13 sw42 connected trunk full 1000 1000BaseLH Gi7/14 disabled routed full 1000 No Transceiver Gi7/15 disabled routed full 1000 No Transceiver Gi7/16 disabled 1 full 1000 No Transceiver Gi7/17 disabled routed full 1000 1000BaseT Gi7/18 disabled routed full 1000 1000BaseSX Gi7/19 disabled routed full 1000 1000BaseLH Gi7/20 disabled routed full 1000 No Transceiver Gi7/21 disabled routed full 1000 No Transceiver Gi7/22 sw38 connected trunk full 1000 1000BaseSX Gi7/23 sw23 connected trunk full 1000 1000BaseSX Gi7/24 sw10 connected trunk full 1000 1000BaseSX Po1 core1-srp connected routed a-full 10G Po2 core1-srp connected routed a-full 10G Po10 4xgig etherchannel disabled unassigne auto auto
In librenms, I see the ports on the sup first, then the 1gb line card, then vlans, then the 10gb, then more vlans that were created after since the ifIndex keeps increasing.
If I click to sort the ports, it keeps giving me the same result.
Could a ‘sort’ option maybe be put in to sort the ports narually/alphabetically?
Something like:
$config['ports_sort_alphabetical'] = true; $config['ports_sort_ifindex'] = false;