CN102238074B - Designated router (DR) election method and router - Google Patents

Designated router (DR) election method and router Download PDF

Info

Publication number
CN102238074B
CN102238074B CN2010101686602A CN201010168660A CN102238074B CN 102238074 B CN102238074 B CN 102238074B CN 2010101686602 A CN2010101686602 A CN 2010101686602A CN 201010168660 A CN201010168660 A CN 201010168660A CN 102238074 B CN102238074 B CN 102238074B
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.)
Active
Application number
CN2010101686602A
Other languages
Chinese (zh)
Other versions
CN102238074A (en
Inventor
哈达
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C Technologies Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN2010101686602A priority Critical patent/CN102238074B/en
Publication of CN102238074A publication Critical patent/CN102238074A/en
Application granted granted Critical
Publication of CN102238074B publication Critical patent/CN102238074B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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

A kind of DR election method and router
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, as unique forwarding person of multicast information in this PIM network, be responsible for receiving the flux of multicast from multicast source, 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 according to the DR priority of all-router in this PIM network, and the highest router of election DR priority is as the DR of this PIM network.If DR priority is identical, select the router of IP address maximum as DR.When DR breaks down, will again trigger new DR election process.
As Fig. 1, it is PIM schematic network structure of the prior art.In Fig. 1, the PIM network comprises 4 routers, i.e. router-A, B, C and D, and the DR priority of these 4 routers reduces successively.When carrying out DR election, because the DR priority of A is the highest, therefore 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, therefore elect the DR of B as this PIM network, DR will switch to B by original A; As A, restart and after the PIM-SM agreement of interface recovered, A recovered to send hello packet, now again the A election is to DR, DR switches to A by B again.After DR switched to A, now the unicast routing table of A may be ready to not yet fully, and this just causes correctly forwarding multicast flow of A.
Visible, existing DR election mechanism is not considered some special circumstances, and the DR equipment elected based on the DR election algorithm of seizing fully may be a not yet complete ready router, therefore may cause the interruption that flux of multicast forwards.
Summary of the invention
The invention provides the method for DR of election a kind of, can avoid occurring that flux of multicast forwards the phenomenon of interrupting after DR election.
The present invention also provides a kind of router, can avoid occurring that flux of multicast forwards the phenomenon of interrupting after 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:
In described PIM network, each router sends the hello hello packet that carries option running time; Described running time, option comprised 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 in the PIM network, each router sends, option running time carried according to described hello packet, in the all-router of described PIM network, select to participate in the router of DR election, elect DR in the router of described participation election; The router of described participation DR election is the moment brought into operation to be not later than the router that described PIM network starts the stable moment.
A kind of router is applied to comprise comprise the PIM network of a plurality of described routers:
Sending module, carry the hello packet of option running time for transmission; Described running time, option comprised time that described router has moved and the PIM network initial condition duration of described router expectation;
Receiver module, the hello packet sent for receiving each router of PIM network;
The election module, for option running time that the hello packet received according to described receiver module carries, select to participate in the router of DR election in the all-router of described PIM network, elect DR in the router of described participation election; The router of described participation DR election is the moment brought into operation to be not later than the router that described PIM network starts the stable moment.
Visible, 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 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 hello packet, option comprised, the moment that selection brings into operation is not later than the router that the PIM network starts 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 by the router of steady operation, thereby can avoid occurring that flux of multicast forwards the phenomenon of interrupting after DR election.
The accompanying drawing explanation
Fig. 1 is PIM schematic network structure of the prior art;
Fig. 2 is the method flow diagram that the present invention elects DR;
Fig. 3 is the structural representation of embodiment of the present invention Uptime option;
Fig. 4 is schematic diagram running time of embodiment of the present invention router and PIM network;
Fig. 5 is the structural representation of embodiment of the present invention router.
Embodiment
The present invention proposes the method for DR of election a kind of, and the method is applied to comprise the PIM network of a plurality of routers, is the method flow diagram that the present invention elects DR as Fig. 2, and the method comprises:
Step 201: in described PIM network, each router sends the hello packet that carries option running time; Described running time, option comprised 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 in the PIM network, each router sends, option running time carried according to described hello packet, in the all-router of described PIM network, select to participate in the router of DR election, elect DR in the router of described participation election; The router of described participation DR election is the moment brought into operation to be not later than the router that described PIM network starts the stable moment.
Below take PIM network shown in Figure 1 and be example, 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, between each router, periodically send mutually hello packet, this hello packet carries running time (Uptime) option, as Fig. 3, be the structural representation of embodiment of the present invention Uptime option, comprise:
Type (Type) field, be used to meaning the type of this Uptime option, can value be 30;
Length (Length) field, be used to meaning the length of this Uptime option, can value be 4, and unit is byte;
Hours of operation (UP_Hours) field, be used to the time that the router that means to send this hello packet has moved, unit is hour that less than was set to 0 in the time of 1 hour;
Thresholding (Threshold) field, be used to the PIM network initial condition duration of the router expectation that means to send this hello packet, unit is hour.
Second step, selection participates in the router of DR election:
By the first step, mutually send hello packet, A, B, C and tetra-routers of D have all been known time that in the PIM network, each router has moved and the PIM network initial condition duration of expectation, and the described information of knowing is listed as in Table 1 the 2nd row and the 3rd.
The time of having moved (UP_Hours) The initial condition duration (Threshold) of the PIM of expectation The moment brought into operation Whether be the router that participates in election
A 300 5 300-300=0 (0<80)
B 289 10 300-289=11 (11<80)
C 100 24 300-100=200 No (200>80)
D 3 80 300-3=297 No (297>80)
Table 1
According to the information in table 1, can determine the moment and the PIM network that each router brings into operation and start the stable moment.If the moment that certain router brings into operation is not later than the PIM network, start the stable moment, illustrate that this router has participated in DR election before, participates in the router of DR election in the time of now must electing as this; If the moment that certain router brings into operation is later than the PIM network, start the stable moment, illustrate that this router just starts operation after the PIM network stabilization, the DR election before this router does not have to participate in, now this router does not participate in this DR election yet.By such setting, can reduce the switching times of DR, and the DR elected like this is the router of stable operation, therefore can avoid occurring that flux of multicast forwards the phenomenon of interrupting after the DR switching.
Below introduce in detail the account form that moment that router brings into operation and PIM network start the stable moment:
1) moment of bringing into operation of router:
It as Fig. 4, is schematic diagram running time of embodiment of the present invention router and PIM network.
On time shaft, if the router that running time is the longest, namely moment of bringing into operation of A is designated as 0 constantly, and because A has moved 300 hours, current time is 0+300=300;
Because B has moved 289 hours, and current time is 300, and moment of bringing into operation of B is: 300-289=11;
Because C has moved 100 hours, and current time is 300, and moment of bringing into operation of C is: 300-100=200;
Because D has moved 3 hours, and current time is 300, and moment of bringing into operation of D is: 300-3=297.
2) the PIM network starts 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 proceeded to stable state, no longer carries out DR election.Visible, be the PIM network finish time of PIM network initial condition duration and start the stable moment.
And the PIM network initial condition duration is to start from the moment that the PIM network brings into operation.
According to These characteristics, the mode that the PIM network starts the stable moment is calculated as follows:
The PIM network starts 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 respectively above-mentioned 3 parameters:
Current time=300;
The PIM network moved time=the PIM network in the maximum=300 of time of having moved of all-router;
The maximum of the PIM network initial condition duration of all-router expectation=80 in the initial condition of PIM network duration=PIM network;
In Fig. 1, the PIM network starts the stable moment=300-300+80=80
After above-mentioned parameter has calculated, select the moment bring into operation to be not later than the router that the PIM network starts the stable moment, using the router selected as the router that participates in DR election, elect DR in these routers.
In PIM network as shown in Figure 1, the moment that router-A, B, C and D bring into operation be respectively 0,11,200 and 297, PIM network to start the stable moment be 80; A, B are elected as to the router that participates in DR election, in A and B, carry out DR election.Can find out, in this way, the DR that this election is selected is identical with the DR 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 that flux of multicast forwards 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, as Fig. 5, is the structural representation of embodiment of the present invention router, and this router comprises:
Sending module 501, carry the hello packet of option running time for transmission; Described running time, option comprised time that described router has moved and the PIM network initial condition duration of described router expectation;
Receiver module 502, the hello packet sent for receiving each router of PIM network;
Election module 503, for option running time that the hello packet received according to described receiver module 502 carries, select to participate in the router of DR election in the all-router of described PIM network, elect DR in the router of described participation election; The router of described participation DR election is the moment brought into operation to be not later than the router that described PIM network starts the stable moment.
In 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 starts 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 in described PIM network, all-router has moved, and the initial condition duration of described PIM network equals the maximum of the PIM network initial condition duration of all-router expectation in described PIM network.
The foregoing is only preferred embodiment of the present invention, in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of making, be equal to replacement, improvement etc., within all should being included in the scope of protection of the invention.

