Defining a Multicast Bandwidth Map
Multicast interface-level admission control, port-level admission control, and QoS adjustment all use a single multicast bandwidth map. The multicast bandwidth map is a route map that uses the set admission-bandwidth, set qos-bandwidth, set admission-bandwidth adaptive, or set qos-bandwidth adaptive commands. The adaptive commands configure an autosense mechanism for measuring the multicast bandwidth.
Interface-level and port-level admission control is performed when an OIF on the interface or port is added to the mroute for a given (S,G) multicast data stream and the multicast bandwidth map contains a set admission-bandwidth or set admission-bandwidth adaptive action for that (S,G).
QoS adjustment is performed on the joining interface when an OIF is added to the mroute for a given (S,G) data stream and the multicast bandwidth map contains a set qos-bandwidth or set qos-bandwidth adaptive action for that (S,G).
You can prioritize the traffic by configuring a priority value for the <S, G> data stream on a physical port by issuing the set priority command. Dynamic multicast admission control enables only prioritized groups to join the interface after the configured priority limit is reached on the physical port. The system records the priority when a new <S, G> entry is created. For more information, see Enabling Port Admission Bandwidth Control
.Using the Autosense Mechanism
Video bandwidth is typically considered to be a constant rate2 Mbps for standard definition television (SDTV) and 10 Mbps for high definition television (HDTV). However, in reality, and depending on achievable video compression, the bit rate can vary. For example, HDTV streams (using MPEG4 or WM9 encoding) can vary between 6 Mbps (for low-action programs) to 10 Mbps (for a fast-paced, high-action programs). The autosense mechanism causes the bandwidth value, used for admission control and QoS adjustment, to be the actual measured rate of the stream. Using this feature to measure the actual bandwidth avoids the need to configure arbitrary bandwidth limits and enables a channel to be reassigned to a different (S, G) without requiring a bandwidth map to be changed.
How Adaptive Mode Works
You configure the auto-sense mechanism in the multicast bandwidth using the set admission-bandwidth adaptive command, set qos-bandwidth adaptive command, or both. For example:
host1(config)#route-map mcast-bandwidths permit 10host1(config-route-map)#match ip address sdtvhost1(config-route-map)#set admission-bandwidth adaptivehost1(config-route-map)#set qos-bandwidth adaptivehost1(config-route-map)#endIn this example, any stream with an (S,G) that matches the sdtv access list performs adaptive bandwidth detection for admission control and QoS adjustment.
A rate measurement mechanism runs on the ingress line card that polls the forwarding controller (FC) to obtain statistics for each mroute. This mechanism then reports the rate measurement to the SRP to update the bandwidth map. By computing the average bandwidth over a relatively short sampling period (T1; 5 seconds), the measurement approximates the peak bandwidth of the multicast stream.
As an example, assume that a new mroute (S1, G1) is added to the interface controller (IC) at time t0.
![]()
To calculate the measured bandwidth of a stream, the router uses the following equation:
R = Calculated bandwidth of the stream during each sampling interval
Nt = Bytes measured at the start of each sampling period (t seconds)
Nt+5 = Bytes measured at the end of each sampling period (t+5 seconds)
Using the previous graph as a reference, the first bandwidth rate (R1) is determined by calculating the number of bytes received during the first sampling period, T1. Mroute statistics are read at time t0 (N0) and at time t5 (N5) and the bytes received values are subtracted and divided by the sampling period T1 to yield the average rate. This process is repeated every sampling interval, T2, to yield rates R1, R2, R3, and so on.
The first two sampling interval calculations are as follows:
The router maintains a history of bandwidth measurements (H) for each mroute, up to a maximum of M measurements. The actual rate, R, reported to the SRP is the maximum rate measured in those H samples.
To minimize the IC to SRP traffic generated by the rate measurements, the IC reports a bandwidth change only when a newly computed rate (R#) differs from the current rate by a specified threshold. When Rs is computed at time t = 5 seconds, R is set to R1. A rate update occurs whenever a newly calculated rate (R) differs from R1 by at least a threshold value (specified as a percentage, P) of the measured peak bandwidth. This calculation is as follows:
R = Rt, if and only if the absolute value of (R - Rt) > P * R.
Table 5 lists values assigned to variables associated with this algorithm.
Multicast Bandwidth Map Example
The following example creates a multicast bandwidth map for both multicast traffic admission control and QoS adjustment:
NOTE: In this example, you can replace the set admission-bandwidth command and set qos-bandwidth command with their adaptive command counterparts.
- Define a route-map using the set admission-bandwidth and set qos-bandwidth commands. You can optionally issue the set priority command.
host1(config)#route-map mcast-bandwidths permit 10host1(config-route-map)#match ip address sdtvhost1(config-route-map)#set admission-bandwidth 2000000host1(config-route-map)#set qos-bandwidth 2000000host1(config-route-map)#set priority 100host1(config-route-map)#route-map mcast-bandwidths permit 20host1(config-route-map)#match ip address hdtvhost1(config-route-map)#set admission-bandwidth 10000000host1(config-route-map)#set qos-bandwidth 10000000host1(config-route-map)#set priority 200host1(config-route-map)#end- Define the access list for use by the match ip address command to match (S,G) and (*,G) entries.
host1(config)#access-list sdtv permit ip host 31.0.0.1 232.0.0.0 0.0.0.255host1(config)#access-list hdtv permit ip host 32.0.0.1 232.0.0.0 0.0.0.255host1(config)#access-list hdtv permit ip host 32.0.0.2 232.0.0.0 0.0.0.255host1(config-route-map)#end
NOTE: You can also define a prefix-list or a prefix-tree for use by the match ip address command to match (S,G) and (*,G) entries.
For additional information about configuring QoS adjustment, see Configuring Multicast QoS Adjustment.
For additional information about configuring interface-level and port-level admission control, see Blocking and Limiting Multicast Traffic.
For additional information about creating route maps, see JUNOSe IP Services Configuration Guide, Chapter 1, Configuring Routing Policy.
set admission-bandwidth
- Use to set a multicast bandwidth for admission control.
- Use the adaptive keyword to define the bandwidth as adaptive (automatically sensed).
- Example
host1(config-route-map)#set admission-bandwidth 2000000Use the no version to remove the set clause from a route map. set priority
- Use to configure a priority value for the <S, G> data stream on a physical port.
- Dynamic multicast admission control enables only prioritized groups to join the interface after the configured priority limit is reached on the physical port. The system records the priority when a new <S, G> entry is created.
- Example
host1(config-route-map)#set priority 100Use the no version to remove the priority value. set qos-bandwidth
- Use to set a multicast bandwidth for QoS adjustment.
- Use the adaptive keyword to define the bandwidth as adaptive (automatically sensed).
- Example
host1(config-route-map)#set qos-bandwidth 10000000Use the no version to remove the set clause from a route map.