- The DOCSIS Specifications
- Overview of the Cable Access Network
- DOCSIS Protocol Layers
- Example Upstream Bandwidth Allocation
- Quality of Service (QoS)
- Baseline Privacy Interface Plus
- Where Do We Go from Here?
Example Upstream Bandwidth Allocation
As we have seen, the process by which a cable modem obtains permission to transmit data upstream is far from trivial. In this section we will attempt to walk through the process slowly to be sure that we understand how the mechanism works.
The essential problem is that a number of modems share a single upstream channel (there are a number of upstream channels, and each channel can be treated independently, but even so, each upstream channel is shared by several modems). Therefore there has to be an arbitrated mechanism by which each modem can be assured of opportunities to transmit. The fact that all the modems share a notion of time, with themselves and their controlling CMTS, makes cooperation possible.
The upstream channel is treated as a sequence of contiguous minislots. The CMTS transmits (on the downstream channel) a MAC management message, the MAP message, that describes exactly how an upcoming series of minislots is to be used. Note that a malfunctioning cable modem that does not honor these commands will be quickly discovered and will be effectively shut down by the CMTS. (Unless, of course, the malfunction is so great that it fails to obey these commands as well. In such a circumstance, the CMTS should recognize what has happened and move traffic on to other channels; it should also notify the network operator of the problem so that, if nothing else can be done, the malfunctioning CM can be shut down manually.) However, it is possible for an individual to create a CM-like device that, when connected to a cable, either renders the cable useless or at least severely degrades performance (for example, by rapidly sweeping a powerful carrier in the frequency domain). This is a consequence of a shared pipe, and there is little that can be done to prevent such attacks.12
A typical MAP might grant some minislots for the exclusive use of particular modems that have indicated in prior Request frames that they have data ready to transmit requiring a number of minislots to transmit. It might also set aside some minislots for modems to use in contention mode and yet others that may be used only by new modems signaling that they wish to join the network. The scheduling algorithm is controlled entirely by the CMTS, and, in most cases, the CMTS will contain intelligence that allows the detailed scheduling to change as a function of the kind of traffic currently on the network. The exchange that occurs between modem and CMTS is shown in Figure 3-21. Figure 3-22 shows an example of how a MAP might allocate an upcoming series of minislots.
Figure 3-21 CM-CMTS Interaction Granting Upstream Bandwidth
Figure 3-22 Minislot Allocation in a DOCSIS MAP Message
Contention Resolution
The timing of all upstream signaling is under the control of the CMTS. In particular, the CMTS decides which minislots are allocated to a particular CM and which are subject to contention.
Data transmitted in a contention minislot are not guaranteed to arrive at the CMTS, since several CMs may simultaneously transmit within the minislot, in which case all their data will be lost. Data transmitted in a noncontention minislot are almost certain to arrive at the CM (barring problems with the low-level link), since only one CM is permitted to transmit in a noncontention minislot.
Contention minislots are, in a sense, "wasted" upstream bandwidth, since they (generally) are not used to send useful data. However, they are necessary since the only way of reserving guaranteed bandwidth for user data is by requesting noncontention minislotsand the mechanism for doing this is via messaging that is carried in contention minislots.
The optimum ratio of contention minislots to noncontention minislots is a function of the type of traffic being carried. If the upstream flows on a cable are mostly carrying telephony traffic, then the number of contention minislots may be decreased because the CMTS typically allocates fixed-bandwidth flows using an Unsolicited Grant mechanism, which requires very few contention minislots to operate (see Quality of Service).
On the other hand, if the flows are mostly best-effort data flows, then a relatively large number of contention minislots are needed because a relatively larger number of requests for upstream bandwidth need to be made because of the unpredictable nature of the traffic. The shorter and more bursty the data, the more contention mode minislots are needed. A well-designed CMTS will monitor the upstream traffic flow and frequently adjust the percentage of contention minislots so as to optimize the way that the upstream bandwidth is being used.
Since there is no guarantee that transmissions made in a contention minislot will be received (because of collisions), there has to be some mechanism to allow for CMs to retransmit contention data. The mechanism must also ensure that any two CMs, once they have transmitted into the same minislot and caused a collision, do not continue to do so. This is called contention resolution.
In every MAP message, the CMTS supplies a pair of values corresponding to an initial back-off window and a maximum back-off window to be used for contention resolution in the time period covered by the MAP (see Upstream Bandwidth Allocation Map). The values are presented as powers of two, such that a value of 5, for example, would indicate a back-off window of width 32.
When a CM transmits a packet in a contention minislot, it sets the width of a window to the value corresponding to the value of Data Backoff Start in the current MAP. At some time later it receives a MAP message from the CMTS (see the section "The MAP Message" for more details about this exchange). If the MAP indicates that the CMTS did not receive the modem's packet, the modem assumes that the packet was lost and begins its retransmission strategy.
The modem selects a random value in the range (0, window width 1). It then allows this number of retransmission opportunities to pass before it retransmits its request. For example, suppose that a CM has a current value for Data Backoff Start of 5. This means that the back-off window runs from zero to 31. It transmits a request, but suppose that the CM receives no response. The CM now randomly selects a number in the range (0, 31). Suppose that it selects 13. This means that the CM must allow 13 retransmission opportunities to pass before it retransmits its request. Assume that the first Request IE 13 in the MAP is for 5 requests. It must allow these to pass, and it still has 8 more to go. The next Request IE might be for 7 requests. It must allow these to pass as well. The next Request IE might be for 2 requests. It must remain silent for the first but will retransmit on the second.
If this transmission also fails to elicit a response, the CM doubles the length of the back-off window (to a maximum value controlled by the maximum back-off window allowed in the currently applicable MAP), generates a new random number within this window, lets that number of opportunities pass, and then retransmits.
The MAP Message
A MAP message contains an ordinary MAC management header, followed by a variable number of Information Elements (IEs) in the format given in Figure 3-23. IEs within a MAP message are ordered strictly according to time, as decribed by the time counter in the CMTS. Except for the first IE, the start time of an IE is (usually) inferred from the start time and duration of the prior IE. A null IE terminates the list of IEs.
Figure 3-23 MAP Information Elements
Each IE contains a 14-bit SID, a 4-bit type code and a 14-bit time offset. A SID of 0x3FFF indicates a broadcast intended for all CMs. Ordinary unicast SIDs are in the range 0x0001 to 0x1FFF and are used to describe a particular CM or a particular service within a particular CM. SIDs in the range 0x2000 to 0x3FF0 are used for multicast messages, which are used only for administrative purposes. SIDs in the range 0x3FF1 to 0x3FFE are used to describe contention minislots of various lengths, as shown in Table 3-6. The transmissions sent in a single contention-mode burst may not exceed 14 minislots in length. Therefore if a modem desires to transmit information that exceeds 14 minislots, it must do so in noncontention mode.
Note that the there is no practical difference between a "broadcast" message and a "multicast" message in this context. We preserve the difference in terminology merely because the DOCSIS specification does so. The basic idea is simple: The CMTS makes the list of available minislots known to all the cable modems. The following IEs are defined:
Request IE
Corresponds to intervals in which CMs may make requests for upstream bandwidth. The Request IE is usually broadcast, indicating that the marked minislots are considered to be contention minislots. If it is unicast to a particular modem, then only that modem may use the marked minislots to request upstream bandwidth.
Request/Data IE
Marks minislots that may be used either for requests for upstream bandwidth or to transmit short data packets that fit entirely within the allocated minislots. The value of the SID, which is typically a multicast SID, indicates exactly how the data may be sent, according to Table 3-6.
Table 3-6 Mapping of Multicast SIDs to Data Transmission Algorithms
SID |
Meaning |
0x0000 |
Broadcast |
0x3FFF |
Broadcast |
0x3FF1 |
Multicast; a CM may transmit at any minislot, but the transmission must fit entirely within a single minislot. |
0x3FF2 |
Multicast; a CM may start to transmit at minislot number 1, 3, 5 and so on, and the transmission must fit entirely within two minislots. |
0x3FF3 |
Multicast; a CM may start to transmit at minislot number 1, 4, 7 and so on, and the transmission must fit entirely within three minislots. |
... |
... |
0x3FFE |
Multicast; a CM may start to transmit at minislot number 1, 15, 29 and so on, and the transmission must fit entirely within 14 minislots. |
Since these minislots are contention minislots available for any CM to use, if a CM uses them to transmit data (as opposed to Requests), the transmitted data packets should request a data acknowledgement; otherwise the CM has no way to determine whether the information reached the CMTS.
Initial Maintenance IE
Provides an opportunity for new devices to join the network. Initial Maintenance grants are for relatively large numbers of minislots, as they must allow for the maximum possible round-trip delay, plus the time to transmit a Ranging Request message.
Station Maintenance IE
Allows CMs to perform periodic station maintenance, such as ranging or adjustments to power or frequency. Station Maintenance IEs may be either broadcast or unicast, depending on the policy of the network operator.
Null IE
The Null IE is used to mark the end of the list of allocated minislots.
Data Grant IEs
There are two kinds of Data Grant IEs: the Short Data Grant IE and, as you might guess, the Long Data Grant IE. Both of these IEs are used to allocate minislots for a CM to transmit data for which it has indicated (via a Request) a desire to transmit. The difference between a Short Data Grant and a Long Data Grant pertains to the physical layer: Short Data Grants are used for bursts whose length is less than the maximum burst size indicated in the Upstream Channel Descriptor (UCD); Long Data Grants are used for data that will exceed this length. Short Data Grants and Long Data Grants are effectively identical insofar as allocating upstream bandwidth is concerned.
A Data Grant IE may allocate a length of zero minislots, in which case it is a Data Grant Pending IE, and indicates to the CM that its request has been received but that no minislots have yet been allocated to it. Reception of a Data Grant Pending IE informs the CM that there is no need to repeat its request for upstream bandwidth. (Data Grant Pending IEs are placed after the Null IE that indicates the end of the allocated minislots.)
The Data Grant Pending IE is obviously useful when a large number of modems make more or less simultaneous requests for upstream bandwidth; the CMTS can acknowledge receipt of the requests without actually granting bandwidth.
Data Acknowledge IE
This simply indicates that a particular data PDU was received from a CM. Typically, this is issued in response to a request for acknowledgement that was contained in an upstream packet, and upstream packets typically only request acknowledgements when they are transmitted in contention minislots. Like Data Grant Pending IEs, Data Acknowledge IEs are placed after the Null IE.
Expansion IE
This is currently unused and is present merely to allow for extensibility.
A CM may make a request for upstream bandwidth during a minislot associated in the MAP with any one of the following: Request IE, Request/Data IE, Data Grant IE. The request indicates the SID for the flow that desires to transmit and the number or minislots being requested.
When a CMTS transmits a MAP containing upcoming minislot usage, it must do so sufficiently in advance of the first minislot mapped in the message to allow for the most distant CM in the network to receive and process the message before the map becomes operative. Typically, this requirement means that the CMTS must allow something of the order of a millisecond between the MAP transmission and the earliest minislot mapped in the message. Figure 3-24 shows the process of obtaining upstream bandwidth.
Figure 3-24 Example of a CM Obtaining Upstream Bandwidth
Suppose that a CMTS transmits, at time T1, a MAP whose first minislot is for time T2 and whose last minislot is at time T3. A particular CM whose propagation delay from the CMTS is d, receives this MAP message at some time T1' (= T1 1 d), prior to T2. Suppose now that sometime shortly after T2 the CM assembles a packet that it wishes to transmit. The CM does not immediately transmit the Request. In order to decrease the probability of collisions, it uses a strategy similar to that used for contention resolution. Using the value of the Data Backoff Start in the MAP, it generates a random number, n, of transmit opportunities that it must let pass (see Contention Resolution). It then scans the currently applicable MAP, looking for minislots in which it is permitted to transmit a request for sufficient upstream bandwidth to transmit the data packet. It allows n of them to pass and settles on the n11th, for time T5 in which to transmit its request.
The CM issues a request for the number of minislots needed to transmit the data at T4, where T4 = T5 d. However, since the Request IE was not directed at a particular CM, other modems may also transmit during the same minislot. Therefore our CM calculates a back-off timer as described in Contention Resolution, in case the CMTS does not receive the request.
To keep things simple, we will assume that the CMTS receives the request at T5 (the section "Contention Resolution" describes the back-off strategy if the CMTS does not receive it). The CMTS processes the request and (normally) will find time in the next MAP to schedule our CM's transmission. It allocates the correct number of minislots in the next MAP, whose starting time is T7; it transmits the map at time T6. Our CM receives the MAP at T6 1 d, scans it, and determines that it has been granted a transmit opportunity at T8. At T8 d, it transmits the data, which is received at the CMTS exactly at time T8.