YouTube Channel Open today

Featured

I thought why not have a go at creating some videos to compliment the posts I publish on my blog, so I’ve created a YouTube channel and uploaded a couple of videos to get started.

My videos use GNS3 and simulated switches to help demonstrate something useful from an Extreme Networks experience with operating systems such as EXOS or VOSS.

Please check it out and subscribe if you like them and I will create some more.

https://www.youtube.com/channel/UC-lME2FRFCEG-sLwZmPDCbw

Thanks

Rob

Comment out multiple lines in Visio Studio Code

Visio Studio Code is great for working with Python scripts. A quick way to comment out lines of instructions is to use Ctrl + Alt + Down Arrow.

Before:

print(“line1”)

print(“line2”)

print(“line3”)

Place cursor at beginning of the first line, in this case the line with “print(“line1″)”. Next press Ctrl + Alt + Down Arrow and release when the last line is reached i.e. “print(“line3″)”. Type the “#” character and all lines will be commented out.

After:

#print(“line1”)

#print(“line2”)

#print(“line3”)

Similarly, to remove the “#” symbol use the same method to select the lines but select delete key to remove the hash character (in Python this will change the print statements back to code again).  

Change IP or Mask of Management VLAN locally in EXOS

Procedure

Login to your switch
Use VI to create a python script, or use TFTP to transfer the Python file to EXOS.
Type vi <Python_FILE_NAME>.py to create the Python file
In the Vi editor, type press the i key to enter insert mode.
Create the Python script.
Exit insert mode by pressing the Esc key.
Save and exit by typing :wq
Run your Python script.
To run the script use the command load script <Python_FILE_NAME>.py

Example:

# vi chg_mask.py
import exsh
exsh.clicmd(“unconfigure vlan MGMT ipaddress”)
exsh.clicmd(“configure vlan MGMT ipaddress 10.10.10.130 255.255.255.192”)
print (“Change complete!”)

# cat chg_mask.py
import exsh
exsh.clicmd(“unconfigure vlan MGMT ipaddress”)
exsh.clicmd(“configure vlan MGMT ipaddress 10.10.10.130 255.255.255.192”)
print (“Change complete!”)

# load sc chg_mask.py

Note: Used this on a live switch and changed the mask remotely without losing connection. Existing SSH session stayed connected which is why I scripted it, in case doing this procedure one line at a time without a script would cut me off.

Python Clear Screen Function

Have you wondered how to clear the screen of your python interpreter?

Create a function that can be called to do this.

>>> import os

>>> def clear():

… os.system(‘cls’ if os.name == ‘nt’ else ‘clear’)

Microsoft Windows uses cls and Linux uses clear command.

Tip:

If you import inspect module you can see the code inside a function.

>>> import inspect

>>> print(inspect.getsource(clear))

The output will look like this:

def clear():

os.system(‘cls’ if os.name == ‘nt’ else ‘clear’)

Now to try clearing the screen.

Type clear() and the screen will clear…

>>>

Type dir() shows the three modules installed like ‘clear’, ‘inspect’ and ‘os’ in our session above amongst others.

EXOS Cable Test between Switch and AP

Looking into a complaint where an AP keeps going offline (orange LED) on an EXOS switch. The port is running at 100 Mbps instead of 1000 Mbps.

Suspect a cabling issue could be the cause but how can I prove this?

Found a useful command to check the cable (can be used on a single port) from the command line which has highlighted there could be an issue with one of the pairs. The test runs for 30 seconds. It will impact traffic on the selected port during the test.

Slot-1 Switch1 #% run diagnostics cable ports 1:18
Do you want to continue cable diagnostics? (y/N) Yes
cablediag: 1.1.0.14

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

C A U T I O N +

cablediag will momentarily interfere with traffic on active ports +
+———————————————————————–+

Slot 1: Ports: 18 +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Collecting port cable diagnostic information may take a moment…
Slot 1
port 1:18: cable (4 pairs, length +/- 10 meters)
pair A Ok, length 31 meters
pair B Open, length 26 meters
pair C Ok, length 26 meters
pair D Ok, length 23 meters

If the diagnostic test reports that Pair B is open, it means there’s a break or disconnection in the second pair of wires inside the Ethernet cable — and this directly explains why we are only getting 100 Mbps instead of 1000 Mbps (and a possible cause of AP instability).

You-Tube Video Viewer

Created a web app which lists the videos on my You-Tube channel. The app accepts any public URL or can choose a number from the list and the video will play in the same window.

