CN102571594A - Method of relay configuration, network node and system - Google Patents

Method of relay configuration, network node and system Download PDF

Info

Publication number
CN102571594A
CN102571594A CN2012100210617A CN201210021061A CN102571594A CN 102571594 A CN102571594 A CN 102571594A CN 2012100210617 A CN2012100210617 A CN 2012100210617A CN 201210021061 A CN201210021061 A CN 201210021061A CN 102571594 A CN102571594 A CN 102571594A
Authority
CN
China
Prior art keywords
network node
relaying
message
election
subnet
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
Application number
CN2012100210617A
Other languages
Chinese (zh)
Other versions
CN102571594B (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201210021061.7A priority Critical patent/CN102571594B/en
Publication of CN102571594A publication Critical patent/CN102571594A/en
Application granted granted Critical
Publication of CN102571594B publication Critical patent/CN102571594B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a method of relay configuration, a network node and a system. The method comprises the following steps: acquiring route information of a DHCP server; starting a first timer, and intercepting a first relay declaration message and a first relay vote message in a subnet scope; if the first timer exceeds time and the first relay declaration message or the first relay vote message is not received, starting a second timer and broadcasting a second relay vote message to the subnet scope, wherein the second relay vote message comprises vote information of a present network node; if the second timer exceeds time, the first relay declaration message is not received, and the first relay vote message which comprises vote information of a second network node whose priority is higher than priority of the present network is not received, broadcasting a second relay declaration message to the subnet scope, wherein the second relay declaration message is used for notifying the present network node as a DHCP relay. According to the method, the network node and the system, efficiency of configuring the DHCP relay is raised.

Description

Method, network node and the system of relaying configuration
Technical field
The embodiment of the invention relates to the communication technology, particularly relates to a kind of method, network node and system of relaying configuration.
Background technology
DHCP (Dynamic Host Configuration Protocol; DHCP) use User Datagram Protocol (User Datagram Protocol; Be called for short UDP) work; Can automatically the IP address assignment be given the client of login TCP (Transmission Control Protocol/Internet Protocol is called for short TCP/IP) network.The DHCP agreement is based on the application on the UDP layer, and the udp port that Dynamic Host Configuration Protocol server uses number is 67, and the udp port that dhcp client uses number is 68.
Dhcp client and Dynamic Host Configuration Protocol server possibly be positioned at same broadcast domain, under this situation, can directly receive and dispatch the dhcp broadcast message between Dynamic Host Configuration Protocol server and the dhcp client.Perhaps; Dhcp client is positioned at different broadcast domains with Dynamic Host Configuration Protocol server; Under this situation, the dhcp broadcast message that dhcp client sends need pass through other target node of this dhcp client place subnet and give Dynamic Host Configuration Protocol server, and this network node is called DHCP relay.Prior art need be in subnet the manual configuration DHCP relay; If there are a plurality of network nodes that can be used as DHCP relay in the sub-net, then need in these network nodes, manually to specify a network node as DHCP relay.
Existing DHCP relay needs manual configuration, after the DHCP relay that has disposed withdraws from subnet, need reconfigure new DHCP relay, and the operation of DHCP relay layoutprocedure is comparatively loaded down with trivial details; In addition; After accomplishing a certain DHCP relay configuration; Whether operating personnel need frequent this DHCP relay of detection online; Withdrawed from subnet if can't know the DHCP relay that has disposed, then possibly cause this subnet because of there not being the configuration DHCP relaying, and can't carry out network configuration for the dhcp client in this subnet.
Summary of the invention
The embodiment of the invention provides a kind of method, network node and system of relaying configuration, in order to improve the efficient of DHCP relay configuration.
The embodiment of the invention provides a kind of method of relaying configuration, comprising:
Obtain the routing iinformation of Dynamic Host Configuration Protocol server;
Start first timer, and in subnet scoping, intercept first relaying declaration message and first relaying election message; Said first relaying declaration message is sent by first network node as DHCP relay in the subnet; Said DHCP relay is used for the routing iinformation according to said Dynamic Host Configuration Protocol server, the data of the dhcp client exchange in said Dynamic Host Configuration Protocol server of relay transmission and the said subnet; Said first relaying election message is sent by second network node that satisfies DHCP relay election condition in the said subnet, comprises the election information of said second network node;
If said first timer is overtime and do not receive said first relaying declaration message or said first relaying election message, then start second timer and broadcasting second relaying election message in said subnet scoping; Said second relaying election message comprises the election information of current network node;
If said second timer is overtime and do not receive said first relaying declaration message and do not receive and comprise that priority is higher than first relaying election message of election information of second network node of said current network node, then broadcasting second relaying declaration message in said subnet scoping; Said second relaying declaration message is used to announce said current network node as said DHCP relay.
The embodiment of the invention also provides a kind of network node, comprising:
The server info acquisition module is used to obtain the routing iinformation of Dynamic Host Configuration Protocol server;
Relay messages is intercepted module, is used to start first timer, and in subnet scoping, intercepts first relaying declaration message and first relaying election message; Said first relaying declaration message is sent by first network node as DHCP relay in the subnet; Said DHCP relay is used for the routing iinformation according to said Dynamic Host Configuration Protocol server, the data of the dhcp client exchange in said Dynamic Host Configuration Protocol server of relay transmission and the said subnet; Said first relaying election message is sent by second network node that satisfies DHCP relay election condition in the said subnet, comprises the election information of said second network node;
Relaying election processing module is used to start second timer, and broadcasting second relaying is elected message in said subnet scoping; Said second relaying election message comprises the election information of current network node;
Relaying announcement process module; If it is overtime and do not receive said first relaying declaration message and do not receive and comprise that priority is higher than first relaying election message of election information of second network node of said current network node, then broadcasting second relaying declaration message in said subnet scoping to be used for said second timer; Said second relaying declaration message is used to announce said current network node as said DHCP relay.
The embodiment of the invention also provides a kind of DHCP relay configuration-system, comprising: dhcp client, first DHCP relay and first Dynamic Host Configuration Protocol server; Said dhcp client and said first DHCP relay are positioned at same subnet;
A plurality of network nodes that said first DHCP relay is comprised by said subnet are used for the data of said Dynamic Host Configuration Protocol server of relay transmission and said dhcp client exchange through electing; The network node of participating in said first DHCP relay of election is the above-mentioned network node that the embodiment of the invention provides.
Method, network node and the system of the relaying configuration that the embodiment of the invention provides; Network node can obtain the routing iinformation of Dynamic Host Configuration Protocol server; Through intercepting first relaying declaration message, confirm that dhcp client belongs to the online situation of current first network node as DHCP relay in the subnet; Through intercepting first relaying election message, obtain the situation that second network node in this subnet is participated in the DHCP relay election; And can participate in the DHCP relay election through broadcasting second relaying election message; And boot and be DHCP relay through broadcasting second relaying declaration message; In this subnet, realized the automatic configuration of DHCP relay thus; Saved the loaded down with trivial details of manual configuration, improved the efficient of DHCP relay configuration, and reduced the required cost of configuration DHCP relaying.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art; To do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art below; Obviously, the accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills; Under the prerequisite of not paying creative work property, can also obtain other accompanying drawing according to these accompanying drawings.
The method flow diagram of the relaying configuration that Fig. 1 provides for the embodiment of the invention one;
Fig. 2 a is the Application Scenarios-Example one of the method for the relaying configuration that provides of the embodiment of the invention;
Fig. 2 b is the Application Scenarios-Example two of the method for the relaying configuration that provides of the embodiment of the invention;
Fig. 3 a is the State Control sketch map one of the state machine of the network node internal operation that provides of the embodiment of the invention two;
Fig. 3 b is the State Control sketch map two of the state machine of the network node internal operation that provides of the embodiment of the invention two;
Fig. 3 c is the State Control sketch map three of the state machine of the network node internal operation that provides of the embodiment of the invention two;
Fig. 3 d is the marginal data of each sketch map of providing of the embodiment of the invention two;
Fig. 4 disposes the format sample of association message for the embodiment of the invention three is that provide with DHCP relay automatically;
The structural representation of the network node that Fig. 5 provides for the embodiment of the invention four;
The structural representation of the relaying system configured that Fig. 6 provides for the embodiment of the invention five.
Embodiment
For the purpose, technical scheme and the advantage that make the embodiment of the invention clearer; To combine the accompanying drawing in the embodiment of the invention below; Technical scheme in the embodiment of the invention is carried out clear, intactly description; Obviously, described embodiment is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills are not paying the every other embodiment that is obtained under the creative work prerequisite, all belong to the scope of the present invention's protection.
The sequence number of following examples of the present invention is not represented the quality of embodiment just to description.
The method flow diagram of the relaying configuration that Fig. 1 provides for the embodiment of the invention one.The executive agent of present embodiment can be: a certain network node in the subnet of dhcp client place, i.e. hereinafter described current network node.Method as shown in Figure 1 comprises:
11: the routing iinformation that obtains Dynamic Host Configuration Protocol server.
The routing iinformation of said Dynamic Host Configuration Protocol server can comprise: the address information of Dynamic Host Configuration Protocol server and the next-hop address information of said Dynamic Host Configuration Protocol server etc.; Wherein, the quantity of said Dynamic Host Configuration Protocol server can be one or more.In the embodiment of the invention, said Dynamic Host Configuration Protocol server and dhcp client be not at same broadcast domain, for example: said Dynamic Host Configuration Protocol server is positioned at public network, and perhaps, said Dynamic Host Configuration Protocol server is positioned at other subnets outside the subnet of said dhcp client place etc.If said Dynamic Host Configuration Protocol server is positioned at other subnets, then the routing iinformation of said Dynamic Host Configuration Protocol server also can comprise: the information of said Dynamic Host Configuration Protocol server place subnet etc.
The obtain manner of the routing iinformation of said Dynamic Host Configuration Protocol server is unrestricted, for example: can be on said current network node the routing iinformation of pre-configured said Dynamic Host Configuration Protocol server; Perhaps, can obtain the routing iinformation of said Dynamic Host Configuration Protocol server according to the broadcasting packet of the routing iinformation that comprises said Dynamic Host Configuration Protocol server that receives; Said broadcasting packet comprises: first relaying declaration message, or other DHCP messages except that first relaying declaration message.
12: start first timer, and in subnet scoping, intercept first relaying declaration message and first relaying election message; Said first relaying declaration message is sent by first network node as DHCP relay in the subnet; Said DHCP relay is used for the routing iinformation according to said Dynamic Host Configuration Protocol server, the data of the dhcp client exchange in said Dynamic Host Configuration Protocol server of relay transmission and the said subnet; Said first relaying election message is sent by second network node that satisfies DHCP relay election condition in the said subnet, comprises the election information of said second network node.
In the subnet scoping at said dhcp client place, current first network node as DHCP relay can the first preset duration be at interval, periodically broadcasting first relaying declaration message in subnet scoping; It is said DHCP relay that said first relaying declaration message is used to announce said first network node.
Second network node that satisfies DHCP relay election condition in the subnet possibly send first relaying election message, is used in subnet, participating in the election of DHCP relay.Second network node can the second preset duration be at interval, periodically to subnet broadcast first relaying election message.When the subnet internal memory as first network node of DHCP relay the time, first network node is broadcasted first relaying declaration message in subnet, said first relaying declaration message is used to announce said first network node as said DHCP relay.
Optional, if receive said first relaying declaration message or said first relaying election message in the said first timer timing range, then restart said first timer.
13:, then start second timer and broadcasting second relaying election message in said subnet scoping if said first timer is overtime and do not receive said first relaying declaration message or said first relaying election message; Said second relaying election message comprises the election information of current network node.
Current network node can be broadcasted second relaying election message in subnet, be used to participate in the election of DHCP relay in this subnet.Optional, current network node can the second preset duration be at interval, periodically said second relaying election of broadcasting message in subnet.
14: if said second timer is overtime and do not receive said first relaying declaration message and do not receive and comprise that priority is higher than first relaying election message of election information of second network node of said current network node, then broadcasting second relaying declaration message in said subnet scoping; Said second relaying declaration message is used to announce said current network node as said DHCP relay.
Optional; If receive said first relaying declaration message in the said second timer timing range; Perhaps, receive and comprise that priority is higher than first relaying election message of election information of second network node of said current network node, then can carry out 12 and 13.
Optional, the election information of said second network node is second identification code of said second network node.Before broadcasting second relaying declaration message, said method also can comprise in said subnet scoping: confirm said first relaying election message that receives in the said second timer timing range; Obtain second identification code of said second network node that definite said first relaying election message comprises; Through the size of more said second identification code and said first identification code, confirm the height of said second network node priority and the said first network node priority.For example: first identification code of the said current network node in the second identification code territory of said second network node is compared; Confirm the priority of the election information of said second network node according to preset judgment criterion, whether greater than the priority of the election information of said current network node.
Above-mentioned first identification code, second identification code and judgment criterion can be provided with according to actual needs, and the embodiment of the invention does not limit.A kind of optional implementation is for example:
Little preferential in judgment criterion 1:MAC address.Second identification code of second network node is: second MAC Address of second network node; First identification code of current network node is: first MAC Address of current network node.If second MAC Address of second network node is less than first MAC Address of current network node, the priority of the election information of second network node then is higher than the priority of the election information of current network node; Otherwise the priority of the election information of second network node is lower than the priority of the election information of current network node.
Big preferential in judgment criterion 2:MAC address.If second MAC Address of second network node is greater than first MAC Address of current network node, the priority of the election information of second network node then is higher than the priority of the election information of current network node; Otherwise the priority of the election information of second network node is lower than the priority of the election information of current network node.
Judgment criterion 3: big preferential of random number.Second identification code of second network node is: second random number that second network node produces; First identification code of current network node is: first random number of the generation of current network node.If second random number of second network node is less than first random number of current network node, the priority of the election information of second network node then is higher than the priority of the election information of current network node; Otherwise the priority of the election information of second network node is lower than the priority of the election information of current network node.
Judgment criterion 4: big preferential of random number.If second random number of second network node is greater than first random number of current network node, the priority of the election information of second network node then is higher than the priority of the election information of current network node; Otherwise the priority of the election information of second network node is lower than the priority of the election information of current network node.
Be appreciated that above-mentioned identification code and judgment criterion are merely optional example, should not be construed as the restriction to embodiment of the invention technical scheme.
Optional, said current network node is broadcasted in subnet scoping after said second relaying declaration message, and other network nodes in the said subnet confirm that then said current network node is said DHCP relay; Because said current network node is obtained the routing iinformation of said Dynamic Host Configuration Protocol server; After said current network node is as said DHCP relay; Between the dhcp client and said Dynamic Host Configuration Protocol server in the said subnet scoping, can carry out exchanges data through said DHCP relay.
In the method that present embodiment provides, the network node in the subnet of dhcp client place can obtain the routing iinformation of Dynamic Host Configuration Protocol server, through intercepting first relaying declaration message, confirms the online situation of current first network node as DHCP relay in this subnet; Through intercepting first relaying election message, obtain the situation that second network node in this subnet is participated in the DHCP relay election; And can participate in the DHCP relay election through broadcasting second relaying election message, and boot and be DHCP relay through broadcasting second relaying declaration message, in this subnet, realized the automatic configuration of DHCP relay thus.
The technical scheme that adopts present embodiment to provide; Can be under situations such as subnet dilatation, evolution upgrading or fault; Through the DHCP relay of electing between the network node; By this DHCP relay is the dhcp client forwarding swap data in Dynamic Host Configuration Protocol server and the subnet, obtains the network configuration information of dhcp client thus.The present embodiment DHCP relay need not manual configuration, has improved the efficient of DHCP relay configuration, and has reduced the required cost of configuration DHCP relaying.
Fig. 2 a and Fig. 2 b are two Application Scenarios-Examples of the DHCP relay collocation method that provides of the embodiment of the invention.Shown in Fig. 2 a, in the subnet at dhcp client place, be integrated with gateway function as the network node of DHCP relay, dhcp client through DHCP relay directly and Dynamic Host Configuration Protocol server mutual.Shown in Fig. 2 b, in the subnet at dhcp client place, as the network node and the gateway function entity separation of DHCP relay, dhcp client is through DHCP relay and mutual through gateway and Dynamic Host Configuration Protocol server.Above-mentioned two application scenarioss are merely the Application Scenarios-Example of the embodiment of the invention, and DHCP relay and gateway can be integrated into an equipment entity or separable and be different equipment entity.The embodiment of the invention is only explained the function of DHCP relay, whether this DHCP relay is integrated with gateway function does not limit.
Fig. 3 a is the State Control sketch map one of the state machine of the network node internal operation that provides of the embodiment of the invention two.The implication of the employed legend of Fig. 3 a is referring to shown in Fig. 3 d, and the implication of each state of being in of network node, network node operation and the network node in each state transform between different conditions and need the condition stub that satisfies, referring to shown in the table 1.
Table 1
Figure BDA0000133166180000081
Figure BDA0000133166180000091
In subnet scoping, the DHCP relay of user's manual configuration is said formal DHCP relay.Described formal DHCP relay 2 states of above-mentioned Fig. 3 a and table 1 have embodied automatic configuration of DCHP relaying and user and have disposed compatible application scenarios.Be in the network node of the arbitrary state outside formal DHCP relay 2 states in the subnet, all can be configured to formal DHCP relay, this network node and then change formal DHCP relay 2 states over to, the state machine of this network node is exemplified as shown in Fig. 3 b.
And be in the network node of formal DHCP relay 2 states, also can open or close the automatic configuration feature of DHCP relay.Closed the automatic configuration feature of DHCP relay if be configured to the network node of formal DHCP relay, then do not handled with DHCP relay and dispose relevant message automatically.Open the automatic configuration feature of DHCP relay if be configured to the network node of formal DHCP relay; Then this network node is handled outside its basic function as formal DHCP relay of operation, also can be used as common network node and participates in the automatic configuration flow of DHCP relay.
Optional, be in the network node of the arbitrary state outside 6 states of termination in the subnet, all can close the automatic configuration feature of DHCP relay of this network node, this network node and then change 6 states of termination over to, the state machine of this network node is exemplified as shown in Fig. 3 c.
Optional, the network node that is in configuration 1 state reads configuration data, and this configuration data can comprise: the information of whether opening the automatic configuration feature of DHCP relay; Also can comprise: whether be configured to the information of formal DHCP relay, the timing length of first timer, the information such as timing length, the first preset duration and/or the second preset duration of second timer.Above-mentioned various duration information can be through network node the different values of configuration parameter pre-configured.Wherein, the explanation of the implication of the title of configuration parameter, value and each configuration parameter is as shown in table 2.
Table 2
Figure BDA0000133166180000102
Figure BDA0000133166180000111
Optional, dispose relevant message automatically with DHCP relay, like relaying declaration message, relaying election message etc., can adopt the form of address resolution protocol (Address Resolution Protocol is called for short ARP) broadcasting packet.Existing ARP broadcasting packet 28-44 position can define the implication that DHCP relay disposes association message automatically based on these expansion for keeping the position.
Fig. 4 disposes the format sample of association message for the embodiment of the invention three is that provide with DHCP relay automatically.In the ARP message as shown in Figure 4:
The 28-32 byte is the type of message sign: these bytes can be filled the message identification code, as filling the identification codes such as ASCII character of " DARRDARR ", are used to identify this message for disposing relevant message automatically with DHCP relay.
The 36-44 byte is option (Option), comprising: type (Type) option, payload length (Length) option, numerical value (Value) option etc.If a certain ARP broadcasting packet does not carry option (Option), then each byte of option (Option) all fills 0; If the value of type (Type) option equals 0, represent that then the type (Type) option is invalid option; Payload length (Length) option is unit with the byte, but value 0-8, when the value of payload length (Length) option greater than 8, represent that then this payload length (Length) option is invalid option; The value length of numerical value (Value) option is the 0-8 byte, if the value length of numerical value (Value) option less than 8, then the afterbody of this numerical value (Value) option is filled with 0.
The represented implication of the different values of each concrete option is as shown in table 3 in the above-mentioned option (Option).
Table 3
Figure BDA0000133166180000121
Figure BDA0000133166180000131
Optional, in the above-mentioned table 3: carry the option of the routing iinformation of Dynamic Host Configuration Protocol server,, be carried in and send in the DHCP relay declaration message like the address of Dynamic Host Configuration Protocol server and the next hop address that reaches Dynamic Host Configuration Protocol server etc.; Carry the option of the election information of network node,, be carried in the DHCP relay election message and send like software or hwid or random number etc.
Optional; For preventing that the neighbor entry of People Near Me is caused undesired refreshing; The body part of ARP broadcasting packet as shown in Figure 4; The collision detection message format that meets RFC 5227, that is: the value of source IP address (SPA) territory and source MAC territory (SHA) does not match, and the value of (TPA) territory, purpose IP address and target MAC (Media Access Control) address territory (THA) does not match.The value in these territories is for example:
Source IP address (SPA) territory=0.0.0.0;
The interface mac address of the network node of territory, source MAC territory (SHA)=this message of transmission;
The interface IP address of the network node of territory, purpose IP address (SPA)=this message of transmission;
Source MAC territory (SHA) territory=0x000000000000.
If in the ARP broadcasting packet that network node receives; The value of source IP address (SPA) territory and source MAC territory (SHA) does not match; The value of (TPA) territory, purpose IP address and target MAC (Media Access Control) address territory (THA) does not match, and then this network node can not refresh the neighbor entry of this network node after receiving this ARP broadcasting packet; Thereby the error message that the neighbor entry of having avoided this ARP broadcasting packet that this network node is safeguarded possibly introduced helps realizing the compatibility with existing system.
The structural representation of the network node that Fig. 5 provides for the embodiment of the invention four.Network node as shown in Figure 5 comprises: server info acquisition module 51, relay messages are intercepted module 52, relaying election processing module 54 and relaying announcement process module 55.
Server info acquisition module 51 can be used for obtaining the routing iinformation of Dynamic Host Configuration Protocol server.
Relay messages is intercepted module 52 and can be used for starting first timer, and in subnet scoping, intercepts first relaying declaration message and first relaying election message; Said first relaying declaration message is sent by first network node as DHCP relay in the subnet; Said DHCP relay is used for the routing iinformation according to said Dynamic Host Configuration Protocol server, the data of the dhcp client exchange in said Dynamic Host Configuration Protocol server of relay transmission and the said subnet; Said first relaying election message is sent by second network node that satisfies DHCP relay election condition in the said subnet, comprises the election information of said second network node.
Relaying election processing module 54 can be used for starting second timer, and broadcasting second relaying is elected message in said subnet scoping; Said second relaying election message comprises the election information of current network node.
If it is overtime and do not receive said first relaying declaration message and do not receive and comprise that priority is higher than first relaying election message of election information of second network node of said current network node, then broadcasting second relaying declaration message in said subnet scoping that relaying announcement process module 55 can be used for said second timer; Said second relaying declaration message is used to announce said current network node as said DHCP relay.
Optional, if intercepting module 52, said relay messages also can be used for receiving in the said first timer timing range said first relaying declaration message or said first relaying election message, then restart said first timer.
Optional, the difference of the obtain manner of the routing iinformation of Dynamic Host Configuration Protocol server, the concrete function of server info acquisition module 51 is different.For example: said server info acquisition module 51 specifically is used in the routing iinformation of pre-configured said Dynamic Host Configuration Protocol server on the said current network node.Perhaps, said server info acquisition module 51 specifically can be used for the broadcasting packet according to the routing iinformation that comprises said Dynamic Host Configuration Protocol server that receives, and obtains the routing iinformation of said Dynamic Host Configuration Protocol server; Said broadcasting packet comprises: said first relaying declaration message, or other DHCP messages except that said first relaying declaration message.
Optional, the network node that present embodiment provides also can further comprise: election message determination module 531, message election information acquisition module 532 and priority determination module 533.
Said first relaying that election message determination module 531 can be used for receiving in definite said second timer timing range is elected message.
Message election information acquisition module 532 can be used for obtaining the election information of said second network node that definite said first relaying election message comprises, the election information of said second network node is second identification code of said second network node.
Priority determination module 533 can be used for the size through more said second identification code and said first identification code; Confirm the height of said second network node priority and the said first network node priority; For example: said second identification code less than or during greater than first identification code of said current network node, confirm that the priority of the election information of said second network node is lower than said current network node.
The network node that present embodiment provides can obtain the routing iinformation of Dynamic Host Configuration Protocol server, through intercepting first relaying declaration message, confirms that dhcp client belongs to the online situation of current first network node as DHCP relay in the subnet; Through intercepting first relaying election message, obtain the situation that second network node in this subnet is participated in the DHCP relay election; And can participate in the DHCP relay election through broadcasting second relaying election message; And boot and be DHCP relay through broadcasting second relaying declaration message; In this subnet, realized the automatic configuration of DHCP relay thus; Saved the loaded down with trivial details of manual configuration, improved the efficient of DHCP relay configuration, and reduced the required cost of configuration DHCP relaying.
The structural representation of the relaying system configured that Fig. 6 provides for the embodiment of the invention five.System as shown in Figure 6 comprises: dhcp client 61, first DHCP relay 62 and Dynamic Host Configuration Protocol server 63.Said dhcp client 61 is positioned at subnet with said first DHCP relay 62, and said Dynamic Host Configuration Protocol server 63 is positioned at outside the said subnet.Wherein, a plurality of network nodes that first DHCP relay 62 is comprised by said subnet are used for the data of said Dynamic Host Configuration Protocol server of relay transmission and said dhcp client exchange through electing; The network node of participating in said first DHCP relay of election has the structure like the described network node of the corresponding embodiment of Fig. 5.
Optional, system as shown in Figure 6 also can comprise: second DHCP relay 64.The function of second DHCP relay 64 can be identical with the function of first DHCP relay 61, promptly is used for the data (as shown in Figure 6) of said Dynamic Host Configuration Protocol server 63 of relay transmission and said dhcp client 61 exchanges; Perhaps, the function of second DHCP relay 64 also can be different with the function of first DHCP relay 61, promptly are used for the data of relay transmission client and other Dynamic Host Configuration Protocol server exchanges except that Dynamic Host Configuration Protocol server shown in Figure 6 63.Said second DHCP relay 64 is produced through manually disposing by arbitrary network node of a plurality of network nodes that said subnet comprises; And network node as said second DHCP relay; Do not participate in the election of said first DHCP relay; Its working mechanism can referring among Fig. 5 about the corresponding record of " formal DHCP relay ", repeat no more at this.
One of ordinary skill in the art will appreciate that: accompanying drawing is the sketch map of an embodiment, and module in the accompanying drawing or flow process might not be that embodiment of the present invention is necessary.
One of ordinary skill in the art will appreciate that: the module in the network node among the embodiment can be described according to embodiment and be distributed in the network node of embodiment, also can carry out respective change and be arranged in the one or more network nodes that are different from present embodiment.The module of the foregoing description can be merged into a module, also can further split into a plurality of submodules.
One of ordinary skill in the art will appreciate that: all or part of step that realizes above-mentioned each method embodiment can be accomplished through the relevant hardware of program command.Aforesaid program can be stored in the computer read/write memory medium.This program the step that comprises above-mentioned each method embodiment when carrying out; And aforesaid storage medium comprises: various media that can be program code stored such as ROM, RAM, magnetic disc or CD.
What should explain at last is: above embodiment is only in order to explaining technical scheme of the present invention, but not to its restriction; Although with reference to previous embodiment the present invention has been carried out detailed explanation, those of ordinary skill in the art is to be understood that: it still can be made amendment to the technical scheme that aforementioned each embodiment put down in writing, and perhaps part technical characterictic wherein is equal to replacement; And these are revised or replacement, do not make the spirit and the scope of the essence disengaging various embodiments of the present invention technical scheme of relevant art scheme.

Claims (13)

1. the method for a relaying configuration is characterized in that, comprising:
Obtain the routing iinformation of dynamic host configuration protocol DHCP server;
Start first timer, and in subnet scoping, intercept first relaying declaration message and first relaying election message; Said first relaying declaration message is sent by first network node as DHCP relay in the subnet; Said DHCP relay is used for the routing iinformation according to said Dynamic Host Configuration Protocol server, the data of the dhcp client exchange in said Dynamic Host Configuration Protocol server of relay transmission and the said subnet; Said first relaying election message is sent by second network node that satisfies DHCP relay election condition in the said subnet, comprises the election information of said second network node;
If said first timer is overtime and do not receive said first relaying declaration message or said first relaying election message, then start second timer and broadcasting second relaying election message in said subnet scoping; Said second relaying election message comprises the election information of current network node;
If said second timer is overtime and do not receive said first relaying declaration message and do not receive and comprise that priority is higher than first relaying election message of election information of second network node of said current network node, then broadcasting second relaying declaration message in said subnet scoping; Said second relaying declaration message is used to announce said current network node as said DHCP relay.
2. method according to claim 1 is characterized in that, said method also comprises:
If receive said first relaying declaration message or said first relaying election message in the said first timer timing range, then restart said first timer.
3. method according to claim 1 and 2 is characterized in that,
The election information of said second network node is second identification code of said second network node;
Before broadcasting second relaying declaration message, said method also comprises in said subnet scoping: confirm said first relaying election message that receives in the said second timer timing range; Obtain second identification code of said second network node that definite said first relaying election message comprises; Through the size of more said second identification code and said first identification code, confirm the height of said second network node priority and the said first network node priority.
4. method according to claim 3 is characterized in that,
Said second identification code is second MAC Address of said second network node, and said first identification code is first MAC Address of said current network node; Perhaps,
Said second identification code is second random number that said second network node produces, and said first identification code is first random number that said current network node produces.
5. according to each described method of claim 1 to 4, it is characterized in that the said routing iinformation that obtains Dynamic Host Configuration Protocol server comprises:
The routing iinformation of pre-configured said Dynamic Host Configuration Protocol server on said current network node; Perhaps,
According to the broadcasting packet of the routing iinformation that comprises said Dynamic Host Configuration Protocol server that receives, obtain the routing iinformation of said Dynamic Host Configuration Protocol server; Said broadcasting packet comprises: said first relaying declaration message, or other DHCP messages except that said first relaying declaration message.
6. according to each described method of claim 1 to 5, it is characterized in that said second relaying declaration message of in said subnet scoping, broadcasting comprises, is the interval with the first preset duration, periodically broadcasts said second relaying declaration message to said subnet scoping.
7. according to each described method of claim 1 to 5, it is characterized in that said method comprises that also with the second preset duration be the interval, periodically broadcast said second relaying election message to said subnet scoping.
8. a network node is characterized in that, comprising:
The server info acquisition module is used to obtain the routing iinformation of dynamic host configuration protocol DHCP server;
Relay messages is intercepted module, is used to start first timer, and in subnet scoping, intercepts first relaying declaration message and first relaying election message; Said first relaying declaration message is sent by first network node as DHCP relay in the subnet; Said DHCP relay is used for the routing iinformation according to said Dynamic Host Configuration Protocol server, the data of the dhcp client exchange in said Dynamic Host Configuration Protocol server of relay transmission and the said subnet; Said first relaying election message is sent by second network node that satisfies DHCP relay election condition in the said subnet, comprises the election information of said second network node;
Relaying election processing module is used to start second timer, and broadcasting second relaying is elected message in said subnet scoping; Said second relaying election message comprises the election information of current network node;
Relaying announcement process module; If it is overtime and do not receive said first relaying declaration message and do not receive and comprise that priority is higher than first relaying election message of election information of second network node of said current network node, then broadcasting second relaying declaration message in said subnet scoping to be used for said second timer; Said second relaying declaration message is used to announce said current network node as said DHCP relay.
9. network node according to claim 8 is characterized in that,
Said relay messages is intercepted module, if also be used for receiving in the said first timer timing range said first relaying declaration message or said first relaying election message, then restarts said first timer.
10. according to Claim 8 or 9 described network nodes, it is characterized in that, also comprise:
Election message determination module is used for said first relaying election message that receives in definite said second timer timing range;
Message election information acquisition module is used to obtain the election information of said second network node that definite said first relaying election message comprises, the election information of said second network node is second identification code of said second network node;
The priority determination module is used for the size through more said second identification code and said first identification code, confirms the height of said second network node priority and the said first network node priority.
11. arbitrary according to Claim 8-10 described network node is characterized in that,
Said server info acquisition module specifically is used for the routing iinformation of pre-configured said Dynamic Host Configuration Protocol server on said current network node;
Perhaps,
Said server info acquisition module specifically is used for the broadcasting packet according to the routing iinformation that comprises said Dynamic Host Configuration Protocol server that receives, and obtains the routing iinformation of said Dynamic Host Configuration Protocol server; Said broadcasting packet comprises: said first relaying declaration message, or other DHCP messages except that said first relaying declaration message.
12. a relaying system configured is characterized in that, comprising:
Dhcp client, first DHCP relay and Dynamic Host Configuration Protocol server; Said dhcp client and said first DHCP relay are positioned at subnet, and said Dynamic Host Configuration Protocol server is positioned at outside the said subnet;
A plurality of network nodes that said first DHCP relay is comprised by said subnet are used for the data of said Dynamic Host Configuration Protocol server of relay transmission and said dhcp client exchange through electing; The network node of participating in said first DHCP relay of election is like the arbitrary described network node of claim 8 to 11.
13. system according to claim 12 is characterized in that, also comprises:
Second DHCP relay is used for the data that said Dynamic Host Configuration Protocol server of relay transmission and said dhcp client exchange;
Arbitrary network node of a plurality of network nodes that said second DHCP relay is comprised by said subnet produces through manual configuration, and as the network node of said second DHCP relay, does not participate in the election of said first DHCP relay.
CN201210021061.7A 2012-01-30 2012-01-30 Method of relay configuration, network node and system Active CN102571594B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210021061.7A CN102571594B (en) 2012-01-30 2012-01-30 Method of relay configuration, network node and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210021061.7A CN102571594B (en) 2012-01-30 2012-01-30 Method of relay configuration, network node and system

Publications (2)

Publication Number Publication Date
CN102571594A true CN102571594A (en) 2012-07-11
CN102571594B CN102571594B (en) 2015-04-15

Family

ID=46416095

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210021061.7A Active CN102571594B (en) 2012-01-30 2012-01-30 Method of relay configuration, network node and system

Country Status (1)

Country Link
CN (1) CN102571594B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111131027A (en) * 2018-10-31 2020-05-08 中兴通讯股份有限公司 Mapping server processing method, device and storage medium
CN111447568A (en) * 2020-03-27 2020-07-24 深圳桔子智能科技发展有限公司 Gateway competition method, system and gateway
CN114827003A (en) * 2022-03-21 2022-07-29 浪潮思科网络科技有限公司 Topology election method, device, equipment and medium of distributed system

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101335652A (en) * 2007-06-29 2008-12-31 华为技术有限公司 Status detection method, apparatus and system of dynamic host configuring protocol

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101335652A (en) * 2007-06-29 2008-12-31 华为技术有限公司 Status detection method, apparatus and system of dynamic host configuring protocol

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘永刚: "基于Linux系统的VRRP for IPv6的研究与实现", 《吉林大学硕士学位论文》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111131027A (en) * 2018-10-31 2020-05-08 中兴通讯股份有限公司 Mapping server processing method, device and storage medium
CN111447568A (en) * 2020-03-27 2020-07-24 深圳桔子智能科技发展有限公司 Gateway competition method, system and gateway
CN114827003A (en) * 2022-03-21 2022-07-29 浪潮思科网络科技有限公司 Topology election method, device, equipment and medium of distributed system
CN114827003B (en) * 2022-03-21 2024-05-14 浪潮思科网络科技有限公司 Topology election method, device, equipment and medium of distributed system

Also Published As

Publication number Publication date
CN102571594B (en) 2015-04-15

Similar Documents

Publication Publication Date Title
CN102647486B (en) Address distribution method, equipment and system
CN101510853B (en) Method and apparatus for implementing WLAN wireless bridge, and wireless access client terminal
CN103957288A (en) Method, device and equipment for IP address dynamic allocation
CN102098354B (en) Method and server for allocating dynamic host configuration protocol (DHCP) addresses
EP2388717B1 (en) Method of controlling mobile terminal, home hub, and visited hub in virtual group for content sharing
CN102340546A (en) IPv6 (Internet Protocol Version 6) address allocation method and system
CN102984288A (en) Method and system for managing internet protocol version 6 (IPV6) address conflicts automatically
CN101179566A (en) Method and apparatus for preventing ARP packet attack
CN102075590A (en) Methods and corresponding systems for acquiring and configuring network parameters by utilizing base station
CN101820382A (en) Method, device and system for announcing information of network address translation equipment
CN105491600A (en) Network access method, device and related equipment for household appliances
CN102148879A (en) Port mapping method and device and communication system
CN102439949A (en) Method for solving internet protocol address assignment conflict and related device and system
CN102118453B (en) Method, service device, client and communication system for automatic configuration of IP address
CN104754070A (en) Method and device for learning address resolution protocol table entries and network device
CN102571594A (en) Method of relay configuration, network node and system
WO2015032452A1 (en) Connecting radio base stations via a third party network
CN106487948A (en) A kind of DHCP service management system and DHCP service management method
US8300649B2 (en) Mobility management method for mobile terminals in a cellular wireless communication system, and equipment for implementing the method
CN102394948A (en) DHCP (dynamic host configuration protocol) address distribution method and DHCP server
US20120269092A1 (en) Auto-configuration of network devices
CN103096300A (en) Base station virtual local area network recognition number automatic acquiring method and system
CN101656724A (en) Anti-attack method and dynamic host configuration protocol server
US20120008627A1 (en) Method and apparatus for assigning device identifier with collision avoidance
CN103959747A (en) Base station opening method and base station opening system

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