Get trunk port - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Networking (https://python-forum.io/forum-12.html) +--- Thread: Get trunk port (/thread-19706.html) |
Get trunk port - Remiix93 - Jul-11-2019 Hi, I am creating a code to creat vlan and find the trunk port on a Avaya switch. So i am wondering how do i get only the trunk ports and adds to get members vlan. show autotopology nmm-table LSlot RSlot LPort IP Addr Seg ID MAC Addr Chassis Type BT LS CS RPort ----- --------------- -------- ------------ ---------------- -- --- ---- ----- 0/ 0 XXXXXXXXXX XXXXXXXXX XXXXXXXXXXX XXXXXXXXXXX XX XXX HTBT XX 1/49 XXXXXXXXXX XXXXXXXXX XXXXXXXXXXX XXXXXXXXXXX XX XXX HTBT XX 1/50 XXXXXXXXXX XXXXXXXXX XXXXXXXXXXX XXXXXXXXXXX XX XXX HTBT XX I want to save 1/49 and 1/50 to Trunk-port value import getpass import sys import telnetlib tn.write("conf t\n") Trunk-port = tn.write("autotopology nmm-table\n") tn.write("vlan create 1234 name TEST-VLAN type port\n") tn.write("vlan members add 1234" + Trunk-port + "\n") tn.write("save config\n") tn.write("end\n") RE: Get trunk port - Larz60+ - Jul-11-2019 is this helpful? https://forums.networkinfrastructure.info/nortel-ethernet-switching/how-can-i-find-out-what-port-number-a-device-is-patched-into-if-i-have-the-ip/ |