Script that sets port alias based on LLDP; Update Alias if device moved.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎09-25-2018 11:33 AM
Anyone come up with a good idea for automating port aliases?
Being able to run a script on the that sets port description based on lldp would be useful.
Or if a device gets moved having a way to move the alias with the device would be useful.
Being able to run a script on the that sets port description based on lldp would be useful.
Or if a device gets moved having a way to move the alias with the device would be useful.
6 REPLIES 6
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎09-25-2018 08:36 PM
Hello Byron,
another approach can be to use XMC (if available).
Because you wrote you have some experience with TCL it's a good starting point.
You can write a TCP script to ask the switches for LLDP infos ( simplified do an "show lldp neighbour detail") via cli and parse the output.
In an second step wrote the infos back as port alias via CLI.
This can be done in one script. No UPM needed. Only CLI knowledge and a little bit TCL for parsing.
One big advantage of XMC is you do not need to transport the script to every switch. Just do it centrally. Select all of you switches and start the script.
Best regards
Stephan
another approach can be to use XMC (if available).
Because you wrote you have some experience with TCL it's a good starting point.
You can write a TCP script to ask the switches for LLDP infos ( simplified do an "show lldp neighbour detail") via cli and parse the output.
In an second step wrote the infos back as port alias via CLI.
This can be done in one script. No UPM needed. Only CLI knowledge and a little bit TCL for parsing.
One big advantage of XMC is you do not need to transport the script to every switch. Just do it centrally. Select all of you switches and start the script.
Best regards
Stephan
Regards
Stephan
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎09-25-2018 01:19 PM
You can use TCL or Python scripts in EXOS to do show lldp for each port (or IMO better for all ports at once), and then take the Neighbor System-Name from $CLI.OUT variable (that needs some parsing definitely, perhaps you would feel better with Python scripts instead of TCL) and issue configure port display-string for each port. That would be a one-shot port alias syncing.
I believe it could also work with a UPM script with an LLDP trigger (configure upm event device-detect profile port ). Also device-undetected trigger with another script should be there so once a device goes away port alias turns blank.
HTH,
Tomasz
I believe it could also work with a UPM script with an LLDP trigger (configure upm event device-detect profile port ). Also device-undetected trigger with another script should be there so once a device goes away port alias turns blank.
HTH,
Tomasz
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎09-25-2018 01:19 PM
I believe Ed's link to another topic is a good starting point for this kind of UPM, take also care about scripting and UPM chapters here: https://documentation.extremenetworks.com/exos_22.5/EXOS_User_Guide_22_5.pdf
Regards,
Tomasz
Regards,
Tomasz
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎09-25-2018 01:19 PM
Nice thanks Tomasz. I've made a few simple TCL's before, no python scripts or UPM's although but I can usually put something together if there's an example I can work off of.
