question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

show interfaces switchport - access_vlan missing

See original GitHub issue

Find a bug in the parser “show interfaces switchport”

If the vlan name 99 contians a hifen sign (-) i dont get the Access Mode VLAN: 99 (Falback-Data)

output from switch

Name: Gi1/0/19
Switchport: Enabled
Administrative Mode: static access
Operational Mode: down
Administrative Trunking Encapsulation: dot1q
Negotiation of Trunking: Off
Access Mode VLAN: 99 (Falback-Data)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: enabled
Voice VLAN: 98 (Fallback-Voice)
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk Native VLAN tagging: enabled
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk associations: none
Administrative private-vlan trunk mappings: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL

Protected: false
Unknown unicast blocked: disabled
Unknown multicast blocked: disabled
Appliance trust: none

No key ‘access_vlan’

{'switchport_enable': True,
 'switchport_mode': 'static access',
 'operational_mode': 'down',
 'encapsulation': {'administrative_encapsulation': 'dot1q',
  'native_vlan': '1'},
 'negotiation_of_trunk': False,
 'native_vlan_tagging': True,
 'private_vlan': {'native_vlan_tagging': True, 'encapsulation': 'dot1q'},
 'trunk_vlans': 'all',
 'pruning_vlans': '2-1001',
 'capture_mode': False,
 'capture_vlans': 'all',
 'unknown_unicast_blocked': False,
 'unknown_multicast_blocked': False}

I renamed the vlan

output from switch

Name: Gi1/0/19
Switchport: Enabled
Administrative Mode: static access
Operational Mode: down
Administrative Trunking Encapsulation: dot1q
Negotiation of Trunking: Off
Access Mode VLAN: 99 (Falback)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: enabled
Voice VLAN: 98 (Fallback-Voice)
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk Native VLAN tagging: enabled
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk associations: none
Administrative private-vlan trunk mappings: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL

Protected: false
Unknown unicast blocked: disabled
Unknown multicast blocked: disabled
Appliance trust: none

i have the key ‘access_vlan’ 😃

{'switchport_enable': True,
 'switchport_mode': 'static access',
 'operational_mode': 'down',
 'encapsulation': {'administrative_encapsulation': 'dot1q',
  'native_vlan': '1'},
 'negotiation_of_trunk': False,
 'access_vlan': '99',
 'native_vlan_tagging': True,
 'private_vlan': {'native_vlan_tagging': True, 'encapsulation': 'dot1q'},
 'trunk_vlans': 'all',
 'pruning_vlans': '2-1001',
 'capture_mode': False,
 'capture_vlans': 'all',
 'unknown_unicast_blocked': False,
 'unknown_multicast_blocked': False}

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
urskog84commented, Aug 29, 2019

Nice it works i Genie v19.8

pip3 list | grep genie.libs.parser
genie.libs.parser            19.8
In [4]: interfaces['GigabitEthernet1/0/17']
Out[4]:
{'switchport_enable': True,
 'switchport_mode': 'static access',
 'operational_mode': 'down',
 'encapsulation': {'administrative_encapsulation': 'dot1q',
  'native_vlan': '1',
  'native_vlan_name': 'default'},
 'negotiation_of_trunk': False,
 'access_vlan': '99',
 'access_vlan_name': 'Falback-Data',
 'native_vlan_tagging': True,
 'voice_vlan': '98',
 'voice_vlan_name': 'Fallback-Voice',
 'private_vlan': {'native_vlan_tagging': True, 'encapsulation': 'dot1q'},
 'trunk_vlans': 'all',
 'pruning_vlans': '2-1001',
 'capture_mode': False,
 'capture_vlans': 'all',
 'protected': False,
 'unknown_unicast_blocked': False,
 'unknown_multicast_blocked': False}

0reactions
tahigashcommented, Aug 29, 2019

Hi @urskog84

We’ve released Genie v19.8 with the fix. Could you please upgrade by below command and see if it works?

pip install genie --upgrade

Read more comments on GitHub >

github_iconTop Results From Across the Web

Switchport missing from the port...may be??? - Cisco Community
I suspect that there is a missing word switchport that should be in the configuration. I am referring to the word "switchport" by...
Read more >
Missing VLANs - CCNA Academy
Use the showport switchport command to verify that the inactive VLAN is assigned to the port. The MAC addresses learned at the F0...
Read more >
Troubleshoot VLANs and Trunks (3.2.4) - Cisco Press
Use the show vlan or show interfaces switchport command to verify ... until the missing VLAN is created using the vlan vlan_id command....
Read more >
Port with VLAN not working on Cisco switch [closed]
this is weird, port 1 is configured as routed port but the vlan-settings are still there. my first try would be: (in the...
Read more >
show vlans | Junos OS - Juniper Networks
Display information about VLANs configured on bridged Ethernet interfaces. For interfaces configured to support a VoIP VLAN and a data VLAN, the show...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found