Skip to content

Commit

Permalink
Update Junos sh eth switch table (#1733)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcgill298 authored Jul 16, 2024
1 parent 7d7808f commit 5d13288
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
Value VLAN_ID (\S+)
Value BRIDGE_DOMAIN_ID (\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\)$$
^MAC\sflags
^\s*SE\s-\sstatistics\senabled
^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_ID}\s+${MAC_ADDRESS}\s+${MAC_FLAG}\s+${AGE}\s+${LOGICAL_INTERFACE}\s*\S*\s*\S* -> Record
^\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_ID}|BD-${BRIDGE_DOMAIN_ID})\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
Expand Up @@ -5,13 +5,16 @@ parsed_sample:
mac_address: "bc:ac:0a:ca:ca:30"
mac_flag: "DR"
vlan_id: "2"
bridge_domain_id: ""
- age: "-"
logical_interface: "xe-0/0/51:0.0"
mac_address: "2c:5a:0f:bc:a3:cd"
mac_flag: "DL"
vlan_id: "100"
bridge_domain_id: ""
- age: "-"
logical_interface: "ae100.0"
mac_address: "ca:fe:ca:fe:00:07"
mac_flag: "DL"
vlan_id: "1011"
bridge_domain_id: ""
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ parsed_sample:
mac_address: "2c:5a:0f:bc:a3:cd"
mac_flag: "DL"
vlan_id: "100"
bridge_domain_id: ""
- age: "-"
logical_interface: "ae112.0"
mac_address: "ca:fe:ca:fe:00:07"
mac_flag: "DL"
vlan_id: "100"
bridge_domain_id: ""
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
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 : 3 entries, 3 learned
Routing instance : default-switch
Vlan MAC MAC Age Logical
name address flags interface
BD-903691 3c:8c:93:50:dc:c0 D - ae2.0
BD-903691 52:54:00:f5:30:2b D - ae2.0
Vlan3117 00:0c:29:84:d2:f8 D - xe-0/0/3.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
parsed_sample:
- age: "-"
logical_interface: "ae2.0"
mac_address: "3c:8c:93:50:dc:c0"
mac_flag: "D"
vlan_id: ""
bridge_domain_id: "903691"
- age: "-"
logical_interface: "ae2.0"
mac_address: "52:54:00:f5:30:2b"
mac_flag: "D"
vlan_id: ""
bridge_domain_id: "903691"
- age: "-"
logical_interface: "xe-0/0/3.0"
mac_address: "00:0c:29:84:d2:f8"
mac_flag: "D"
vlan_id: "3117"
bridge_domain_id: ""

0 comments on commit 5d13288

Please # to comment.