-
Notifications
You must be signed in to change notification settings - Fork 721
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add: Mikrotik interface vlan print detail (#1869)
- Loading branch information
Showing
8 changed files
with
215 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
ntc_templates/templates/mikrotik_routeros_interface_vlan_print_detail.textfsm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Value Required ID (\d+) | ||
Value NAME (\S+) | ||
Value PARENT_INTERFACE (\S+) | ||
Value List DESCRIPTION (.+?) | ||
Value STATUS (X|R) | ||
Value VLAN_ID (\d+) | ||
Value SERVICE_TAG (yes|no) | ||
|
||
Start | ||
^\s*Flags:\s*X\s*-\s*disabled,\s*R\s*-\s*running\s*$$ -> Vlan | ||
^\s*$$ | ||
^. -> Error | ||
|
||
Vlan | ||
^\s*(?:\d+)?\s*(?:X|R)?\s*$$ -> Continue.Record | ||
^\s*name="${NAME}"\s*mtu=(?:\d+)\s*l2mtu=(?:\d+)\s*mac-address=(?:[a-zA-Z0-9]{2}(?::[a-zA-Z0-9]{2}){5})\s*arp=(?:\S+)\s*arp-timeout=(?:\S+)\s*loop-protect=(?:\S+)\s*loop-protect-status=(?:\S+)\s*loop-protect-send-interval=(?:\d+\w)\s*loop-protect-disable-time=(?:\d+\w)\s*vlan-id=${VLAN_ID}\s*interface=${PARENT_INTERFACE}\s*use-service-tag=${SERVICE_TAG}\s*$$ | ||
^\s*${ID}\s*${STATUS}\s*name="${NAME}"\s*mtu=(?:\d+)\s*l2mtu=(?:\d+)\s*mac-address=(?:[a-zA-Z0-9]{2}(?::[a-zA-Z0-9]{2}){5})\s*arp=(?:\S+)\s*arp-timeout=(?:\S+)\s*loop-protect=(?:\S+)\s*loop-protect-status=(?:\S+)\s*loop-protect-send-interval=(?:\d+\w)\s*loop-protect-disable-time=(?:\d+\w)\s*vlan-id=${VLAN_ID}\s*interface=${PARENT_INTERFACE}\s*use-service-tag=${SERVICE_TAG}\s*$$ | ||
^\s*${ID}\s*${STATUS}\s*;{3}\s*${DESCRIPTION}\s*$$ | ||
^\s*${DESCRIPTION}\s*$$ | ||
^\s*$$ | ||
^. -> Error |
23 changes: 23 additions & 0 deletions
23
...ik_routeros/interface_vlan_print_detail/mikrotik_routeros_interface_vlan_print_detail.raw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Flags: X - disabled, R - running | ||
0 R ;;; MGMT | ||
name="vlan1@bond1" mtu=1574 l2mtu=9212 mac-address=AA:BB:CC:11:22:33 arp=enabled arp-timeout=auto loop-protect=default loop-protect-status=off loop-protect-send-interval=5s loop-protect-disable-time=5m vlan-id=1 interface=bond1 use-service-tag=no | ||
|
||
1 R ;;; INET | ||
name="vlan2@bond1" mtu=1574 l2mtu=9212 mac-address=AA:BB:CC:11:22:33 arp=enabled arp-timeout=auto loop-protect=default loop-protect-status=off loop-protect-send-interval=5s loop-protect-disable-time=5m vlan-id=2 interface=bond1 use-service-tag=no | ||
|
||
2 R ;;; MGMT | ||
name="vlan10@vlan975@sfp-sfpplus1" mtu=1574 l2mtu=9208 mac-address=AA:BB:CC:11:22:33 arp=enabled arp-timeout=auto loop-protect=default loop-protect-status=off loop-protect-send-interval=5s loop-protect-disable-time=5m vlan-id=10 interface=vlan975@sfp-sfpplus1 use-service-tag=no | ||
|
||
3 R ;;; INET | ||
name="vlan11@vlan975@sfp-sfpplus1" mtu=1500 l2mtu=9208 mac-address=AA:BB:CC:11:22:33 arp=enabled arp-timeout=auto loop-protect=default loop-protect-status=off loop-protect-send-interval=5s loop-protect-disable-time=5m vlan-id=11 interface=vlan975@sfp-sfpplus1 use-service-tag=no | ||
|
||
4 R ;;; INET | ||
name="vlan12@vlan975@sfp-sfpplus1" mtu=1500 l2mtu=9208 mac-address=AA:BB:CC:11:22:33 arp=enabled arp-timeout=auto loop-protect=default loop-protect-status=off loop-protect-send-interval=5s loop-protect-disable-time=5m vlan-id=12 interface=vlan975@sfp-sfpplus1 use-service-tag=no | ||
|
||
5 R ;;; INET | ||
name="vlan111@sfp-sfpplus1" mtu=1500 l2mtu=9212 mac-address=AA:BB:CC:11:22:33 arp=enabled arp-timeout=auto loop-protect=default loop-protect-status=off loop-protect-send-interval=5s loop-protect-disable-time=5m vlan-id=111 interface=sfp-sfpplus1 use-service-tag=no | ||
|
||
6 R ;;; Intercap | ||
name="vlan975@sfp-sfpplus1" mtu=1500 l2mtu=9212 mac-address=AA:BB:CC:11:22:33 arp=enabled arp-timeout=auto loop-protect=default loop-protect-status=off loop-protect-send-interval=5s loop-protect-disable-time=5m vlan-id=975 interface=sfp-sfpplus1 use-service-tag=no | ||
|
||
7 R name="vlan4050@sfp-sfpplus11" mtu=9212 l2mtu=9212 mac-address=AA:BB:CC:11:22:33 arp=enabled arp-timeout=auto loop-protect=default loop-protect-status=off loop-protect-send-interval=5s loop-protect-disable-time=5m vlan-id=4050 interface=sfp-sfpplus11 use-service-tag=no |
65 changes: 65 additions & 0 deletions
65
...ik_routeros/interface_vlan_print_detail/mikrotik_routeros_interface_vlan_print_detail.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--- | ||
parsed_sample: | ||
- description: | ||
- "MGMT" | ||
id: "0" | ||
name: "vlan1@bond1" | ||
parent_interface: "bond1" | ||
service_tag: "no" | ||
status: "R" | ||
vlan_id: "1" | ||
- description: | ||
- "INET" | ||
id: "1" | ||
name: "vlan2@bond1" | ||
parent_interface: "bond1" | ||
service_tag: "no" | ||
status: "R" | ||
vlan_id: "2" | ||
- description: | ||
- "MGMT" | ||
id: "2" | ||
name: "vlan10@vlan975@sfp-sfpplus1" | ||
parent_interface: "vlan975@sfp-sfpplus1" | ||
service_tag: "no" | ||
status: "R" | ||
vlan_id: "10" | ||
- description: | ||
- "INET" | ||
id: "3" | ||
name: "vlan11@vlan975@sfp-sfpplus1" | ||
parent_interface: "vlan975@sfp-sfpplus1" | ||
service_tag: "no" | ||
status: "R" | ||
vlan_id: "11" | ||
- description: | ||
- "INET" | ||
id: "4" | ||
name: "vlan12@vlan975@sfp-sfpplus1" | ||
parent_interface: "vlan975@sfp-sfpplus1" | ||
service_tag: "no" | ||
status: "R" | ||
vlan_id: "12" | ||
- description: | ||
- "INET" | ||
id: "5" | ||
name: "vlan111@sfp-sfpplus1" | ||
parent_interface: "sfp-sfpplus1" | ||
service_tag: "no" | ||
status: "R" | ||
vlan_id: "111" | ||
- description: | ||
- "Intercap" | ||
id: "6" | ||
name: "vlan975@sfp-sfpplus1" | ||
parent_interface: "sfp-sfpplus1" | ||
service_tag: "no" | ||
status: "R" | ||
vlan_id: "975" | ||
- description: [] | ||
id: "7" | ||
name: "vlan4050@sfp-sfpplus11" | ||
parent_interface: "sfp-sfpplus11" | ||
service_tag: "no" | ||
status: "R" | ||
vlan_id: "4050" |
24 changes: 24 additions & 0 deletions
24
...routeros/interface_vlan_print_detail/mikrotik_routeros_interface_vlan_print_detail_01.raw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
Flags: X - disabled, R - running | ||
0 R ;;; CUST | ||
name="vlan1@vlan602@interface" mtu=1574 l2mtu=8992 mac-address=AA:BB:CC:11:22:33 arp=enabled arp-timeout=auto loop-protect=default loop-protect-status=off loop-protect-send-interval=5s loop-protect-disable-time=5m vlan-id=1 interface=vlan602@interface use-service-tag=no | ||
|
||
1 R ;;; PPPoE Termination on BNGs | ||
name="vlan6@bond1" mtu=1508 l2mtu=8996 mac-address=AA:BB:CC:11:22:33 arp=enabled arp-timeout=auto loop-protect=default loop-protect-status=off loop-protect-send-interval=5s loop-protect-disable-time=5m vlan-id=6 interface=bond1 use-service-tag=no | ||
|
||
2 R ;;; Cust | ||
name="vlan10@vlan975@interface" mtu=1574 l2mtu=8992 mac-address=AA:BB:CC:11:22:33 arp=enabled arp-timeout=auto loop-protect=default loop-protect-status=off loop-protect-send-interval=5s loop-protect-disable-time=5m vlan-id=10 interface=vlan975@interface use-service-tag=no | ||
|
||
3 R ;;; test pppoe | ||
name="vlan11@bond1" mtu=1500 l2mtu=8996 mac-address=AA:BB:CC:11:22:33 arp=enabled arp-timeout=auto loop-protect=default loop-protect-status=off loop-protect-send-interval=5s loop-protect-disable-time=5m vlan-id=11 interface=bond1 use-service-tag=no | ||
|
||
4 R ;;; Intercap | ||
name="vlan11@vlan975@interface" mtu=1574 l2mtu=8992 mac-address=AA:BB:CC:11:22:33 arp=enabled arp-timeout=auto loop-protect=default loop-protect-status=off loop-protect-send-interval=5s loop-protect-disable-time=5m vlan-id=11 interface=vlan975@interface use-service-tag=no | ||
|
||
5 R ;;; Intercap | ||
name="vlan12@vlan975@interface" mtu=1574 l2mtu=8992 mac-address=AA:BB:CC:11:22:33 arp=enabled arp-timeout=auto loop-protect=default loop-protect-status=off loop-protect-send-interval=5s loop-protect-disable-time=5m vlan-id=12 interface=vlan975@interface use-service-tag=no | ||
|
||
6 R ;;; Carrier | ||
name="vlan60@interface" mtu=1600 l2mtu=8996 mac-address=AA:BB:CC:11:22:33 arp=enabled arp-timeout=auto loop-protect=default loop-protect-status=off loop-protect-send-interval=5s loop-protect-disable-time=5m vlan-id=60 interface=sfp-sfpplus1 use-service-tag=no | ||
|
||
7 R ;;; Carrier | ||
name="vlan60@bond1" mtu=1600 l2mtu=8996 mac-address=AA:BB:CC:11:22:33 arp=enabled arp-timeout=auto loop-protect=default loop-protect-status=off loop-protect-send-interval=5s loop-protect-disable-time=5m vlan-id=60 interface=bond1 use-service-tag=no |
66 changes: 66 additions & 0 deletions
66
...routeros/interface_vlan_print_detail/mikrotik_routeros_interface_vlan_print_detail_01.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
--- | ||
parsed_sample: | ||
- description: | ||
- "CUST" | ||
id: "0" | ||
name: "vlan1@vlan602@interface" | ||
parent_interface: "vlan602@interface" | ||
service_tag: "no" | ||
status: "R" | ||
vlan_id: "1" | ||
- description: | ||
- "PPPoE Termination on BNGs" | ||
id: "1" | ||
name: "vlan6@bond1" | ||
parent_interface: "bond1" | ||
service_tag: "no" | ||
status: "R" | ||
vlan_id: "6" | ||
- description: | ||
- "Cust" | ||
id: "2" | ||
name: "vlan10@vlan975@interface" | ||
parent_interface: "vlan975@interface" | ||
service_tag: "no" | ||
status: "R" | ||
vlan_id: "10" | ||
- description: | ||
- "test pppoe" | ||
id: "3" | ||
name: "vlan11@bond1" | ||
parent_interface: "bond1" | ||
service_tag: "no" | ||
status: "R" | ||
vlan_id: "11" | ||
- description: | ||
- "Intercap" | ||
id: "4" | ||
name: "vlan11@vlan975@interface" | ||
parent_interface: "vlan975@interface" | ||
service_tag: "no" | ||
status: "R" | ||
vlan_id: "11" | ||
- description: | ||
- "Intercap" | ||
id: "5" | ||
name: "vlan12@vlan975@interface" | ||
parent_interface: "vlan975@interface" | ||
service_tag: "no" | ||
status: "R" | ||
vlan_id: "12" | ||
- description: | ||
- "Carrier" | ||
id: "6" | ||
name: "vlan60@interface" | ||
parent_interface: "sfp-sfpplus1" | ||
service_tag: "no" | ||
status: "R" | ||
vlan_id: "60" | ||
- description: | ||
- "Carrier" | ||
id: "7" | ||
name: "vlan60@bond1" | ||
parent_interface: "bond1" | ||
service_tag: "no" | ||
status: "R" | ||
vlan_id: "60" |
4 changes: 4 additions & 0 deletions
4
...routeros/interface_vlan_print_detail/mikrotik_routeros_interface_vlan_print_detail_02.raw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Flags: X - disabled, R - running | ||
0 R ;;; CUST | ||
who has a multiline comment | ||
name="vlan1@vlan602@interface" mtu=1574 l2mtu=8992 mac-address=AA:BB:CC:11:22:33 arp=enabled arp-timeout=auto loop-protect=default loop-protect-status=off loop-protect-send-interval=5s loop-protect-disable-time=5m vlan-id=1 interface=vlan602@interface use-service-tag=no |
11 changes: 11 additions & 0 deletions
11
...routeros/interface_vlan_print_detail/mikrotik_routeros_interface_vlan_print_detail_02.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
parsed_sample: | ||
- description: | ||
- "CUST" | ||
- "who has a multiline comment" | ||
id: "0" | ||
name: "vlan1@vlan602@interface" | ||
parent_interface: "vlan602@interface" | ||
service_tag: "no" | ||
status: "R" | ||
vlan_id: "1" |