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,14 @@ 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 INTERFACE_NAME (\S+)
Value INTERFACE_INDEX (\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*${ID}\s+(?:${DYNAMIC})?\s*(?:${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=${INTERFACE_NAME})?(\s+ifindex=${INTERFACE_INDEX})?(\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*$$ -> 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: ""
interface_name: ""
interface_index: ""
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: ""
interface_name: ""
interface_index: ""
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: ""
interface_name: ""
interface_index: ""
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: ""
interface_name: ""
interface_index: ""
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: ""
interface_name: ""
interface_index: ""
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: ""
interface_name: ""
interface_index: ""
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: ""
interface_name: ""
interface_index: ""
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: ""
interface_name: ""
interface_index: ""
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: ""
interface_name: ""
interface_index: ""
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: ""
interface_name: ""
interface_index: ""
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"
interface_name: ""
interface_index: ""
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"
interface_id: ""
interface_index: ""
interface_name: ""
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"
interface_id: ""
interface_index: ""
interface_name: ""
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"
interface_id: ""
interface_index: ""
interface_name: ""
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"
interface_id: ""
interface_index: ""
interface_name: ""
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"
interface_id: ""
interface_index: ""
interface_name: ""
l2mtu: "1600"
last_link_down_time: ""
last_link_up_time: ""
Expand All @@ -96,6 +111,9 @@ parsed_sample:
dynamic: ""
fast_path: ""
id: "5"
interface_id: ""
interface_index: ""
interface_name: ""
l2mtu: "1600"
last_link_down_time: ""
last_link_up_time: ""
Expand All @@ -114,6 +132,9 @@ parsed_sample:
dynamic: ""
fast_path: ""
id: "6"
interface_id: ""
interface_index: ""
interface_name: ""
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"
interface_id: ""
interface_index: ""
interface_name: ""
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"
interface_id: ""
interface_index: ""
interface_name: ""
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?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Still working some of this out. I believe there might be different results based on the type of device or the version of routeros. Trying to narrow this down.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
0 S name=ether1 default-name=ether1 type=ether mtu=1500 actual-mtu=1500 l2mtu=1598 max-l2mtu=9214 mac-address=12:34:56:78:90:01 ifname=eth0 ifindex=8 id=1 link-downs=0
1 S name=ether2 default-name=ether2 type=ether mtu=1500 actual-mtu=1500 l2mtu=1598 max-l2mtu=9214 mac-address=12:34:56:78:90:02 ifname=eth1 ifindex=9 id=2 link-downs=0
2 S name=ether3 default-name=ether3 type=ether mtu=1500 actual-mtu=1500 l2mtu=1598 max-l2mtu=9214 mac-address=12:34:56:78:90:03 ifname=eth2 ifindex=10 id=3 link-downs=0
3 comment=temp uplink to peer name=ether4 default-name=ether4 type=ether mtu=1500 actual-mtu=1500 l2mtu=1598 max-l2mtu=9214 mac-address=12:34:56:78:90:04 ifname=eth3 ifindex=11 id=4 link-downs=0
4 R comment=uplink to internet name=ether5 default-name=ether5 type=ether mtu=1500 actual-mtu=1500 l2mtu=1598 max-l2mtu=9214 mac-address=12:34:56:78:90:05 ifname=eth4 ifindex=12 id=5 last-link-down-time=2026-08-18 07:20:12 last-link-up-time=2026-08-18 07:20:13 link-downs=5
5 RS name=wlan1 default-name=wlan1 type=wlan mtu=1500 actual-mtu=1500 l2mtu=1600 max-l2mtu=2290 mac-address=12:34:56:78:90:06 ifname=ath0 ifindex=13 id=6 last-link-up-time=2026-08-18 05:28:19 link-downs=0
6 RS name=wlan2 default-name=wlan2 type=wlan mtu=1500 actual-mtu=1500 l2mtu=1600 max-l2mtu=2290 mac-address=12:34:56:78:90:07 ifname=ath1 ifindex=14 id=7 last-link-up-time=2026-08-18 05:25:31 link-downs=0
7 R comment=defconf name=lan_bridge type=bridge mtu=auto actual-mtu=1500 l2mtu=1598 mac-address=12:34:56:78:90:01 ifname=br0 ifindex=6 id=8 last-link-up-time=2026-08-18 05:25:07 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: ""
id: "0"
interface_id: "1"
interface_index: "8"
interface_name: "eth0"
l2mtu: "1598"
last_link_down_time: ""
last_link_up_time: ""
link_downs: "0"
mac_address: "12:34:56:78:90:01"
max_l2mtu: "9214"
mtu: "1500"
name: "ether1"
slave: "S"
status: ""
type: "ether"
vrf: ""
- actual_mtu: "1500"
comment: ""
default_name: "ether2"
dynamic: ""
fast_path: ""
id: "1"
interface_id: "2"
interface_index: "9"
interface_name: "eth1"
l2mtu: "1598"
last_link_down_time: ""
last_link_up_time: ""
link_downs: "0"
mac_address: "12:34:56:78:90:02"
max_l2mtu: "9214"
mtu: "1500"
name: "ether2"
slave: "S"
status: ""
type: "ether"
vrf: ""
- actual_mtu: "1500"
comment: ""
default_name: "ether3"
dynamic: ""
fast_path: ""
id: "2"
interface_id: "3"
interface_index: "10"
interface_name: "eth2"
l2mtu: "1598"
last_link_down_time: ""
last_link_up_time: ""
link_downs: "0"
mac_address: "12:34:56:78:90:03"
max_l2mtu: "9214"
mtu: "1500"
name: "ether3"
slave: "S"
status: ""
type: "ether"
vrf: ""
- actual_mtu: "1500"
comment: "temp uplink to peer"
default_name: "ether4"
dynamic: ""
fast_path: ""
id: "3"
interface_id: "4"
interface_index: "11"
interface_name: "eth3"
l2mtu: "1598"
last_link_down_time: ""
last_link_up_time: ""
link_downs: "0"
mac_address: "12:34:56:78:90:04"
max_l2mtu: "9214"
mtu: "1500"
name: "ether4"
slave: ""
status: ""
type: "ether"
vrf: ""
- actual_mtu: "1500"
comment: "uplink to internet"
default_name: "ether5"
dynamic: ""
fast_path: ""
id: "4"
interface_id: "5"
interface_index: "12"
interface_name: "eth4"
l2mtu: "1598"
last_link_down_time: "2026-08-18 07:20:12"
last_link_up_time: "2026-08-18 07:20:13"
link_downs: "5"
mac_address: "12:34:56:78:90:05"
max_l2mtu: "9214"
mtu: "1500"
name: "ether5"
slave: ""
status: "R"
type: "ether"
vrf: ""
- actual_mtu: "1500"
comment: ""
default_name: "wlan1"
dynamic: ""
fast_path: ""
id: "5"
interface_id: "6"
interface_index: "13"
interface_name: "ath0"
l2mtu: "1600"
last_link_down_time: ""
last_link_up_time: "2026-08-18 05:28:19"
link_downs: "0"
mac_address: "12:34:56:78:90:06"
max_l2mtu: "2290"
mtu: "1500"
name: "wlan1"
slave: "S"
status: "R"
type: "wlan"
vrf: ""
- actual_mtu: "1500"
comment: ""
default_name: "wlan2"
dynamic: ""
fast_path: ""
id: "6"
interface_id: "7"
interface_index: "14"
interface_name: "ath1"
l2mtu: "1600"
last_link_down_time: ""
last_link_up_time: "2026-08-18 05:25:31"
link_downs: "0"
mac_address: "12:34:56:78:90:07"
max_l2mtu: "2290"
mtu: "1500"
name: "wlan2"
slave: "S"
status: "R"
type: "wlan"
vrf: ""
- actual_mtu: "1500"
comment: "defconf"
default_name: ""
dynamic: ""
fast_path: ""
id: "7"
interface_id: "8"
interface_index: "6"
interface_name: "br0"
l2mtu: "1598"
last_link_down_time: ""
last_link_up_time: "2026-08-18 05:25:07"
link_downs: "0"
mac_address: "12:34:56:78:90:01"
max_l2mtu: ""
mtu: "auto"
name: "lan_bridge"
slave: ""
status: "R"
type: "bridge"
vrf: ""
Loading
Loading