Skip to content

Commit

Permalink
Add: Mikrotik interface bonding print detail (#1870)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwood92 authored Oct 15, 2024
1 parent 76f41e2 commit ba49649
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 0 deletions.
1 change: 1 addition & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,7 @@ mikrotik_routeros_snmp_community_print_without-paging.textfsm, .*, mikrotik_rout
mikrotik_routeros_ipv6_neighbor_print_without-paging.textfsm, .*, mikrotik_routeros, [[/]]ipv6 neighbor print without-paging
mikrotik_routeros_ip_arp_print_terse_without-paging.textfsm, .*, mikrotik_routeros, [[/]]ip a[[rp]] p[[rint]] t[[erse]] wi[[thout-paging]]
mikrotik_routeros_log_print_detail_without-paging.textfsm, .*, mikrotik_routeros, [[/]]log p[[rint]] d[[etail]] wi[[thout-paging]]
mikrotik_routeros_interface_bonding_print_detail.textfsm, .*, mikrotik_routeros, [[/]]in[[terface]] bo[[nding]] p[[rint]] d[[etail]]
mikrotik_routeros_routing_bgp_peer_print_status.textfsm, .*, mikrotik_routeros, [[/]]r[[outing]] bg[[p]] p[[eer]] p[[rint]] s[[tatus]]
mikrotik_routeros_interface_vlan_print_detail.textfsm, .*, mikrotik_routeros, [[/]]in[[terface]] vlan p[[rint]] d[[etail]]
mikrotik_routeros_ip_arp_print_without-paging.textfsm, .*, mikrotik_routeros, [[/]]ip arp print without-paging
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Value Required ID (\d+)
Value STATUS (X|R)
Value NAME (\S+)
Value SLAVES (\S+(?:,)?)
Value List DESCRIPTION (.+?)
Value MODE (\S+)

Start
^\s*Flags:\s*X\s*-\s*disabled(?:;|,)\s*R\s*-\s*running\s*$$ -> Interface
^\s*$$
^. -> Error

Interface
^\s*\d+\s*(?:X|R)?\s*$$ -> Continue.Record
^\s*${ID}\s*${STATUS}\s*name="${NAME}"\s*mtu=\d+\s*mac-address=([a-zA-Z0-9]{2}(?::[a-zA-Z0-9]{2}){5})\s*arp=\S+\s*arp-timeout=\S+\s*slaves=${SLAVES}\s*mode=${MODE}\s*primary=\S+\s*link-monitoring=\S+\s*arp-interval=(?:\d+ms)\s*arp-ip-targets=\S+\s*mii-interval=(?:\d+ms)\s*down-delay=(?:\d+ms)\s*up-delay=(?:\d+ms)\s*lacp-rate=(?:\d+sec(?:s)?)\s*transmit-hash-policy=\S+\s*min-links=\d+\s*$$
^\s*name="${NAME}"\s*mtu=\d+\s*mac-address=([a-zA-Z0-9]{2}(?::[a-zA-Z0-9]{2}){5})\s*arp=\S+\s*arp-timeout=\S+\s*slaves=${SLAVES}\s*mode=${MODE}\s*primary=\S+\s*link-monitoring=\S+\s*arp-interval=(?:\d+ms)\s*arp-ip-targets=\S+\s*mii-interval=(?:\d+ms)\s*down-delay=(?:\d+ms)\s*up-delay=(?:\d+ms)\s*lacp-rate=(?:\d+sec(?:s)?)\s*transmit-hash-policy=\S+\s*min-links=\d+\s*$$
^\s*${ID}\s*${STATUS}\s*;{3}\s*${DESCRIPTION}\s*$$
^\s*${DESCRIPTION}\s*$$
^\s*$$
^. -> Error
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Flags: X - disabled, R - running
0 R ;;; To Cisco Te1/3 - Te1/4
name="bond1" mtu=9000 mac-address=4C:5E:0C:14:3F:9D arp=enabled arp-timeout=auto slaves=sfp-sfpplus7,sfp-sfpplus8 mode=802.3ad primary=none link-monitoring=mii arp-interval=100ms arp-ip-targets="" mii-interval=100ms down-delay=0ms up-delay=0ms lacp-rate=1sec transmit-hash-policy=layer-3-and-4 min-links=0
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
parsed_sample:
- description:
- "To Cisco Te1/3 - Te1/4"
id: "0"
mode: "802.3ad"
name: "bond1"
slaves: "sfp-sfpplus7,sfp-sfpplus8"
status: "R"
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Flags: X - disabled; R - running
0 R ;;; Link to Mikrotik
name="bond1" mtu=1500 mac-address=48:A9:8A:5D:24:05 arp=enabled arp-timeout=auto slaves=sfp-sfpplus9,sfp-sfpplus10 mode=802.3ad primary=none link-monitoring=mii arp-interval=100ms arp-ip-targets="" mii-interval=100ms down-delay=0ms up-delay=0ms lacp-rate=30secs transmit-hash-policy=layer-2 min-links=0
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
parsed_sample:
- description:
- "Link to Mikrotik"
id: "0"
mode: "802.3ad"
name: "bond1"
slaves: "sfp-sfpplus9,sfp-sfpplus10"
status: "R"
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Flags: X - disabled; R - running
0 R ;;; Link to Mikrotik
and other things
name="bond1" mtu=1500 mac-address=48:A9:8A:5D:24:05 arp=enabled arp-timeout=auto slaves=sfp-sfpplus9,sfp-sfpplus10 mode=802.3ad primary=none link-monitoring=mii arp-interval=100ms arp-ip-targets="" mii-interval=100ms down-delay=0ms up-delay=0ms lacp-rate=30secs transmit-hash-policy=layer-2 min-links=0
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
parsed_sample:
- description:
- "Link to Mikrotik"
- "and other things"
id: "0"
mode: "802.3ad"
name: "bond1"
slaves: "sfp-sfpplus9,sfp-sfpplus10"
status: "R"

0 comments on commit ba49649

Please sign in to comment.