diff --git a/templates/cisco_ios_show_ip_ospf_database_network.textfsm b/templates/cisco_ios_show_ip_ospf_database_network.textfsm index 1c87bcadca..a359349632 100644 --- a/templates/cisco_ios_show_ip_ospf_database_network.textfsm +++ b/templates/cisco_ios_show_ip_ospf_database_network.textfsm @@ -10,6 +10,8 @@ Value Filldown LSA_SEQ_NUMBER (\S+) Value Filldown LSA_CHECKSUM (\S+) Value Filldown LSA_LENGTH (\d+) Value Filldown LSA_NETWORK_MASK (\S+) +Value Filldown LSA_ABR (Area\s+Border\s+Router) +Value Filldown LSA_ASBR (AS\s+Boundary\s+Router) Value LS_ATT_ROUTER (\d+\.\d+\.\d+\.\d+) Start @@ -27,6 +29,8 @@ LSAInfo ^\s+LS\s+Seq\s+Number:\s+${LSA_SEQ_NUMBER} ^\s+Checksum:\s+${LSA_CHECKSUM} ^\s+Length:\s+${LSA_LENGTH} + ^\s+${LSA_ABR}$$ + ^\s+${LSA_ASBR}$$ ^\s+Network\s+Mask:\s+${LSA_NETWORK_MASK} -> LSAs ^\s*$$ ^. -> Error @@ -34,6 +38,7 @@ LSAInfo LSAs ^\s+Attached\s+Router:\s+${LS_ATT_ROUTER} -> Next.Record ^\s+LS\s+age:\s+${LSA_AGE} -> LSAInfo + ^\s+Router\s+Link\s+States\s+\(Area ${AREA}\) -> LSAInfo ^\s*$$ ^. -> Error diff --git a/templates/cisco_ios_show_ip_ospf_database_router.textfsm b/templates/cisco_ios_show_ip_ospf_database_router.textfsm index 7c030113cb..956c35ed4e 100644 --- a/templates/cisco_ios_show_ip_ospf_database_router.textfsm +++ b/templates/cisco_ios_show_ip_ospf_database_router.textfsm @@ -10,6 +10,8 @@ Value Filldown LSA_SEQ_NUMBER (\S+) Value Filldown LSA_CHECKSUM (\S+) Value Filldown LSA_LENGTH (\d+) Value Filldown LSA_NUM_LINKS (\d+) +Value Filldown LSA_ABR (Area\s+Border\s+Router) +Value Filldown LSA_ASBR (AS\s+Boundary\s+Router) Value LS_LINK_TYPE (.+?) Value LS_LINK_ID (\d+\.\d+\.\d+\.\d+) Value LS_LINK_DATA (\d+\.\d+\.\d+\.\d+) @@ -31,6 +33,8 @@ LSAInfo ^\s+LS\s+Seq\s+Number:\s+${LSA_SEQ_NUMBER} ^\s+Checksum:\s+${LSA_CHECKSUM} ^\s+Length:\s+${LSA_LENGTH} + ^\s+${LSA_ABR}$$ + ^\s+${LSA_ASBR}$$ ^\s+Number\s+of\s+Links:\s+${LSA_NUM_LINKS} -> LSAs ^\s*$$ ^. -> Error @@ -42,6 +46,7 @@ LSAs ^\s+Number\s+of\s+MTID\s+metrics:\s+${LS_MTID_METRICS} ^\s+TOS\s+0\s+Metrics:\s+${LS_TOS_0_METRICS} -> Next.Record ^\s+LS\s+age:\s+${LSA_AGE} -> LSAInfo + ^\s+Router\s+Link\s+States\s+\(Area ${AREA}\) -> LSAInfo ^\s*$$ ^. -> Error diff --git a/tests/cisco_ios/show_ip_ospf_database_network/cisco_ios_show_ip_ospf_database_network.yml b/tests/cisco_ios/show_ip_ospf_database_network/cisco_ios_show_ip_ospf_database_network.yml index 92d575125c..dae9b460c8 100644 --- a/tests/cisco_ios/show_ip_ospf_database_network/cisco_ios_show_ip_ospf_database_network.yml +++ b/tests/cisco_ios/show_ip_ospf_database_network/cisco_ios_show_ip_ospf_database_network.yml @@ -12,6 +12,8 @@ parsed_sample: lsa_checksum: "0x4B27" lsa_length: "32" lsa_network_mask: "/30" + lsa_abr: "" + lsa_asbr: "" ls_att_router: "100.1.1.1" - router_id: "100.1.1.1" process_id: "1" @@ -25,6 +27,8 @@ parsed_sample: lsa_checksum: "0x4B27" lsa_length: "32" lsa_network_mask: "/30" + lsa_abr: "" + lsa_asbr: "" ls_att_router: "100.2.2.2" - router_id: "100.1.1.1" process_id: "1" @@ -38,6 +42,8 @@ parsed_sample: lsa_checksum: "0x4816" lsa_length: "32" lsa_network_mask: "/30" + lsa_abr: "" + lsa_asbr: "" ls_att_router: "100.4.4.4" - router_id: "100.1.1.1" process_id: "1" @@ -51,6 +57,8 @@ parsed_sample: lsa_checksum: "0x4816" lsa_length: "32" lsa_network_mask: "/30" + lsa_abr: "" + lsa_asbr: "" ls_att_router: "100.2.2.2" - router_id: "100.1.1.1" process_id: "1" @@ -64,6 +72,8 @@ parsed_sample: lsa_checksum: "0x60F7" lsa_length: "32" lsa_network_mask: "/30" + lsa_abr: "" + lsa_asbr: "" ls_att_router: "100.4.4.4" - router_id: "100.1.1.1" process_id: "1" @@ -77,4 +87,6 @@ parsed_sample: lsa_checksum: "0x60F7" lsa_length: "32" lsa_network_mask: "/30" + lsa_abr: "" + lsa_asbr: "" ls_att_router: "100.3.3.3" diff --git a/tests/cisco_ios/show_ip_ospf_database_network/cisco_ios_show_ip_ospf_database_network_leading-spaces-truncated.yml b/tests/cisco_ios/show_ip_ospf_database_network/cisco_ios_show_ip_ospf_database_network_leading-spaces-truncated.yml index 92d575125c..dae9b460c8 100644 --- a/tests/cisco_ios/show_ip_ospf_database_network/cisco_ios_show_ip_ospf_database_network_leading-spaces-truncated.yml +++ b/tests/cisco_ios/show_ip_ospf_database_network/cisco_ios_show_ip_ospf_database_network_leading-spaces-truncated.yml @@ -12,6 +12,8 @@ parsed_sample: lsa_checksum: "0x4B27" lsa_length: "32" lsa_network_mask: "/30" + lsa_abr: "" + lsa_asbr: "" ls_att_router: "100.1.1.1" - router_id: "100.1.1.1" process_id: "1" @@ -25,6 +27,8 @@ parsed_sample: lsa_checksum: "0x4B27" lsa_length: "32" lsa_network_mask: "/30" + lsa_abr: "" + lsa_asbr: "" ls_att_router: "100.2.2.2" - router_id: "100.1.1.1" process_id: "1" @@ -38,6 +42,8 @@ parsed_sample: lsa_checksum: "0x4816" lsa_length: "32" lsa_network_mask: "/30" + lsa_abr: "" + lsa_asbr: "" ls_att_router: "100.4.4.4" - router_id: "100.1.1.1" process_id: "1" @@ -51,6 +57,8 @@ parsed_sample: lsa_checksum: "0x4816" lsa_length: "32" lsa_network_mask: "/30" + lsa_abr: "" + lsa_asbr: "" ls_att_router: "100.2.2.2" - router_id: "100.1.1.1" process_id: "1" @@ -64,6 +72,8 @@ parsed_sample: lsa_checksum: "0x60F7" lsa_length: "32" lsa_network_mask: "/30" + lsa_abr: "" + lsa_asbr: "" ls_att_router: "100.4.4.4" - router_id: "100.1.1.1" process_id: "1" @@ -77,4 +87,6 @@ parsed_sample: lsa_checksum: "0x60F7" lsa_length: "32" lsa_network_mask: "/30" + lsa_abr: "" + lsa_asbr: "" ls_att_router: "100.3.3.3" diff --git a/tests/cisco_ios/show_ip_ospf_database_router/cisco_ios_show_ip_ospf_database_router.yml b/tests/cisco_ios/show_ip_ospf_database_router/cisco_ios_show_ip_ospf_database_router.yml index 394d48d18a..4742c4f57b 100644 --- a/tests/cisco_ios/show_ip_ospf_database_router/cisco_ios_show_ip_ospf_database_router.yml +++ b/tests/cisco_ios/show_ip_ospf_database_router/cisco_ios_show_ip_ospf_database_router.yml @@ -12,6 +12,8 @@ parsed_sample: lsa_checksum: "0x8A21" lsa_length: "72" lsa_num_links: "4" + lsa_abr: "" + lsa_asbr: "" ls_link_type: "a Stub Network" ls_link_id: "100.1.1.1" ls_link_data: "255.255.255.255" @@ -29,6 +31,8 @@ parsed_sample: lsa_checksum: "0x8A21" lsa_length: "72" lsa_num_links: "4" + lsa_abr: "" + lsa_asbr: "" ls_link_type: "a Transit Network" ls_link_id: "192.168.2.1" ls_link_data: "192.168.2.1" @@ -46,6 +50,8 @@ parsed_sample: lsa_checksum: "0x8A21" lsa_length: "72" lsa_num_links: "4" + lsa_abr: "" + lsa_asbr: "" ls_link_type: "another Router (point-to-point)" ls_link_id: "100.3.3.3" ls_link_data: "192.168.1.1" @@ -63,6 +69,8 @@ parsed_sample: lsa_checksum: "0x8A21" lsa_length: "72" lsa_num_links: "4" + lsa_abr: "" + lsa_asbr: "" ls_link_type: "a Stub Network" ls_link_id: "192.168.1.0" ls_link_data: "255.255.255.252" @@ -80,6 +88,8 @@ parsed_sample: lsa_checksum: "0xCA4F" lsa_length: "60" lsa_num_links: "3" + lsa_abr: "" + lsa_asbr: "" ls_link_type: "a Stub Network" ls_link_id: "100.2.2.2" ls_link_data: "255.255.255.255" @@ -97,6 +107,8 @@ parsed_sample: lsa_checksum: "0xCA4F" lsa_length: "60" lsa_num_links: "3" + lsa_abr: "" + lsa_asbr: "" ls_link_type: "a Transit Network" ls_link_id: "192.168.3.2" ls_link_data: "192.168.3.1" @@ -114,6 +126,8 @@ parsed_sample: lsa_checksum: "0xCA4F" lsa_length: "60" lsa_num_links: "3" + lsa_abr: "" + lsa_asbr: "" ls_link_type: "a Transit Network" ls_link_id: "192.168.2.1" ls_link_data: "192.168.2.2" @@ -131,6 +145,8 @@ parsed_sample: lsa_checksum: "0x3969" lsa_length: "72" lsa_num_links: "4" + lsa_abr: "" + lsa_asbr: "" ls_link_type: "a Stub Network" ls_link_id: "100.3.3.3" ls_link_data: "255.255.255.255" @@ -148,6 +164,8 @@ parsed_sample: lsa_checksum: "0x3969" lsa_length: "72" lsa_num_links: "4" + lsa_abr: "" + lsa_asbr: "" ls_link_type: "a Transit Network" ls_link_id: "192.168.4.2" ls_link_data: "192.168.4.1" @@ -165,6 +183,8 @@ parsed_sample: lsa_checksum: "0x3969" lsa_length: "72" lsa_num_links: "4" + lsa_abr: "" + lsa_asbr: "" ls_link_type: "another Router (point-to-point)" ls_link_id: "100.1.1.1" ls_link_data: "192.168.1.2" @@ -182,6 +202,8 @@ parsed_sample: lsa_checksum: "0x3969" lsa_length: "72" lsa_num_links: "4" + lsa_abr: "" + lsa_asbr: "" ls_link_type: "a Stub Network" ls_link_id: "192.168.1.0" ls_link_data: "255.255.255.252" @@ -199,6 +221,8 @@ parsed_sample: lsa_checksum: "0x5CB0" lsa_length: "60" lsa_num_links: "3" + lsa_abr: "" + lsa_asbr: "" ls_link_type: "a Stub Network" ls_link_id: "100.4.4.4" ls_link_data: "255.255.255.255" @@ -216,6 +240,8 @@ parsed_sample: lsa_checksum: "0x5CB0" lsa_length: "60" lsa_num_links: "3" + lsa_abr: "" + lsa_asbr: "" ls_link_type: "a Transit Network" ls_link_id: "192.168.4.2" ls_link_data: "192.168.4.2" @@ -233,6 +259,8 @@ parsed_sample: lsa_checksum: "0x5CB0" lsa_length: "60" lsa_num_links: "3" + lsa_abr: "" + lsa_asbr: "" ls_link_type: "a Transit Network" ls_link_id: "192.168.3.2" ls_link_data: "192.168.3.2" diff --git a/tests/cisco_ios/show_ip_ospf_database_router/cisco_ios_show_ip_ospf_database_router_asbr_abr.raw b/tests/cisco_ios/show_ip_ospf_database_router/cisco_ios_show_ip_ospf_database_router_asbr_abr.raw new file mode 100644 index 0000000000..f1b5d8978c --- /dev/null +++ b/tests/cisco_ios/show_ip_ospf_database_router/cisco_ios_show_ip_ospf_database_router_asbr_abr.raw @@ -0,0 +1,43 @@ +OSPF Router with ID (10.0.0.1) (Process ID 1) + + Router Link States (Area 0) + + LS age: 4 + Options: (No TOS-capability, DC) + LS Type: Router Links + Link State ID: 10.0.0.1 + Advertising Router: 10.0.0.1 + LS Seq Number: 80000006 + Checksum: 0x5DAB + Length: 36 + Area Border Router + AS Boundary Router + Number of Links: 1 + + Link connected to: a Stub Network + (Link ID) Network/subnet number: 10.0.0.1 + (Link Data) Network Mask: 255.255.255.255 + Number of MTID metrics: 0 + TOS 0 Metrics: 1 + + + + Router Link States (Area 1) + + LS age: 4 + Options: (No TOS-capability, DC) + LS Type: Router Links + Link State ID: 10.0.0.2 + Advertising Router: 10.0.0.2 + LS Seq Number: 80000002 + Checksum: 0x7694 + Length: 36 + Area Border Router + AS Boundary Router + Number of Links: 1 + + Link connected to: a Stub Network + (Link ID) Network/subnet number: 10.1.1.1 + (Link Data) Network Mask: 255.255.255.255 + Number of MTID metrics: 0 + TOS 0 Metrics: 1 diff --git a/tests/cisco_ios/show_ip_ospf_database_router/cisco_ios_show_ip_ospf_database_router_asbr_abr.yml b/tests/cisco_ios/show_ip_ospf_database_router/cisco_ios_show_ip_ospf_database_router_asbr_abr.yml new file mode 100644 index 0000000000..48e318dd5f --- /dev/null +++ b/tests/cisco_ios/show_ip_ospf_database_router/cisco_ios_show_ip_ospf_database_router_asbr_abr.yml @@ -0,0 +1,40 @@ +--- +parsed_sample: + - router_id: "10.0.0.1" + process_id: "1" + area: "0" + lsa_age: "4" + lsa_options: "No TOS-capability, DC" + lsa_type: "Router Links" + lsa_id: "10.0.0.1" + lsa_adv_router: "10.0.0.1" + lsa_seq_number: "80000006" + lsa_checksum: "0x5DAB" + lsa_length: "36" + lsa_num_links: "1" + lsa_abr: "Area Border Router" + lsa_asbr: "AS Boundary Router" + ls_link_type: "a Stub Network" + ls_link_id: "10.0.0.1" + ls_link_data: "255.255.255.255" + ls_mtid_metrics: "0" + ls_tos_0_metrics: "1" + - router_id: "10.0.0.1" + process_id: "1" + area: "1" + lsa_age: "4" + lsa_options: "No TOS-capability, DC" + lsa_type: "Router Links" + lsa_id: "10.0.0.2" + lsa_adv_router: "10.0.0.2" + lsa_seq_number: "80000002" + lsa_checksum: "0x7694" + lsa_length: "36" + lsa_num_links: "1" + lsa_abr: "Area Border Router" + lsa_asbr: "AS Boundary Router" + ls_link_type: "a Stub Network" + ls_link_id: "10.1.1.1" + ls_link_data: "255.255.255.255" + ls_mtid_metrics: "0" + ls_tos_0_metrics: "1" diff --git a/tests/cisco_ios/show_ip_ospf_database_router/cisco_ios_show_ip_ospf_database_router_leading-spaces-truncated.yml b/tests/cisco_ios/show_ip_ospf_database_router/cisco_ios_show_ip_ospf_database_router_leading-spaces-truncated.yml index 394d48d18a..4742c4f57b 100644 --- a/tests/cisco_ios/show_ip_ospf_database_router/cisco_ios_show_ip_ospf_database_router_leading-spaces-truncated.yml +++ b/tests/cisco_ios/show_ip_ospf_database_router/cisco_ios_show_ip_ospf_database_router_leading-spaces-truncated.yml @@ -12,6 +12,8 @@ parsed_sample: lsa_checksum: "0x8A21" lsa_length: "72" lsa_num_links: "4" + lsa_abr: "" + lsa_asbr: "" ls_link_type: "a Stub Network" ls_link_id: "100.1.1.1" ls_link_data: "255.255.255.255" @@ -29,6 +31,8 @@ parsed_sample: lsa_checksum: "0x8A21" lsa_length: "72" lsa_num_links: "4" + lsa_abr: "" + lsa_asbr: "" ls_link_type: "a Transit Network" ls_link_id: "192.168.2.1" ls_link_data: "192.168.2.1" @@ -46,6 +50,8 @@ parsed_sample: lsa_checksum: "0x8A21" lsa_length: "72" lsa_num_links: "4" + lsa_abr: "" + lsa_asbr: "" ls_link_type: "another Router (point-to-point)" ls_link_id: "100.3.3.3" ls_link_data: "192.168.1.1" @@ -63,6 +69,8 @@ parsed_sample: lsa_checksum: "0x8A21" lsa_length: "72" lsa_num_links: "4" + lsa_abr: "" + lsa_asbr: "" ls_link_type: "a Stub Network" ls_link_id: "192.168.1.0" ls_link_data: "255.255.255.252" @@ -80,6 +88,8 @@ parsed_sample: lsa_checksum: "0xCA4F" lsa_length: "60" lsa_num_links: "3" + lsa_abr: "" + lsa_asbr: "" ls_link_type: "a Stub Network" ls_link_id: "100.2.2.2" ls_link_data: "255.255.255.255" @@ -97,6 +107,8 @@ parsed_sample: lsa_checksum: "0xCA4F" lsa_length: "60" lsa_num_links: "3" + lsa_abr: "" + lsa_asbr: "" ls_link_type: "a Transit Network" ls_link_id: "192.168.3.2" ls_link_data: "192.168.3.1" @@ -114,6 +126,8 @@ parsed_sample: lsa_checksum: "0xCA4F" lsa_length: "60" lsa_num_links: "3" + lsa_abr: "" + lsa_asbr: "" ls_link_type: "a Transit Network" ls_link_id: "192.168.2.1" ls_link_data: "192.168.2.2" @@ -131,6 +145,8 @@ parsed_sample: lsa_checksum: "0x3969" lsa_length: "72" lsa_num_links: "4" + lsa_abr: "" + lsa_asbr: "" ls_link_type: "a Stub Network" ls_link_id: "100.3.3.3" ls_link_data: "255.255.255.255" @@ -148,6 +164,8 @@ parsed_sample: lsa_checksum: "0x3969" lsa_length: "72" lsa_num_links: "4" + lsa_abr: "" + lsa_asbr: "" ls_link_type: "a Transit Network" ls_link_id: "192.168.4.2" ls_link_data: "192.168.4.1" @@ -165,6 +183,8 @@ parsed_sample: lsa_checksum: "0x3969" lsa_length: "72" lsa_num_links: "4" + lsa_abr: "" + lsa_asbr: "" ls_link_type: "another Router (point-to-point)" ls_link_id: "100.1.1.1" ls_link_data: "192.168.1.2" @@ -182,6 +202,8 @@ parsed_sample: lsa_checksum: "0x3969" lsa_length: "72" lsa_num_links: "4" + lsa_abr: "" + lsa_asbr: "" ls_link_type: "a Stub Network" ls_link_id: "192.168.1.0" ls_link_data: "255.255.255.252" @@ -199,6 +221,8 @@ parsed_sample: lsa_checksum: "0x5CB0" lsa_length: "60" lsa_num_links: "3" + lsa_abr: "" + lsa_asbr: "" ls_link_type: "a Stub Network" ls_link_id: "100.4.4.4" ls_link_data: "255.255.255.255" @@ -216,6 +240,8 @@ parsed_sample: lsa_checksum: "0x5CB0" lsa_length: "60" lsa_num_links: "3" + lsa_abr: "" + lsa_asbr: "" ls_link_type: "a Transit Network" ls_link_id: "192.168.4.2" ls_link_data: "192.168.4.2" @@ -233,6 +259,8 @@ parsed_sample: lsa_checksum: "0x5CB0" lsa_length: "60" lsa_num_links: "3" + lsa_abr: "" + lsa_asbr: "" ls_link_type: "a Transit Network" ls_link_id: "192.168.3.2" ls_link_data: "192.168.3.2"