Wednesday, April 24, 2013

Misc Mcast-02

interesting debug command:
SW2#debug ip mpacket 238.1.1.1 detail
IP multicast packets debugging is on (detailed) for group 238.1.1.1
SW2#

mroute; multicast route info
The good old mroute command has some knobs that beats the 'debug' command in some situations.
R5#sh ip mroute count
IP Multicast Statistics
6 routes using 3528 bytes of memory
3 groups, 1.00 average sources per group
Forwarding Counts: Pkt Count/Pkts(neg(-) = Drops) per second/Avg Pkt Size/Kilobits per second
Other counts: Total/RPF failed/Other drops(OIF-null, rate-limit etc)

Group: 239.1.1.7, Source count: 3, Packets forwarded: 7, Packets received: 7
  RP-tree: Forwarding: 4/0/100/0, Other: 4/0/0
  Source: 150.1.10.10/32, Forwarding: 1/0/100/0, Other: 1/0/0
  Source: 155.1.10.10/32, Forwarding: 1/0/100/0, Other: 1/0/0
  Source: 155.1.108.10/32, Forwarding: 1/0/100/0, Other: 1/0/0

Group: 239.7.7.7, Source count: 0, Packets forwarded: 3, Packets received: 3
  RP-tree: Forwarding: 3/0/100/0, Other: 3/0/0

Group: 224.0.1.40, Source count: 0, Packets forwarded: 0, Packets received: 0
R5#


Here is the gory details.

Group:

Summary statistics for traffic on an IP multicast group G. This row is displayed only for non-SSM groups.

Forwarding Counts:

Statistics on the packets that are received and forwarded to at least one interface.

Note There is no specific command to clear only the forwarding counters; you can clear only the actual multicast forwarding state with the clear ip mroute command. Issuing this command will cause interruption of traffic forwarding.

Pkt Count/

Total number of packets received and forwarded since the multicast forwarding state to which this counter applies was created.

Pkts per second/

Number of packets received and forwarded per second. On an IP multicast fast-switching platform, this number is the number of packets during the last second. Other platforms may use a different approach to calculate this number. Please refer to the platform documentation for more information.

Avg Pkt Size/

Total number of bytes divided by the total number of packets for this multicast forwarding state. There is no direct display for the total number of bytes. You can calculate the total number of bytes by multiplying the average packet size by the packet count.

Kilobits per second

Bytes per second divided by packets per second divided by 1000. On an IP multicast fast switching platform, the number of packets per second is the number of packets during the last second. Other platforms may use a different approach to calculate this number. Please refer to the platform documentation for more information.

Other counts:

Statistics on the received packets. These counters include statistics about the packets received and forwarded and packets received but not forwarded.

Total/

Total number of packets received.

RPF failed/

Number of packets not forwarded due to a failed RPF or acceptance check (when bidir-PIM is configured).

Other drops(OIF-null, rate-limit etc)

Number of packets not forwarded for reasons other than an RPF or acceptance check (such as the OIF list was empty or because the packets were discarded because of a configuration, such as ip multicast rate-limit, was enabled).

Group:

Summary information about counters for (*, G) and the range of (S, G) states for one particular group G. The following RP-tree: and Source: output fields contain information about the individual states belonging to this group.

Note For SSM range groups, the Group: displays are statistical. All SSM range (S, G) states are individual, unrelated SSM channels.

Source count:

Number of (S, G) states for this group G. Individual (S, G) counters are detailed in the Source: output field rows.

Packets forwarded:

The sum of the packets detailed in the Forwarding Counts: fields for this IP multicast group G. This field is the sum of the RP-tree and all Source: fields for this group G.

Packets received:

The sum of packets detailed in the Other counts fields for this IP multicast group G. This field is the sum of the Other count: Pkt Count fields of the RP-tree: and Source: rows for this group G.

RP-tree:

Counters for the (*, G) state of this group G. These counters are displayed only for groups that have a forwarding mode that do not forward packets on the shared tree. These (*,G) groups are bidir-PIM and PIM-SM groups. There are no RP-tree displays for PIM-DM and SSM range groups.

Source:

Counters for an individual (S, G) state of this group G. There are no (S, G) states for bidir-PIM groups.

to quickly find out if OIF is null or not, or mode of the group, etc.
R5#sh ip mroute sum
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.1.1.7), 04:25:29/stopped, RP 150.1.8.8, OIF count: 1, flags: SJCF
  (150.1.10.10, 239.1.1.7), 00:00:05/00:02:55, OIF count: 1, flags: JT
  (155.1.10.10, 239.1.1.7), 00:00:05/00:02:55, OIF count: 1, flags: JT
  (155.1.108.10, 239.1.1.7), 00:00:05/00:02:55, OIF count: 1, flags: JT

