Medianet - Video Monitoring #1

Blog

Feb 13, 2011 8:48 PM
Feb 13th, 2011

Medianet Blog: #1

Medianet Video Monitoring - Performance Monitor introduction

This Blog is one of many in which we will introduce Cisco's Medianet features to our followers on a bi-monthly basis.  We would like to begin with the Medianet Video Monitoring feature called Performance Monitoring.

What is Medianet?
Medianet is a framework of features which will enable today's critical media applications the infrastructure which supports different models of media optimization and delivery to a converged IP network.  There are various types of media applications today which require specific demands on network infrastructure components.  Applications such as streaming and broadcast types of video applications such as digital signage, video on demand (VoD), and video surveillance. Enterprises face many challenges as they prepare their networks for video adoption. Unlike voice, video is more bursty and bandwidth-intensive, and it is more sensitive to delay, jitter, and packet loss. This leds to our Medianet topic Performance monitor.

Performance-monitor is a Cisco IOS feature that measures various media flows packet performance, generates SNMP and Syslog alerts based on user-defineable quality thresholds, and can report on multiple management interfaces.  When performance monitoring is enabled on a standalone router it can measure ingress and egress media flow performance on a particular interface or service policy.  When video performance measurements for a specific flow is collected across multiple routers, the results of the output from each device can be analyzed and define how video flows perform across each network hop.

Let's walk through some basic configurations this will help illustrate how to configure Performance Monitoring (Perf-Mon) and the results it provides.  The simple diagram below shows a simple IP network where an IP camera is sending streaming video to a PC host which is viewing the Video stream live.  Note that the IP camera the sending UDP/RTP packets using a DSCP = CS5 and this media is uni-directional as noted by the red arrow.

Perf-Mon_image1.GIF

Performance Monitoring Guidelines

There are two methods to configure medianet performance monitoring where each method is intended to be configured in different type of operational support scenarios.

Performance Monitoring Configuration methods

    * Quick Inline
    * Flexible Traffic Selection

Both methods address five basic performance implementation requirements.  These requirements are listed here as questions that can be interpreted to configuration commands.

    * What traffic type will be monitored?
    * What metrics should be collected about the traffic flow?
    * Where on the network should the traffic flows be monitored?
    * What the thresholds that defines the service level agreements?
    * How will the performance metrics be reported?

Performance Monitoring - Quick Inline

The quick inline method to configuring performance monitoring on a router can best be implemented in a adhoc situation where a video flows performance must be determined on a specific router interface.  Administrators can isolate a video traffic flow to diagnose the performance on their ip network.

The commands on R1 shown below measures ingress traffic that is marked with DSCP cs5, EF or AF41 on R1's G0/0 interface .  The default-rtp flow record defines the metrics to be collected for RTP streams. The flow record can be custom defined or configured to reference a default flow record. In addition, the jitter average threshold metrics is configured to raise an "error" alert and will generate a syslog message (or SNMP) if the RTP packet loss is greater than 10%.


interface GigabitEthernet0/0
service-policy type performance-monitor inline input
  match  dscp af41  cs5  ef
   flow monitor inline
    record default-rtp
   react 1 transport-packets-lost-rate
    threshold value gt 10
    alarm severity error
    action syslog
    action snmp

   
Flexible Traffic Selection

The flexible traffic configuration method uses class-maps to allow operators to measure specific video traffic flows based on layer 3, layer 4, DSCP values, protocol types and other various types of traffic classification schemes.  This method allows system designers to define a consistent strategy to measure video traffic performance across an IP network.  Administrators can defined IP video surveillance, Telepresence, voice, TCP application such as Webex, and video traffic class maps on R2 based on DSCP CS5 markings that will be used for measuring video performance.

class-map match-any af41
match access-group name vlc
class-map match-all IPVS-CS5
match  dscp cs5
class-map match-all IPVS-traffic-http
match  dscp cs5
class-map match-all TP-video-AF41
match  dscp af41
class-map match-all Voice-EF
match  dscp ef

A performance monitoring policy map on R2 defines the monitoring interval and type of metrics that will be collected for each flow. In addition, the policy map is configured to trigger a syslog and snmp alert if performance metrics exceed the predefined thresholds. The "exporter" keyword sends netflow records to the optional LiveAction netflow collector which provides real-time and historical Network Mgt feature.


