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.
Add support for cisco show ip mroute (networktocode#216)
* Add support for cisco show ip mroute * Rename field * Use list for fields that can repeat several times * Update .gitignore * Update empty mroute to be empty list * Update template to raise an error for unmatched lines
- Loading branch information
1 parent
75cdab8
commit d62ff93
Showing
9 changed files
with
196 additions
and
20 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
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,26 @@ | ||
Value MULTICAST_SOURCE_IP (\*|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}) | ||
Value MULTICAST_GROUP_IP (\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}) | ||
Value UP_TIME (\d{2}:\d{2}:\d{2}) | ||
Value EXPIRATION_TIME (\d{2}:\d{2}:\d{2}|stopped) | ||
Value RENDEZVOUS_POINT (\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}) | ||
Value FLAGS (\w*) | ||
Value INCOMING_INTERFACE (\S+) | ||
Value REVERSE_PATH_FORWARDING_NEIGHBOUR_IP (\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}) | ||
Value REGISTERING (Registering) | ||
Value List OUTGOING_INTERFACE (\S+) | ||
Value List FORWARD_MODE (Forward\/Sparse|Forward\/Dense) | ||
Value List OUTGOING_MULTICAST_UP_TIME (\d{2}:\d{2}:\d{2}) | ||
Value List OUTGOING_MULTICAST_EXPIRATION_TIME (\d{2}:\d{2}:\d{2}|stopped) | ||
|
||
Start | ||
^\((\*|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}),\s(\*|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\) -> Continue.Record | ||
^\(${MULTICAST_SOURCE_IP},\s${MULTICAST_GROUP_IP}\),\s${UP_TIME}\/${EXPIRATION_TIME}(,\sRP\s${RENDEZVOUS_POINT})?,\sflags:\s${FLAGS} | ||
^\s+Incoming\sinterface:\s${INCOMING_INTERFACE},\sRPF\snbr\s${REVERSE_PATH_FORWARDING_NEIGHBOUR_IP}(,\s${REGISTERING})? | ||
^\s+Outgoing\s+interface\s+list:(?:\s+Null|)\s*$$ | ||
^\s+${OUTGOING_INTERFACE},\s${FORWARD_MODE},\s${OUTGOING_MULTICAST_UP_TIME}\/${OUTGOING_MULTICAST_EXPIRATION_TIME} | ||
^\s*$$ | ||
^IP\s+Multicast\s+(?:Forwarding|Routing) | ||
^.*[Ff]lags | ||
^\s+\S+\s+-\s+ | ||
^\s+(?:Timers|Interface\s+state): | ||
^. -> Error |
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
16 changes: 16 additions & 0 deletions
16
tests/cisco_ios/show_ip_mroute/cisco_ios_show_ip_mroute1.parsed
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,16 @@ | ||
--- | ||
parsed_sample: | ||
|
||
- multicast_source_ip: "*" | ||
multicast_group_ip: "224.0.1.40" | ||
up_time: "01:04:48" | ||
expiration_time: "00:02:41" | ||
rendezvous_point: "172.16.1.1" | ||
flags: "SJPCL" | ||
incoming_interface: "FastEthernet0/1" | ||
reverse_path_forwarding_neighbour_ip: "172.16.1.1" | ||
registering: "" | ||
outgoing_interface: [] | ||
forward_mode: [] | ||
outgoing_multicast_up_time: [] | ||
outgoing_multicast_expiration_time: [] |
15 changes: 15 additions & 0 deletions
15
tests/cisco_ios/show_ip_mroute/cisco_ios_show_ip_mroute1.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,15 @@ | ||
IP Multicast Routing Table | ||
Flags: D - Dense, S - Sparse, B - Bidir Group, s - SSM Group, C - Connected, | ||
L - Local, P - Pruned, R - RP-bit set, F - Register flag, | ||
T - SPT-bit set, J - Join SPT, M - MSDP created entry, | ||
X - Proxy Join Timer Running, A - Candidate for MSDP Advertisement, | ||
U - URD, I - Received Source Specific Host Report, | ||
Z - Multicast Tunnel, z - MDT-data group sender, | ||
Y - Joined MDT-data group, y - Sending to MDT-data group | ||
V - RD & Vector, v - Vector | ||
Outgoing interface flags: H - Hardware switched, A - Assert winner | ||
Timers: Uptime/Expires | ||
Interface state: Interface, Next-Hop or VCD, State/Mode | ||
(*, 224.0.1.40), 01:04:48/00:02:41, RP 172.16.1.1, flags: SJPCL | ||
Incoming interface: FastEthernet0/1, RPF nbr 172.16.1.1 | ||
Outgoing interface list: Null |
2 changes: 2 additions & 0 deletions
2
tests/cisco_ios/show_ip_mroute/cisco_ios_show_ip_mroute2.parsed
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,2 @@ | ||
--- | ||
parsed_sample: [] |
13 changes: 13 additions & 0 deletions
13
tests/cisco_ios/show_ip_mroute/cisco_ios_show_ip_mroute2.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,13 @@ | ||
IP Multicast Forwarding is not enabled. | ||
IP Multicast Routing Table | ||
Flags: D - Dense, S - Sparse, B - Bidir Group, s - SSM Group, C - Connected, | ||
L - Local, P - Pruned, R - RP-bit set, F - Register flag, | ||
T - SPT-bit set, J - Join SPT, M - MSDP created entry, E - Extranet, | ||
X - Proxy Join Timer Running, A - Candidate for MSDP Advertisement, | ||
U - URD, I - Received Source Specific Host Report, | ||
Z - Multicast Tunnel, z - MDT-data group sender, | ||
Y - Joined MDT-data group, y - Sending to MDT-data group, | ||
V - RD & Vector, v - Vector | ||
Outgoing interface flags: H - Hardware switched, A - Assert winner | ||
Timers: Uptime/Expires | ||
Interface state: Interface, Next-Hop or VCD, State/Mode |
87 changes: 87 additions & 0 deletions
87
tests/cisco_ios/show_ip_mroute/cisco_ios_show_ip_mroute3.parsed
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,87 @@ | ||
--- | ||
parsed_sample: | ||
|
||
- multicast_source_ip: "*" | ||
multicast_group_ip: "239.0.0.1" | ||
up_time: "00:00:58" | ||
expiration_time: "00:02:02" | ||
rendezvous_point: "172.16.2.1" | ||
flags: "SJC" | ||
incoming_interface: "FastEthernet0/1" | ||
reverse_path_forwarding_neighbour_ip: "172.16.2.1" | ||
registering: "" | ||
outgoing_interface: ["Vlan1"] | ||
forward_mode: ["Forward/Sparse"] | ||
outgoing_multicast_up_time: ["00:00:58"] | ||
outgoing_multicast_expiration_time: ["00:02:02"] | ||
|
||
- multicast_source_ip: "*" | ||
multicast_group_ip: "239.0.0.2" | ||
up_time: "00:01:02" | ||
expiration_time: "00:01:57" | ||
rendezvous_point: "172.16.2.1" | ||
flags: "SJC" | ||
incoming_interface: "FastEthernet0/1" | ||
reverse_path_forwarding_neighbour_ip: "172.16.2.1" | ||
registering: "" | ||
outgoing_interface: ["Vlan1"] | ||
forward_mode: ["Forward/Sparse"] | ||
outgoing_multicast_up_time: ["00:01:03"] | ||
outgoing_multicast_expiration_time: ["00:01:57"] | ||
|
||
- multicast_source_ip: "*" | ||
multicast_group_ip: "239.0.0.3" | ||
up_time: "00:00:58" | ||
expiration_time: "00:02:57" | ||
rendezvous_point: "172.16.2.1" | ||
flags: "SJC" | ||
incoming_interface: "FastEthernet0/1" | ||
reverse_path_forwarding_neighbour_ip: "172.16.2.1" | ||
registering: "" | ||
outgoing_interface: ["Vlan1", "Vlan2"] | ||
forward_mode: ["Forward/Sparse", "Forward/Sparse"] | ||
outgoing_multicast_up_time: ["00:00:58", "00:00:58"] | ||
outgoing_multicast_expiration_time: ["00:02:57", "00:02:57"] | ||
|
||
- multicast_source_ip: "*" | ||
multicast_group_ip: "239.0.0.4" | ||
up_time: "00:00:04" | ||
expiration_time: "stopped" | ||
rendezvous_point: "172.16.2.1" | ||
flags: "SPF" | ||
incoming_interface: "FastEthernet0/1" | ||
reverse_path_forwarding_neighbour_ip: "172.16.2.1" | ||
registering: "" | ||
outgoing_interface: [] | ||
forward_mode: [] | ||
outgoing_multicast_up_time: [] | ||
outgoing_multicast_expiration_time: [] | ||
|
||
- multicast_source_ip: "192.168.2.44" | ||
multicast_group_ip: "239.0.0.5" | ||
up_time: "00:00:07" | ||
expiration_time: "00:02:58" | ||
rendezvous_point: "" | ||
flags: "FT" | ||
incoming_interface: "Vlan1" | ||
reverse_path_forwarding_neighbour_ip: "0.0.0.0" | ||
registering: "Registering" | ||
outgoing_interface: ["FastEthernet0/1"] | ||
forward_mode: ["Forward/Dense"] | ||
outgoing_multicast_up_time: ["00:00:07"] | ||
outgoing_multicast_expiration_time: ["00:00:00"] | ||
|
||
- multicast_source_ip: "*" | ||
multicast_group_ip: "239.0.0.6" | ||
up_time: "00:02:36" | ||
expiration_time: "00:02:25" | ||
rendezvous_point: "172.16.2.1" | ||
flags: "SJPCL" | ||
incoming_interface: "FastEthernet0/1" | ||
reverse_path_forwarding_neighbour_ip: "172.16.2.1" | ||
registering: "" | ||
outgoing_interface: [] | ||
forward_mode: [] | ||
outgoing_multicast_up_time: [] | ||
outgoing_multicast_expiration_time: [] | ||
|
35 changes: 35 additions & 0 deletions
35
tests/cisco_ios/show_ip_mroute/cisco_ios_show_ip_mroute3.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,35 @@ | ||
IP Multicast Routing Table | ||
Flags: D - Dense, S - Sparse, B - Bidir Group, s - SSM Group, C - Connected, | ||
L - Local, P - Pruned, R - RP-bit set, F - Register flag, | ||
T - SPT-bit set, J - Join SPT, M - MSDP created entry, | ||
X - Proxy Join Timer Running, A - Candidate for MSDP Advertisement, | ||
U - URD, I - Received Source Specific Host Report, | ||
Z - Multicast Tunnel, z - MDT-data group sender, | ||
Y - Joined MDT-data group, y - Sending to MDT-data group | ||
V - RD & Vector, v - Vector | ||
Outgoing interface flags: H - Hardware switched, A - Assert winner | ||
Timers: Uptime/Expires | ||
Interface state: Interface, Next-Hop or VCD, State/Mode | ||
(*, 239.0.0.1), 00:00:58/00:02:02, RP 172.16.2.1, flags: SJC | ||
Incoming interface: FastEthernet0/1, RPF nbr 172.16.2.1 | ||
Outgoing interface list: | ||
Vlan1, Forward/Sparse, 00:00:58/00:02:02 | ||
(*, 239.0.0.2), 00:01:02/00:01:57, RP 172.16.2.1, flags: SJC | ||
Incoming interface: FastEthernet0/1, RPF nbr 172.16.2.1 | ||
Outgoing interface list: | ||
Vlan1, Forward/Sparse, 00:01:03/00:01:57 | ||
(*, 239.0.0.3), 00:00:58/00:02:57, RP 172.16.2.1, flags: SJC | ||
Incoming interface: FastEthernet0/1, RPF nbr 172.16.2.1 | ||
Outgoing interface list: | ||
Vlan1, Forward/Sparse, 00:00:58/00:02:57 | ||
Vlan2, Forward/Sparse, 00:00:58/00:02:57 | ||
(*, 239.0.0.4), 00:00:04/stopped, RP 172.16.2.1, flags: SPF | ||
Incoming interface: FastEthernet0/1, RPF nbr 172.16.2.1 | ||
Outgoing interface list: Null | ||
(192.168.2.44, 239.0.0.5), 00:00:07/00:02:58, flags: FT | ||
Incoming interface: Vlan1, RPF nbr 0.0.0.0, Registering | ||
Outgoing interface list: | ||
FastEthernet0/1, Forward/Dense, 00:00:07/00:00:00 | ||
(*, 239.0.0.6), 00:02:36/00:02:25, RP 172.16.2.1, flags: SJPCL | ||
Incoming interface: FastEthernet0/1, RPF nbr 172.16.2.1 | ||
Outgoing interface list: Null |