‎Gemini – You-Tube Video Viewer

In addition, a similar web app but uses the Extreme Videos playlist on my channel where I collect useful videos relating to Extreme Networks.

You-Tube Playlist Viewer (Extreme Videos):

https://gemini.google.com/share/d53d1456b696

You-Tube Channel Video Titles

https://www.youtube.com/@robd493/featured

  1. Podcast on VOSS Segmented Management Interface PDF
  2. Podcast on ISIS External Test and Use Case PDF
  3. Podcast on Regular Expressions Web App
  4. Web app for testing Regular Expressions created by Gemini
  5. Using Google Gemini 2.5 Pro to create a web app for generating EXOS CLI commands
  6. Rob’s Tech Quiz Part 1
  7. Fabric Convergence Demonstration
  8. How to install VOSS 9.2 VM into GNS3?
  9. How IP Shortcuts advertise ISIS routes
  10. How to Backup and Restore EXOS Configuration
  11. Test Podcast
  12. How to SSH to Mgmt CLIP in VOSS 8.2 or later
  13. How to setup Extreme Fabric Extend – VXLAN over L3
  14. How to setup Extreme Fabric Extend – IPsec Tunnel over L3
  15. Upgrade of XIQ Site Engine – MySQL to PostgreSQL
  16. XIQ-SE ERS Port VLAN Change
  17. VOSS Segmented Management Interface (OOB)
  18. ZTP Plus and EXOS
  19. VOSS BGP AS PATH Prepending
  20. VOSS and Cisco ASA BGP AS Path Prepend
  21. VOSS Ping and Traceroute Test (Asymmetric)
  22. EXOS LLDP with Avaya 1140E IP Deskphone
  23. VOSS VLACP between two switches
  24. VOSS Spanning-Tree Loop detected by SLPP
  25. VOSS Changing I-SID on a single VLAN in an SMLT
  26. VOSS VIST/SMLT with LACP and EXOS LAG LACP
  27. VOSS login with freeradius
  28. VOSS AAA TACACS
  29. Cisco ASA filtering routes between VOSS VRFs with EBGP
  30. VOSS Segmented Management Interface Test
  31. Wireshark VLAN Capture
  32. Extreme Cloud AP CAPWAP Status
  33. VOSS KHI Performance Information
  34. EXCEL VLOOKUP from another Workbook
  35. EXCEL Record Macro to Transpose Cells
  36. EXCEL to JSON variable file
  37. VOSS and EXOS Fabric Attach
  38. VOSS Run SPBM Script to create VIST/SMLT Cluster
  39. VOSS Recover SLPP
  40. VOSS Configuring VRRP
  41. VOSS Migrate Mgmt CLIP to SMI
  42. VOSS BGP Configuration
  43. VOSS 40G Channelization to 4 x 10G (to use with breakout cables)
  44. VOSS Software Upgrade Process
  45. EXOS Software Upgrade from USB
  46. Fabric ISIS Accept Policies control VRF route sharing
  47. EXOS Software Upgrade via TFTP
  48. Fabric Redistribution between ISIS and OSPF avoiding loops
  49. Fabric Multicast Address
  50. Fabric Multicast TLV
  51. Fabric L2 VSN with Multicast and PIM
  52. Fabric L3 VSN with Multicast and PIM
  53. Fabric IP Shortcuts with Multicast
  54. Fabric L2 VSN with Multicast
  55. EXOS Show Stacking
  56. VOSS Border 2 OSPF Default Route
  57. VOSS Border 1 OSPF Default Route
  58. VOSS ISIS node reachability (l2 ping and l2 traceroute)
  59. VOSS L2 VSN
  60. Extreme Control LDAPS
  61. Extreme Control End System Configuration Evaluation Tool
  62. Extreme Control and ERS EAPOL
  63. Extreme Control and EXOS Netlogin
  64. EXOS Show Log with match “Network Login” displays hourly reauthentication
  65. XIQ-SE Archive Compare Backup Files
  66. Wireshark OUI Lookup
  67. EXOS Port Description String
  68. Extreme Control Engine tcpdump of RADIUS packets
  69. VOSS Show Interface GigabitEthernet
  70. VOSS L3 VSN in VRF passing routes between protocols
  71. VOSS SNMPv3 with VRF
  72. VOSS Configure new web-server username and password
  73. XIQ-SE NBI Graphiql Query
  74. XIQ-SE L2VSN ELAN
  75. XIQ-SE Provision SMLT to EXOS
  76. XIQ-SE Ping Test with Ave RTT
  77. XIQ-SE Python Script LLDP
  78. XIQ-SE Python Script to get EMC VARS
  79. VOSS Web Server and EDM
  80. VOSS SSH
  81. XIQ SE Add device
  82. VOSS Configuring SNMPv3
  83. EXOS Spanning-Tree Auto-Bind and Edge Ports
  84. VOSS MSTP Edge Ports
  85. VOSS VRRP FHRP
  86. VOSS DHCP Relay
  87. VOSS Virtual IST SMLT with EXOS
  88. Redistributing routes between ISIS and OSPF with VOSS
  89. EXOS IP Forwarding between VLANs