policy-map type performance-monitor All-Media
class IPVS-CS5
  flow monitor inline
   record default-rtp
   exporter LiveAction-PC1
  monitor parameters
   interval duration 60
   history 60
   flows 16
  monitor metric rtp
   min-sequential 10
   max-dropout 20
   max-reorder 20
   clock-rate 96 30000
  react 1 transport-packets-lost-rate
   threshold value gt 3.00
   alarm severity error
   action syslog
   action snmp
class Voice-EF
  flow monitor inline
   record default-rtp
   exporter LiveAction-PC1
  react 2 transport-packets-lost-rate
   threshold value gt 5.00
   alarm severity error
   action syslog
class IPVS-traffic-http
  flow monitor inline
   record default-tcp
   exporter LiveAction-PC1
class TP-video-AF41
  flow monitor inline
   record default-rtp
   exporter LiveAction-PC1
  react 3 transport-packets-lost-rate
   threshold value gt 5.00
   alarm severity error
   action syslog

To identify video flow performance for ingress and egress traffic, an administrators applies the performance monitor policy on R2's G0/0 and G0/1 interface.

interface g0/1 
service-policy type performance-monitor input All-Media
interface g0/0
service-policy type performance-monitor output All-Media


Performance Monitoring Validation Commands

Show commands on both R1 and R2 can verify the performance monitoring configuration from the previous steps.  The show commands allow users to view all media session on an interface or by filtering the display search by identifying a Media flow by its SSRC, IP address or by policy-map/class-map.  It is very help to narrow the search when many flows exist on the router being analyzed.


R1# show performance monitor ?
cache    Display metering cache for monitored traffic
clients  Displays information of media monitor dynamic clients
clock    Display RTP clock related information
history  Display history intervals for monitored traffic
status   Display status of monitored traffic

R1# show performance monitor status ?
interface     Limit the display to specific interface
ip               Filter by ip protocol
policy-map  Limit the display to specific policy-map
sort           Sort the entries by certain fields
ssrc           Filter by ssrc
tcp            Filter by tcp protocol
udp           Filter by udp protocol
|           Output modifiers


Below is an example of the show Perf-Mon output when applied the an interface g0/0.  Notice how the output shows both the IP camera media as well as the media from a voice call routeing through the interface.

R1#show perf monitor status interface gigabitEthernet0/0

Codes: *   - field is not configurable under flow record
       NA  - field is not applicable for configured parameters

Match: ipv4 src addr = 10.10.2.101, ipv4 dst addr = 10.10.1.210, ipv4 prot = udp, trns src port = 5000, trns dst port = 4312, SSRC = 1227918265
Policy: All-Media, Class: IPVS-CS5, Interface: GigabitEthernet0/0, Direction: input


*counter flow                                       : 60
  counter bytes                                      : 1941575092
  counter bytes rate                           (Bps) : 539326
*counter bytes rate per flow                  (Bps) : 8988
*counter bytes rate per flow min              (Bps) : 537129
*counter bytes rate per flow max              (Bps) : 540622
  counter packets                                    : 1397650
*counter packets rate per flow                      : 6
  counter packets dropped                            : 0
  routing forwarding-status reason                   : Unknown
  interface input                                    : Gi0/0
  interface output                                   : Gi0/1
  monitor event                                      : false
  ipv4 dscp                                          : 40
  ipv4 ttl                                           : 60
  application media bytes counter                    : 0
  application media packets counter                  : 0
  application media bytes rate                 (Bps) : 531561
*application media bytes rate per flow        (Bps) : 8859
*application media bytes rate per flow min    (Bps) : 529433
*application media bytes rate per flow max    (Bps) : 532871
  application media packets rate               (pps) : 388
  application media event                            : Normal
*transport rtp flow count                           : 60
  transport rtp jitter mean                   (usec) : 5281
  transport rtp jitter minimum                (usec) : 0
  transport rtp jitter maximum                (usec) : 152193
*transport rtp payload type                         : 96
  transport event packet-loss counter                : 0
