forked from networktocode/ntc-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mirkotik: Fix issue with flags on IP route print and truncated long I…
…Pv6 (networktocode#1152) Fix flags on ip route print mikrotik
- Loading branch information
Showing
9 changed files
with
138 additions
and
55 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
13 changes: 13 additions & 0 deletions
13
ntc_templates/templates/mikrotik_routeros_ip_route_print_terse.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,13 @@ | ||
Value Key index (\d+) | ||
Value flags ([XADCSrbomBUP ]+) | ||
Value dst_address ([\w.:/\d]+) | ||
Value pref_src (\S+?) | ||
Value gateway (\S+) | ||
Value gateway_status (.+) | ||
Value distance (\d+) | ||
Value scope (\d+) | ||
Value target_scope (\d+) | ||
|
||
Start | ||
^\s?${index}\s${flags}\s\sdst-address=${dst_address}(\spref-src=${pref_src})?\sgateway=${gateway}\sgateway-status=${gateway_status}\sdistance=${distance}\sscope=${scope}(\starget-scope=${target_scope})?.*$$ -> Record | ||
^. -> Error |
15 changes: 0 additions & 15 deletions
15
ntc_templates/templates/mikrotik_routeros_ip_route_print_without-paging.textfsm
This file was deleted.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
tests/mikrotik_routeros/ip_route_print_terse/mikrotik_routeros_ip_route_print_terseIPv4.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,7 @@ | ||
0 A S dst-address=0.0.0.0/0 gateway=23.90.232.243 gateway-status=23.90.232.243 reachable via pppoe-out1 distance=10 scope=30 target-scope=10 | ||
1 Db dst-address=0.0.0.0/0 gateway=23.90.232.243 gateway-status=23.90.232.243 reachable via pppoe-out1 distance=20 scope=40 target-scope=10 bgp-as-path=57809 bgp-local-pref=300 bgp-origin=incomplete received-from=23.90.232.243-peer | ||
2 DS dst-address=0.0.0.0/0 gateway=pppoe-out1 gateway-status=pppoe-out1 reachable distance=100 scope=30 target-scope=10 | ||
3 ADC dst-address=23.90.232.243/32 pref-src=100.95.1.127 gateway=pppoe-out1 gateway-status=pppoe-out1 reachable distance=0 scope=10 | ||
4 ADC dst-address=185.163.212.156/30 pref-src=185.163.212.157 gateway=dmz-1-vlan gateway-status=dmz-1-vlan reachable distance=0 scope=10 | ||
5 ADC dst-address=192.168.1.0/24 pref-src=192.168.1.1 gateway=bridge-lan gateway-status=bridge-lan reachable distance=0 scope=10 | ||
6 A S dst-address=0.0.0.0/0 gateway=185.138.116.222,185.138.116.223 gateway-status=185.138.116.222 unreachable,185.138.116.223 reachable via pppoe-out1 distance=10 scope=30 target-scope=10 |
65 changes: 65 additions & 0 deletions
65
tests/mikrotik_routeros/ip_route_print_terse/mikrotik_routeros_ip_route_print_terseIPv4.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: | ||
- index: "0" | ||
flags: "A S" | ||
dst_address: "0.0.0.0/0" | ||
pref_src: "" | ||
gateway: "23.90.232.243" | ||
gateway_status: "23.90.232.243 reachable via pppoe-out1" | ||
distance: "10" | ||
scope: "30" | ||
target_scope: "10" | ||
- index: "1" | ||
flags: " Db" | ||
dst_address: "0.0.0.0/0" | ||
pref_src: "" | ||
gateway: "23.90.232.243" | ||
gateway_status: "23.90.232.243 reachable via pppoe-out1" | ||
distance: "20" | ||
scope: "40" | ||
target_scope: "10" | ||
- index: "2" | ||
flags: " DS" | ||
dst_address: "0.0.0.0/0" | ||
pref_src: "" | ||
gateway: "pppoe-out1" | ||
gateway_status: "pppoe-out1 reachable" | ||
distance: "100" | ||
scope: "30" | ||
target_scope: "10" | ||
- index: "3" | ||
flags: "ADC" | ||
dst_address: "23.90.232.243/32" | ||
pref_src: "100.95.1.127" | ||
gateway: "pppoe-out1" | ||
gateway_status: "pppoe-out1 reachable" | ||
distance: "0" | ||
scope: "10" | ||
target_scope: "" | ||
- index: "4" | ||
flags: "ADC" | ||
dst_address: "185.163.212.156/30" | ||
pref_src: "185.163.212.157" | ||
gateway: "dmz-1-vlan" | ||
gateway_status: "dmz-1-vlan reachable" | ||
distance: "0" | ||
scope: "10" | ||
target_scope: "" | ||
- index: "5" | ||
flags: "ADC" | ||
dst_address: "192.168.1.0/24" | ||
pref_src: "192.168.1.1" | ||
gateway: "bridge-lan" | ||
gateway_status: "bridge-lan reachable" | ||
distance: "0" | ||
scope: "10" | ||
target_scope: "" | ||
- index: "6" | ||
flags: "A S" | ||
dst_address: "0.0.0.0/0" | ||
pref_src: "" | ||
gateway: "185.138.116.222,185.138.116.223" | ||
gateway_status: "185.138.116.222 unreachable,185.138.116.223 reachable via pppoe-out1" | ||
distance: "10" | ||
scope: "30" | ||
target_scope: "10" |
5 changes: 5 additions & 0 deletions
5
tests/mikrotik_routeros/ip_route_print_terse/mikrotik_routeros_ip_route_print_terseIPv6.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 ADS dst-address=::/0 gateway=pppoe-out1 gateway-status=pppoe-out1 reachable distance=100 scope=30 target-scope=10 | ||
1 ADC dst-address=2a05:c100:7::/64 gateway=bridge-lan gateway-status=bridge-lan reachable distance=0 scope=10 | ||
2 S dst-address=9bb8:baac:d400::/38 gateway=ether4 gateway-status=ether4 unreachable distance=44 scope=30 target-scope=10 | ||
3 X S dst-address=ec64:a7fd:bc1c:14c:7960:5000::/84 gateway=ether2 gateway-status=ether2 inactive distance=7 scope=30 target-scope=10 | ||
4 S dst-address=fd79:f1d4:a400::/39 gateway=ether5 gateway-status=ether5 unreachable distance=24 scope=30 target-scope=10 |
47 changes: 47 additions & 0 deletions
47
tests/mikrotik_routeros/ip_route_print_terse/mikrotik_routeros_ip_route_print_terseIPv6.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,47 @@ | ||
--- | ||
parsed_sample: | ||
- index: "0" | ||
flags: "ADS" | ||
dst_address: "::/0" | ||
pref_src: "" | ||
gateway: "pppoe-out1" | ||
gateway_status: "pppoe-out1 reachable" | ||
distance: "100" | ||
scope: "30" | ||
target_scope: "10" | ||
- index: "1" | ||
flags: "ADC" | ||
dst_address: "2a05:c100:7::/64" | ||
pref_src: "" | ||
gateway: "bridge-lan" | ||
gateway_status: "bridge-lan reachable" | ||
distance: "0" | ||
scope: "10" | ||
target_scope: "" | ||
- index: "2" | ||
flags: " S" | ||
dst_address: "9bb8:baac:d400::/38" | ||
pref_src: "" | ||
gateway: "ether4" | ||
gateway_status: "ether4 unreachable" | ||
distance: "44" | ||
scope: "30" | ||
target_scope: "10" | ||
- index: "3" | ||
flags: "X S" | ||
dst_address: "ec64:a7fd:bc1c:14c:7960:5000::/84" | ||
pref_src: "" | ||
gateway: "ether2" | ||
gateway_status: "ether2 inactive" | ||
distance: "7" | ||
scope: "30" | ||
target_scope: "10" | ||
- index: "4" | ||
flags: " S" | ||
dst_address: "fd79:f1d4:a400::/39" | ||
pref_src: "" | ||
gateway: "ether5" | ||
gateway_status: "ether5 unreachable" | ||
distance: "24" | ||
scope: "30" | ||
target_scope: "10" |
7 changes: 0 additions & 7 deletions
7
...outeros/ip_route_print_without-paging/mikrotik_routeros_ip_route_print_without-paging.raw
This file was deleted.
Oops, something went wrong.
32 changes: 0 additions & 32 deletions
32
...outeros/ip_route_print_without-paging/mikrotik_routeros_ip_route_print_without-paging.yml
This file was deleted.
Oops, something went wrong.