Background technique
It is needed in the service applications such as video on demand, videoconference with Protocol Independent Multicast (PIM:ProtocolIndependent Multicast) agreement etc..PIM agreement can be divided into again Protocol Independent Multicast-dense mode (PIM-DM:Protocol Independent Multicast-Dense Mode) and Protocol independent multicast-sparse mode (PIM-SM:Protocol Independent Multicast-Sparse Mode).The application emphasis is related to PIM-SM, not reinflated descriptionPIM-DM。
In pim-sm domain, BootStrap Router (BSR:Boot Strap Router) is the higher management of pim-sm domain, oneThere can only be a BSR in a pim-sm domain, but multiple C-BSR (Candidate-BSR, candidate bsr) can be configured.In this way, oneDenier BSR breaks down, remaining C-BSR can generate new BSR by automatic election, so that it is guaranteed that business is from interrupting.
When the scale of pim-sm domain is smaller, the multicast information amount in pim-sm domain is accordingly also fewer, Ke YicongStatic state specifies one of PIM router to be used as candidate RP (C-RP) in each PIM router in pim-sm domain, is made by the C-RPIt is responsible for the multicast letter of all multicast groups in entire pim-sm domain for the corresponding RP of multicast group IP address all in entire pim-sm domainBreath forwarding;But in the more common scenario, the scale of pim-sm domain is all very big, merely by a PIM router as C-RP is the multicast information forwarding that cannot complete entire pim-sm domain, therefore can be from each PIM router middle finger in pim-sm domainFixed multiple PIM routers are as C-RP.
In pim-sm domain, it is multicast group address from numerous C-RP that each PIM router in the domain PIM, which uses identical algorithms,Corresponding RP is selected, specific algorithm is as follows:
Using Hash (Hash) function calculate cryptographic Hash, the value the greater win, if cryptographic Hash is identical, the address C-RP compared withBig person wins.
Wherein, the expression formula of hash function are as follows: Value (G, M, Ci)=(1103515245* ((1103515245* (G&M)+12345)XOR Ci)+12345)mod 231。
Wherein, Value is cryptographic Hash, and G is multicast group IP address, and M is hash mask length (Hash Mask Length),Ci is the IP address of C-RP, and & is indicated and operation, and XOR indicates XOR operation, and remainder is divided exactly in mod expression.
Finally, select only one as corresponding RP for multicast group IP address.
In pim-sm domain, a multicast group can only uniquely correspond to a RP.But because of all PIM routings in pim-sm domainDevice is that multicast group IP address selects RP using same rule, this will lead to as multiple same RP of multicast group selection, thus canIt has a problem that: if a C-RP (being denoted as C-RP1) has been chosen to the RP of multicast group 1, multicast group 2, at this point, C-RP1 be merely multicast group 1,2 forwarding multicast flow of multicast group burden it is overweight, if subsequent be selected as multicast group 3RP is responsible for the flux of multicast of forwarding multicasting group 3, this can increase flow forwarding burden of C-RP1, it is possible to lead to flow congestion andIt is dropped, and also results in other C-RP and be not fully utilized.
Summary of the invention
This application provides the method and apparatus for multicast group selection convergent point RP, select by multicast group of load balancing modeRP is selected, realizes the load balancing between each C-RP.
The technical scheme provided by the application includes:
A method of for multicast group selection convergent point RP, this method is applied to Protocol independent multicast-sparse mode PIM-PIM router in the domain SM, comprising:
Receive the Bootstrap message that BootStrap Router BSR is sent;
From parsed in Bootstrap message Bootstrap message carry pim-sm domain in all candidate RP bandwidth usage simultaneouslyIt stores to local, wherein when the used bandwidth of candidate RP is more than pre-set bandwidths thresholding, the bandwidth usage of candidate RP isFirst situation, when the used bandwidth of candidate RP is less than pre-set bandwidths thresholding, the bandwidth usage of candidate RP is secondSituation;
Video flowing is received, when also for the multicast group IP address of video flowing not selecting corresponding RP, from locally storedThe candidate RP with the second situation is determined in the bandwidth usage of each candidate RP, and the time determined is removed from the domain PIMSelecting in the remaining candidate RP except RP selects a candidate RP to select corresponding RP as multicast group IP address.
A method of for multicast group selection convergent point RP, this method is applied to Protocol independent multicast-sparse mode PIM-BootStrap Router BSR in the domain SM, comprising:
The notification packet that candidate RP is sent in pim-sm domain is received, whether identification notification packet carries the first situation mark,If so, determining that the bandwidth usage of candidate RP is the first situation, the first situation is for indicating the used bandwidth of candidate RPMore than pre-set bandwidths thresholding;If not, determining that the bandwidth usage of candidate RP is the second situation, the second situation is waited for indicatingThe used bandwidth of RP is selected to be less than pre-set bandwidths thresholding;
The bandwidth usage of candidate RP in pim-sm domain is carried and is broadcasted certainly in Bootstrap message and in pim-sm domainReport text.
A method of for multicast group selection convergent point RP, this method is applied to Protocol independent multicast-sparse mode PIM-Candidate RP in the domain SM, comprising:
The bandwidth usage of incoming interface in local each multicast (S, the G) list item of detection, when detecting at least one multicastWhen the used bandwidth of incoming interface is more than pre-set bandwidths thresholding in (S, G) list item, determine that the bandwidth usage of this candidate RP isFirst situation, when the used bandwidth of the incoming interface for detecting any one multicast group list item is less than pre-set bandwidths thresholding,The bandwidth usage for determining this candidate RP is the second situation;
It, will if the bandwidth usage of candidate RP is the first situation at this time when reaching in the period for sending notification packetFirst situation mark carry in notification packet and unicast be sent to the BootStrap Router BSR in pim-sm domain, if this whenThe bandwidth usage for selecting RP is the second situation, and the BootStrap Router BSR unicast transmission into pim-sm domain does not carry the first feelingsThe notification packet of condition mark.
A kind of device for multicast group selection convergent point RP, the device are applied to Protocol independent multicast-sparse mode PIM-PIM router in the domain SM, comprising:
Receiving unit, for receiving the Bootstrap message of BootStrap Router BSR transmission;
Resolution unit, the band for all candidate RP from the pim-sm domain for parsing Bootstrap message carrying in Bootstrap messageWide service condition is simultaneously stored to local, wherein when the used bandwidth of candidate RP is more than pre-set bandwidths thresholding, the band of candidate RPWide service condition is the first situation, and when the used bandwidth of candidate RP is less than pre-set bandwidths thresholding, the bandwidth of candidate RP makesIt is the second situation with situation;
Selecting unit, for also not for received video flowing multicast group IP address select corresponding RP when, from localThe candidate RP with the second situation is determined in the bandwidth usage of stored each candidate RP, from the domain PIM really except thisA candidate RP is selected to select corresponding RP as multicast group IP address in remaining candidate RP except the candidate RP made.
A kind of device for multicast group selection convergent point RP, the device are applied to Protocol independent multicast-sparse mode PIM-BootStrap Router BSR in the domain SM, comprising:
Receiving unit, for receiving the notification packet that candidate RP is sent in pim-sm domain;
Recognition unit, whether notification packet carries the first situation mark for identification, if so, determining the bandwidth of candidate RPService condition is the first situation, and the first situation is for indicating that the used bandwidth of candidate RP is more than pre-set bandwidths thresholding;If not,The bandwidth usage for determining candidate RP is the second situation, and the second situation is pre- for indicating that the used bandwidth of candidate RP is less thanIf bandwidth threshold;
Transmission unit, for carrying the bandwidth usage of candidate RP in pim-sm domain in Bootstrap message and in PIM-SM broadcasts Bootstrap message in domain.
A kind of device for multicast group selection convergent point RP, the device are applied to Protocol independent multicast-sparse mode PIM-Candidate RP in the domain SM, comprising:
Detection unit, for detecting the bandwidth usage of incoming interface in local each multicast (S, G) list item;
Determination unit, for detecting the used band of incoming interface at least one multicast (S, G) list item when detection unitWhen width is more than pre-set bandwidths thresholding, the bandwidth usage of this candidate RP is determined for the first situation, when detecting any one groupWhen broadcasting the used bandwidth of incoming interface of group list item and being less than pre-set bandwidths thresholding, determine that the bandwidth usage of this candidate RP isSecond situation;
Transmission unit, when for being reached in the period for sending notification packet, if the bandwidth usage of candidate RP at this timeFor the first situation, the first situation mark is carried in notification packet and unicast is sent to the BootStrap Router in pim-sm domainBSR, the BootStrap Router BSR unicast hair if the bandwidth usage of candidate RP is the second situation at this time, into pim-sm domainSend the notification packet for not carrying the first situation mark.
As can be seen from the above technical solutions, in the present invention, PIM router is the selection of multicast group IP address in pim-sm domainWhen corresponding RP, the bandwidth usage for excluding C-RP is that (i.e. the used bandwidth of C-RP is more than pre-set bandwidths door to the second situationThe case where limit) C-RP, select corresponding RP from remaining C-RP for multicast group IP address, this can make other C-RP (It is lower than pre-set bandwidths thresholding using bandwidth) it is selected as the chance increase that multicast group IP address selects corresponding RP, reach with load pointLoad mode is multicast group selection RP, realizes the purpose of load balancing between each C-RP.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer, right in the following with reference to the drawings and specific embodimentsThe present invention is described in detail.
Referring to Fig. 1, Fig. 1 is method flow diagram provided by the invention.The process is applied to there are multiple C- in pim-sm domainIn the networking of RP.
As shown in Figure 1, the process can comprise the following steps that
Step 101, the bandwidth of incoming interface uses feelings in every local each multicast (S, G) list item of C-RP detection in the domain PIMCondition determines this when detecting when bandwidth having been used to be more than pre-set bandwidths thresholding of incoming interface at least one multicast (S, G) list itemThe bandwidth usage of C-RP is the first situation, when detect incoming interface in any one multicast (S, G) list item has used bandWhen width is less than pre-set bandwidths thresholding, determine that the bandwidth usage of this C-RP is the second situation.
That is, the bandwidth usage of C-RP is that the first situation refers to that the used bandwidth of C-RP is more than pre- in the present inventionIf the case where bandwidth threshold;The bandwidth usage of C-RP is that the second situation refers to that the used bandwidth of C-RP is less than default bandThe case where wide thresholding.Here pre-set bandwidths thresholding and above-mentioned pre-set bandwidths thresholding may be the same or different, and the present invention is notIt is specific to limit.
Step 102, every C-RP is when reaching in the period for sending notification packet in the domain PIM, if the band of this C-RP at this timeWide service condition is the first situation, and the first situation mark is carried in notification packet and unicast is sent in pim-sm domainBSR, if the bandwidth usage of this C-RP is the second situation at this time, the BSR unicast transmission into pim-sm domain does not carry theThe notification packet of one situation mark.
The notification packet that RFC2362 is defined is not carry the first above-mentioned situation to identify.It is fixed that Fig. 2 shows RFC2362The format of the notification packet of justice.In the present invention, when the bandwidth usage of C-RP is the first situation, to send this C-RPNotification packet carries the first situation mark and can be extended to notification packet shown in Fig. 2, specifically:
Reserved field (Reserved) in notification packet is extended, so that the reserved field Reserved after extensionCarry the first situation mark.
In the present invention, when the bandwidth usage of C-RP is the second situation, BSR unicast hair of the C-RP into pim-sm domainThe notification packet sent is the notification packet that RFC2362 is defined, and the Reserved of the notification packet of the transmission at this time does not have any expansionExhibition.
Step 103, BSR receives the notification packet that C-RP is sent in pim-sm domain, identifies whether the notification packet carries theOne situation mark, if so, determining that the bandwidth usage of the C-RP is the first situation, if not, determining the bandwidth of the C-RPService condition is the second situation.
Step 104, BSR carries the bandwidth usage of C-RP in pim-sm domain in Bootstrap message and in pim-sm domainMiddle broadcast Bootstrap message.
When specific implementation, BSR can be used the bandwidth of C-RP in pim-sm domain when reaching in the period for sending Bootstrap messageBootstrap message is broadcasted in situation carrying in Bootstrap message and in pim-sm domain.
The Bootstrap message that RFC2362 is defined is the bandwidth usage for not carrying C-RP.It is fixed that Fig. 3 shows RFC2362The format of the Bootstrap message of justice.It, can be to Fig. 3 institute to make Bootstrap message carry the bandwidth usage of C-RP applied in the present inventionThe Bootstrap message shown is extended, specifically:
Reserved field (Reserved) in Bootstrap message is extended, so that the reserved field Reserved after extensionCarry the bandwidth usage of C-RP.
Step 105, the PIM router in pim-sm domain receives the Bootstrap message that BSR is sent, and parses from Bootstrap messageBootstrap message carry pim-sm domain in all C-RP bandwidth usage and store to local.
The bandwidth usage of C-RP as defined above, then the bandwidth usage of C-RP here can be above-mentioned firstSituation, or be the second above-mentioned situation, which is not described herein again.
Step 106, the PIM router in pim-sm domain receives video flowing, be not also the multicast group IP address of video flowingWhen selecting corresponding RP, the C- with the second situation is determined from the bandwidth usage of locally stored each C-RPRP selects a C-RP to select as multicast group IP address from the remaining C-RP in the domain PIM in addition to the C-RP that this is determinedCorresponding RP.
In this step 106, a C-RP is selected to select corresponding RP specific as multicast group IP address from remaining C-RPThe algorithm as described in background technique can be used when realization, which is not described herein again.
As an embodiment of the present invention, in step 106, can may also there be following situations:
Situation 1 determines the C- for not providing the second situation from the bandwidth usage of locally stored each C-RPThe bandwidth usage of all C-RP is all the first situation in RP namely pim-sm domain;
Situation 2: the C-RP with the second situation is determined from the bandwidth usage of locally stored each C-RPFor C-RP all in pim-sm domain, i.e., the bandwidth usage of all C-RP is all the second situation in pim-sm domain.
Based on this, in the present invention, regardless of there is situation 1 or situation 2 in step 106, then following step can be further executedIt is rapid:
A C-RP is selected to select corresponding RP as multicast group IP address in all C-RP in pim-sm domain.
So far, process shown in FIG. 1 is completed.
Can be seen that PIM router in pim-sm domain by process shown in FIG. 1 is that the selection of multicast group IP address is correspondingWhen RP, the bandwidth usage for excluding C-RP is the C-RP of the second situation, is selected from remaining C-RP for multicast group IP addressCorresponding RP.As above be the defined below of the second situation for the bandwidth usage of C-RP: the bandwidth usage of C-RP isSecond situation refers to the case where used bandwidth of C-RP is more than pre-set bandwidths thresholding, then the available present invention will no longer makeMulticast group IP address is selected as with the C-RP that bandwidth is more than pre-set bandwidths thresholding and selects corresponding RP, this can make other C-RP(having used bandwidth lower than pre-set bandwidths thresholding) is selected as multicast group IP address and the chance of corresponding RP is selected to increase, and reaches to loadSharing mode is multicast group selection RP, realizes the purpose of load balancing between each C-RP.
Process shown in Fig. 1 is described below by a specific embodiment:
Referring to fig. 4, Fig. 4 is pim-sm domain networking diagram provided in an embodiment of the present invention.As shown in figure 4, PIM router(Router) 3, Router4, Router5, Router6 are designated as the C-RP of pim-sm domain, and Router2 is configured as PIM-SMThe BSR in domain.
Router3 detects the bandwidth usage of incoming interface in local each multicast (S, G) list item as C-RP, ifRouter3 detects that the bandwidth that used of incoming interface in local multicast (S, a G) list item is more than pre-set bandwidths thresholding, thenRouter3 determines that the bandwidth usage of this equipment is the first situation;Router3 send notification packet period reach when,First situation mark is carried in notification packet and unicast is sent to the Router2 as BSR.For ease of description, here willThe notification packet for the first situation of carrying mark that Router3 is sent is denoted as third message;
Router4 detects the bandwidth usage of incoming interface in local each multicast (S, G) list item as C-RP, ifWhat Router4 detected incoming interface in any one local multicast (S, G) list item is all less than pre-set bandwidths door using bandwidthLimit, then Router4 determine this equipment bandwidth usage be the second situation, Router4 send notification packet period toUp to when, unicast send notification packet to the Router2 as BSR.Here, the notification packet that Router4 is sent has RFC2362Prescribed form, for ease of description, the Router4 notification packet sent is denoted as the 4th message here;
Router5 detects the bandwidth usage of incoming interface in local each multicast (S, G) list item as C-RP, ifWhat Router5 detected incoming interface in local two multicast (S, G) list items has used bandwidth to be above pre-set bandwidths thresholding, thenRouter5 determines that the bandwidth usage of this equipment is the first situation;Router5 send notification packet period reach when,First situation mark is carried in notification packet and unicast is sent to the Router2 as BSR.For ease of description, here willThe notification packet for the first situation of carrying mark that Router5 is sent is denoted as the 5th message;
Router6 detects the bandwidth usage of incoming interface in local each multicast (S, G) list item as C-RP, ifWhat Router6 detected incoming interface in any one local multicast (S, G) list item is all less than pre-set bandwidths door using bandwidthLimit, then Router6 determine this equipment bandwidth usage be the second situation, Router6 send notification packet period toUp to when, unicast send notification packet to the Router2 as BSR.Here, the notification packet that Router6 is sent has RFC2362Prescribed form, for ease of description, the Router6 notification packet sent is denoted as the 6th message here;
Router2 receives third message as BSR, and discovery third message carries the first situation mark, it is determined that sends theThe bandwidth usage of the Router3 of three messages is that the first situation (indicates that the used bandwidth of Router3 is more than pre-set bandwidths doorLimit) and record to local;The 4th message is received, the 4th message of discovery does not carry the first situation mark, it is determined that sends the 4th reportThe bandwidth usage of the Router4 of text is that the second situation (indicates that the used bandwidth of Router4 is less than pre-set bandwidths doorLimit) and record to local;The 5th message is received, the 5th message of discovery carries the first situation mark, it is determined that sends the 5th messageRouter5 bandwidth usage be the first situation (indicate the used bandwidth of Router5 be more than pre-set bandwidths thresholding) simultaneouslyIt records to local;The 6th message is received, the 6th message of discovery does not carry the first situation mark, it is determined that sends the 6th messageThe bandwidth usage of Router6 be the second situation (indicate the used bandwidth of Router6 be less than pre-set bandwidths thresholding) simultaneouslyIt records to local.
BSR makes the bandwidth of the local Router3 to Router6 recorded when reaching in the period for sending Bootstrap messageBootstrap message is broadcasted in Bootstrap message and in pim-sm domain with situation carrying.
Router1, Router3 to 6 in the domain PIM receive Bootstrap message, parse Bootstrap message from Bootstrap message and takeThe bandwidth usage of the Router3 to 6 of band is simultaneously stored to local.
Router1 receives video flowing, when finding the multicast group IP address also unselected corresponding RP of video flowing, fromThe C-RP with the second situation is determined in the bandwidth usage of locally stored Router3 to 6, that is, is determinedRouter3, Router6 select one as multicast group IP address from the remaining C-RP in addition to Router3, Router6 and selectCorresponding RP selects one as multicast group IP address from Router4, Router5 and selects corresponding RP.BecauseThe used bandwidth of Router3, Router6 is more than pre-set bandwidths thresholding, so being here again the multicast group IP address of video flowingWhen selecting corresponding RP, just no longer Router3, Router6 are participated in selecting, to be again selected as Router3, Router6The corresponding RP of multicast group IP address of video flowing, is further aggravated the burden of Router3, Router6.Router2 to Router6The treatment process of video flowing is received similar to Router1, which is not described herein again.
So far, the specific descriptions of embodiment are completed.
Method provided by the invention is described above.The apparatus provided by the present invention will be described below:
Referring to Fig. 5, Fig. 5 is first device structure chart provided by the invention.It is sparse that the device is applied to Protocol Independent Multicast-PIM router in mode pim-sm domain, comprising:
Receiving unit, for receiving the Bootstrap message of BootStrap Router BSR transmission;
Resolution unit, the band for all candidate RP from the pim-sm domain for parsing Bootstrap message carrying in Bootstrap messageWide service condition is simultaneously stored to local, wherein when the used bandwidth of candidate RP is more than pre-set bandwidths thresholding, the band of candidate RPWide service condition is the first situation, and when the used bandwidth of candidate RP is less than pre-set bandwidths thresholding, the bandwidth of candidate RP makesIt is the second situation with situation;
Selecting unit, for also not for received video flowing multicast group IP address select corresponding RP when, from localThe candidate RP with the second situation is determined in the bandwidth usage of stored each candidate RP, from the domain PIM really except thisA candidate RP is selected to select corresponding RP as multicast group IP address in remaining candidate RP except the candidate RP made.
Preferably, selecting unit is when the bandwidth usage of all candidate RP is all the second situation in pim-sm domain, orPerson, when the bandwidth usage of all candidate RP is all the first situation in pim-sm domain, further from the institute in pim-sm domainHave and a candidate RP is selected to select corresponding RP as multicast group IP address in candidate RP.
So far, apparatus structure description shown in fig. 5 is completed.
Referring to Fig. 6, Fig. 6 is second device structure chart provided by the invention.It is sparse that the device is applied to Protocol Independent Multicast-BootStrap Router BSR in mode pim-sm domain, comprising:
Receiving unit, for receiving the notification packet that candidate RP is sent in pim-sm domain;
Recognition unit, whether notification packet carries the first situation mark for identification, if so, determining the bandwidth of candidate RPService condition is the first situation, and the first situation is for indicating that the used bandwidth of candidate RP is more than pre-set bandwidths thresholding;If not,The bandwidth usage for determining candidate RP is the second situation, and the second situation is pre- for indicating that the used bandwidth of candidate RP is less thanIf bandwidth threshold;
Transmission unit, for carrying the bandwidth usage of candidate RP in pim-sm domain in Bootstrap message and in PIM-SM broadcasts Bootstrap message in domain.
Here, the bandwidth usage of candidate RP all in pim-sm domain is carried in Bootstrap message and includes:
Reserved field in Bootstrap message is extended, is owned so that the reserved field after extension carries in pim-sm domainThe bandwidth usage of candidate RP.
So far, apparatus structure description shown in fig. 6 is completed.
Referring to Fig. 7, Fig. 7 is the third structure drawing of device provided by the invention.It is dilute that the device is applied to Protocol Independent Multicast-Dredge the candidate RP in mode pim-sm domain, comprising:
Detection unit, for detecting the bandwidth usage of incoming interface in local each multicast (S, G) list item;
Determination unit, for detecting the used band of incoming interface at least one multicast (S, G) list item when detection unitWhen width is more than pre-set bandwidths thresholding, the bandwidth usage of this candidate RP is determined for the first situation, when detecting any one groupWhen broadcasting the used bandwidth of incoming interface of group list item and being less than pre-set bandwidths thresholding, determine that the bandwidth usage of this candidate RP isSecond situation;
Transmission unit, when for being reached in the period for sending notification packet, if the bandwidth usage of candidate RP at this timeFor the first situation, the first situation mark is carried in notification packet and unicast is sent to the BootStrap Router in pim-sm domainBSR, the BootStrap Router BSR unicast hair if the bandwidth usage of candidate RP is the second situation at this time, into pim-sm domainSend the notification packet for not carrying the first situation mark.
Preferably, the first situation mark is carried in notification packet and includes:
Reserved field in notification packet is extended, so that the reserved field after extension carries the first situation mark.
So far, apparatus structure description shown in Fig. 7 is completed.
The above is merely preferred embodiments of the present invention, be not intended to limit the invention, it is all in spirit of the invention andWithin principle, any modification, equivalent substitution, improvement and etc. done be should be included within the scope of the present invention.