(*, 239.7.7.7), 04:25:18/00:02:38, RP 150.1.10.10, OIF count: 1, flags: SF

(*, 224.0.1.40), 04:25:40/00:02:37, RP 0.0.0.0, OIF count: 1, flags: DCL

R5#

mstat; multicast statistics
SW1#mstat 150.1.10.10 150.1.7.7
Type escape sequence to abort.
Mtrace from 150.1.10.10 to 150.1.7.7 via RPF
From source (?) to destination (?)
Waiting to accumulate statistics......
Results after 10 seconds:

  Source        Response Dest   Packet Statistics For     Only For Traffic
150.1.10.10     155.1.37.7      All Multicast Traffic     From 150.1.10.10
     |       __/  rtt 83   ms   Lost/Sent = Pct  Rate     To 0.0.0.0
     v      /     hop 83   ms   ---------------------     --------------------

150.1.10.10     SW4

155.1.108.10    ?
     |     ^      ttl   0  
     v     |      hop 418  ms    -2/0 = --%      0 pps    0/0 = --%  0 pps
155.1.108.8    
SW2 
155.1.58.8      ?
     |     ^      ttl   1  
     v     |      hop -2   s     0/0 = --%      0 pps    0/0 = --%  0 pps
155.1.58.5      
R5  
155.1.0.5       ?
     |     ^      ttl   2  
     v     |      hop -12  s     0/0 = --%      0 pps    0/0 = --%  0 pps
155.1.0.3      
R3 
155.1.37.3      ?
     |     ^      ttl   3  
     v     |      hop 14   s     0/0 = --%      0 pps    0/0 = --%  0 pps
155.1.37.7     
SW1 
150.1.7.7       ?
     |      \__   ttl   4  
     v         \  hop 0    ms        0         0 pps           0    0 pps
150.1.7.7       155.1.37.7     
  Receiver      Query Source

SW1#

 mrinfo; multicast router info
 SW1#mrinfo 150.1.5.5
150.1.5.5 [version  12.4] [flags: PMA]:
  150.1.5.5 -> 0.0.0.0 [1/0/pim/querier/leaf]
  155.1.58.5 -> 155.1.58.8 [1/0/pim]
  155.1.45.5 -> 155.1.45.4 [1/0/pim]
  155.1.0.5 -> 155.1.0.2 [1/0/pim/querier]
  155.1.0.5 -> 155.1.0.1 [1/0/pim/querier]

SW1#mrinfo
155.1.7.7 [version  12.2] [flags: PMA]:
  155.1.7.7 -> 0.0.0.0 [1/0/pim/querier/leaf]
  155.1.67.7 -> 155.1.67.6 [1/0/pim/querier]
  155.1.79.7 -> 155.1.79.9 [1/0/pim]
  155.1.37.7 -> 0.0.0.0 [1/0/pim/querier/leaf]
  150.1.7.7 -> 0.0.0.0 [1/0/pim/querier/leaf]

SW1#


mtrace; multicast traceroute
SW1#mtrace 150.1.8.8
Type escape sequence to abort.
Mtrace from 150.1.8.8 to 155.1.37.7 via RPF
From source (?) to destination (?)
Querying full reverse path...
 0  155.1.37.7
-1  155.1.37.7 PIM  [150.1.8.0/24]
-2  155.1.37.3 PIM  [150.1.8.0/24]
-3  155.1.0.5 PIM  [150.1.8.0/24]
-4  155.1.58.8 PIM  [150.1.8.0/24]
-5  150.1.8.8
SW1#


rpf; reverse path forwarding check
R5#sh ip rpf 150.1.7.7
RPF information for ? (150.1.7.7)
  RPF interface: Serial0/0/0
  RPF neighbor: ? (155.1.0.3)
  RPF route/mask: 150.1.7.0/24
  RPF type: unicast (ospf 1)
  RPF recursion count: 0
  Doing distance-preferred lookups across tables
R5#



Possible sources of RPF information are:
  1. Unicast Routing Table, 
  2. MBGP routing table, 
  3. DVMRP routing table and 
  4. Static Mroute table. 
When you calculate the RPF interface, primarily administrative distance is used to determine exactly which source of information the RPF calculation is based on. The specific rules are
  • All preceding sources of RPF data are searched for a match on the source IP address. 
  • When using Shared Trees, the RP address is used instead of the source address.  
  • If more than one matching route is found, the route with the lowest administrative distance is used.   
  • If the admin distances are equal, then this order of preference is used: 
  1. Static mroutes  
  2. DVMRP routes   
  3. MBGP routes   
  4. Unicast routes 
 If multiple entries for a route occur within the same route table, the longest match route, longest subnet mask, is used.

No comments:

Post a Comment