Making Web Apps with Google Gemini

Trying to keep up with AI and tried out Google Gemini Pro 2.5 to see how it differs from ChatGPT.

With simple prompt engineering it is possible to create web apps which interact with the user and the code can handle difference scenarios based on choices made by the user.

The key take away is that with a little imagination you can build a user interface which works in a browser and provides output. Useful for training or learning things.

The web apps can look different each time you ask, even with the same prompt. This seems a side effect of AI in that it does not always give the right answer or even the exact same answer. I’m sure there are ways to achieve consistency but in a way it is also useful to see alternative results.

I created web apps to provide the CLI commands for EXOS, VOSS and Cisco IOS. I also created a regular expression tutor which is great for testing.

Removing all VLANs on a port in VOSS

A quick python script that will collect the VLANs configured on an individual port in VOSS.

import paramiko

import time

import re

# Configuration

HOST = “192.168.0.50”

USERNAME = “rwa”

PASSWORD = “rwa”

PORT = “1/9”

def extract_vlan_ids(output, port):

    vlan_ids = []

    for line in output.splitlines():

        if port in line and “normal” in line:

            words = line.split()

            try:

                normal_index = words.index(“normal”)

                vlan_field = words[normal_index – 1]

                vlan_ids = [int(v) for v in vlan_field.split(“,”) if v.isdigit()]

                print(f”🔎 Extracted VLANs: {vlan_ids}”)

            except (ValueError, IndexError):

                print(“⚠️ Could not parse VLANs from line:”, line)

            break

    return vlan_ids

def remove_vlans_from_port(host, username, password, port):

    try:

        ssh = paramiko.SSHClient()

        ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())

        ssh.connect(host, username=username, password=password, look_for_keys=False)

        shell = ssh.invoke_shell()

        time.sleep(1)

        shell.send(“enable\n”)

        time.sleep(0.5)

        shell.send(“configure terminal\n”)

        time.sleep(0.5)

        # Show VLAN info for the port

        shell.send(f”show interface gig vlan {port}\n”)

        time.sleep(2)

        output = shell.recv(5000).decode()

        print(“📋 Raw Output:\n”, output)

        vlan_ids = extract_vlan_ids(output, port)

        if not vlan_ids:

            print(f”⚠️ No VLANs found near ‘normal’ for port {port}.”)

        else:

            for vlan_id in vlan_ids:

                cmd = f”vlan members remove {vlan_id} {port}\n”

                shell.send(cmd)

                time.sleep(0.2)

                print(f”✅ Sent: {cmd.strip()}”)

        shell.send(“exit\n”)

        time.sleep(0.5)

        ssh.close()

        print(f”✅ Completed: Removed VLANs {vlan_ids} from port {port} on {host}”)

    except Exception as e:

        print(f”❌ Error: {e}”)

# Run it

remove_vlans_from_port(HOST, USERNAME, PASSWORD, PORT)

##

5520-24T-FabricEngine:1(config)#
🔎 Extracted VLANs: [44, 55]
✅ Sent: vlan members remove 44 1/9
✅ Sent: vlan members remove 55 1/9
✅ Completed: Removed VLANs [44, 55] from port 1/9 on 192.168.0.50

Note: Alternatively, use EDM to remove port from VLANs and Apply. Or prepare a list of VLAN IDs in Column A in an Excel sheet and concatenate into the command “vlan members remove <cell-A1> <port>” to create the complete command in the next column and then select the + sign of that cell and drag the cell down until reach the end and you can then copy a list of commands into the CLI which will remove each VLAN from the port.

Another idea is to remove tagging from the port, this will remove all the VLANs immediately. Can then make the port an untagged member of a single VLAN.