CN102238074A - Designated router (DR) election method and router - Google Patents
Designated router (DR) election method and router Download PDFInfo
- Publication number
- CN102238074A CN102238074A CN2010101686602A CN201010168660A CN102238074A CN 102238074 A CN102238074 A CN 102238074A CN 2010101686602 A CN2010101686602 A CN 2010101686602A CN 201010168660 A CN201010168660 A CN 201010168660A CN 102238074 A CN102238074 A CN 102238074A
- Authority
- CN
- China
- Prior art keywords
- router
- pim network
- election
- time
- pim
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Mobile Radio Communication Systems (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a designated router (DR) election method and a router. The method comprises that: each router in a protocol independent multicast (PIM) network transmits a Hello message carrying a running time option, wherein the running time option comprises the running time of the router and PIM network initial state duration expected by the router; and each router receives the Hello message from each router in the PIM network, selects the routers taking part in DR election from all the routers of the PIM network according to the running time option carried by the Hello message, and elects a DR from the routers taking part in the election, wherein the running of each router taking part in the DR election is started at a moment not later than the moment at which the PIM gets stable.
Description
Technical field
The present invention relates to Protocol Independent Multicast-sparse mode (PIM-SM, Protocol IndependentMulticast-Sparse Mode) technical field, relate in particular to a kind of Designated Router (DR, DesignatedRouter) electoral machinery and router.
Background technology
In the PIM-SM agreement, elect one as DR in a plurality of routers of PIM network, DR will be responsible for receiving the flux of multicast from multicast source as unique forwarding person of multicast information in this PIM network, and this flux of multicast is forwarded to user side.
The mode of DR election is: each router in the PIM network periodically sends hello (Hello) message each other, and this hello packet carries the DR priority of this router; Each router is elected the DR of the highest router of DR priority as this PIM network according to the DR priority of all-router in this PIM network.If DR priority is identical, the router of then selecting IP address maximum is as DR.When DR breaks down, will trigger new DR election process again.
As Fig. 1 is PIM schematic network structure of the prior art.In Fig. 1, comprise 4 routers in the PIM network, i.e. router-A, B, C and D, the DR priority of these 4 routers reduces successively.When carrying out DR election, because the DR priority of A is the highest, so election A is as the DR of this PIM network; When A broke down, A no longer sent hello packet, and in remaining 3 routers, because the DR priority of B is the highest, so elect the DR of B as this PIM network, DR will switch to B by original A; Restart and after the PIM-SM agreement of interface recovered, A recovered to send hello packet as A, be DR with the A election this moment again, and DR switches to A by B again.After DR switched to A, this moment, the unicast routing table of A may not be ready to as yet fully, and this just causes correctly forwarding multicasting flow of A.
As seen, existing DR election mechanism is not considered some special circumstances, and the DR equipment that elects based on the DR election algorithm of seizing fully may be incomplete as yet ready router, therefore may cause the interruption that flux of multicast is transmitted.
Summary of the invention
The invention provides the method for a kind of DR of election, can avoid the phenomenon that flux of multicast is transmitted interruption occurring behind the DR election.
The present invention also provides a kind of router, can avoid the phenomenon that flux of multicast is transmitted interruption occurring behind the DR election.
Technical scheme of the present invention is achieved in that
A kind of DR election method is applied to comprise comprise the PIM network of a plurality of routers:
Each router sends the hello hello packet that carries option running time in the described PIM network; Described running time, option comprised the time that described router has moved and the PIM network initial condition duration of described router expectation;
Described each router receives the hello packet that each router sends in the PIM network, option running time that carries according to described hello packet, in the all-router of described PIM network, select to participate in the router of DR election, in the router of described participation election, elect DR; The router of described participation DR election is the moment that brings into operation to be not later than the router that described PIM network begins the stable moment.
A kind of router is applied to comprise comprise the PIM network of a plurality of described routers:
Sending module is used to send the hello packet that carries option running time; Described running time, option comprised the time that described router has moved and the PIM network initial condition duration of described router expectation;
Receiver module is used for receiving the hello packet that each router of PIM network sends;
The election module is used for option running time that carries according to the hello packet that described receiver module receives, selects to participate in the router of DR election in the all-router of described PIM network, elects DR in the router of described participation election; The router of described participation DR election is the moment that brings into operation to be not later than the router that described PIM network begins the stable moment.
As seen, DR election method and router that the present invention proposes increase option running time in the hello packet that router sends, and this, option comprised the time that this router has moved and the PIM network initial condition duration of expectation running time; Afterwards, each router is according to information that the running time in the hello packet, option comprised, the moment that selection brings into operation is not later than the router that the PIM network begins the stable moment, as the router that participates in DR election, and elects DR in the router that participates in DR election.In this way, guarantee to serve as new DR, thereby can avoid flux of multicast occurring behind the DR election and transmit the phenomenon of interrupting by the router of steady operation.
Description of drawings
Fig. 1 is a PIM schematic network structure of the prior art;
Fig. 2 elects the method flow diagram of DR for the present invention;
Fig. 3 is the structural representation of embodiment of the invention Uptime option;
Fig. 4 is schematic diagram running time of embodiment of the invention router and PIM network;
Fig. 5 is the structural representation of embodiment of the invention router.
Embodiment
The present invention proposes the method for a kind of DR of election, and this method is applied to comprise the PIM network of a plurality of routers, and as the method flow diagram that Fig. 2 elects DR for the present invention, this method comprises:
Step 201: each router sends the hello packet that carries option running time in the described PIM network; Described running time, option comprised the time that described router has moved and the PIM network initial condition duration of described router expectation;
Step 202: described each router receives the hello packet that each router sends in the PIM network, option running time that carries according to described hello packet, in the all-router of described PIM network, select to participate in the router of DR election, in the router of described participation election, elect DR; The router of described participation DR election is the moment that brings into operation to be not later than the router that described PIM network begins the stable moment.
Below be example with PIM network shown in Figure 1, lift specific embodiment and introduce in detail.
The first step sends hello packet:
In PIM network shown in Figure 1, there are 4 routers, be A, B, C and D, periodically send hello packet between each router mutually, this hello packet carries running time (Uptime) option, as Fig. 3 is the structural representation of embodiment of the invention Uptime option, comprising:
Type (Type) field is used to represent the type of this Uptime option, can value be 30;
Length (Length) field is used to represent the length of this Uptime option, can value be 4, and unit is a byte;
Hours of operation (UP_Hours) field is used to represent to send the time that the router of this hello packet has moved, and unit is hour that less than was set to 0 in the time of 1 hour;
Thresholding (Threshold) field is used to represent send PIM network initial condition duration of the router expectation of this hello packet, and unit is hour.
In second step, selection participates in the router of DR election:
Send hello packet mutually by the first step, A, B, C and four routers of D have all been known each router has moved in the PIM network the time and the PIM network initial condition duration of expectation, and the described information of knowing sees Table 1 the 2nd row and the 3rd and is listed as.
The time of having moved (UP_Hours) | The initial condition duration (Threshold) of the PIM of expectation | The moment that brings into operation | Whether be the router that participates in election | |
?A | 300 | 5 | 300-300=0 | Be (0<80) |
?B | 289 | 10 | 300-289=11 | Be (11<80) |
?C | 100 | 24 | 300-100=200 | Not (200>80) |
? |
3 | 80 | 300-3=297 | Not (297>80) |
Table 1
According to the information in the table 1, can determine the moment and the PIM network that each router brings into operation and begin the stable moment.Begin the stable moment if the moment that certain router brings into operation is not later than the PIM network, illustrate that this router has participated in DR election before, participates in the router of DR election when then must elect this moment as this; Begin the stable moment if the moment that certain router brings into operation is later than the PIM network, illustrate that this router just starts operation behind the PIM network stabilization, the DR election before this router does not have to participate in, then this moment, this router did not participate in this DR election yet.By such setting, can reduce the switching times of DR, and the DR that elects like this is the router of stable operation, therefore can avoid the phenomenon that flux of multicast is transmitted interruption occurring after the DR switching.
Below introduce the account form that moment that router brings into operation and PIM network begin the stable moment in detail:
1) moment of bringing into operation of router:
As Fig. 4 is schematic diagram running time of embodiment of the invention router and PIM network.
On time shaft, if the router that running time is the longest, promptly moment of bringing into operation of A is designated as 0 constantly, because A has moved 300 hours, then current time is 0+300=300;
Because B moved 289 hours, and current time is 300, and then moment of bringing into operation of B is: 300-289=11;
Because C moved 100 hours, and current time is 300, and then moment of bringing into operation of C is: 300-100=200;
Because D moved 3 hours, and current time is 300, and then moment of bringing into operation of D is: 300-3=297.
2) the PIM network begins the stable moment:
The PIM network plays pendulum in the duration in initial condition, can carry out DR election; After initial state duration finished, the PIM network changed stable state over to, no longer carries out DR election.As seen, be the PIM network finish time of PIM network initial condition duration and begin the stable moment.
And the PIM network initial condition duration is to begin from the moment that the PIM network brings into operation.
According to These characteristics, the mode that the PIM network begins the stable moment is calculated as follows:
The PIM network begins the stable moment
=PIM network bring into operation the moment+initial condition duration of PIM network
=current time-PIM network moved time+initial condition duration of PIM network
In PIM network shown in Figure 1, determine above-mentioned 3 parameters respectively:
Current time=300;
The PIM network moved time=the PIM network in maximum=300 of time of having moved of all-router;
Maximum=80 of the PIM network initial condition duration of all-router expectation in the initial condition of PIM network duration=PIM network;
Then the PIM network begins the stable moment=300-300+80=80 among Fig. 1
After above-mentioned parameter calculated and to finish, the moment of selecting to bring into operation was not later than the router that the PIM network begins the stable moment, and the router selected as the router that participates in DR election, is elected DR in these routers.
In the PIM network as shown in Figure 1, the moment that router-A, B, C and D bring into operation is respectively 0,11,200 and 297, and it is 80 that the PIM network begins the stable moment; Then A, B are elected as the router that participates in DR election, in A and B, carry out DR election.As can be seen, in this way, the DR that this election is selected is identical with the DR that selected last time, thereby can reduce the switching times of DR, and guarantees that the DR newly select is the router of steady operation, avoids occurring flux of multicast and transmits the phenomenon of interrupting.
The present invention also proposes a kind of router, is applied to comprise the PIM network of a plurality of described routers, is the structural representation of embodiment of the invention router as Fig. 5, and this router comprises:
Sending module 501 is used to send the hello packet that carries option running time; Described running time, option comprised the time that described router has moved and the PIM network initial condition duration of described router expectation;
In the above-mentioned router, the moment that the router that election module 503 is calculated brings into operation is: current time deducts the poor of time that described router moved;
The PIM network that election module 503 is calculated begins the stable moment and is: current time deducts the time that described PIM network has moved, and adds the initial condition duration of described PIM network; Wherein, the time that described PIM network has moved equals the maximum of the time that all-router has moved in the described PIM network, and the initial condition duration of described PIM network equals the maximum of the PIM network initial condition duration of all-router expectation in the described PIM network.
The above only is preferred embodiment of the present invention, and is in order to restriction the present invention, within the spirit and principles in the present invention not all, any modification of being made, is equal to replacement, improvement etc., all should be included within the scope of protection of the invention.
Claims (4)
1. Designated Router DR election method is applied to comprise the Protocol Independent Multicast PIM network of a plurality of routers it is characterized in that described method comprises:
Each router sends the hello hello packet that carries option running time in the described PIM network; Described running time, option comprised the time that described router has moved and the PIM network initial condition duration of described router expectation;
Described each router receives the hello packet that each router sends in the PIM network, option running time that carries according to described hello packet, in the all-router of described PIM network, select to participate in the router of DR election, in the router of described participation election, elect DR; The router of described participation DR election is the moment that brings into operation to be not later than the router that described PIM network begins the stable moment.
2. method according to claim 1 is characterized in that, in the described method, the moment that router brings into operation is: current time deducts the poor of time that described router moved;
Described PIM network begins the stable moment and is: current time deducts the time that described PIM network has moved, and adds the initial condition duration of described PIM network; Wherein, the time that described PIM network has moved equals the maximum of the time that all-router has moved in the described PIM network, and the initial condition duration of described PIM network equals the maximum of the PIM network initial condition duration of all-router expectation in the described PIM network.
3. router is applied to comprise the PIM network of a plurality of described routers it is characterized in that described router comprises:
Sending module is used to send the hello packet that carries option running time; Described running time, option comprised the time that described router has moved and the PIM network initial condition duration of described router expectation;
Receiver module is used for receiving the hello packet that each router of PIM network sends;
The election module is used for option running time that carries according to the hello packet that described receiver module receives, selects to participate in the router of DR election in the all-router of described PIM network, elects DR in the router of described participation election; The router of described participation DR election is the moment that brings into operation to be not later than the router that described PIM network begins the stable moment.
4. want 3 described routers according to right, it is characterized in that, the moment that the router that described election module is calculated brings into operation is: current time deducts the poor of time that described router moved;
The PIM network that described election module is calculated begins the stable moment and is: current time deducts the time that described PIM network has moved, and adds the initial condition duration of described PIM network; Wherein, the time that described PIM network has moved equals the maximum of the time that all-router has moved in the described PIM network, and the initial condition duration of described PIM network equals the maximum of the PIM network initial condition duration of all-router expectation in the described PIM network.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2010101686602A CN102238074B (en) | 2010-05-04 | 2010-05-04 | Designated router (DR) election method and router |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2010101686602A CN102238074B (en) | 2010-05-04 | 2010-05-04 | Designated router (DR) election method and router |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102238074A true CN102238074A (en) | 2011-11-09 |
CN102238074B CN102238074B (en) | 2013-11-27 |
Family
ID=44888314
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2010101686602A Active CN102238074B (en) | 2010-05-04 | 2010-05-04 | Designated router (DR) election method and router |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102238074B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103117935A (en) * | 2013-02-28 | 2013-05-22 | 杭州华三通信技术有限公司 | Multicast data forwarding method and multicast data forwarding device applied to multi-homing networking |
WO2016145782A1 (en) * | 2015-03-19 | 2016-09-22 | 中兴通讯股份有限公司 | Method and system for reducing pim protocol dr change |
CN106559343A (en) * | 2015-09-28 | 2017-04-05 | 中兴通讯股份有限公司 | A kind of electoral machinery and device of Designated Router |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060268869A1 (en) * | 2005-05-31 | 2006-11-30 | Arjen Boers | Designated router assginment per multicast group address/range |
CN1874315A (en) * | 2006-06-21 | 2006-12-06 | 杭州华为三康技术有限公司 | Method for recovering fault of multicast, and router of multicast |
US20070239879A1 (en) * | 2006-04-10 | 2007-10-11 | Sbc Knowledge Ventures, L.P. | Method and apparatus for router recovery |
CN101420362A (en) * | 2007-10-22 | 2009-04-29 | 华为技术有限公司 | Method, system and router for multicast flow switching |
-
2010
- 2010-05-04 CN CN2010101686602A patent/CN102238074B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060268869A1 (en) * | 2005-05-31 | 2006-11-30 | Arjen Boers | Designated router assginment per multicast group address/range |
US20070239879A1 (en) * | 2006-04-10 | 2007-10-11 | Sbc Knowledge Ventures, L.P. | Method and apparatus for router recovery |
CN1874315A (en) * | 2006-06-21 | 2006-12-06 | 杭州华为三康技术有限公司 | Method for recovering fault of multicast, and router of multicast |
CN101420362A (en) * | 2007-10-22 | 2009-04-29 | 华为技术有限公司 | Method, system and router for multicast flow switching |
Non-Patent Citations (3)
Title |
---|
B.FENNER 等: "《IETF RFC 4601》", 31 August 2006 * |
X.XU 等: "《IETF Network working group Internet Draft》", 19 October 2009 * |
XIN WANG 等: "IP Multicast Fault Recovery in PIM over OSPF date", 《2000 INTERNATIONAL CONFERENCE ON NETWORK PROTOCOLS,2000.PROCEEDINGS》 * |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103117935A (en) * | 2013-02-28 | 2013-05-22 | 杭州华三通信技术有限公司 | Multicast data forwarding method and multicast data forwarding device applied to multi-homing networking |
WO2016145782A1 (en) * | 2015-03-19 | 2016-09-22 | 中兴通讯股份有限公司 | Method and system for reducing pim protocol dr change |
CN106034078A (en) * | 2015-03-19 | 2016-10-19 | 中兴通讯股份有限公司 | Method and system for reducing DR change of PIM protocol |
US10291581B2 (en) | 2015-03-19 | 2019-05-14 | Zte Corporation | Method and system for reducing PIM protocol DR change |
CN106034078B (en) * | 2015-03-19 | 2020-05-05 | 中兴通讯股份有限公司 | Method and system for reducing DR change of PIM protocol |
CN106559343A (en) * | 2015-09-28 | 2017-04-05 | 中兴通讯股份有限公司 | A kind of electoral machinery and device of Designated Router |
Also Published As
Publication number | Publication date |
---|---|
CN102238074B (en) | 2013-11-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101385275B (en) | Rerouting multicast traffic in response to detecting imminent network disruption | |
US9992099B2 (en) | Protocol independent multicast designated router redundancy | |
EP2622805B1 (en) | Method for pruning a multicast branch, protocol independent multicast router, and layer-2 exchange | |
US9509636B2 (en) | Multicast traffic management within a wireless mesh network | |
CN100417141C (en) | Group broadcasting business realizing method | |
US20110267962A1 (en) | Method and system for predictive designated router handover in a multicast network | |
US9215078B2 (en) | Multicast method and multicast device | |
CN101296105B (en) | Multicast fast switching method and system, three-layer network appliance | |
CN105099937B (en) | A kind of determination method and apparatus of PMTU | |
CN103117935A (en) | Multicast data forwarding method and multicast data forwarding device applied to multi-homing networking | |
CN102801632A (en) | Unified electoral method of PIM-SM (Protocol Independent Multicast-Sparse Mode) designated router and IGMP (Internet Group Management Protocol) querier | |
WO2017201750A1 (en) | Method, device and system for processing multicast data | |
CN102238074B (en) | Designated router (DR) election method and router | |
US20120218898A1 (en) | Bandwidth utilization for equal cost multiple paths | |
CN102377584A (en) | Method for protecting DR (designated router) redundancy in PIM-SM (protocol independent multicast-sparse mode) | |
CN101610200A (en) | Multicast path by changing method and device | |
US9313037B2 (en) | Method, apparatus and system for forwarding data under protocol independent multicast dual join | |
US8902891B2 (en) | Method of managing broadcasts and multicasts by a network device | |
CN102843303B (en) | Multicast message processing method in PIM and device | |
CN100542142C (en) | Change the method and apparatus of three-layer network appliance Interface status | |
CN106034078B (en) | Method and system for reducing DR change of PIM protocol | |
KR101562225B1 (en) | Method and apparatus for preventing unnecessary assert message in network | |
EP2273734B1 (en) | Querier vote method, router and network system | |
CN110572322B (en) | Method for improving multicast forwarding efficiency by modifying search key words | |
CN114745250B (en) | Port management method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CP03 | Change of name, title or address |
Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No. Patentee after: Xinhua three Technology Co., Ltd. Address before: 310053 Hangzhou hi tech Industrial Development Zone, Zhejiang province science and Technology Industrial Park, No. 310 and No. six road, HUAWEI, Hangzhou production base Patentee before: Huasan Communication Technology Co., Ltd. |
|
CP03 | Change of name, title or address |