Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MikroTik RouterOS 'ip route print terse without-paging' template #1499

Merged
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
1 change: 1 addition & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,7 @@ mikrotik_routeros_ip_dhcp-server_lease_print_without-paging.textfsm, .*, mikroti
mikrotik_routeros_ip_firewall_nat_print_all_without-paging.textfsm, .*, mikrotik_routeros, [[/]]ip(v6)? firewall nat print all without-paging
mikrotik_routeros_interface_ethernet_monitor_name_once.textfsm, .*, mikrotik_routeros, [[/]]interface ethernet monitor (\S+) once
mikrotik_routeros_ip_firewall_address-list_print_terse.textfsm, .*, mikrotik_routeros, [[/]]ip(v6)? firewall address-list print terse
mikrotik_routeros_ip_route_print_terse_without-paging.textfsm, .*, mikrotik_routeros, [[/]]ip r[[oute]] p[[rint]] t[[erse]] wi[[thout-paging]]
mikrotik_routeros_snmp_community_print_without-paging.textfsm, .*, mikrotik_routeros, [[/]]snmp community print without-paging
mikrotik_routeros_ipv6_neighbor_print_without-paging.textfsm, .*, mikrotik_routeros, [[/]]ipv6 neighbor print without-paging
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,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
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
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: ""
Loading