Claims (4)

1. Designated Router DR election method, be applied to comprise it is characterized in that the Protocol Independent Multicast PIM network of a plurality of routers, and described method comprises:
In described PIM network, each router sends the hello hello packet that carries option running time; Described running time, option comprised 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 in the PIM network, each router sends, option running time carried according to described hello packet, in the all-router of described PIM network, select to participate in the router of DR election, elect DR in the router of described participation election; The router of described participation DR election is the moment brought into operation to be not later than the router that described PIM network starts the stable moment;
Described PIM network starts 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 in described PIM network, all-router has moved, and the initial condition duration of described PIM network equals the maximum of the PIM network initial condition duration of all-router expectation in described PIM network.
2. method according to claim 1, is characterized in that, in described method, the moment that router brings into operation is: current time deducts the poor of time that described router moved.
3. router, be applied to comprise it is characterized in that the PIM network of a plurality of described routers, and described router comprises:
Sending module, carry the hello packet of option running time for transmission; Described running time, option comprised time that described router has moved and the PIM network initial condition duration of described router expectation;
Receiver module, the hello packet sent for receiving each router of PIM network;
The election module, for option running time that the hello packet received according to described receiver module carries, select to participate in the router of DR election in the all-router of described PIM network, elect DR in the router of described participation election; The router of described participation DR election is the moment brought into operation to be not later than the router that described PIM network starts the stable moment;
Described PIM network starts 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 in described PIM network, all-router has moved, and the initial condition duration of described PIM network equals the maximum of the PIM network initial condition duration of all-router expectation in described PIM network.
4. according to right, want 3 described routers, 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.
CN2010101686602A 2010-05-04 2010-05-04 Designated router (DR) election method and router Active CN102238074B (en)

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 CN102238074A (en) 2011-11-09
CN102238074B true 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)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103117935B (en) * 2013-02-28 2016-02-17 杭州华三通信技术有限公司 Be applied to multicast data forwarding method and the device of multi-home networking
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

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7911977B2 (en) * 2005-05-31 2011-03-22 Cisco Technology, Inc. Designated router assignment per multicast group address/range
US20070239879A1 (en) * 2006-04-10 2007-10-11 Sbc Knowledge Ventures, L.P. Method and apparatus for router recovery

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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 (4)

