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

Fortinet 'get router info routing-table all' template #1490

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
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Value Filldown TYPE ((?:K|C|S|R|B|O|IA|N1|N2|E1|E2|i|L1|L2|ia|\*|\s)+?)
Value Filldown DESTINATION (\S+)
Value DISTANCE (\d+)
Value METRIC (\d+)
Value Required GATEWAY (\S+|is\s+directly\s+connected)
Value Required INTERFACE (\S+)
Value LAST_TIME_UPDATE (\S+)

Start
^\s*Codes:\s+K\s+-\s+kernel,\s+C\s+-\s+connected,\s+S\s+-\s+static,\s+R\s+-\s+RIP,\s+B\s+-\s+BGP\s*$$
^\s*O\s+-\s+OSPF,\s+IA\s+-\s+OSPF\s+inter\s+area\s*$$
^\s*N1\s+-\s+OSPF\s+NSSA\s+external\s+type\s+1,\s+N2\s+-\s+OSPF\s+NSSA\s+external\s+type\s+2\s*$$
^\s*E1\s+-\s+OSPF\s+external\s+type\s+1,\s+E2\s+-\s+OSPF\s+external\s+type\s+2\s*$$
^\s*i\s+-\s+IS-IS,\s+L1\s+-\s+IS-IS\s+level-1,\s+L2\s+-\s+IS-IS\s+level-2,\s+ia\s+-\s+IS-IS\s+inter\s+area\s*$$
^\s*\*\s+-\s+candidate\s+default\s*$$
^\s*Routing\s+table\s+for\s+VRF=\d+\s*$$
^\s*${TYPE}\s+${DESTINATION}(?:\s+\[${DISTANCE}/${METRIC}\]\s+via)?\s+${GATEWAY},\s*${INTERFACE}(?:\s*,\s*${LAST_TIME_UPDATE})?\s*$$ -> Record
^\s*(?:\[${DISTANCE}/${METRIC}\]\s+via\s+)?${GATEWAY},\s*${INTERFACE}(?:\s*,\s*${LAST_TIME_UPDATE})?\s*$$ -> Record
^\s*$$
^. -> Error
1 change: 1 addition & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,7 @@ extreme_show_vlan_description.textfsm, .*, extreme, show vlan description
extreme_show_ipconfig.textfsm, .*, extreme, show ipconfig
extreme_show_sharing.textfsm, .*, extreme, show sharing

fortinet_get_router_info_routing-table_all.textfsm, .*, fortinet, g[[et]] r[[outer]] info ro[[uting-table]] a[[ll]]
fortinet_get_system_interface_physical.textfsm, .*, fortinet, g[[et]] sy[[stem]] in[[terface]] p[[hysical]]
fortinet_get_router_info_bgp_summary.textfsm, .*, fortinet, g[[et]] r[[outer]] info bg[[p]] su[[mmary]]
fortinet_get_system_ha_status.textfsm, .*, fortinet, g[[et]] sy[[stem]] ha s[[tatus]]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default

Routing table for VRF=0
O*E2 0.0.0.0/0 [110/10] via 10.149.127.253, Tu-Hub01-Main, 03w2d20h
S 8.8.8.8/32 [200/0] via 4.3.2.1, wan
O 10.80.58.224/27 [110/201] via 10.149.127.253, Tu-Hub01-Main, 3d13h31m
O E2 10.80.130.0/24 [110/20] via 10.149.127.253, Tu-Hub01-Main, 22:00:53
C 10.100.105.224/27 is directly connected, Vlan40
C 10.149.0.0/16 is directly connected, Tu-Hub01-Main
is directly connected, Tu-Hub02-Main
B 10.160.0.0/23 [20/0] via 10.142.0.74, port3, 2d18h02m
S 1.2.3.4/32 [10/0] via 10.152.1.229, lan
[10/0] via 4.3.2.1, wan
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
parsed_sample:
- destination: "0.0.0.0/0"
distance: "110"
gateway: "10.149.127.253"
interface: "Tu-Hub01-Main"
last_time_update: "03w2d20h"
metric: "10"
type: "O*E2"
- destination: "8.8.8.8/32"
distance: "200"
gateway: "4.3.2.1"
interface: "wan"
last_time_update: ""
metric: "0"
type: "S"
- destination: "10.80.58.224/27"
distance: "110"
gateway: "10.149.127.253"
interface: "Tu-Hub01-Main"
last_time_update: "3d13h31m"
metric: "201"
type: "O"
- destination: "10.80.130.0/24"
distance: "110"
gateway: "10.149.127.253"
interface: "Tu-Hub01-Main"
last_time_update: "22:00:53"
metric: "20"
type: "O E2"
- destination: "10.100.105.224/27"
distance: ""
gateway: "is directly connected"
interface: "Vlan40"
last_time_update: ""
metric: ""
type: "C"
- destination: "10.149.0.0/16"
distance: ""
gateway: "is directly connected"
interface: "Tu-Hub01-Main"
last_time_update: ""
metric: ""
type: "C"
- destination: "10.149.0.0/16"
distance: ""
gateway: "is directly connected"
interface: "Tu-Hub02-Main"
last_time_update: ""
metric: ""
type: "C"
- destination: "10.160.0.0/23"
distance: "20"
gateway: "10.142.0.74"
interface: "port3"
last_time_update: "2d18h02m"
metric: "0"
type: "B"
- destination: "1.2.3.4/32"
distance: "10"
gateway: "10.152.1.229"
interface: "lan"
last_time_update: ""
metric: "0"
type: "S"
- destination: "1.2.3.4/32"
distance: "10"
gateway: "4.3.2.1"
interface: "wan"
last_time_update: ""
metric: "0"
type: "S"
Loading