Sample IP Multicast Network
PIM Dense Mode Configuration
PIM-DM Configuration on RT1, RT2, and RT3
The following commands are often used in lab environments where no multicast servers and receivers are configured. These can cause multicast traffic to flow to a network segment.
- Issue the ip igmp join-group {group-address} interface subcommand to configure a router to join and become a member of the specified group. Note that accepting multicast packets prevents the router from performing fast switching. Once the router become a multicast group member and supports the protocol that is being transmitted to the group, eg: ICMP Echo Request packets, it can respond to the requests addressed to the group.
- Issue the ip igmp static-group {group-address} interface subcommand to configure a router as a statically connected member of the specified group. The router does not accept the packets destined for the group, but only forwards them; hence, allows fast switching. The outgoing interface appears in the IGMP cache, but the router itself is not a member, as evidenced by the lack of an L (local) flag in the multicast route entry, as shown in the show ip mroute EXEC command.
Below shows the status of RT1 upon PC1 joining the multicast group 224.11.22.33:
RT1#sh ip igmp groups IGMP Connected Group Membership Group Address Interface Uptime Expires Last Reporter 224.0.1.40 FastEthernet0/0 00:07:16 00:02:53 192.168.1.1 RT1# ====================================================================== PC1#conf t Enter configuration commands, one per line. End with CNTL/Z. PC1(config)#int fa0/0 PC1(config-if)#ip igmp join-group 224.11.22.33 PC1(config-if)#do sh ip igmp groups IGMP Connected Group Membership Group Address Interface Uptime Expires Last Reporter 224.11.22.33 FastEthernet0/0 00:00:30 stopped 192.168.1.11 PC1(config-if)# ====================================================================== RT1#sh ip igmp groups IGMP Connected Group Membership Group Address Interface Uptime Expires Last Reporter 224.11.22.33 FastEthernet0/0 00:00:09 00:02:50 192.168.1.11 224.0.1.40 FastEthernet0/0 00:07:37 00:02:32 192.168.1.1 RT1# RT1#sh ip mroute 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 Outgoing interface flags: H - Hardware switched, A - Assert winner Timers: Uptime/Expires Interface state: Interface, Next-Hop or VCD, State/Mode (*, 224.11.22.33), 00:00:11/00:02:48, RP 0.0.0.0, flags: DC Incoming interface: Null, RPF nbr 0.0.0.0 Outgoing interface list: FastEthernet1/0, Forward/Dense, 00:00:11/00:00:00 FastEthernet0/0, Forward/Dense, 00:00:11/00:00:00 (*, 224.0.1.40), 00:07:09/00:02:29, RP 0.0.0.0, flags: DCL Incoming interface: Null, RPF nbr 0.0.0.0 Outgoing interface list: FastEthernet1/0, Forward/Dense, 00:06:03/00:00:00 FastEthernet0/0, Forward/Dense, 00:07:09/00:00:00 RT1#
Below shows that all members of the multicast group will reply the ICMP Echo Requests destined for the multicast group.
PC1#ping 224.11.22.33
Type escape sequence to abort.
Sending 1, 100-byte ICMP Echos to 224.11.22.33, timeout is 2 seconds:
Reply to request 0 from 192.168.1.11, 4 ms
Reply to request 0 from 192.168.2.22, 128 ms
Reply to request 0 from 192.168.3.33, 128 ms
PC1#
Enabling PIM on an interface also enables IGMPv2 operation on the interface. The ip igmp version {1 | 2 | 3} interface subcommand changes the IGMP version for a particular interface.
There are 2 versions of the PIM protocol – PIMv1 and PIMv2. PIMv2 is used on router interface by default. The ip pim version {1 | 2} interface subcommand changes the version.
The show ip mroute [group-addr] [summary] [count] [active [kbps]] EXEC command that displays the IP multicast routing table is the most useful command for determining the state of multicast sources and groups from the router perspective. It represents a part of the multicast distribution tree with an incoming interface and a list of outgoing interfaces. The summary keyword displays a one-line, abbreviated summary of each entry in the IP multicast routing table. The count keyword displays statistics about the group and source, including number of packets, packets per second, average packet size, and bytes per second. The active parameter displays the rate at which active sources are sending to multicast groups; active sources are those sending at the rate specified as the kbps value or higher (the default value is 4 kbps).
RT1#sh ip mroute summary 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 Outgoing interface flags: H - Hardware switched, A - Assert winner Timers: Uptime/Expires Interface state: Interface, Next-Hop or VCD, State/Mode (*, 224.11.22.33), 00:01:11/stopped, RP 0.0.0.0, OIF count: 2, flags: DC (192.168.1.11, 224.11.22.33), 00:00:08/00:02:59, OIF count: 1, flags: T (192.168.2.22, 224.11.22.33), 00:00:06/00:02:59, OIF count: 1, flags: T (192.168.3.33, 224.11.22.33), 00:00:04/00:02:59, OIF count: 1, flags: T (*, 224.0.1.40), 00:03:09/00:03:29, RP 0.0.0.0, OIF count: 2, flags: DCL RT1# RT1#sh ip mroute count IP Multicast Statistics 5 routes using 3074 bytes of memory 2 groups, 1.50 average sources per group Forwarding Counts: Pkt Count/Pkts per second/Avg Pkt Size/Kilobits per second Other counts: Total/RPF failed/Other drops(OIF-null, rate-limit etc) Group: 224.11.22.33, Source count: 3, Packets forwarded: 3, Packets received: 3 Source: 192.168.1.11/32, Forwarding: 1/0/100/0, Other: 1/0/0 Source: 192.168.2.22/32, Forwarding: 1/0/100/0, Other: 1/0/0 Source: 192.168.3.33/32, Forwarding: 1/0/100/0, Other: 1/0/0 Group: 224.0.1.40, Source count: 0, Packets forwarded: 0, Packets received: 0 RT1# RT1#sh ip mroute active Active IP Multicast Sources - sending >= 4 kbps Group: 224.11.22.33, (?) Source: 192.168.1.11 (?) Rate: 8 pps/6 kbps(1sec), 2 kbps(last 40 secs), 2 kbps(life avg) RT1#
Interpret the multicast forwarding entries in IP multicast forwarding table in the following way:
- (S, G) – For the source S sending to the group G; traffic is forwarded from the source via the shortest path. These entries typically reflect a source tree, but may also appear on a shared tree. (S, G) entries consume more router CPU and memory resources as there is an entry for each source and group pair. The multicast traffic is sent over the optimal path to each receiver, hence minimizing the delay in packet delivery.
- (*, G) – For any source (*) sending to the group G; traffic is forwarded via an RP for this group. These entries reflect a shared tree, but are also created for any existing (S, G) entry. (*, G) entries consume less router CPU and memory resources, but may result in suboptimal paths from a source to receivers, hence introducing extra delay in packet delivery.
RT1#sh ip pim interface Address Interface Ver/ Nbr Query DR DR Mode Count Intvl Prior 192.168.1.1 FastEthernet0/0 v2/D 0 30 1 192.168.1.1 12.12.12.1 FastEthernet1/0 v2/D 1 30 1 12.12.12.2 RT1# RT1#sh ip pim interface count State: * - Fast Switched, D - Distributed Fast Switched H - Hardware Switching Enabled Address Interface FS Mpackets In/Out 192.168.1.1 FastEthernet0/0 * 1/2 12.12.12.1 FastEthernet1/0 * 15/1 RT1# RT1#sh ip pim interface stats Interface Mpackets In Mpackets Out Octets In Octets Out Fa0/0 1 2 100 200 Fa1/0 15 1 980 100 RT1#Note: If all the routers on a multi-access link have the same priority (the default value is 1), highest IP address is the tiebreaker. Point-to-point links do not have DRs (shows 0.0.0.0). The PIM DR has 2 major responsibilities – send IGMP queries onto the LAN; and if PIM sparse mode is running, transmit PIM Join and Register messages to the RP.
The show ip pim neighbor [intf-type intf-num] EXEC command displays the PIM neighbors discovered by PIMv1 Router-Query messages or PIMv2 Hello messages.
RT1#sh ip pim neighbor
PIM Neighbor Table
Mode: B - Bidir Capable, DR - Designated Router, N - Default DR Priority,
S - State Refresh Capable
Neighbor Interface Uptime/Expires Ver DR
Address Prio/Mode
12.12.12.2 FastEthernet1/0 00:11:36/00:01:39 v2 1 / DR S
RT1#
The mrinfo [hostname | ip-addr] EXEC command displays information about multicast routers that are peering with the local router (if no address is specified) or with the specified router.
RT1#mrinfo 192.168.1.1 [version 12.3] [flags: PMA]: 192.168.1.1 -> 0.0.0.0 [1/0/pim/querier/leaf] 12.12.12.1 -> 12.12.12.2 [1/0/pim] RT1#The flags indicate the following:
P | Prune capable |
M | mtrace capable |
S | SNMP capable |
A | Auto-RP capable |
The Cisco IOS multicast traceroute tool – the mtrace {source-name | source-addr} [dest-name | dest-addr [group-name | group-addr]] EXEC command traces the path from a source to a destination branch for a multicast distribution tree. The trace request generated by the mtrace command is multicast to the multicast group to find the last hop router to the specified destination. The trace then follows the multicast path from destination to source by passing the mtrace request packet via unicast to each hop. Responses are unicast to the querying router by the first hop router to the source. This command can isolate multicast routing failures.
RT1#mtrace 192.168.1.11 192.168.1.11 224.11.22.33 Type escape sequence to abort. Mtrace from 192.168.1.11 to 192.168.1.11 via group 224.11.22.33 From source (?) to destination (?) Querying full reverse path... 0 192.168.1.11 -1 192.168.1.1 PIM [192.168.1.0/24] -2 192.168.1.11 RT1# RT1#mtrace 192.168.1.11 192.168.2.22 224.11.22.33 Type escape sequence to abort. Mtrace from 192.168.1.11 to 192.168.2.22 via group 224.11.22.33 From source (?) to destination (?) Querying full reverse path... 0 192.168.2.22 -1 12.12.12.2 PIM [192.168.1.0/24] -2 12.12.12.1 PIM [192.168.1.0/24] -3 192.168.1.11 RT1# RT1#mtrace 192.168.1.11 192.168.3.33 224.11.22.33 Type escape sequence to abort. Mtrace from 192.168.1.11 to 192.168.3.33 via group 224.11.22.33 From source (?) to destination (?) Querying full reverse path... 0 192.168.3.33 -1 23.23.23.3 PIM [192.168.1.0/24] -2 23.23.23.2 PIM [192.168.1.0/24] -3 12.12.12.1 PIM [192.168.1.0/24] -4 192.168.1.11 RT1#
The mstat {source-name | source-addr} [dest-name | dest-addr [group-name | group-addr]] EXEC command displays IP multicast packet rate and loss information.
RT1#mstat VRF name: Source address or name: 192.168.1.11 Destination address or name: 192.168.2.22 Group address or name: 224.11.22.33 Multicast request TTL [64]: [Enter] Response address for mtrace: [Enter] Type escape sequence to abort. Mtrace from 192.168.1.11 to 192.168.2.22 via group 224.11.22.33 From source (?) to destination (?) Waiting to accumulate statistics...... Results after 10 seconds: Source Response Dest Packet Statistics For Only For Traffic 192.168.1.11 192.168.1.1 All Multicast Traffic From 192.168.1.11 | __/ rtt 27 ms Lost/Sent = Pct Rate To 224.11.22.33 v / hop 2435 ms --------------------- -------------------- 192.168.1.1 12.12.12.1 ? | ^ ttl 0 v | hop 0 ms -3/0 = --% 0 pps 0/0 = --% 0 pps 12.12.12.2 ? | \__ ttl 1 v \ hop -2 s 0 0 pps 0 0 pps 192.168.2.22 192.168.1.1 Receiver Query Source RT1#
PIM Sparse Mode Configuration
PIM-SM Configuration on RT1, RT2, and RT3
Below shows the IP multicast routing table on RT1 after PC1, PC2, and PC3 have ping 224.11.22.33.
RT1#sh ip mroute
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
Outgoing interface flags: H - Hardware switched, A - Assert winner
Timers: Uptime/Expires
Interface state: Interface, Next-Hop or VCD, State/Mode
(*, 224.11.22.33), 00:09:11/stopped, RP 192.168.2.1, flags: SJCF
Incoming interface: FastEthernet1/0, RPF nbr 12.12.12.2
Outgoing interface list:
FastEthernet0/0, Forward/Sparse, 00:09:11/00:02:55
(192.168.1.11, 224.11.22.33), 00:00:18/00:03:24, flags: FT
Incoming interface: FastEthernet0/0, RPF nbr 0.0.0.0, Registering
Outgoing interface list:
FastEthernet1/0, Forward/Sparse, 00:00:18/00:03:20, A
(192.168.2.22, 224.11.22.33), 00:00:48/00:02:54, flags: JT
Incoming interface: FastEthernet1/0, RPF nbr 12.12.12.2
Outgoing interface list:
FastEthernet0/0, Forward/Sparse, 00:00:48/00:02:55
(192.168.3.33, 224.11.22.33), 00:00:39/00:02:24, flags: JT
Incoming interface: FastEthernet1/0, RPF nbr 12.12.12.2
Outgoing interface list:
FastEthernet0/0, Forward/Sparse, 00:00:39/00:02:55
(*, 224.0.1.40), 00:10:28/00:02:53, RP 192.168.2.1, flags: SJCL
Incoming interface: FastEthernet1/0, RPF nbr 12.12.12.2
Outgoing interface list:
FastEthernet0/0, Forward/Sparse, 00:10:28/00:02:53
RT1#
The configuration above uses the ip pim rp-address {rp-addr} global configuration command to statically define RT2 as the RP for the multicast groups operating in PIM sparse mode.
Use the ip pim send-rp-announce {intf-type intf-num | ip-addr} scope {ttl} [group-list acl] global configuration command to use the Auto-RP mechanism to define a router as an RP and distribute Group-to-RP mappings. This command causes the router to send an Auto-RP announcement message to the well-known multicast group Cisco-RP-Announce (224.0.1.39) to announce the router as a candidate RP for the groups in the range described by the access list.
Use the ip pim send-rp-discovery [intf-type intf-num] scope {ttl} global configuration command to configure a router as an RP mapping agent. An RP mapping agent listens to the 224.0.1.39 multicast group to receives Auto-RP announcement messages, stores them into its local Group-to-RP mapping cache, uses the information in the Auto-RP announcement messages to elect the RP (highest IP address), and sends Auto-RP discovery messages to the 224.0.1.40 Cisco-RP-Discovery multicast group. Other PIM routers that join the 224.0.1.40 multicast group by default automatically discover the RP from the RP mapping agent and store the information about the RP in their local Group-to-RP mapping caches.
The ip pim spt-threshold {rate | infinity} [group-list acl] global configuration command configures when a PIM leaf router should switchover from the shared tree to the shortest path source tree in PIM sparse mode. When this command is not used, the PIM leaf router joins the shortest path source tree immediately after the first packet arrives from a new source. The infinity keyword indicates that the switchover will never occur – will use the shared tree. If a source sends at a rate ≥ the rate value (in kbps), a PIM join message is triggered toward the source to construct a source tree. When the traffic rate from the source drops below the threshold traffic rate, the leaf router will switch back to the shared tree and send a prune message toward the source. Specify an access list to define the multicast groups to which the threshold applies.
The RP for a multicast group operating in PIM sparse mode must be reachable and from the router. The show ip pim rp [group-name | group-addr] | mapping] EXEC command is often used to troubleshoot RP in addition to the standard tools, eg: unicast ping to check the RP reachability. This command displays RP information about active groups or as specified with the group name or group address. The mapping keyword displays the contents of the Group-to-RP mapping cache indicating which RP is active for which group range. The mapping cache is populated via the static RP assignments, Auto-RP, or BSR mechanisms. It contains detailed information such as the IP address of the router that distributed the information, or local when the source of the information is the local router that either has manual RP configuration or is a source of automatically distributed information, the mechanism by which the information was determined – Static, Auto-RP, or BSR; and whether the router is operating as a candidate RP, mapping agent, or BSR.
RT2#sh ip pim rp Group: 224.11.22.33, RP: 192.168.2.1, next RP-reachable in 00:00:59 Group: 224.0.1.40, RP: 192.168.2.1, next RP-reachable in 00:00:59 RT2# RT2#sh ip pim rp mapping PIM Group-to-RP Mappings Group(s): 224.0.0.0/4, Static RP: 192.168.2.1 (?) RT2#
The show ip rpf {ip-addr | name} EXEC command displays RPF information for the RP or any source specified. The specified address is not necessarily to be a currently active source. Specifying the address of the RP is useful in determining the RPF information for the shared tree.
RT2#sh ip rpf 192.168.2.1 RPF information for ? (192.168.2.1) RPF interface: FastEthernet0/0 RPF neighbor: ? (192.168.2.1) - directly connected RPF route/mask: 192.168.2.0/24 RPF type: unicast (connected) RPF recursion count: 0 Doing distance-preferred lookups across tables RT2# RT2#sh ip rpf 192.168.1.11 RPF information for ? (192.168.1.11) RPF interface: FastEthernet1/0 RPF neighbor: ? (12.12.12.1) RPF route/mask: 192.168.1.0/24 RPF type: unicast (eigrp 100) RPF recursion count: 0 Doing distance-preferred lookups across tables RT2#
The RPF interface is the interface in the direction of the source or RP; while the RPF neighbor is the address of the next-hop router in the direction of the source or RP. The RPF type indicates the source of RPF information; unicast indicates that the information was derived from the unicast routing table; other RPF types include DVMRP, Multiprotocol Border Gateway Protocol (MBGP) Extensions for IP Multicast, or static. RPF information is essential in multicast routing, and requires attention when inspecting the PIM-SM information because of the possible coexistence of shared and source trees.
IGMP Snooping
IGMP snooping is enabled on all switch ports and VLAN interfaces by default on Cisco Catalyst switch platforms that support it. The [no] ip igmp snooping global configuration command enable or disable IGMP snooping respectively.
Below shows the output of the show ip igmp snooping EXEC command on a Catalyst 2950. It displays the IGMP snooping configuration of the switch.
Switch#sh ip igmp snooping
Global IGMP Snooping configuration:
-----------------------------------
IGMP snooping : Enabled
IGMPv3 snooping (minimal) : Enabled
Report suppression : Enabled
TCN solicit query : Disabled
TCN flood query count : 2
Last member query interval : 1000
Vlan 1:
--------
IGMP snooping : Enabled
Immediate leave : Disabled
Multicast router learning mode : pim-dvmrp
Source only learning age timer : 10
Last member query interval : 1000
CGMP interoperability mode : IGMP_ONLY
Switch#
No comments:
Post a Comment