Summary of the invention
The application provides the method and apparatus of selecting convergent point RP for multicast group, in load balancing mode as groupBroadcast group selection RP, realize the load balancing between each C-RP.
The technical scheme that the application provides comprises:
For a method of multicast group selection convergent point RP, the method is applied to Protocol Independent Multicast-sparse mouldPIM router in formula pim-sm domain, comprising:
Receive the Bootstrap message that BootStrap Router BSR sends;
From Bootstrap message, parse the bandwidth of all candidate RP in the pim-sm domain that Bootstrap message carriesService condition is also stored to this locality, and wherein, the bandwidth having used as candidate RP exceedes pre-set bandwidths thresholdingTime, the bandwidth usage of candidate RP is the first situation, the bandwidth having used as candidate RP does not exceed in advanceIf when bandwidth threshold, the bandwidth usage of candidate RP is the second situation;
Receiver, video stream, in the time of RP corresponding to the multicast group IP address choice that be also video flowing, fromIn the bandwidth usage of each candidate RP that ground has been stored, determine the candidate RP with the second situation,In residue candidate RP the candidate RP determining except this, select a candidate RP from PIM territoryAs RP corresponding to multicast group IP address choice.
For a method of multicast group selection convergent point RP, the method is applied to Protocol Independent Multicast-sparse mouldBootStrap Router BSR in formula pim-sm domain, comprising:
Receive the notification packet that candidate RP sends in pim-sm domain, whether identification notification packet carries theOne situation mark, if so, the bandwidth usage of determining candidate RP is the first situation, the first situationFor representing that the bandwidth that candidate RP has used exceedes pre-set bandwidths thresholding; If not, determine candidate RPBandwidth usage be the second situation, the second situation is super for representing the bandwidth that candidate RP usedCross pre-set bandwidths thresholding;
The bandwidth usage of candidate RP in pim-sm domain is carried in Bootstrap message and at PIM-SMIn territory, broadcast Bootstrap message.
For a method of multicast group selection convergent point RP, the method is applied to Protocol Independent Multicast-sparse mouldCandidate RP in formula pim-sm domain, comprising:
Detect the bandwidth usage of incoming interface in local each multicast (S, G) list item, when detect toWhen the bandwidth that in a few multicast (S, G) list item, incoming interface has used exceedes pre-set bandwidths thresholding, determineThe bandwidth usage of this candidate RP is the first situation, when detecting entering of any one multicast group list itemWhen the bandwidth that interface has used does not exceed pre-set bandwidths thresholding, determine the bandwidth usage of this candidate RPIt is the second situation;
In the time that the cycle that sends notification packet arrives, if now the bandwidth usage of candidate RP is theOne situation, the first situation mark is carried in notification packet and clean culture send in pim-sm domain fromLift router BSR, if now the bandwidth usage of candidate RP is the second situation, to PIM-SMBootStrap Router BSR clean culture in territory sends the notification packet that does not carry the first situation mark.
For a device of multicast group selection convergent point RP, this application of installation is in Protocol Independent Multicast-sparse mouldPIM router in formula pim-sm domain, comprising:
Receiving element, the Bootstrap message sending for receiving BootStrap Router BSR;
Resolution unit, all for parsing from Bootstrap message the pim-sm domain that Bootstrap message carriesThe bandwidth usage of candidate RP is also stored to this locality, and wherein, the bandwidth having used as candidate RP exceedesWhen pre-set bandwidths thresholding, the bandwidth usage of candidate RP is the first situation, when candidate RP has usedWhen bandwidth does not exceed pre-set bandwidths thresholding, the bandwidth usage of candidate RP is the second situation;
Selected cell, at the RP corresponding to multicast group IP address choice of video flowing for receiving alsoTime, the bandwidth usage of each candidate RP having stored from this locality, determine and to there is the second situationCandidate RP, selects one in the residue candidate RP the candidate RP determining from PIM territory except thisCandidate RP is as RP corresponding to multicast group IP address choice.
For a device of multicast group selection convergent point RP, this application of installation is in Protocol Independent Multicast-sparse mouldBootStrap Router BSR in formula pim-sm domain, comprising:
Receiving element, the notification packet sending for receiving pim-sm domain candidate RP;
Whether recognition unit, carry the first situation mark for identifying notification packet, if so, determines and waitThe bandwidth usage that selects RP is the first situation, and the first situation is for representing the bandwidth that candidate RP has usedExceed pre-set bandwidths thresholding; If not, the bandwidth usage of determining candidate RP is the second situation, theTwo situations are for representing that the bandwidth that candidate RP has used does not exceed pre-set bandwidths thresholding;
Transmitting element, for being carried at the bandwidth usage of pim-sm domain candidate RP from reportIn literary composition and in pim-sm domain, broadcast Bootstrap message.
For a device of multicast group selection convergent point RP, this application of installation is in Protocol Independent Multicast-sparse mouldCandidate RP in formula pim-sm domain, comprising:
Detecting unit, uses feelings for detection of the bandwidth of incoming interface in local each multicast (S, G) list itemCondition;
Determining unit, for detecting incoming interface at least one multicast (S, G) list item when detecting unitWhen the bandwidth having used exceedes pre-set bandwidths thresholding, the bandwidth usage of determining this candidate RP is firstSituation, does not exceed pre-set bandwidths when detecting the bandwidth that the incoming interface of any one multicast group list item usedWhen thresholding, the bandwidth usage of determining this candidate RP is the second situation;
Transmitting element, in the time that the cycle that sends notification packet arrives, if the band of candidate RP nowWide service condition is the first situation, the first situation mark is carried in notification packet and clean culture sends toBootStrap Router BSR in pim-sm domain, if now the bandwidth usage of candidate RP is secondSituation, the BootStrap Router BSR clean culture in pim-sm domain sends logical that first situation of not carrying identifiesAccuse message.
As can be seen from the above technical solutions, in the present invention, in pim-sm domain, PIM router is multicast groupWhen RP corresponding to IP address choice, the bandwidth usage of getting rid of C-RP is that the second situation (is C-RPThe bandwidth having used exceedes the situation of pre-set bandwidths thresholding) C-RP, from remaining C-RP, be multicastRP corresponding to group IP address choice, this can make other C-RP, and (utilized bandwidth is lower than pre-set bandwidths doorLimit) chance that is chosen as the corresponding RP of multicast group IP address choice increases, reach taking load balancing mode asMulticast group is selected RP, realizes the object of load balancing between each C-RP.
Detailed description of the invention
In order to make the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing and concreteEmbodiment describes the present invention.
Referring to Fig. 1, Fig. 1 is method flow diagram provided by the invention. This flow process is applied in pim-sm domain depositsIn the networking of multiple C-RP.
As shown in Figure 1, this flow process can comprise the following steps:
Step 101, in PIM territory, each C-RP detects incoming interface in local each multicast (S, G) list itemBandwidth usage, when detecting the band of use of incoming interface at least one multicast (S, G) list itemWide while exceeding pre-set bandwidths thresholding, determine that the bandwidth usage of this C-RP is the first situation, work as detectionWhen the utilized bandwidth that goes out incoming interface in any one multicast (S, G) list item does not exceed pre-set bandwidths thresholding,The bandwidth usage of determining this C-RP is the second situation.
Also,, in the present invention, the bandwidth usage of C-RP is that the first situation refers to what C-RP had usedBandwidth exceedes the situation of pre-set bandwidths thresholding; The bandwidth usage of C-RP is that the second situation refers to C-RPThe bandwidth having used does not exceed the situation of pre-set bandwidths thresholding. The pre-set bandwidths thresholding here and above-mentioned pre-If bandwidth threshold can be identical also can be different, the present invention does not specifically limit.
Step 102, in PIM territory, each C-RP is in the time that the cycle that sends notification packet arrives, if nowThe bandwidth usage of this C-RP is the first situation, and the first situation mark is carried in notification packet alsoClean culture sends to the BSR in pim-sm domain, if now the bandwidth usage of this C-RP is secondSituation, the BSR clean culture in pim-sm domain sends the notification packet that does not carry the first situation mark.
The notification packet of RFC2362 definition is not carry the first above-mentioned situation mark. Fig. 2 showsThe form of the notification packet of RFC2362 definition. In the present invention, when the bandwidth usage of C-RP isWhen one situation, for the notification packet that this C-RP is sent carries the first situation mark can be to shown in Fig. 2Notification packet is expanded, specifically:
Reserved field in notification packet (Reserved) is expanded, so that writeeing down characters in advance after expansionSection Reserved carries the first situation mark.
In the present invention, in the time that the bandwidth usage of C-RP is the second situation, C-RP is to pim-sm domainIn the notification packet that sends of BSR clean culture be the notification packet of RFC2362 definition, now this transmissionThe Reserved of notification packet is without any expansion.
Step 103, BSR receives the notification packet that in pim-sm domain, C-RP sends, and identifies this notice reportWhether literary composition carries the first situation mark, and if so, the bandwidth usage of determining this C-RP is the first feelingsCondition, if not, the bandwidth usage of determining this C-RP is the second situation.
Step 104, the bandwidth usage of C-RP in pim-sm domain is carried at Bootstrap message by BSRIn and in pim-sm domain, broadcast Bootstrap message.
When specific implementation, BSR can be in the time that the cycle that sends Bootstrap message arrives, by pim-sm domainThe bandwidth usage of C-RP is carried at and in Bootstrap message and in pim-sm domain, broadcasts Bootstrap message.
The Bootstrap message of RFC2362 definition is the bandwidth usage that does not carry C-RP. Fig. 3 illustratesThe form of Bootstrap message of RFC2362 definition. Be applied in the present invention, for Bootstrap message is carriedThe bandwidth usage of C-RP can be expanded the Bootstrap message shown in Fig. 3, specifically:
Reserved field in Bootstrap message (Reserved) is expanded, so that writeeing down characters in advance after expansionSection Reserved carries the bandwidth usage of C-RP.
Step 105, the PIM router in pim-sm domain receives the Bootstrap message that BSR sends, from oneselfThe bandwidth usage that report parses all C-RP in the pim-sm domain that Bootstrap message carries in literary composition alsoBe stored to this locality.
The bandwidth usage of the C-RP being defined as above, the bandwidth usage of the C-RP here can beThe first above-mentioned situation, or be the second above-mentioned situation, repeat no more here.
Step 106, PIM router receiver, video in pim-sm domain stream, be not also video flowingWhen RP corresponding to multicast group IP address choice, the bandwidth of each C-RP having stored from this locality is used feelingsIn condition, determine the C-RP with the second situation, remaining from PIM territory except the C-RP that this is determinedIn remaining C-RP, select a C-RP as RP corresponding to multicast group IP address choice.
In this step 106, from residue C-RP, select a C-RP as multicast group IP address choiceWhen corresponding RP specific implementation, can adopt the algorithm of describing as background technology, repeat no more here.
As one embodiment of the present of invention, in step 106, may also can there is following situation:
Situation 1, can not determine the bandwidth usage of each C-RP having stored have from this localityThe C-RP of two situations, the bandwidth usage that is also all C-RP in pim-sm domain is all the first feelingsCondition;
Situation 2: determine and have second bandwidth usage of each C-RP having stored from this localityThe C-RP of situation is all C-RP in pim-sm domain, i.e. the bandwidth of all C-RP in pim-sm domainService condition is all the second situation.
Based on this, in the present invention, no matter there is situation 1 or situation 2 in step 106, can enter oneStep is carried out following steps:
In all C-RP in pim-sm domain, select a C-RP as multicast group IP address choice pairThe RP answering.
So far, complete the flow process shown in Fig. 1.
Can find out by the flow process shown in Fig. 1, in pim-sm domain, PIM router is multicast group IPWhen RP corresponding to address choice, the bandwidth usage of getting rid of C-RP is the C-RP of the second situation, fromIn remaining C-RP, be RP corresponding to multicast group IP address choice. As above use for the bandwidth of C-RPSituation is the following restriction of the second situation: the bandwidth usage of C-RP is that the second situation refers to that C-RPThe bandwidth using exceedes the situation of pre-set bandwidths thresholding, can obtain the present invention no longer by utilized bandwidthThe C-RP that exceedes pre-set bandwidths thresholding is chosen as RP corresponding to multicast group IP address choice, and this can makeOther C-RP (utilized bandwidth is lower than pre-set bandwidths thresholding) are chosen as multicast group IP address choice correspondenceThe chance of RP increases, and reaches and selects RP in load balancing mode as multicast group, realizes between each C-RPThe object of load balancing.
Below by a specific embodiment, flow process shown in Fig. 1 is described:
Referring to Fig. 4, the pim-sm domain networking diagram that Fig. 4 provides for the embodiment of the present invention. As shown in Figure 4,PIM router (Router) 3, Router4, Router5, Router6 are designated as pim-sm domainC-RP, Router2 is configured to the BSR of pim-sm domain.
Router3 is as C-RP, and the bandwidth that detects incoming interface in local each multicast (S, G) list item makesBy situation, if Router3 detects the use of incoming interface in a local multicast (S, G) list itemBandwidth exceedes pre-set bandwidths thresholding, and Router3 determines that the bandwidth usage of this equipment is the first feelingsCondition; Router3, in the time that the cycle that sends notification packet arrives, is carried at the first situation mark to notice reportIn literary composition, also clean culture sends to the Router2 as BSR. For ease of describing, here Router3 is sentThe notification packet that carries the first situation mark be designated as the 3rd message;
Router4 is as C-RP, and the bandwidth that detects incoming interface in local each multicast (S, G) list item makesBy situation, if Router4 has detected in local any one multicast (S, G) list item incoming interfaceUtilized bandwidth does not all exceed pre-set bandwidths thresholding, and Router4 determines that the bandwidth usage of this equipment isThe second situation, Router4 is in the time that the cycle that sends notification packet arrives, and clean culture sends notification packet to workFor the Router2 of BSR. Here, the notification packet that Router4 sends has RFC2362 prescribed form,For ease of describing, the notification packet here Router4 being sent is designated as the 4th message;
Router5 is as C-RP, and the bandwidth that detects incoming interface in local each multicast (S, G) list item makesBy situation, if Router5 detects the use of incoming interface in local two multicasts (S, G) list itemBandwidth all exceedes pre-set bandwidths thresholding, and Router5 determines that the bandwidth usage of this equipment is the first feelingsCondition; Router5, in the time that the cycle that sends notification packet arrives, is carried at the first situation mark to notice reportIn literary composition, also clean culture sends to the Router2 as BSR. For ease of describing, here Router5 is sentThe notification packet that carries the first situation mark be designated as the 5th message;
Router6 is as C-RP, and the bandwidth that detects incoming interface in local each multicast (S, G) list item makesBy situation, if Router6 has detected in local any one multicast (S, G) list item incoming interfaceUtilized bandwidth does not all exceed pre-set bandwidths thresholding, and Router6 determines that the bandwidth usage of this equipment isThe second situation, Router6 is in the time that the cycle that sends notification packet arrives, and clean culture sends notification packet to workFor the Router2 of BSR. Here, the notification packet that Router6 sends has RFC2362 prescribed form,For ease of describing, the notification packet here Router6 being sent is designated as the 6th message;
Router2, as BSR, receives the 3rd message, finds that the 3rd message carries the first situation mark,The bandwidth usage of determining the Router3 that sends the 3rd message is that the first situation (represents Router3The bandwidth having used exceedes pre-set bandwidths thresholding) and be recorded to this locality; Receive the 4th message, find the 4thMessage does not carry the first situation mark, determines the bandwidth usage of the Router4 that sends the 4th messageBe the second situation (representing that the bandwidth that used of Router4 does not exceed pre-set bandwidths thresholding) and be recorded to thisGround; Receive the 5th message, find that the 5th message carries the first situation mark, determines and sends the 5th messageThe bandwidth usage of Router5 be that the first situation (represents that the bandwidth that Router5 has used exceedes defaultBandwidth threshold) and be recorded to this locality; Receive the 6th message, find that the 6th message does not carry the first situation markKnow, the bandwidth usage of determining the Router6 that sends the 6th message is that the second situation (representsThe bandwidth that Router6 has used does not exceed pre-set bandwidths thresholding) and be recorded to this locality.
BSR send Bootstrap message cycle arrive time, the Router3 to Router6 that this locality has been recordedBandwidth usage be carried at and in Bootstrap message and in pim-sm domain, broadcast Bootstrap message.
Router1, Router3 to 6 reception Bootstrap message in PIM territory parses from Bootstrap messageThe bandwidth usage of the Router3 to 6 that Bootstrap message carries is also stored to this locality.
Router1 receives video flowing, also not selected corresponding in the multicast group IP address of finding video flowingRP time, the bandwidth usage of the Router3 to 6 having stored from this locality, determine and there are the second feelingsThe C-RP of condition, determines Router3, Router6, from the residue except Router3, Router6C-RP selects one as RP corresponding to multicast group IP address choice, from Router4, Router5Select one as RP corresponding to multicast group IP address choice. Because Router3, Router6 useBandwidth exceed pre-set bandwidths thresholding, so be the multicast group IP address choice correspondence of video flowing here againRP time, just no longer Router3, Router6 are participated in to selection, so that again by Router3, Router6Be chosen as the RP corresponding to multicast group IP address of video flowing, further increase the weight of Router3, Router6Burden. Router2 to Router6 receives the similar Router1 of processing procedure of video flowing, here no longerRepeat.
So far, complete the specific descriptions of embodiment.
Above method provided by the invention is described. Below device provided by the invention is retouchedState:
Referring to Fig. 5, Fig. 5 is first device structure chart provided by the invention. This application of installation is in protocol-independent groupPIM router in broadcast-sparse mode pim-SM territory, comprising:
Receiving element, the Bootstrap message sending for receiving BootStrap Router BSR;
Resolution unit, all for parsing from Bootstrap message the pim-sm domain that Bootstrap message carriesThe bandwidth usage of candidate RP is also stored to this locality, and wherein, the bandwidth having used as candidate RP exceedesWhen pre-set bandwidths thresholding, the bandwidth usage of candidate RP is the first situation, when candidate RP has usedWhen bandwidth does not exceed pre-set bandwidths thresholding, the bandwidth usage of candidate RP is the second situation;
Selected cell, at the RP corresponding to multicast group IP address choice of video flowing for receiving alsoTime, the bandwidth usage of each candidate RP having stored from this locality, determine and to there is the second situationCandidate RP, selects one in the residue candidate RP the candidate RP determining from PIM territory except thisCandidate RP is as RP corresponding to multicast group IP address choice.
Preferably, the bandwidth usage of selected cell all candidate RP in pim-sm domain is allWhen two situations, or the bandwidth usage of all candidate RP is all the first feelings in pim-sm domainWhen condition, further in all candidate RP from pim-sm domain, select a candidate RP as multicast groupThe RP that IP address choice is corresponding.
So far, completing the apparatus structure shown in Fig. 5 describes.
Referring to Fig. 6, Fig. 6 is the second structure drawing of device provided by the invention. This application of installation is in protocol-independentBootStrap Router BSR in multicast-sparse mode pim-SM territory, comprising:
Receiving element, the notification packet sending for receiving pim-sm domain candidate RP;
Whether recognition unit, carry the first situation mark for identifying notification packet, if so, determines and waitThe bandwidth usage that selects RP is the first situation, and the first situation is for representing the bandwidth that candidate RP has usedExceed pre-set bandwidths thresholding; If not, the bandwidth usage of determining candidate RP is the second situation, theTwo situations are for representing that the bandwidth that candidate RP has used does not exceed pre-set bandwidths thresholding;
Transmitting element, for being carried at the bandwidth usage of pim-sm domain candidate RP from reportIn literary composition and in pim-sm domain, broadcast Bootstrap message.
Here, the bandwidth usage of all candidate RP in pim-sm domain is carried in Bootstrap messageComprise:
Reserved field in Bootstrap message is expanded, so that the reserved field after expansion carriesThe bandwidth usage of all candidate RP in pim-sm domain.
So far, completing the apparatus structure shown in Fig. 6 describes.
Referring to Fig. 7, Fig. 7 is the third structure drawing of device provided by the invention. This application of installation in agreement withoutClose the candidate RP in multicast-sparse mode pim-SM territory, comprising:
Detecting unit, uses feelings for detection of the bandwidth of incoming interface in local each multicast (S, G) list itemCondition;
Determining unit, for detecting incoming interface at least one multicast (S, G) list item when detecting unitWhen the bandwidth having used exceedes pre-set bandwidths thresholding, the bandwidth usage of determining this candidate RP is firstSituation, does not exceed pre-set bandwidths when detecting the bandwidth that the incoming interface of any one multicast group list item usedWhen thresholding, the bandwidth usage of determining this candidate RP is the second situation;
Transmitting element, in the time that the cycle that sends notification packet arrives, if the band of candidate RP nowWide service condition is the first situation, the first situation mark is carried in notification packet and clean culture sends toBootStrap Router BSR in pim-sm domain, if now the bandwidth usage of candidate RP is secondSituation, the BootStrap Router BSR clean culture in pim-sm domain sends logical that first situation of not carrying identifiesAccuse message.
Preferably, the first situation mark being carried to notification packet comprises:
Reserved field in notification packet is expanded, so that the reserved field after expansion carries the first feelingsCondition mark.
So far, completing the apparatus structure shown in Fig. 7 describes.
These are only preferred embodiment of the present invention, in order to limit the present invention, not all at thisWithin bright spirit and principle, any amendment of making, be equal to replacement, improvement etc., all should be included in thisWithin the scope of invention protection.