*transport event packet-loss counter min            : 0
*transport event packet-loss counter max            : 0
  transport packets expected counter                 : 1397650
  transport packets lost counter                     : 0
*transport packets lost counter minimum             : 0
*transport packets lost counter maximum             : 0
  transport packets lost rate                  ( % ) : 0.00
*transport packets lost rate min              ( % ) : 0.00
*transport packets lost rate max              ( % ) : 0.00


Match: ipv4 src addr = 10.10.2.100, ipv4 dst addr = 10.10.1.200, ipv4 prot = udp, trns src port = 27538, trns dst port = 22570, SSRC = 1566371281
Policy: All-Media, Class: Voice-EF, Interface: GigabitEthernet0/0, Direction: input


*counter flow                                       : 10
  counter bytes                                      : 3001600
  counter bytes rate                           (Bps) : 10005
*counter bytes rate per flow                  (Bps) : 1000
*counter bytes rate per flow min              (Bps) : 10000
*counter bytes rate per flow max              (Bps) : 10006
  counter packets                                    : 15008
*counter packets rate per flow                      : 5
  counter packets dropped                            : 0
  routing forwarding-status reason                   : Unknown
  interface input                                    : Gi0/0
  interface output                                   : Gi0/1
  monitor event                                      : false
  ipv4 dscp                                          : 46
  ipv4 ttl                                           : 60
  application media bytes counter                    : 0
  application media packets counter                  : 0
  application media bytes rate                 (Bps) : 9004
*application media bytes rate per flow        (Bps) : 900
*application media bytes rate per flow min    (Bps) : 9000
*application media bytes rate per flow max    (Bps) : 9006
  application media packets rate               (pps) : 50
  application media event                            : Normal
*transport rtp flow count                           : 10
  transport rtp jitter mean                   (usec) : 57
  transport rtp jitter minimum                (usec) : 0
  transport rtp jitter maximum                (usec) : 144443
*transport rtp payload type                         : 0
  transport event packet-loss counter                : 0
*transport event packet-loss counter min            : 0
*transport event packet-loss counter max            : 0
  transport packets expected counter                 : 15008
  transport packets lost counter                     : 0
*transport packets lost counter minimum             : 0
*transport packets lost counter maximum             : 0
  transport packets lost rate                  ( % ) : 0.00
*transport packets lost rate min              ( % ) : 0.00
*transport packets lost rate max              ( % ) : 0.00


Match: ipv4 src addr = 10.10.1.200, ipv4 dst addr = 10.10.2.100, ipv4 prot = udp, trns src port = 22570, trns dst port = 27538, SSRC = 722829170
Policy: All-Media, Class: Voice-EF, Interface: GigabitEthernet0/0, Direction: output


*counter flow                                       : 10
  counter bytes                                      : 3001600
  counter bytes rate                           (Bps) : 10005
*counter bytes rate per flow                  (Bps) : 1000
*counter bytes rate per flow min              (Bps) : 10000
*counter bytes rate per flow max              (Bps) : 10006
  counter packets                                    : 15008
*counter packets rate per flow                      : 5
  counter packets dropped                            : 0
  routing forwarding-status reason                   : Unknown
  interface input                                    : Gi0/1
  interface output                                   : Gi0/0
  monitor event                                      : false
  ipv4 dscp                                          : 46
  ipv4 ttl                                           : 63
  application media bytes counter                    : 0
  application media packets counter                  : 0
  application media bytes rate                 (Bps) : 9004
*application media bytes rate per flow        (Bps) : 900
*application media bytes rate per flow min    (Bps) : 9000
*application media bytes rate per flow max    (Bps) : 9006
  application media packets rate               (pps) : 50
  application media event                            : Normal
*transport rtp flow count                           : 10
  transport rtp jitter mean                   (usec) : 25
  transport rtp jitter minimum                (usec) : 0
  transport rtp jitter maximum                (usec) : 121662
*transport rtp payload type                         : 0
  transport event packet-loss counter                : 0
*transport event packet-loss counter min            : 0
*transport event packet-loss counter max            : 0
  transport packets expected counter                 : 15008
  transport packets lost counter                     : 0
*transport packets lost counter minimum             : 0
*transport packets lost counter maximum             : 0
  transport packets lost rate                  ( % ) : 0.00