* Cited by examiner, † Cited by third party
Title
B.Fenner 等.Protocol Independent Multicast - Sparse Mode (PIM-SM):Protocol Specification (Revised).《IETF RFC 4601》.2006,
B.Fenner 等.Protocol Independent Multicast- Sparse Mode (PIM-SM):Protocol Specification (Revised).《IETF RFC 4601》.2006, *
X.Xu 等.PIM-SM DR Priority Auto-Adjustment.《IETF Network working group Internet Draft》.2009, *
Xin Wang 等.IP Multicast Fault Recovery in PIM over OSPF date.《2000 International Conference on Network Protocols,2000.Proceedings》.2000, *

Also Published As

Publication number Publication date
CN102238074A (en) 2011-11-09

Similar Documents

Publication Publication Date Title
EP2622805B1 (en) Method for pruning a multicast branch, protocol independent multicast router, and layer-2 exchange
CN101385275B (en) Rerouting multicast traffic in response to detecting imminent network disruption
US9992099B2 (en) Protocol independent multicast designated router redundancy
CN100417141C (en) Group broadcasting business realizing method
US9215078B2 (en) Multicast method and multicast device
US7609656B2 (en) Bridge device, method of controlling bridge device, and control program
CN101296105B (en) Multicast fast switching method and system, three-layer network appliance
CN102801632A (en) Unified electoral method of PIM-SM (Protocol Independent Multicast-Sparse Mode) designated router and IGMP (Internet Group Management Protocol) querier
CN102238074B (en) Designated router (DR) election method and router
WO2017201750A1 (en) Method, device and system for processing multicast data
CN102377584A (en) Method for protecting DR (designated router) redundancy in PIM-SM (protocol independent multicast-sparse mode)
CN100499658C (en) Method for avoiding redundant Flood
EP2736204B1 (en) Rendezvous Point Convergence Method and Apparatus
CN101610200A (en) Multicast path by changing method and device
CN101304359B (en) Method and apparatus for RRPP looped network link recuperation
US20130028254A1 (en) Method of managing broadcasts and multicasts by a network device
EP2571201A1 (en) Method, device and system for forwarding data under protocol independent multicast (pim) dual join
CN106034078B (en) Method and system for reducing DR change of PIM protocol
EP2273734B1 (en) Querier vote method, router and network system
KR101562225B1 (en) Method and apparatus for preventing unnecessary assert message in network
CN101848169B (en) Message forwarding method in cluster management and exchanger
CN110572322B (en) Method for improving multicast forwarding efficiency by modifying search key words
CN114745250B (en) Port management method and device
Mishra et al. Network Working Group Yiqun. Cai Internet-Draft Heidi. Ou Intended status: Standards Track Alibaba Group Expires: December 30, 2017 Sri. Vallepalli
KR100984633B1 (en) IPTV receiver and operating method for IPTV receiver

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