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 auto-sense mechanism for measuring the multicast bandwidth.
Interface- 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).
Using the Auto-Sense 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 auto-sense mechanism allows 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
As mentioned above, 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 each determined time interval (t seconds)
Nt+5 = Bytes measured 5 seconds after each determined time interval (t seconds)
Using the earlier 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 time 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 would look like the following:
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.
In order 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 would look like the following:
R = Rt, if and only if the absolute value of (R - Rt) > P * R.
The values assigned to variables associated with this algorithm are as shown in Table 10.
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.
host1(config)#route-map mcast-bandwidths permit 10host1(config-route-map)#match ipv6 address sdtvhost1(config-route-map)#set admission-bandwidth 2000000host1(config-route-map)#set qos-bandwidth 2000000host1(config-route-map)#route-map mcast-bandwidths permit 20host1(config-route-map)#match ipv6 address hdtvhost1(config-route-map)#set admission-bandwidth 10000000host1(config-route-map)#set qos-bandwidth 10000000host1(config-route-map)#end- Define the access list for use by the match ipv6 address command to match (S,G) and (*,G) entries.
host1(config)#access-list sdtv permit ip host 31::1 ff3e::0/112host1(config)#access-list hdtv permit ip host 32::1 ff3e::0/112host1(config)#access-list hdtv permit ip host 32::2 ff3e::0/112host1(config-route-map)#end
NOTE: You can also define a prefix-list or a prefix-tree for use by the match ipv6 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- 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.