*transport packets lost rate min              ( % ) : 0.00
*transport packets lost rate max              ( % ) : 0.00

R1#


Now let's filter our show Perf-Mon command to only display the IP camera media session;

R1#show performance monitor status policy-map All-Media class-map IPVS-CS5

Codes: *   - field is not configurable under flow record
       NA  - field is not applicable for configured parameters

Match: ipv4 src addr = 10.10.2.101, ipv4 dst addr = 10.10.1.210, ipv4 prot = udp, trns src port = 5000, trns dst port = 4312, SSRC = 1227918265
Policy: All-Media, Class: IPVS-CS5, Interface: GigabitEthernet0/0, Direction: input


*counter flow                                       : 26
  counter bytes                                      : 814701988
  counter bytes rate                           (Bps) : 522244
*counter bytes rate per flow                  (Bps) : 20086
*counter bytes rate per flow min              (Bps) : 79506
*counter bytes rate per flow max              (Bps) : 540629
  counter packets                                    : 586005
*counter packets rate per flow                      : 14
  counter packets dropped                            : 0
  routing forwarding-status reason                   : Unknown
  interface input                                    : Gi0/0
  interface output                                   : Gi0/1
  monitor event                                      : false
  ipv4 dscp                                          : 40
  ipv4 ttl                                           : 60
  application media bytes counter                    : 0
  application media packets counter                  : 0
  application media bytes rate                 (Bps) : 514731
*application media bytes rate per flow        (Bps) : 19797
*application media bytes rate per flow min    (Bps) : 78363
*application media bytes rate per flow max    (Bps) : 532860
  application media packets rate               (pps) : 375
  application media event                            : Normal
*transport rtp flow count                           : 26
  transport rtp jitter mean                   (usec) : 5520
  transport rtp jitter minimum                (usec) : 0
  transport rtp jitter maximum                (usec) : 141483
*transport rtp payload type                         : 96
  transport event packet-loss counter                : 454
*transport event packet-loss counter min            : 0
*transport event packet-loss counter max            : 287
  transport packets expected counter                 : 586510
  transport packets lost counter                     : 505
*transport packets lost counter minimum             : 0
*transport packets lost counter maximum             : 330
  transport packets lost rate                  ( % ) : 0.08
*transport packets lost rate min              ( % ) : 0.00
*transport packets lost rate max              ( % ) : 4.85

R1#


Medianet perf-mon CLI commands can also display packet performance over a specified time interval. Since the policy-map for IP Camera media specifies an interval duration of 60 sec and we want to view the packet performance over the last 5-min's, use the following command with interval 5. Notice that the packet loss begins during the 7:25AM measurement interval and the variable "monitor event" is set to TRUE. This monitor event TRUE is a signal that the React threshold set within the policy-map was exceeded and syslog messages were generated as a result.

#show performance monitor history interval 5 policy-map All-Media class-map IPVS-CS5

Codes: *   - field is not configurable under flow record
       NA  - field is not applicable for configured parameters

Match: ipv4 src addr = 10.10.2.101, ipv4 dst addr = 10.10.1.210, ipv4 prot = udp, trns src port = 5000, trns dst port = 4312, SSRC = 1227918265
Policy: All-Media, Class: IPVS-CS5, Interface: GigabitEthernet0/0, Direction: input

  start time                                           07:26:08     07:25:08     07:24:08     07:23:08     07:22:08   
                                                       ============ ============ ============ ============ ============
*history bucket number                              : 1            2            3            4            5          
*counter flow                                       : 1            1            1            1            1          
  counter bytes                                      : 27689K       29364K       32425K       32410K       32423K     
  counter bytes rate                           (Bps) : 461483       489410       540428       540173       540383     
*counter bytes rate per flow                  (Bps) : 461483       489410       540428       540173       540383     
*counter bytes rate per flow min              (Bps) : 461483       489410       540428       540173       540383     
*counter bytes rate per flow max              (Bps) : 461483       489410       540428       540173       540383     
  counter packets                                    : 20099        21320        23486        23486        23494      
