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.

EthernetSwitchingTable broken?

See original GitHub issue

Trying to get MACs out of some Juniper boxes. Different models EX4200, EX4300, QFX5100. Both in VC and non VC configuration.

Example below is from a EX4200 running 12.2R4.5.

#!/usr/bin/python -tt

from jnpr.junos.op.ethernetswitchingtable import EthernetSwitchingTable
from jnpr.junos import Device

device = Device('172.16.0.16', username='XX', password='XX')

device.open()

macs = EthernetSwitchingTable(device)
macs.get()

print macs

device.close()
$ ./test3.py 
<class 'jnpr.junos.factory.OpTable.EthernetSwitchingTable'>
EthernetSwitchingTable:172.16.0.16: 0 items

$ pip show junos-eznc Name: junos-eznc Version: 2.1.1

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
braincorkcommented, Jul 9, 2018

I just tested this for an ex4300 with ELS…took some trial and error but works great:

EtherSwTable:
  rpc: get-ethernet-switching-table-information
  item: l2ng-l2ald-mac-entry-vlan/l2ng-mac-entry
  key:
      - l2ng-l2-mac-address
      - mac-count-global
      - learnt-mac-count
      - l2ng-l2-mac-routing-instance
      - l2ng-l2-vlan-id
      - l2ng-mac-entry
  view: EtherSwView

EtherSwView:
  fields:
    vlan_name: l2ng-l2-vlan-name
    mac: l2ng-l2-mac-address
    interface: l2ng-l2-mac-logical-interface
0reactions
mcpat1993commented, Aug 29, 2018

braincork, I found your yml to be very useful for the following:

  • l2ng-l2-mac-address
  • l2ng-l2-mac-logical-interface
  • l2ng-l2-mac-flags

I was not successful, however, with l2ng-l2-vlan-id. I keep getting none, which I don’t think should be possible.

Here’s what my yaml looks like: `EthernetSwitchingTable: rpc: get-ethernet-switching-table-information item: l2ng-l2ald-mac-entry-vlan/l2ng-mac-entry key: - l2ng-l2-mac-address - l2ng-l2-mac-logical-interface - l2ng-l2-mac-flags - l2ng-l2-vlan-id view: EthernetSwitchingView

EthernetSwitchingView: fields: -mac_address: l2ng-l2-mac-address -interface: l2ng-l2-mac-logical-interface -type: l2ng-l2-mac-flags -id: l2ng-l2-vlan-id`

I appreciate any help!

Read more comments on GitHub >

github_iconTop Results From Across the Web

ethernet-switching table issue QFX10002
I observe a strange situation with the learning of mac addresses.Scheme is attached.Fact:If any host from internet (like 2.2.2.2) try setup ...
Read more >
Juniper QFX5110 - EVPN-VXLAN ethernet switching table is ...
As soon as I add any VXLAN VNI config to my existing VLAN100, my ethernet-switching table goes completely empty, with no MACs showing....
Read more >
Juniper ARP/ethernet switching table mystery : r/networking
Juniper ARP/ethernet switching table mystery. I've got two switches directly connected to each other via an aggregated ethernet link (ae0 on ...
Read more >
LESSONS IN JUNOS TROUBLESHOOTING: FIXING A LAN ...
Next, I type “show ethernet-switching table” – and I notice that ... cable that plugged the main switch into the SRX was a...
Read more >
Troubleshoot LAN Switching Environments - Cisco
Suggestions to troubleshoot general switch. Troubleshoot port connectivity problems. Troubleshoot Ethernet 10/100Mb half/full duplex auto- ...
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