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

New Template: cisco_ios_show_ip_ospf_database_network #618

Merged
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
40 changes: 40 additions & 0 deletions templates/cisco_ios_show_ip_ospf_database_network.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
Value Filldown ROUTER_ID (\d+\.\d+\.\d+\.\d+)
Value Filldown PROCESS_ID (\d+)
Value Filldown AREA (\d+\.\d+\.\d+\.\d+|\d+)
Value Filldown LSA_AGE (\d+)
Value Filldown LSA_OPTIONS (.+)
Value Filldown LSA_TYPE (.+)
Value Filldown LSA_ID (\d+\.\d+\.\d+\.\d+)
Value Filldown LSA_ADV_ROUTER (\d+\.\d+\.\d+\.\d+)
Value Filldown LSA_SEQ_NUMBER (\S+)
Value Filldown LSA_CHECKSUM (\S+)
Value Filldown LSA_LENGTH (\d+)
Value Filldown LSA_NETWORK_MASK (\S+)
Value LS_ATT_ROUTER (\d+\.\d+\.\d+\.\d+)

Start
^\s+OSPF\s+Router\s+with\s+ID\s+\(${ROUTER_ID}\)\s+\(Process\s+ID\s+${PROCESS_ID}\)
^\s+Net\s+Link\s+States\s+\(Area ${AREA}\) -> LSAInfo
^\s*$$
^. -> Error

LSAInfo
^\s+LS\s+age:\s+${LSA_AGE}
^\s+Options:\s+\(${LSA_OPTIONS}\)
^\s+LS\s+Type:\s+${LSA_TYPE}
^\s+Link\s+State\s+ID:\s+${LSA_ID}
^\s+Advertising\s+Router:\s+${LSA_ADV_ROUTER}
^\s+LS\s+Seq\s+Number:\s+${LSA_SEQ_NUMBER}
^\s+Checksum:\s+${LSA_CHECKSUM}
^\s+Length:\s+${LSA_LENGTH}
^\s+Network\s+Mask:\s+${LSA_NETWORK_MASK} -> LSAs
^\s*$$
^. -> Error

LSAs
^\s+Attached\s+Router:\s+${LS_ATT_ROUTER} -> Next.Record
^\s+LS\s+age:\s+${LSA_AGE} -> LSAInfo
^\s*$$
^. -> Error

EOF
1 change: 1 addition & 0 deletions templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ cisco_ios_show_switch_detail.textfsm:cisco_ios_show_switch_detail_stack_ports.te
cisco_ios_show_running-config_partition_access-list.textfsm, .*, cisco_ios, sh[[ow]] ru[[nning-config]] p[[artition]] a[[ccess-list]]
cisco_ios_show_running-config_partition_route-map.textfsm, .*, cisco_ios, sh[[ow]] ru[[nning-config]] p[[artition]] route-[[map]]
cisco_ios_show_capability_feature_routing.textfsm, .*, cisco_ios, sh[[ow]] cap[[ability]] f[[eature]] r[[outing]]
cisco_ios_show_ip_ospf_database_network.textfsm, .*, cisco_ios, sh[[ow]] ip ospf data[[base]] ne[[twork]]
cisco_ios_show_authentication_sessions.textfsm, .*, cisco_ios, show authen[[tication]] ses[[sions]]
cisco_ios_show_environment_temperature.textfsm, .*, cisco_ios, sh[[ow]] envi[[ronment]] t[[emperature]]
cisco_ios_show_ip_ospf_database_router.textfsm, .*, cisco_ios, sh[[ow]] ip ospf data[[base]] r[[outer]]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
OSPF Router with ID (100.1.1.1) (Process ID 1)

Net Link States (Area 0)

LS age: 500
Options: (No TOS-capability, DC)
LS Type: Network Links
Link State ID: 192.168.2.1 (address of Designated Router)
Advertising Router: 100.1.1.1
LS Seq Number: 80000224
Checksum: 0x4B27
Length: 32
Network Mask: /30
Attached Router: 100.1.1.1
Attached Router: 100.2.2.2

LS age: 872
Options: (No TOS-capability, DC)
LS Type: Network Links
Link State ID: 192.168.3.2 (address of Designated Router)
Advertising Router: 100.4.4.4
LS Seq Number: 80000224
Checksum: 0x4816
Length: 32
Network Mask: /30
Attached Router: 100.4.4.4
Attached Router: 100.2.2.2

LS age: 351
Options: (No TOS-capability, DC)
LS Type: Network Links
Link State ID: 192.168.4.2 (address of Designated Router)
Advertising Router: 100.4.4.4
LS Seq Number: 80000226
Checksum: 0x60F7
Length: 32
Network Mask: /30
Attached Router: 100.4.4.4
Attached Router: 100.3.3.3
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
parsed_sample:
- router_id: "100.1.1.1"
process_id: "1"
area: "0"
lsa_age: "500"
lsa_options: "No TOS-capability, DC"
lsa_type: "Network Links"
lsa_id: "192.168.2.1"
lsa_adv_router: "100.1.1.1"
lsa_seq_number: "80000224"
lsa_checksum: "0x4B27"
lsa_length: "32"
lsa_network_mask: "/30"
ls_att_router: "100.1.1.1"
- router_id: "100.1.1.1"
process_id: "1"
area: "0"
lsa_age: "500"
lsa_options: "No TOS-capability, DC"
lsa_type: "Network Links"
lsa_id: "192.168.2.1"
lsa_adv_router: "100.1.1.1"
lsa_seq_number: "80000224"
lsa_checksum: "0x4B27"
lsa_length: "32"
lsa_network_mask: "/30"
ls_att_router: "100.2.2.2"
- router_id: "100.1.1.1"
process_id: "1"
area: "0"
lsa_age: "872"
lsa_options: "No TOS-capability, DC"
lsa_type: "Network Links"
lsa_id: "192.168.3.2"
lsa_adv_router: "100.4.4.4"
lsa_seq_number: "80000224"
lsa_checksum: "0x4816"
lsa_length: "32"
lsa_network_mask: "/30"
ls_att_router: "100.4.4.4"
- router_id: "100.1.1.1"
process_id: "1"
area: "0"
lsa_age: "872"
lsa_options: "No TOS-capability, DC"
lsa_type: "Network Links"
lsa_id: "192.168.3.2"
lsa_adv_router: "100.4.4.4"
lsa_seq_number: "80000224"
lsa_checksum: "0x4816"
lsa_length: "32"
lsa_network_mask: "/30"
ls_att_router: "100.2.2.2"
- router_id: "100.1.1.1"
process_id: "1"
area: "0"
lsa_age: "351"
lsa_options: "No TOS-capability, DC"
lsa_type: "Network Links"
lsa_id: "192.168.4.2"
lsa_adv_router: "100.4.4.4"
lsa_seq_number: "80000226"
lsa_checksum: "0x60F7"
lsa_length: "32"
lsa_network_mask: "/30"
ls_att_router: "100.4.4.4"
- router_id: "100.1.1.1"
process_id: "1"
area: "0"
lsa_age: "351"
lsa_options: "No TOS-capability, DC"
lsa_type: "Network Links"
lsa_id: "192.168.4.2"
lsa_adv_router: "100.4.4.4"
lsa_seq_number: "80000226"
lsa_checksum: "0x60F7"
lsa_length: "32"
lsa_network_mask: "/30"
ls_att_router: "100.3.3.3"