*counter packets rate per flow                      : 334          355          391          391          391        
  counter packets dropped                            : 0            0            0            0            0          
  routing forwarding-status reason                   : Unknown      Unknown      Unknown      Unknown      Unknown    
  interface input                                    : Gi0/0        Gi0/0        Gi0/0        Gi0/0        Gi0/0      
  interface output                                   : Gi0/1        Gi0/1        Gi0/1        Gi0/1        Gi0/1      
  monitor event                                      : false        true         false        false        false      
  ipv4 dscp                                          : 40           40           40           40           40         
  ipv4 ttl                                           : 60           60           60           60           60         
  application media bytes counter                    : 27287K       28938K       31955K       31940K       31953K     
  application media packets counter                  : 20099        21320        23486        23486        23494      
  application media bytes rate                 (Bps) : 454783       482304       532599       532344       532552     
*application media bytes rate per flow        (Bps) : 454783       482304       532599       532344       532552     
*application media bytes rate per flow min    (Bps) : 454783       482304       532599       532344       532552     
*application media bytes rate per flow max    (Bps) : 454783       482304       532599       532344       532552     
  application media packets rate               (pps) : 334          355          391          391          391        
  application media event                            : Normal       Normal       Normal       Normal       Normal     
*transport rtp flow count                           : 1            1            1            1            1          
  transport rtp jitter mean                   (usec) : 26609        30225        6202         6265         4941       
  transport rtp jitter minimum                (usec) : 22           6            4            6            5          
  transport rtp jitter maximum                (usec) : 95964        91577        134692       40315        27136      
*transport rtp payload type                         : 96           96           96           96           96         
  transport event packet-loss counter                : 4753         3070         0            0            0          
*transport event packet-loss counter min            : 4753         3070         0            0            0          
*transport event packet-loss counter max            : 4753         3070         0            0            0          
  transport packets expected counter                 : 26806        25335        23486        23486        23494      
  transport packets lost counter                     : 6714         4015         0            0            0          
*transport packets lost counter minimum             : 6714         4015         0            0            0          
*transport packets lost counter maximum             : 6714         4015         0            0            0          
  transport packets lost rate                  ( % ) : 25.04        15.84        0.00         0.00         0.00       
*transport packets lost rate min              ( % ) : 25.04        15.84        0.00         0.00         0.00       
*transport packets lost rate max              ( % ) : 25.04        15.84        0.00         0.00         0.00      

R1#


A syslog message is generated by R1, as the packet loss threshold exceeds 3%.  This threshold value was set within the policy-map in the "React 1 transport-packets-lost-rate" statement.  The syslog message can be displayed in the R1 logs and system console.  The packet loss current value within the syslog message is the same value (15.84%) as the first Perf-Mon interval in which the threshold exceeded as shown below.

R1#
Nov  4 07:26:08 EST: %PERF_TRAFFIC_REACT-3-ERRSET: TCA RAISE.
Detailed info: Threshold value crossed - current value 15.84%
Flow info: src ip 10.87.93.154, dst ip 10.87.93.164
           src port 5000, dst port 4312
           ssrc 1227918265
Policy info: Policy-map All-Media, Class IPVS-CS5, Interface GigabitEthernet0/0, Direction input
React info: id 1, criteria transport-packets-lost-rate, severity error, alarm type discrete, threshold range (3.00%, 100.00%]

Note: The performance monitor counts all out-of-order packets as lost packets. This makes the Perf-mon packet loss measurement higher since the perf-mon packet loss count increases by the number of out-of-order packets. When using packet impairment generators to create packet loss and jitter conditions be sure to set the jitter to non-ordering mode. By not doing this you may measure packet loss rates much higher than the actual packet loss as determine at the far-end codec which has a dejitter buffer to re-order the packets in sequence.

Average Rating: 5 (1 ratings)

Comments

vijayasankarj Wed, 05/11/2011 - 02:44

Hi michael ,

                    Could you clarify me that how UDP protocol having  Jitter and all media values ???

                    Actually I thought that only RTP protocol will carry those values .

mpobrien Wed, 05/11/2011 - 03:13 (reply to vijayasankarj)

Hi Vijayasankar,

I think the point we are trying to make for this example of media type using an IP Camera uses an RTP stream which is encapsulated within a UDP packet. The Performance Monitor keys on the IP header protocol type UDP = 17 and does packet header inspection into the RTP header information to analyze packet loss and jitter for this media flow.  You our correct it UDP without an RTP packet does not provide useful information such as jitter.

