-
Notifications
You must be signed in to change notification settings - Fork 735
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ad MikroTik ip route print terse without-paging template (#1499)
Co-authored-by: pskliarenko <“[email protected]”>
- Loading branch information
1 parent
605fa01
commit 5888b12
Showing
4 changed files
with
127 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
24 changes: 24 additions & 0 deletions
24
ntc_templates/templates/mikrotik_routeros_ip_route_print_terse_without-paging.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,24 @@ | ||
Value INDEX (\d+) | ||
Value FLAGS ([XADCSrbomBUP ]{4}) | ||
Value COMMENT (.*?(?=(?:[^=]\S+=)|\s*$)) | ||
Value DESTINATION_ADDRESS (\S+) | ||
Value DESTINATION_ADDRESS_SUBNET (\d+) | ||
Value TYPE (.+?(?=(?:[^=]\S+=)|\s*$)) | ||
Value ROUTING_TABLE (.+?(?=(?:[^=]\S+=)|\s*$)) | ||
Value PREF_SRC (\S+?) | ||
Value GATEWAY (.+?(?=(?:[^=]\S+=)|\s*$)) | ||
Value GATEWAY_STATUS (.+?(?=(?:[^=]\S+=)|\s*$)) | ||
Value IMMEDIATE_GW (.+?(?=(?:[^=]\S+=)|\s*$)) | ||
Value CHECK_GATEWAY (.+?(?=(?:[^=]\S+=)|\s*$)) | ||
Value DISTANCE (\d+) | ||
Value SCOPE (\d+) | ||
Value TARGET_SCOPE (\d+) | ||
Value VRF_INTERFACE (.+?(?=(?:[^=]\S+=)|\s*$)) | ||
Value SUPPRESS_HW_OFFLOAD (yes|no) | ||
Value LOCAL_ADDRESS (.+?(?=(?:[^=]\S+=)|\s*$)) | ||
Value ROUTING_MARK (.*?(?=(?:[^=]\S+=)|\s*$)) | ||
|
||
Start | ||
^\s*${INDEX}\s+${FLAGS}(?:\s+comment=${COMMENT})?\s+dst-address=${DESTINATION_ADDRESS}/${DESTINATION_ADDRESS_SUBNET}(?:\s+type=${TYPE})?(?:\s+routing-table=${ROUTING_TABLE})?(?:\s+pref-src=${PREF_SRC})?(?:\s+gateway=${GATEWAY})?(?:\s+gateway-status=${GATEWAY_STATUS})?(?:\s+immediate-gw=${IMMEDIATE_GW})?(?:\s+check-gateway=${CHECK_GATEWAY})?(?:\s+distance=${DISTANCE})?(?:\s+scope=${SCOPE})?(?:\s+target-scope=${TARGET_SCOPE})?(?:\s+vrf-interface=${VRF_INTERFACE})?(?:\s+suppress-hw-offload=${SUPPRESS_HW_OFFLOAD})?(?:\s+local-address=${LOCAL_ADDRESS})?(?:\s+routing-mark=${ROUTING_MARK})?\s*$$ -> Record | ||
^\s*$$ | ||
^. -> Error |
5 changes: 5 additions & 0 deletions
5
...oute_print_terse_without-paging/mikrotik_routeros_ip_route_print_terse_without-paging.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,5 @@ | ||
0 A S dst-address=0.0.0.0/0 gateway=192.168.8.1 gateway-status=192.168.8.1 reachable via lte1 distance=2 scope=30 target-scope=10 vrf-interface=lte1 | ||
1 ADC dst-address=10.160.1.228/30 pref-src=10.160.1.230 gateway=ether1 gateway-status=ether1 reachable distance=0 scope=10 | ||
2 A S comment=to Internet dst-address=134.0.0.0/8 gateway=10.160.1.230 gateway-status=10.160.1.230 reachable via ether2 distance=1 scope=30 target-scope=10 routing-mark=reserve | ||
3 A S dst-address=172.0.0.0/8 gateway=1.2.3.4 gateway-status=1.2.3.4 recursive via 10.152.1.230 ether5 distance=1 scope=30 target-scope=10 routing-mark=Free_Wi-Fi | ||
4 A SB dst-address=10.0.0.0/8 type=blackhole distance=100 routing-mark=Free_Wi-Fi |
97 changes: 97 additions & 0 deletions
97
...oute_print_terse_without-paging/mikrotik_routeros_ip_route_print_terse_without-paging.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,97 @@ | ||
--- | ||
parsed_sample: | ||
- check_gateway: "" | ||
comment: "" | ||
distance: "2" | ||
destination_address: "0.0.0.0" | ||
destination_address_subnet: "0" | ||
flags: "A S " | ||
gateway: "192.168.8.1" | ||
gateway_status: "192.168.8.1 reachable via lte1" | ||
immediate_gw: "" | ||
index: "0" | ||
local_address: "" | ||
pref_src: "" | ||
routing_mark: "" | ||
routing_table: "" | ||
scope: "30" | ||
suppress_hw_offload: "" | ||
target_scope: "10" | ||
type: "" | ||
vrf_interface: "lte1" | ||
- check_gateway: "" | ||
comment: "" | ||
distance: "0" | ||
destination_address: "10.160.1.228" | ||
destination_address_subnet: "30" | ||
flags: "ADC " | ||
gateway: "ether1" | ||
gateway_status: "ether1 reachable" | ||
immediate_gw: "" | ||
index: "1" | ||
local_address: "" | ||
pref_src: "10.160.1.230" | ||
routing_mark: "" | ||
routing_table: "" | ||
scope: "10" | ||
suppress_hw_offload: "" | ||
target_scope: "" | ||
type: "" | ||
vrf_interface: "" | ||
- check_gateway: "" | ||
comment: "to Internet" | ||
distance: "1" | ||
destination_address: "134.0.0.0" | ||
destination_address_subnet: "8" | ||
flags: "A S " | ||
gateway: "10.160.1.230" | ||
gateway_status: "10.160.1.230 reachable via ether2" | ||
immediate_gw: "" | ||
index: "2" | ||
local_address: "" | ||
pref_src: "" | ||
routing_mark: "reserve" | ||
routing_table: "" | ||
scope: "30" | ||
suppress_hw_offload: "" | ||
target_scope: "10" | ||
type: "" | ||
vrf_interface: "" | ||
- check_gateway: "" | ||
comment: "" | ||
distance: "1" | ||
destination_address: "172.0.0.0" | ||
destination_address_subnet: "8" | ||
flags: "A S " | ||
gateway: "1.2.3.4" | ||
gateway_status: "1.2.3.4 recursive via 10.152.1.230 ether5" | ||
immediate_gw: "" | ||
index: "3" | ||
local_address: "" | ||
pref_src: "" | ||
routing_mark: "Free_Wi-Fi" | ||
routing_table: "" | ||
scope: "30" | ||
suppress_hw_offload: "" | ||
target_scope: "10" | ||
type: "" | ||
vrf_interface: "" | ||
- check_gateway: "" | ||
comment: "" | ||
distance: "100" | ||
destination_address: "10.0.0.0" | ||
destination_address_subnet: "8" | ||
flags: "A SB" | ||
gateway: "" | ||
gateway_status: "" | ||
immediate_gw: "" | ||
index: "4" | ||
local_address: "" | ||
pref_src: "" | ||
routing_mark: "Free_Wi-Fi" | ||
routing_table: "" | ||
scope: "" | ||
suppress_hw_offload: "" | ||
target_scope: "" | ||
type: "blackhole" | ||
vrf_interface: "" |