Skip to content

Commit

Permalink
New Template: juniper_junos_show_ethenet-switching_table.textfsm (#700)
Browse files Browse the repository at this point in the history
  • Loading branch information
ichisuke55 authored May 19, 2020
1 parent 591c23e commit a5048ea
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 0 deletions.
1 change: 1 addition & 0 deletions templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ huawei_vrp_display_temperature.textfsm, .*, huawei_vrp, disp[[lay]] tem[[peratur
huawei_vrp_display_version.textfsm, .*, huawei_vrp, disp[[lay]] ver[[sion]]

juniper_junos_show_chassis_cluster_interfaces.textfsm, .*, juniper_junos, sh[[ow]] ch[[assis]] c[[luster]] i[[nterface]]
juniper_junos_show_ethernet-switching_table.textfsm, .*, juniper_junos, sh[[ow]] et[[hernet-switching]] t[[able]]
juniper_junos_show_chassis_cluster_status.textfsm, .*, juniper_junos, sh[[ow]] ch[[assis]] c[[luster]] s[[tatus]]
juniper_junos_show_chassis_firmware.textfsm, .*, juniper_junos, sh[[ow]] ch[[assis]] fi[[rmware]]
juniper_junos_show_arp_no-resolve.textfsm, .*, juniper_junos, sh[[ow]] a[[rp]] n[[o-resolve]]
Expand Down
19 changes: 19 additions & 0 deletions templates/juniper_junos_show_ethernet-switching_table.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Value VLAN (\S+)
Value MAC_ADDRESS (\S+)
Value MAC_FLAG (\S+)
Value AGE (\S+)
Value LOGICAL_INTERFACE (\S+)

Start
^MAC\sflags\s\(S\s-\sstatic\sMAC,\sD\s-\sdynamic\sMAC,\sL\s-\slocally\slearned,\sP\s-\sPersistent\sstatic\S*\s*\S*\s*\S*\s*\S*\s*\S*$$
^\s+SE\s-\sstatistics\senabled,\sNM\s-\snon\sconfigured\sMAC,\sR\s-\sremote\sPE\sMAC,\sO\s-\sovsdb\sMAC\)$$
^Ethernet\sswitching\stable\s:\s\d+\sentries,\s\d+\slearned$$
^Routing\sinstance\s:\sdefault-switch$$
^\s+Vlan\s+MAC\s+MAC\s+Age\s+Logical\s*\S*\s*\S*\s*$$
^\s+name\s+address\s+flags\s+interface\s*\S*\s*\S*\s*$$
^\s+Vlan${VLAN}\s+${MAC_ADDRESS}\s+${MAC_FLAG}\s+${AGE}\s+${LOGICAL_INTERFACE}\s*\S*\s*\S* -> Record
^\s*$$
^{master:\d+}
^. -> Error

EOF
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

MAC flags (S - static MAC, D - dynamic MAC, L - locally learned, P - Persistent static, C - Control MAC
SE - statistics enabled, NM - non configured MAC, R - remote PE MAC, O - ovsdb MAC)


Ethernet switching table : 3 entries, 3 learned
Routing instance : default-switch
Vlan MAC MAC Age Logical NH RTR
name address flags interface Index ID
Vlan2 bc:ac:0a:ca:ca:30 DR - ae3.0 0 0
Vlan100 2c:5a:0f:bc:a3:cd DL - xe-0/0/51:0.0 0 0
Vlan1011 ca:fe:ca:fe:00:07 DL - ae100.0 0 0

{master:0}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
parsed_sample:
- vlan: "2"
mac_address: "bc:ac:0a:ca:ca:30"
mac_flag: "DR"
age: "-"
logical_interface: "ae3.0"
- vlan: "100"
mac_address: "2c:5a:0f:bc:a3:cd"
mac_flag: "DL"
age: "-"
logical_interface: "xe-0/0/51:0.0"
- vlan: "1011"
mac_address: "ca:fe:ca:fe:00:07"
mac_flag: "DL"
age: "-"
logical_interface: "ae100.0"
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

MAC flags (S - static MAC, D - dynamic MAC, L - locally learned, P - Persistent static
SE - statistics enabled, NM - non configured MAC, R - remote PE MAC, O - ovsdb MAC)


Ethernet switching table : 2 entries, 2 learned
Routing instance : default-switch
Vlan MAC MAC Age Logical
name address flags interface
Vlan100 2c:5a:0f:bc:a3:cd DL - ae112.0
Vlan100 ca:fe:ca:fe:00:07 DL - ae112.0

{master:0}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
parsed_sample:
- vlan: "100"
mac_address: "2c:5a:0f:bc:a3:cd"
mac_flag: "DL"
age: "-"
logical_interface: "ae112.0"
- vlan: "100"
mac_address: "ca:fe:ca:fe:00:07"
mac_flag: "DL"
age: "-"
logical_interface: "ae112.0"

0 comments on commit a5048ea

Please # to comment.