The present invention is hereinafter further described in detail with reference to the accompanying drawings and embodiments.
To implement control of a service bandwidth based on a service priority, a processing module needs to extract priority information of a message first after receiving the message. The priority information can be extracted from an 802.1P area of a Virtual Local Area Network TAG (VLAN TAG) or from a Type of Service (TOS) area in an IP message, and the specific principle for extracting is that the priority information is extracted from the TOS area if the access device operates in a mode of third layer while the priority information is extracted from the 802.1P area if the access device operates in a mode of second layer. The CAR function which is performed based on a port (PVC) and priority in an access device can be activated or inactivated based on user's configuration. Thus, the bandwidth can be controlled based on the service priority no matter the user uses a single PVC or multiple PVCs.
For example, supposing that a user has applied for a bandwidth of 10 M and there are two access devices of user terminal. One is a Set Top Box (STB) and the other is a Personal Computer (PC). The STB establishes a PVC to an access device, thus can access the network as well as acquire the video service; while the PC establishes a PVC to the access device, thus can access the network, perform a voice communication and acquire the video service. The access device performs the CAR based on the service priority. Specifically, the voice communication is regarded as one kind of service and allocated with a bandwidth of, for example, 1 M; video service of the STB and that of the PC are regarded as another kind of service and allocated with a bandwidth of, for example, 6M; network accessing service of the STB and that of the PC are allocated with the remained bandwidth of 3M. With such an allocation of the bandwidth, various services would not take over the bandwidth with each other.
As shown in
As shown in
Step 901: reading mode information of an access device and extracting priority information of a message according to the mode information of the access device;
Step 902: reading information of the port and the frame length of the message;
Step 903: determining whether CAR functions based on each port are activated in the access device, performing step 904 if the CAR functions based on each port are activated in the access device, otherwise performing step 905;
Step 904: taking tokens from corresponding token bucket according to the information of the port and the priority;
Step 905; taking a token from a specified token bucket;
Step 906: comparing the byte number of the message with that corresponding to the token, if the byte number corresponding to the token is larger than that of the message, performing step 907, otherwise performing step 908;
Step 907: forwarding the message;
Step 908: discarding the message.
Choosing the priority information is mainly to choose the 802.1P area or the TOS area. The general choosing principle adopted is that the 802.1P area is chosen if the access device operates in a mode of the second layer while the TOS area is chosen if the access device operates in a mode of the third layer. Those discarded messages are passed to a statistical module to be processed. It is determined based on the port whether the port and priority based CAR has been activated, and a port based CAR processing is performed with a fixed choice of the port and priority 0 if the port and priority based CAR has not been activated. The method for choosing the fixed priority is not limited, that is to say, any one of priority 0 to priority 7 can be chosen and then what need to do is to configure corresponding parameters and to set the fixed token bucket module corresponding to a priority.
Though there is another PVC and priority based bandwidth limiting policy in an access though an Asymmetric Digital Subscriber Line (ADSL) or an Asynchronous Transfer Mode (ATM), this policy cannot be applied and only the port and priority based bandwidth control policy can be applied in an IP based access, such as an access though a VDSL2 or an Ethernet, because there is no PVC.
As shown in
As shown in
Step 1101: reading mode information of an access device and extracting priority information of a message according to the mode information of the access device;
Step 1102: reading information of the PVC and the frame length of the message;
Step 1103: determining whether CAR functions based on each PVC are activated in the access device, if the CAR functions based on each PVC are activated in the access device, performing step 1104, otherwise performing step 1105;
Step 1104: taking a token from corresponding token bucket according to the information of the PVC and the priority;
Step 1105: taking a token from a specified token bucket;
Step 1106; comparing the byte number of the message with that corresponding to the token, if the byte number corresponding to the token is larger than that of the message, performing step 1107, otherwise performing step 1108;
Step 1107: forwarding the message;
Step 1108: discarding the message.
According to situations of the 802.1P area and the TOS area, priorities are divided into priorities of 8 levels, that is, priority 0 to priority 7, in general. The number of the PVCs is determined based on the number of the PVCs supported by the device and is larger than the number of the ports. Each of the PVC and priority corresponds to an independent token bucket and thus the PVC and priority based bandwidth control can be implemented. Choosing the priority information is mainly to choose the 802.1P area or the TOS area. The general choosing principle is that the 802.1P area is chosen if the access device operates in a mode of the second layer while the TOS area is chosen as the priority area if the access device operates in a mode of the third layer. Those discarded messages are passed to a statistical module to be processed. It is determined according to configurations of the PVC whether the PVC and priority based CAR should be activated, and a PVC based CAR processing is performed with a fixed choice of the PVC and priority 0 if the port and priority based CAR has not been activated. The method for choosing a fixed priority is not limited, that is to say, any one of priority 0 to priority 7 can be chosen and then what need to do is to configure corresponding parameters and to set the fixed token bucket module corresponding to a priority.
Though the present invention has been illustrated and described by referring to preferred embodiments of the present invention, a skilled person in the art should understand that various changes can be made in its form and detail without departing from the spirit or scope of the present invention defined in the appended claims.
Number | Date | Country | Kind |
---|---|---|---|
200610060481.0 | Apr 2006 | CN | national |