vijayasankarj Sun, 09/25/2011 - 23:50 (reply to mpobrien)

Thank you michael I undestand,

         I have few more questions regarding medianet  ...

         First actaully I dont understand difference between application media bytes and usual counter bytes ? because in the snmp protocol itself I can view counter bytes as well as media bytes. How can the snmp protocol has media bytes ?

Second , if counter bytes is 100B and media bytes is 10B means it says 100B traffic with 10B of media. Am I right ? 

mpobrien Wed, 09/28/2011 - 14:40

Hi Vijayasankar,

Glad you are back for more INFO!  I have provided a link to the Media monitoring config guide as well as pasted some of the Perf-Mon Metric definitions as images below.  In a nut-shell "counter" metric track pkt activity for all flows within a given class-map and "application" metric tracks specific media sessions within a bundle of media flows which may match the same class-map but use different SSRC's.

http://www.cisco.com/en/US/docs/ios/media_monitoring/configuration/guide/mm_pasv_mon.html

Show_Perf-Mon_Stats_Table2.jpg

Show_Perf-Mon_Stats_Table2a.jpg

vijayasankarj Mon, 11/21/2011 - 02:44 (reply to mpobrien)

Hi Michale ,

                  As per the perf moniter definitions above :

                         counter bytes : total number of bytes collected by all flows

                         application media bytes : number of bytes for specific media stream

But you can see from the output below  , where application media bytes is greater that counter bytes.

How is that possible ?

Match: ipv4 src addr = 172.18.101.181, ipv4 dst addr = 172.18.2.101, ipv4 prot = icmp, trns dst port = 2048,

Policy: medianetpolicy, Class: class-default, Interface: FastEthernet0/1, Direction: input

  ipv4 source mask                                   : 16         

  ipv4 destination mask                              : 0          

*counter flow                                       : 4

  counter bytes                                      : 120

  counter packets                                    : 2

*counter packets rate per flow                      : 0

  routing forwarding-status reason                   : Unknown

  interface input                                    : Fa0/1

  interface output                                   : NA

  monitor event                                      : false

  ipv4 dscp                                          : 0

  ipv4 ttl                                           : 127

  application media bytes counter                    : 142

  application media packets counter                  : 1

eyu Mon, 11/21/2011 - 15:58 (reply to vijayasankarj)

Hi Vijayashankar,

Can you share the performance monitor configuration for this particular output?

Also, what is the specific type of packet for this traffic flow?

vijayasankarj Mon, 11/21/2011 - 21:34 (reply to eyu)

Yeah Sure eyu,

This is the policy-map which I have attached. I have attached default class for testing.

Policy Map type performance-monitor medianetpolicy

    Class class-default

      flow monitor medianetmonitor

      monitor parameters

        interval duration 40

        timeout 20

        history 4

        flows 40

      monitor metric rtp

        min-sequential 2

        max-dropout 2

        max-reorder 4

        clock-rate pcma 9600

        clock-rate default 90000

        ssrc maximum 20

And the flow record is :

    match ipv4 protocol

    match ipv4 source address

    match ipv4 destination address

    match transport source-port

    match transport destination-port

    collect routing forwarding-status

    collect ipv4 dscp

    collect ipv4 ttl

    collect ipv4 source mask

    collect ipv4 destination mask

    collect transport packets expected counter

    collect transport packets lost counter

    collect transport packets lost rate

    collect transport round-trip-time

    collect transport event packet-loss counter

    collect transport rtp jitter mean

    collect transport rtp jitter minimum

    collect transport rtp jitter maximum

    collect interface input

    collect interface output

    collect counter bytes

    collect counter packets

    collect timestamp interval

    collect application media bytes counter

    collect application media bytes rate

    collect application media packets counter

    collect application media packets rate

    collect application media event

    collect monitor event

And I have sent UDP packets for this traffic flow.


      

Actions

Login or Register to take actions

This Blog

Posted February 13, 2011 at 8:48 PM
Stats:
Comments:8 Avg. Rating:5
Views:2150   
Shares:0

Related Content

Blogs Leaderboard