Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,16 @@ Value MAX_L2MTU (\d+)
Value VRF (.*?)
Value MAC_ADDRESS ([a-zA-Z0-9]{2}(:[a-zA-Z0-9]{2}){5})
Value FAST_PATH (\S+)
Value IFNAME (\S+)
Value IFINDEX (\d+)
Value INTERFACE_ID (\d+)
Value LAST_LINK_DOWN_TIME (\S+\s\S+)
Value LAST_LINK_UP_TIME (\S+\s\S+)
Value LINK_DOWNS (\d+)

Start
^\s*${ID}\s+(?:${DYNAMIC})?(?:${STATUS}|\s)?(?:${SLAVE})?\s+(comment=${COMMENT}\s+)?name=${NAME}(\s+default-name=${DEFAULT_NAME})?\s+type=${TYPE}(\s+mtu=${MTU})?(\s+actual-mtu=${ACTUAL_MTU})?(\s+l2mtu=${L2MTU})?(\s+max-l2mtu=${MAX_L2MTU})?(\s+vrf=${VRF})?(\s+mac-address=${MAC_ADDRESS})?(\s+fast-path=${FAST_PATH})?(\s+last-link-down-time=${LAST_LINK_DOWN_TIME})?(\s+last-link-up-time=${LAST_LINK_UP_TIME})?(\s+link-downs=${LINK_DOWNS})?\s*$$ -> Record
^\s*Flags:.*$$
^\s*Columns:.*$$
^\s*${ID}\s+(?:${DYNAMIC})?(?:${STATUS}|\s)?(?:${SLAVE})?\s+(comment=${COMMENT}\s+)?name=${NAME}(\s+default-name=${DEFAULT_NAME})?\s+type=${TYPE}(\s+mtu=${MTU})?(\s+actual-mtu=${ACTUAL_MTU})?(\s+l2mtu=${L2MTU})?(\s+max-l2mtu=${MAX_L2MTU})?(\s+vrf=${VRF})?(\s+mac-address=${MAC_ADDRESS})?(\s+fast-path=${FAST_PATH})?(\s+ifname=${IFNAME})?(\s+ifindex=${IFINDEX})?(\s+id=${INTERFACE_ID})?(\s+last-link-down-time=${LAST_LINK_DOWN_TIME})?(\s+last-link-up-time=${LAST_LINK_UP_TIME})?(\s+link-downs=${LINK_DOWNS})?(\s+\S+=\S+)*\s*$$ -> Record
^\s*$$
^. -> Error
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ parsed_sample:
max_l2mtu: "2028"
mac_address: "12:34:56:78:90:AA"
fast_path: ""
ifname: ""
ifindex: ""
interface_id: ""
last_link_down_time: ""
last_link_up_time: "aug/16/1970 13:05:43"
link_downs: "0"
Expand All @@ -32,6 +35,9 @@ parsed_sample:
max_l2mtu: "2028"
mac_address: "12:34:56:78:90:AB"
fast_path: ""
ifname: ""
ifindex: ""
interface_id: ""
last_link_down_time: "aug/17/1970 13:33:01"
last_link_up_time: "aug/17/1970 13:23:11"
link_downs: "3"
Expand All @@ -50,6 +56,9 @@ parsed_sample:
max_l2mtu: "2028"
mac_address: "12:34:56:78:90:AC"
fast_path: ""
ifname: ""
ifindex: ""
interface_id: ""
last_link_down_time: ""
last_link_up_time: ""
link_downs: "0"
Expand All @@ -68,6 +77,9 @@ parsed_sample:
max_l2mtu: ""
mac_address: "12:34:56:78:90:AD"
fast_path: ""
ifname: ""
ifindex: ""
interface_id: ""
last_link_down_time: ""
last_link_up_time: "aug/16/1970 13:05:35"
link_downs: "0"
Expand All @@ -86,6 +98,9 @@ parsed_sample:
max_l2mtu: ""
mac_address: "12:34:56:78:90:AE"
fast_path: ""
ifname: ""
ifindex: ""
interface_id: ""
last_link_down_time: ""
last_link_up_time: ""
link_downs: "0"
Expand All @@ -104,6 +119,9 @@ parsed_sample:
max_l2mtu: ""
mac_address: "12:34:56:78:90:AF"
fast_path: ""
ifname: ""
ifindex: ""
interface_id: ""
last_link_down_time: "aug/17/1970 13:33:01"
last_link_up_time: "aug/17/1970 13:23:11"
link_downs: "3"
Expand All @@ -122,6 +140,9 @@ parsed_sample:
max_l2mtu: ""
mac_address: "12:34:56:78:90:BA"
fast_path: ""
ifname: ""
ifindex: ""
interface_id: ""
last_link_down_time: ""
last_link_up_time: ""
link_downs: "0"
Expand All @@ -140,6 +161,9 @@ parsed_sample:
max_l2mtu: ""
mac_address: "12:34:56:78:90:BB"
fast_path: ""
ifname: ""
ifindex: ""
interface_id: ""
last_link_down_time: ""
last_link_up_time: ""
link_downs: "0"
Expand All @@ -158,6 +182,9 @@ parsed_sample:
max_l2mtu: ""
mac_address: "12:34:56:78:90:BC"
fast_path: ""
ifname: ""
ifindex: ""
interface_id: ""
last_link_down_time: ""
last_link_up_time: ""
link_downs: "0"
Expand All @@ -176,6 +203,9 @@ parsed_sample:
max_l2mtu: ""
mac_address: "12:34:56:78:90:BD"
fast_path: ""
ifname: ""
ifindex: ""
interface_id: ""
last_link_down_time: ""
last_link_up_time: "aug/16/1970 13:05:43"
link_downs: "0"
Expand All @@ -194,6 +224,9 @@ parsed_sample:
max_l2mtu: ""
mac_address: "12:34:56:78:90:BE"
fast_path: "yes"
ifname: ""
ifindex: ""
interface_id: ""
last_link_down_time: "sep/08/2023 01:07:00"
last_link_up_time: "sep/08/2023 01:07:09"
link_downs: "7"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ parsed_sample:
dynamic: ""
fast_path: ""
id: "0"
ifindex: ""
ifname: ""
interface_id: ""
l2mtu: "1596"
last_link_down_time: "1970-01-01 01:02:03"
last_link_up_time: "1970-01-01 01:02:03"
Expand All @@ -24,6 +27,9 @@ parsed_sample:
dynamic: ""
fast_path: ""
id: "1"
ifindex: ""
ifname: ""
interface_id: ""
l2mtu: "1596"
last_link_down_time: "1970-01-01 01:02:03"
last_link_up_time: "1970-01-01 01:02:03"
Expand All @@ -42,6 +48,9 @@ parsed_sample:
dynamic: ""
fast_path: ""
id: "2"
ifindex: ""
ifname: ""
interface_id: ""
l2mtu: "1596"
last_link_down_time: "1970-01-01 01:02:03"
last_link_up_time: "1970-01-01 01:02:03"
Expand All @@ -60,6 +69,9 @@ parsed_sample:
dynamic: ""
fast_path: ""
id: "3"
ifindex: ""
ifname: ""
interface_id: ""
l2mtu: "1596"
last_link_down_time: "1970-01-01 01:02:03"
last_link_up_time: "1970-01-01 01:02:03"
Expand All @@ -78,6 +90,9 @@ parsed_sample:
dynamic: ""
fast_path: ""
id: "4"
ifindex: ""
ifname: ""
interface_id: ""
l2mtu: "1600"
last_link_down_time: ""
last_link_up_time: ""
Expand All @@ -96,6 +111,9 @@ parsed_sample:
dynamic: ""
fast_path: ""
id: "5"
ifindex: ""
ifname: ""
interface_id: ""
l2mtu: "1600"
last_link_down_time: ""
last_link_up_time: ""
Expand All @@ -114,6 +132,9 @@ parsed_sample:
dynamic: ""
fast_path: ""
id: "6"
ifindex: ""
ifname: ""
interface_id: ""
l2mtu: "1596"
last_link_down_time: ""
last_link_up_time: "1970-01-01 01:02:03"
Expand All @@ -132,6 +153,9 @@ parsed_sample:
dynamic: ""
fast_path: ""
id: "7"
ifindex: ""
ifname: ""
interface_id: ""
l2mtu: ""
last_link_down_time: ""
last_link_up_time: "1970-01-01 01:02:03"
Expand All @@ -150,6 +174,9 @@ parsed_sample:
dynamic: ""
fast_path: ""
id: "8"
ifindex: ""
ifname: ""
interface_id: ""
l2mtu: ""
last_link_down_time: ""
last_link_up_time: "1970-01-01 01:02:03"
Expand Down

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bile0026
Is this terse output since it contains "flags" and "columns" lines?

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Flags: D - DYNAMIC; X - DISABLED, R - RUNNING, S - SLAVE
Columns: NAME, DEFAULT-NAME, TYPE, MTU, ACTUAL-MTU, L2MTU, MAX-L2MTU, MAC-ADDRESS
0 R name=ether1 default-name=ether1 type=ether mtu=1500 actual-mtu=1500 l2mtu=1596 max-l2mtu=9578 mac-address=12:34:56:78:90:01 fast-path=yes ifname=ether1 ifindex=1 id=1 last-link-down-time=jan/01/2026 00:00:03 last-link-up-time=jan/01/2026 00:00:09 link-downs=2
1 R comment=uplink to core name=ether2 default-name=ether2 type=ether mtu=1500 actual-mtu=1500 l2mtu=1596 max-l2mtu=9578 mac-address=12:34:56:78:90:02 ifname=ether2 ifindex=2 id=2 last-link-up-time=jan/01/2026 00:00:09 link-downs=0
2 name=ether3 default-name=ether3 type=ether mtu=1500 actual-mtu=1500 l2mtu=1596 max-l2mtu=9578 mac-address=12:34:56:78:90:03 ifname=ether3 ifindex=3 id=3 link-downs=0
3 R name=lan-bridge type=bridge mtu=auto actual-mtu=1500 l2mtu=1594 vrf=myvrf mac-address=12:34:56:78:90:10 ifname=lan-bridge ifindex=4 id=4 last-link-up-time=jan/01/2026 00:00:11 link-downs=0
4 RS name=vlan100 type=vlan mtu=1500 actual-mtu=1500 l2mtu=1590 mac-address=12:34:56:78:90:11 ifname=vlan100 ifindex=5 id=5 link-downs=0 switch=switch1
5 D S name=vlan200 type=vlan mtu=1500 actual-mtu=1500 l2mtu=1590 mac-address=12:34:56:78:90:12 ifindex=6 link-downs=0
6 DXS name=vlan300 type=vlan mac-address=12:34:56:78:90:13 id=7 link-downs=0
7 R name=lo type=loopback mtu=65536 actual-mtu=65536 mac-address=00:00:00:00:00:00 ifname=lo ifindex=8 id=8 last-link-up-time=jan/01/2026 00:00:11 link-downs=0
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
---
parsed_sample:
- actual_mtu: "1500"
comment: ""
default_name: "ether1"
dynamic: ""
fast_path: "yes"
id: "0"
ifindex: "1"
ifname: "ether1"
interface_id: "1"
l2mtu: "1596"
last_link_down_time: "jan/01/2026 00:00:03"
last_link_up_time: "jan/01/2026 00:00:09"
link_downs: "2"
mac_address: "12:34:56:78:90:01"
max_l2mtu: "9578"
mtu: "1500"
name: "ether1"
slave: ""
status: "R"
type: "ether"
vrf: ""
- actual_mtu: "1500"
comment: "uplink to core"
default_name: "ether2"
dynamic: ""
fast_path: ""
id: "1"
ifindex: "2"
ifname: "ether2"
interface_id: "2"
l2mtu: "1596"
last_link_down_time: ""
last_link_up_time: "jan/01/2026 00:00:09"
link_downs: "0"
mac_address: "12:34:56:78:90:02"
max_l2mtu: "9578"
mtu: "1500"
name: "ether2"
slave: ""
status: "R"
type: "ether"
vrf: ""
- actual_mtu: "1500"
comment: ""
default_name: "ether3"
dynamic: ""
fast_path: ""
id: "2"
ifindex: "3"
ifname: "ether3"
interface_id: "3"
l2mtu: "1596"
last_link_down_time: ""
last_link_up_time: ""
link_downs: "0"
mac_address: "12:34:56:78:90:03"
max_l2mtu: "9578"
mtu: "1500"
name: "ether3"
slave: ""
status: ""
type: "ether"
vrf: ""
- actual_mtu: "1500"
comment: ""
default_name: ""
dynamic: ""
fast_path: ""
id: "3"
ifindex: "4"
ifname: "lan-bridge"
interface_id: "4"
l2mtu: "1594"
last_link_down_time: ""
last_link_up_time: "jan/01/2026 00:00:11"
link_downs: "0"
mac_address: "12:34:56:78:90:10"
max_l2mtu: ""
mtu: "auto"
name: "lan-bridge"
slave: ""
status: "R"
type: "bridge"
vrf: "myvrf"
- actual_mtu: "1500"
comment: ""
default_name: ""
dynamic: ""
fast_path: ""
id: "4"
ifindex: "5"
ifname: "vlan100"
interface_id: "5"
l2mtu: "1590"
last_link_down_time: ""
last_link_up_time: ""
link_downs: "0"
mac_address: "12:34:56:78:90:11"
max_l2mtu: ""
mtu: "1500"
name: "vlan100"
slave: "S"
status: "R"
type: "vlan"
vrf: ""
- actual_mtu: "1500"
comment: ""
default_name: ""
dynamic: "D"
fast_path: ""
id: "5"
ifindex: "6"
ifname: ""
interface_id: ""
l2mtu: "1590"
last_link_down_time: ""
last_link_up_time: ""
link_downs: "0"
mac_address: "12:34:56:78:90:12"
max_l2mtu: ""
mtu: "1500"
name: "vlan200"
slave: "S"
status: ""
type: "vlan"
vrf: ""
- actual_mtu: ""
comment: ""
default_name: ""
dynamic: "D"
fast_path: ""
id: "6"
ifindex: ""
ifname: ""
interface_id: "7"
l2mtu: ""
last_link_down_time: ""
last_link_up_time: ""
link_downs: "0"
mac_address: "12:34:56:78:90:13"
max_l2mtu: ""
mtu: ""
name: "vlan300"
slave: "S"
status: "X"
type: "vlan"
vrf: ""
- actual_mtu: "65536"
comment: ""
default_name: ""
dynamic: ""
fast_path: ""
id: "7"
ifindex: "8"
ifname: "lo"
interface_id: "8"
l2mtu: ""
last_link_down_time: ""
last_link_up_time: "jan/01/2026 00:00:11"
link_downs: "0"
mac_address: "00:00:00:00:00:00"
max_l2mtu: ""
mtu: "65536"
name: "lo"
slave: ""
status: "R"
type: "loopback"
vrf: ""
Loading