CN105592181A - Link load balancing method and device - Google Patents

Link load balancing method and device Download PDF

Info

Publication number
CN105592181A
CN105592181A CN201510670698.2A CN201510670698A CN105592181A CN 105592181 A CN105592181 A CN 105592181A CN 201510670698 A CN201510670698 A CN 201510670698A CN 105592181 A CN105592181 A CN 105592181A
Authority
CN
China
Prior art keywords
domain name
message
address
dns
load
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.)
Pending
Application number
CN201510670698.2A
Other languages
Chinese (zh)
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.)
Hangzhou 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 CN201510670698.2A priority Critical patent/CN105592181A/en
Publication of CN105592181A publication Critical patent/CN105592181A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present invention provides a link load balancing method and device The method comprises: obtaining the domain name carried in a DNS response message when a load balancing device receives the DNS response message sent by a DNS server, and the DNS response message is used for replying the message of an IP address corresponding to the domain name required by the DNS request message; determining whether the domain name matches a configured specific domain name in advance or not; if domain name matches a configured specific domain name in advance, generating a dynamic item, wherein the dynamic item includes the IP address corresponding to the domain name carried by the DNS response message; when receiving the data message sent by a user terminal, inquiring the dynamic item according to the object IP address of the data message; and if there is provided an IP address being the same as the object IP address of the data message in the dynamic item, forwarding the data message through a specific link. Through adoption of the embodiment of the invention, the link load balancing method and device are able to optimize the load balancing effect.

Description

A kind of balancing link load method and device
Technical field
The present invention relates to network communications technology field, relate in particular to a kind of balancing link load method and device.
Background technology
Balancing link load technology is a kind of technology that Intranet user access outer net link is experienced of improving, and it is logicalCross operator access problem while crossing close principle solution Intranet user access outer net link, and pass through chainRoad Detection Techniques solve outbound integrity problem.
Because some particular station need to be accessed by particular link, for the problems referred to above, existing link is negativeCarry in equalization scheme, when object IP (InternetProtocol, the internet of the flow of accessing outer network from inner networkAgreement) address is not while belonging to domestic address field, and all by particular link, (special services provider is correspondingLink) forward.
But practice discovery, in such scheme, all accessing outer network from inner networks, and object IP address does not belong toThe flow of domestic address field all forwards by particular link, and load balancing effect is poor.
Summary of the invention
The invention provides a kind of balancing link load method and device, to solve existing balancing link load sideAll accessing outer network from inner networks in case, and the flow that object IP address does not belong to domestic address field is all by specificLink forwards, the problem that load balancing effect is poor.
According to the first aspect of the embodiment of the present invention, a kind of balancing link load method is provided, comprising:
When load-balancing device receives the DNS response message that domain name system DNS server sends, andThis DNS response message is the Internet protocol IP address corresponding to domain name of replying the request of DNS request messageMessage time, obtain the domain name of carrying in this DNS response message;
Described load-balancing device judges whether domain name mates with pre-configured certain domain name; Wherein,Described certain domain name is the predefined domain name that need to access by particular link;
If so, described load-balancing device generates dynamic entry; Wherein, described in described dynamic entry comprisesIP address corresponding to domain name that DNS response message carries;
In the time that described load-balancing device receives the data message of user terminal transmission, according to described dataDynamic entry described in the object IP address lookup of message;
If there is the IP address identical with the object IP address of described data message in described dynamic entry,Described load-balancing device forwards described data message by described particular link.
According to the second aspect of the embodiment of the present invention, a kind of balancing link load device is provided, be applied to negativeCarry balancing equipment, comprising:
Acquiring unit, should for the DNS that receives the transmission of domain name system DNS server when described deviceAnswer message, and this DNS response message is the internet corresponding to domain name of replying the request of DNS request messageWhen the message of protocol IP address, obtain the domain name of carrying in this DNS response message;
Judging unit, for judging whether domain name mates with pre-configured certain domain name; Wherein,Described certain domain name is the predefined domain name that need to access by particular link;
Generation unit, in the time that described judging unit is judged as YES, generates dynamic entry; Wherein, instituteState IP address corresponding to domain name that dynamic entry comprises that described DNS response message carries;
Query unit, for receive when described device user terminal send data message time, according to instituteState dynamic entry described in the object IP address lookup of data message;
Transmitting element, if exist and the object IP address phase of described data message for described dynamic entrySame IP address, forwards described data message by described particular link.
The application embodiment of the present invention, by the pre-configured certain domain name that need to forward by particular link,When load-balancing device receives the DNS response message that dns server sends, and this DNS replys reportWhen literary composition is the message of IP address corresponding to the domain name for replying the request of DNS request message, carry out domain nameResolve, and the domain name comprising when this DNS response message is while mating with pre-configured certain domain name, gives birth toBecome corresponding dynamic entry, and according to the forwarding of this dynamic entry guide data message, so that object IP groundLocation is that the data message of IP address corresponding to pre-configured certain domain name forwards by link, with existing skillIn art, all accessing outer network from inner networks, and the flow that object IP address does not belong to domestic address field is all by specialDetermine the implementation of link forwarding and compare, realized the load balancing control based on domain name, optimized loadPortfolio effect.
Brief description of the drawings
Fig. 1 is the schematic flow sheet of a kind of balancing link load method of providing of the embodiment of the present invention;
Fig. 2 is the schematic flow sheet of the another kind of balancing link load method that provides of the embodiment of the present invention;
Fig. 3 is a kind of hardware configuration of the balancing link load device place equipment that provides of the embodiment of the present inventionFigure;
Fig. 4 is the structural representation of a kind of balancing link load device of providing of the embodiment of the present invention;
Fig. 5 is the structural representation of the another kind of balancing link load device that provides of the embodiment of the present invention;
Fig. 6 is the structural representation of the another kind of balancing link load device that provides of the embodiment of the present invention.
Detailed description of the invention
In order to make those skilled in the art person understand better the technical scheme in the embodiment of the present invention, and makeAbove-mentioned purpose, the feature and advantage of the embodiment of the present invention can become apparent more, below in conjunction with accompanying drawing pairIn the embodiment of the present invention, technical scheme is described in further detail.
Referring to Fig. 1, the schematic flow sheet of a kind of balancing link load method providing for the embodiment of the present invention,As shown in Figure 1, this balancing link load method can comprise the following steps:
It should be noted that, step 101 to the executive agent of step 105 is load-balancing device or loadProcessor in balancing equipment, as CPU (English full name: CenterProcessUnit). For ease of retouchingState, below taking executive agent as load-balancing device as example describes.
Step 101, receive DNS response message when load-balancing device, and this DNS response messageDuring for the message of IP address corresponding to the domain name for replying the request of DNS request message, obtain this DNSThe domain name of carrying in response message.
In the embodiment of the present invention, in the time that load-balancing device receives message, can separate this messageAnalyse, and obtain the source port in this message, if the source port of this message is TCP (TransmissionControlProtocol, transmission control protocol)/UDP (UserDatagramProtocol, user dataProtocol massages) No. 53 ports, load-balancing device can tentatively think that this message is that DNS replys reportLiterary composition, and then, can determine whether this message is DNS response message according to the message format of this message.
In the time that load-balancing device determines that the message receiving is DNS response message, can further obtainThe DNS record type that this DNS response message comprises, to determine that whether this DNS response message is as useIn the message of IP address corresponding to the domain name of replying the request of DNS request message; If so, load balancing is establishedFor obtaining the domain name of carrying in this DNS response message; Otherwise load-balancing device can be according to itIts strategy is processed, and the embodiment of the present invention does not limit this.
Step 102, load-balancing device judge whether this domain name mates with pre-configured certain domain name;Wherein, this certain domain name is the predefined domain name that need to access by particular link. If so, go toStep 103; Otherwise, finish current flow process.
In the embodiment of the present invention, consider all accessing outer network from inner networks in existing balancing link load scheme,And the flow that object IP address does not belong to domestic address field all forwards by particular link, causes load balancingEffect is poor, and in practical application scene, only has the flow of access portion domain name need to pass through particular linkForward, having object IP address is non-domestic address field, but can not need to turn by particular linkThe flow of sending out can configure and need to pass through particular link (this particular link in advance in load-balancing deviceCan be preset by user) access domain name (hereinafter referred to as certain domain name).
Correspondingly, when load-balancing device receives DNS response message, and this DNS response message isWhen replying the message of IP address corresponding to the domain name of DNS request message request, can judge this DNSWhether the domain name of carrying in response message mates with pre-configured certain domain name.
Alternatively, in embodiments of the present invention, the domain name of carrying in DNS response message and pre-configuredCertain domain name coupling can include but not limited to exist with this DNS and reply in pre-configured certain domain nameThe identical domain name of domain name of carrying in message, or the domain name of carrying in DNS response message comprises pre-configuredCertain domain name.
For instance, suppose that pre-configured certain domain name compriseswww.abcde.com, work as DNSIn response message, carry domain namewww.abcde.comTime, can think this domain name and pre-configured specificDomain name coupling (exists identical with the domain name of carrying in this DNS response message in pre-configured certain domain nameDomain name).
Again for instance, suppose that pre-configured certain domain name comprises * .abcde.com, works as DNSIn response message, carry domain namewww.abcde.comTime, can think this domain name and pre-configured specificDomain name coupling (domain name of carrying in DNS response message comprises pre-configured certain domain name).
Step 103, load-balancing device generate dynamic entry, and wherein, this dynamic entry comprises that DNS shouldAnswer IP address corresponding to domain name that message carries.
In the embodiment of the present invention, when load-balancing device determines that domain name that DNS response message comprises is with pre-When first the certain domain name of configuration is mated, load-balancing device can be according to the DNS record in this response messageDetermine the IP address corresponding to domain name of carrying in this DNS response message, and generate corresponding dynamic entry,In this dynamic entry, can comprise the IP address corresponding to domain name of carrying in this DNS response message.
Wherein, to record IP address corresponding to domain name comprising be IPv4 (InternetProtocol to DNSVersion4, Internet protocol the 4th edition) IP address or the IPv6 (InternetProtocolVersion of type6, Internet protocol the 6th edition) the IP address of type.
It should be noted that in embodiments of the present invention, when load-balancing device is determined DNS response messageIn the domain name of carrying while not mating with pre-configured certain domain name, load-balancing device can be according to otherStrategy is processed, and the embodiment of the present invention does not limit this.
Further, as the optional embodiment of one, in embodiments of the present invention, above-mentioned dynamic tableIn, can also comprise TTL (TimeToLive, life span), this TTL can answer according to DNSAnswering the life span that DNS resource record that message comprises comprises determines.
Correspondingly, in this embodiment, load-balancing device generates after dynamic entry, can also basisThe TTL that dynamic entry comprises carries out aging to corresponding dynamic entry, every the unit interval (as 1Second) to the TTL of dynamic entry is subtracted to one, and in the time that the TTL of dynamic entry is 0, delete that this is dynamicList item.
For example, load-balancing device can arrange an independently process, and this process can periodically be examinedTTL in the dynamic entry that survey load-balancing device is safeguarded, and the dynamic entry of TTL=0 is carried out alwaysChange.
Step 104, when load-balancing device receive user terminal send data message time, according to thisThe object IP address lookup dynamic entry of data message.
In the embodiment of the present invention, when load-balancing device receives message, and the source port of definite this messageAnd destination interface is not while being all TCP/UDP53 port, load-balancing device can be determined this messageFor non-DNS message (or being called data message), now, load-balancing device can obtain this datagramThe object IP address of literary composition, and according to this object IP address lookup dynamic entry, to determine in dynamic entryWhether there is identical IP address.
If there is the IP ground identical with the object IP address of this data message in step 105 dynamic entryLocation, load-balancing device forwards this data message by particular link.
In the embodiment of the present invention, when load-balancing device is moving according to the object IP address of this data messageIn state list item, inquire identical IP address, in dynamic entry, have the object IP with this data message, load-balancing device can forward this data message by particular link when the identical IP address, address. ?In the technical scheme providing in the embodiment of the present invention, object IP address is pre-configured certain domain name correspondenceThe datagram literary talent of IP address need to forward by particular link, instead of all object IP address is notThe data message that belongs to domestic address field all needs to forward by particular link.
It should be noted that in embodiments of the present invention, when load-balancing device is according to the order of data messageIP address do not inquire corresponding IP address, in dynamic entry, there is not the order with this data messageIdentical IP address, IP address time, load-balancing device can be determined this datagram according to other strategyThe conversion link of literary composition, the embodiment of the present invention does not limit this.
As the optional embodiment of one, in the time also comprising TTL in dynamic entry, above-mentioned steps 104In, if be present in identical IP address, the object IP address of data message in dynamic entry, above-mentioned negativeCarry before balancing equipment forwards this data message by particular link, can also comprise the following steps:
11), load-balancing device judges the moving of the IP address identical with the object IP address of this data messageWhether the TTL that state list item comprises is 0;
12), if not, determine and carry out the step that forwards this data message by this particular link.
In this embodiment, when load-balancing device according to the object IP address of data message at dynamic tableIn while inquiring identical IP address, load-balancing device can further judge this and data messageWhether the TTL that the identical dynamic entry in object IP address comprises is 0, and whether this dynamic entry is effective,If not, TTL is not 0, and load-balancing device can be forwarded and is somebody's turn to do by predefined particular linkData message.
Wherein, if the TTL that dynamic entry comprises is 0, this dynamic entry is invalid, load balancingEquipment can forward this data message according to other strategy, and the embodiment of the present invention does not limit this.
Further, as the optional embodiment of one, in above-mentioned dynamic entry, can also comprise DNSThe domain name of carrying in response message, the embodiment of the present invention can also comprise the following steps:
21), in the time that load-balancing device receives DNS request message, and this DNS request message for useIn the time asking the message of IP address corresponding to domain name, obtain the domain name of carrying in this DNS request message;
22), load-balancing device is according to the inquiry of the domain name dynamic entry carrying in this DNS request message;
23) if there is the identical domain name of domain name comprising with this DNS request message in dynamic entry,Load-balancing device obtains IP address corresponding to this domain name, and to the use that sends this DNS request messageFamily terminal is returned to the DNS response message that carries this domain name and IP address corresponding to this domain name.
In this embodiment, when load-balancing device receives message, and the destination of definite this messageWhen mouth is TCP/UDP53 port, load-balancing device can be further according to the message lattice of this messageFormula determines whether this message is DNS request message.
Determining this message when load-balancing device is DNS request message, and determines in this message to be for askingWhile asking the message of IP address corresponding to domain name, load-balancing device can obtain in this DNS request messageThe domain name comprising, and according to the above-mentioned dynamic entry of this inquiry of the domain name.
If there is the identical domain name of domain name comprising with DNS request message, load in this dynamic entryBalancing equipment can obtain IP address corresponding to this domain name that this dynamic entry comprises, and should to sendingThe transmit leg of DNS request message return carry the DNS of this domain name and IP address corresponding to this domain name shouldAnswer message, realize DNS request generation and answer, to reduce the load of dns server, and improve DNS requestTreatment effeciency.
Visible, in the described method flow of Fig. 1, need to turn by particular link by pre-configuredThe certain domain name of sending out, when load-balancing device receives the DNS response message that dns server sends,And this DNS response message is the report of IP address corresponding to the domain name for replying the request of DNS request messageWen Shi, carries out domain name mapping, and when the domain name of carrying in this DNS response message and pre-configured specificWhen domain name coupling, generate corresponding dynamic entry, and according to the forwarding of this dynamic entry guide data message,So that the data message of the IP address that to be pre-configured certain domain name corresponding, object IP address passes through linkForward, in prior art, all accessing outer network from inner networks, and object IP address does not belong to domestic address fieldThe implementation that all forwards by particular link of flow compare, realized the load balancing control based on domain nameSystem, has optimized load balancing effect.
Referring to Fig. 2, the flow process signal of the another kind of balancing link load method providing for the embodiment of the present inventionFigure, as shown in Figure 2, this balancing link load method can comprise the following steps:
It should be noted that, step 201 to the executive agent of step 209 is load-balancing device or loadProcessor in balancing equipment, as CPU. For ease of describing, below establish taking executive agent as load balancingFor describing for example.
Step 201, in the time that load-balancing device receives message, determine the type of this message. If DNSResponse message, goes to step 202; If DNS request message, goes to step 205; If datagramLiterary composition, goes to step 208.
In the embodiment of the present invention, in the time that load-balancing device receives message, can separate this messageAnalyse, obtain source port and destination interface in this message, if the source port of this message is TCP/UDP53Number port, whether load-balancing device can further determine this message according to the message format of this messageFor DNS response message; If the destination interface of this message is TCP/UDP53 port, load balancingEquipment can further determine according to the message format of this message whether this message is DNS request message; IfThe source port of this message and destination interface are not all TCP/UDP53 ports, and load-balancing device canTo determine that this message is as data message.
Step 202, when this DNS response message be the domain name pair for replying the request of DNS request messageWhen the message of the IP address of answering, load-balancing device obtains the domain name of carrying in this DNS response message.
In the embodiment of the present invention, when load-balancing device determines that the message receiving is DNS response messageTime, can further obtain the DNS record type that this DNS response message comprises, and judge this DNSWhether response message is the message of IP address corresponding to the domain name for replying the request of DNS request message;If so, load-balancing device can obtain the domain name of carrying in this DNS response message; Otherwise load is equalWeighing apparatus equipment can be processed according to other strategy, and the embodiment of the present invention does not limit this.
Step 203, load-balancing device judge whether this domain name mates with pre-configured certain domain name;Wherein, this certain domain name is the predefined domain name that need to access by particular link. If so, go toStep 204; Otherwise, finish current flow process.
In the embodiment of the present invention, consider all accessing outer network from inner networks in existing balancing link load scheme,And the flow that object IP address does not belong to domestic address field all forwards by particular link, causes load balancingEffect is poor, and in practical application scene, only has the flow of access portion domain name need to pass through particular linkForward, having object IP address is non-domestic address field, but can not need to turn by particular linkThe flow of sending out, can be in advance configuration need to be accessed by particular link in load-balancing device domain name (withUnder be called certain domain name).
Correspondingly, when load-balancing device receives DNS response message, and this DNS response message isWhen replying the message of IP address corresponding to the domain name of DNS request message request, can judge this DNSWhether the domain name of carrying in response message mates with pre-configured certain domain name.
Alternatively, in embodiments of the present invention, the domain name of carrying in DNS response message and pre-configuredCertain domain name coupling can include but not limited to exist with this DNS and reply in pre-configured certain domain nameThe identical domain name of domain name of carrying in message, or the domain name of carrying in DNS response message comprises pre-configuredCertain domain name.
The domain name that step 204, load-balancing device carry according to DNS response message and this domain name correspondenceIP address generate dynamic entry, wherein, this dynamic entry comprises the domain name that DNS response message carriesAnd IP address corresponding to this domain name.
In the embodiment of the present invention, when load-balancing device determines that domain name that DNS response message comprises is with pre-When first the certain domain name of configuration is mated, load-balancing device can be according to the DNS record in this response messageDetermine IP address corresponding to domain name that this DNS response message comprises, and according to this domain name and IP addressGenerate corresponding dynamic entry.
Further, as the optional embodiment of one, in embodiments of the present invention, above-mentioned dynamic tableIn, can also comprise TTL (TimeToLive, life span), this TTL can answer according to DNSAnswering the life span that DNS resource record that message comprises comprises determines.
Correspondingly, in this embodiment, load-balancing device generates after dynamic entry, can also basisThe TTL that dynamic entry comprises carries out aging to corresponding dynamic entry, it is embodied in, and this is no longer superfluousState.
Step 205, in the time that this DNS request message is the message for asking IP address corresponding to domain name,Load-balancing device obtains the domain name of carrying in this DNS request message.
In the embodiment of the present invention, when load-balancing device determines that the message receiving is DNS request messageTime, can further obtain the DNS record type that this DNS request message comprises, and judge this DNSWhether request message is the message for asking IP address corresponding to domain name; If so, load-balancing deviceCan obtain the domain name of carrying in this DNS request message; Otherwise load-balancing device can be according to otherStrategy is processed, and the embodiment of the present invention does not limit this.
Step 206, load-balancing device are according to the inquiry of the domain name dynamic table carrying in this DNS request message.
In the embodiment of the present invention, after load-balancing device gets the domain name in DNS request message, canWith the inquiry of the domain name dynamic entry comprising according to this DNS request message, whether to determine in dynamic entryBe present in the identical domain name of domain name that this DNS request message comprises.
If there is the identical territory of domain name comprising with this DNS request message in step 207 dynamic entryName, load-balancing device obtains IP address corresponding to this domain name, and to sending this DNS request messageUser terminal return to the DNS response message that carries this domain name and IP address corresponding to this domain name.
In the embodiment of the present invention, when load-balancing device is moving according to the domain name of carrying in DNS request messageWhile inquiring same domain name in state list item, what load-balancing device can obtain that this dynamic entry comprises shouldThe IP address that domain name is corresponding, and to send the transmit leg of this DNS request message return carry this domain name withAnd the DNS response message of IP address corresponding to this domain name, realize DNS request message for answering, to fallThe load of low dns server, and improve the treatment effeciency of DNS request.
It should be noted that in embodiments of the present invention, when load-balancing device is according to DNS request messageThe domain name comprising does not inquire same domain name in dynamic entry, in dynamic entry, does not have DNSWhen domain name that request message comprises, load-balancing device can be according to other strategy to this DNS request reportLiterary composition forwards, and the embodiment of the present invention does not limit this.
Step 208, load-balancing device are according to the object IP address lookup dynamic entry of this data message.
In the embodiment of the present invention, in the time that load-balancing device determines that the message receiving is data message, negativeCarry the object IP address that balancing equipment can obtain this data message, and according to this object IP address lookupDynamic entry, to determine whether there is identical IP address in dynamic entry.
If there is the IP ground identical with the object IP address of this data message in step 209 dynamic entryLocation, load-balancing device forwards this data message by particular link.
In the embodiment of the present invention, when load-balancing device is moving according to the object IP address of this data messageIn state list item, inquire identical IP address, in dynamic entry, have the object IP with this data message, load-balancing device can forward this data message by particular link when the identical IP address, address.
Can find out by above description, in the technical scheme providing in the embodiment of the present invention, by advanceThe certain domain name that configuration need to forward by particular link, when load-balancing device receives dns serverThe DNS response message sending, and this DNS response message is for replying the request of DNS request messageWhen the message of IP address corresponding to domain name, carry out domain name mapping, and when carrying in this DNS response messageDomain name while mating with pre-configured certain domain name, generate corresponding dynamic entry, and dynamic according to thisThe forwarding of list item guide data message, so that object IP address is pre-configured IP corresponding to certain domain nameThe data message of address forwards by link, in prior art, and all accessing outer network from inner networks, and objectIP address does not belong to the implementation that the flow of domestic address field all forwards by particular link to be compared, and realizesLoad balancing control based on domain name, optimized load balancing effect.
Device embodiment can realize by software, also can be by the mode of hardware or software and hardware combiningRealize. Be embodied as example with software, as the device on a logical meaning, by its place equipmentProcessor reads operation in internal memory by computer program instructions corresponding in nonvolatile memory and forms. Say from hardware view, as shown in Figure 3, the balancing link load providing for the embodiment of the present invention fillsPut a kind of hardware structure diagram of place equipment, except the processor shown in Fig. 3, network interface, internal memory withAnd outside nonvolatile memory, the equipment that installs place in embodiment can also comprise other hardware conventionally,As being responsible for forwarding chip of processing message etc.; May be also distributed from this equipment of hardware configurationEquipment, may comprise multiple interface cards, to carry out the expansion of message processing at hardware view.
Refer to Fig. 4, the structural representation of a kind of balancing link load device providing for the embodiment of the present inventionFigure, wherein, described device can be applied in load-balancing device, as shown in Figure 4, this link loadBalancer can comprise:
Acquiring unit 410, replys report for the DNS that receives dns server transmission when described deviceLiterary composition, and this DNS response message is IP address corresponding to domain name for replying the request of DNS request messageMessage time, obtain the domain name of carrying in this DNS response message;
Judging unit 420, for judging whether domain name mates with pre-configured certain domain name; ItsIn, described certain domain name is the predefined domain name that need to access by particular link;
Generation unit 430, in the time that described judging unit 420 is judged as YES, generates dynamic entry;Wherein, described dynamic entry comprises IP address corresponding to domain name that described DNS response message carries;
Query unit 440, for receive when described device user terminal send data message time, rootAccording to dynamic entry described in the object IP address lookup of described data message;
Transmitting element 450, if exist and the object IP ground of described data message for described dynamic entryThe IP address that location is identical, forwards described data message by described particular link.
In optional embodiment, in described dynamic entry, also comprise the territory of carrying in described DNS response messageName;
Described acquiring unit 410, the DNS request also sending for receive user terminal when described deviceMessage, and this DNS request message is while being the message for asking IP address corresponding to domain name, obtains thisThe domain name of carrying in DNS request message;
Described query unit 440, also the inquiry of the domain name institute for carrying according to described DNS request messageState dynamic entry;
Described acquiring unit 410, if also exist and described DNS request message for described dynamic entryIn the identical domain name of domain name of carrying, obtain IP address corresponding to this domain name;
Described transmitting element 450, also for returning and take to the user terminal that sends described DNS request messageWith the DNS response message of this domain name and IP address corresponding to this domain name.
In optional embodiment, in described dynamic entry, can also comprise life span TTL;
Correspondingly, referring to Fig. 5, the another kind of balancing link load device providing for the embodiment of the present inventionStructural representation, this embodiment is on aforementioned basis embodiment illustrated in fig. 4, and described device can also wrapDraw together: aging unit 460. Wherein:
Aging unit 460, for subtracting one every the default unit interval by the TTL of described dynamic entry; WhenThe TTL of described dynamic entry is 0 o'clock, deletes described dynamic entry.
In optional embodiment, described judging unit 420, if also for described dynamic entry exist withThe identical IP address, object IP address of described data message, the object IP of judgement and described data messageWhether the TTL that the dynamic entry of identical IP address, address comprises is 0;
Described transmitting element 450, specifically in the time that described judging unit 420 is judged as NO, by instituteState particular link and forward described data message.
Referring to Fig. 6, the structural representation of the another kind of balancing link load device providing for the embodiment of the present inventionFigure, this embodiment on the basis of earlier figures 4 or 5 illustrated embodiments (in Fig. 6 with real shown in Fig. 4Execute on routine basis and be optimized for example), described device can also comprise: determining unit 470. Wherein:
Determining unit 470, in the time that described device receives message, determines the type of described message;
Wherein, the type of described message comprises: DNS response message, DNS request message and datagramLiterary composition.
In said apparatus, the implementation procedure of the function and efficacy of unit specifically refers in said method correspondingThe implementation procedure of step, does not repeat them here.
For device embodiment, because it corresponds essentially to embodiment of the method, so relevant part ginsengSee the part explanation of embodiment of the method. Device embodiment described above is only schematically,The wherein said unit as separating component explanation can or can not be also physically to separate, and doesThe parts that show for unit can be or can not be also physical locations, can be positioned at a place,Or also can be distributed on multiple NEs. Can select according to the actual needs part wherein orThe whole modules of person realize the present invention program's object. Those of ordinary skill in the art are not paying creativenessIn the situation of work, be appreciated that and implement.
As seen from the above-described embodiment, by the pre-configured certain domain name that need to forward by particular link,When load-balancing device receives the DNS response message that dns server sends, and this DNS replys reportWhen literary composition is the message of IP address corresponding to the domain name for replying the request of DNS request message, carry out domain nameResolve, and the domain name comprising when this DNS response message is while mating with pre-configured certain domain name, gives birth toBecome corresponding dynamic entry, and according to the forwarding of this dynamic entry guide data message,, so that object IPAddress is that the data message of IP address corresponding to pre-configured certain domain name forwards by link, with existingIn technology, all accessing outer network from inner networks, and the flow that object IP address does not belong to domestic address field all passes throughThe implementation that particular link forwards is compared, and has realized the load balancing control based on domain name, has optimized negativeCarry portfolio effect.
Those skilled in the art are considering description and are putting into practice after invention disclosed herein, will easily expect thisOther embodiment of invention. The application is intended to contain any modification of the present invention, purposes or adaptabilityChange, these modification, purposes or adaptations are followed general principle of the present invention and are comprised thisBright undocumented common practise or conventional techniques means in the art. Description and embodiment only byBe considered as exemplary, true scope of the present invention and spirit pointed out by claim below.
Should be understood that, the present invention is not limited to described above and illustrated in the accompanying drawings accurateStructure, and can carry out various amendments and change not departing from its scope. Scope of the present invention is only by instituteAttached claim limits.

Claims (10)

1. a balancing link load method, is characterized in that, comprising:
When load-balancing device receives the DNS response message that domain name system DNS server sends, andThis DNS response message is Internet protocol IP corresponding to domain name for replying the request of DNS request messageWhen the message of address, obtain the domain name of carrying in this DNS response message;
Described load-balancing device judges whether domain name mates with pre-configured certain domain name; Wherein,Described certain domain name is the predefined domain name that need to access by particular link;
If so, described load-balancing device generates dynamic entry; Wherein, described in described dynamic entry comprisesIP address corresponding to domain name that DNS response message carries;
In the time that described load-balancing device receives the data message of user terminal transmission, according to described dataDynamic entry described in the object IP address lookup of message;
If there is the IP address identical with the object IP address of described data message in described dynamic entry,Described load-balancing device forwards described data message by described particular link.
2. method according to claim 1, is characterized in that, also comprises institute in described dynamic entryState the domain name of carrying in DNS response message, described method also comprises:
When described load-balancing device receives the DNS request message that user terminal sends, and this DNSWhen request message is the message for asking IP address corresponding to domain name, obtain in this DNS request messageThe domain name of carrying;
Described load-balancing device is according to dynamic described in the inquiry of the domain name of carrying in described DNS request messageList item;
If there is the domain name identical with the domain name of carrying in described DNS request message in described dynamic entry,Described load-balancing device obtains IP address corresponding to this domain name, and to sending described DNS request reportThe user terminal of literary composition returns to the DNS response message that carries this domain name and IP address corresponding to this domain name.
3. method according to claim 1 and 2, is characterized in that, in described dynamic entry, also wrapsDraw together life span TTL; Described method also comprises:
Described load-balancing device subtracts one every the default unit interval by the TTL of described dynamic entry;
In the time that the TTL of described dynamic entry is 0, delete described dynamic entry.
4. method according to claim 3, is characterized in that, if in described dynamic entry exist withThe identical IP address, object IP address of described data message, described in described load-balancing device passes throughParticular link also comprises before forwarding described data message:
Described load-balancing device judges the IP address identical with the object IP address of described data messageWhether the TTL that dynamic entry comprises is 0;
If not, determine and carry out the described step that forwards described data message by described particular link.
5. method according to claim 1 and 2, is characterized in that, described method also comprises:
In the time that described load-balancing device receives message, determine the type of described message;
Wherein, the type of described message comprises: DNS response message, DNS request message and datagramLiterary composition.
6. a balancing link load device, is applied to load-balancing device, it is characterized in that, comprising:
Acquiring unit, should for the DNS that receives the transmission of domain name system DNS server when described deviceAnswer message, and this DNS response message be domain name for replying the request of DNS request message corresponding mutuallyWhen the message of networking protocol IP address, obtain the domain name of carrying in this DNS response message;
Judging unit, for judging whether domain name mates with pre-configured certain domain name; Wherein,Described certain domain name is the predefined domain name that need to access by particular link;
Generation unit, in the time that described judging unit is judged as YES, generates dynamic entry; Wherein, instituteState IP address corresponding to domain name that dynamic entry comprises that described DNS response message carries;
Query unit, for receive when described device user terminal send data message time, according to instituteState dynamic entry described in the object IP address lookup of data message;
Transmitting element, if exist and the object IP address phase of described data message for described dynamic entrySame IP address, forwards described data message by described particular link.
7. device according to claim 6, is characterized in that, also comprises institute in described dynamic entryState the domain name of carrying in DNS response message;
Described acquiring unit, the DNS request report also sending for receive user terminal when described deviceLiterary composition, and this DNS request message is while being the message for asking IP address corresponding to domain name, obtains this DNSThe domain name of carrying in request message;
Described query unit, also for moving described in the inquiry of the domain name of carrying according to described DNS request messageState list item;
Described acquiring unit, if also for taking in described dynamic entry existence and described DNS request messageThe identical domain name of domain name of band, obtains IP address corresponding to this domain name;
Described transmitting element, also for returning and carry this to the user terminal that sends described DNS request messageThe DNS response message of IP address corresponding to domain name and this domain name.
8. according to the device described in claim 6 or 7, it is characterized in that, in described dynamic entry, also wrapDraw together life span TTL;
Described device also comprises:
Aging unit, for subtracting one every the default unit interval by the TTL of described dynamic entry; When describedThe TTL of dynamic entry is 0 o'clock, deletes described dynamic entry.
9. device according to claim 8, is characterized in that,
Described judging unit, if also exist and the object IP of described data message for described dynamic entryThe IP address that address is identical, judges the moving of the IP address identical with the object IP address of described data messageWhether the TTL that state list item comprises is 0;
Described transmitting element, specifically in the time that described judging unit is judged as NO, by described specific chainsRoad forwards described data message.
10. according to the device described in claim 6 or 7, it is characterized in that, described device also comprises:
Determining unit, in the time that described device receives message, determines the type of described message;
Wherein, the type of described message comprises: DNS response message, DNS request message and datagramLiterary composition.
CN201510670698.2A 2015-10-15 2015-10-15 Link load balancing method and device Pending CN105592181A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510670698.2A CN105592181A (en) 2015-10-15 2015-10-15 Link load balancing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510670698.2A CN105592181A (en) 2015-10-15 2015-10-15 Link load balancing method and device

Publications (1)

Publication Number Publication Date
CN105592181A true CN105592181A (en) 2016-05-18

Family

ID=55931381

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510670698.2A Pending CN105592181A (en) 2015-10-15 2015-10-15 Link load balancing method and device

Country Status (1)

Country Link
CN (1) CN105592181A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106131129A (en) * 2016-06-23 2016-11-16 杭州迪普科技有限公司 The method and apparatus of the data syn-chronization time management of GSLB
CN106789993A (en) * 2016-12-09 2017-05-31 锐捷网络股份有限公司 TCP agent method and device
CN108234546A (en) * 2016-12-14 2018-06-29 中国移动通信集团公司 A kind of load-balancing method and load equalizer
CN110995608A (en) * 2019-12-20 2020-04-10 锐捷网络股份有限公司 Method, device and system for multi-link load balancing
WO2020147647A1 (en) * 2019-01-17 2020-07-23 Oppo广东移动通信有限公司 Message sending method and related device
CN113422723A (en) * 2021-05-13 2021-09-21 新华三信息安全技术有限公司 Method and equipment for forwarding message
CN113873012A (en) * 2021-09-01 2021-12-31 北京天融信网络安全技术有限公司 Link load balancing method, device, equipment, system and computer storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090172192A1 (en) * 2007-12-28 2009-07-02 Christian Michael F Mapless Global Traffic Load Balancing Via Anycast
CN103491123A (en) * 2012-06-14 2014-01-01 中国移动通信集团贵州有限公司 Load balancing method based on domain name visiting, system and load balancer
CN103929507A (en) * 2014-04-28 2014-07-16 广东睿江科技有限公司 Method and device capable of achieving off-line DNS services
CN104754066A (en) * 2013-12-26 2015-07-01 华为技术有限公司 Message processing method and message processing equipment
CN105991793A (en) * 2015-05-27 2016-10-05 杭州迪普科技有限公司 Message forwarding method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090172192A1 (en) * 2007-12-28 2009-07-02 Christian Michael F Mapless Global Traffic Load Balancing Via Anycast
CN103491123A (en) * 2012-06-14 2014-01-01 中国移动通信集团贵州有限公司 Load balancing method based on domain name visiting, system and load balancer
CN104754066A (en) * 2013-12-26 2015-07-01 华为技术有限公司 Message processing method and message processing equipment
CN103929507A (en) * 2014-04-28 2014-07-16 广东睿江科技有限公司 Method and device capable of achieving off-line DNS services
CN105991793A (en) * 2015-05-27 2016-10-05 杭州迪普科技有限公司 Message forwarding method and device

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106131129A (en) * 2016-06-23 2016-11-16 杭州迪普科技有限公司 The method and apparatus of the data syn-chronization time management of GSLB
CN106131129B (en) * 2016-06-23 2019-05-07 杭州迪普科技股份有限公司 The method and apparatus of management data synchronization time of global load balancing
CN106789993A (en) * 2016-12-09 2017-05-31 锐捷网络股份有限公司 TCP agent method and device
CN106789993B (en) * 2016-12-09 2019-06-14 锐捷网络股份有限公司 TCP agent method and device
CN108234546A (en) * 2016-12-14 2018-06-29 中国移动通信集团公司 A kind of load-balancing method and load equalizer
WO2020147647A1 (en) * 2019-01-17 2020-07-23 Oppo广东移动通信有限公司 Message sending method and related device
CN110995608A (en) * 2019-12-20 2020-04-10 锐捷网络股份有限公司 Method, device and system for multi-link load balancing
CN113422723A (en) * 2021-05-13 2021-09-21 新华三信息安全技术有限公司 Method and equipment for forwarding message
CN113873012A (en) * 2021-09-01 2021-12-31 北京天融信网络安全技术有限公司 Link load balancing method, device, equipment, system and computer storage medium

Similar Documents

Publication Publication Date Title
CN105592181A (en) Link load balancing method and device
US8194566B2 (en) Information processing device, and bubble packet transmission method and program
US20190207920A1 (en) System and method for secure application communication between networked processors
EP3125502A1 (en) Method for providing access to a web server
CN101582856B (en) Session setup method of portal server and BAS (broadband access server) device and system thereof
WO2020248963A1 (en) Method and apparatus for establishing end-to-end network connection, and network system
US11146664B2 (en) Method for remote vehicle diagnostics and device
JP2012138901A (en) Data transmission system and method using relay server
EP3462713B1 (en) Nat entry management method and apparatus, and nat device
CN112104744B (en) Traffic proxy method, server and storage medium
KR20130052240A (en) Method and apparatus for provisioning network address translator traversal methods
JP5930449B2 (en) Data interaction method, apparatus, and system
US8873569B2 (en) User centric virtual network and method of establishing the same
US9413590B2 (en) Method for management of a secured transfer session through an address translation device, corresponding server and computer program
CN104506573A (en) Point-to-point device and point-to-point online method
US10158587B2 (en) Communication between a web application instance connected to a connection server and a calling entity other than said connection server
US11637874B2 (en) Communications apparatus, systems, and methods for preventing and/or minimizing session data clipping
US9432330B2 (en) Data interaction method, apparatus, and system
US10375175B2 (en) Method and apparatus for terminal application accessing NAS
KR101666724B1 (en) Method, Server and Apparatus For P2P Connection
CN114598532B (en) Connection establishment method, device, electronic equipment and storage medium
CN112019641B (en) Data transmission method and device
CN108650179B (en) Method for configuring forwarding table, forwarding device and computer readable storage medium
JP3905067B2 (en) Communication method between hosts via network
KR101586058B1 (en) Device for connecting peer-to-peer communication considering nat types and method connecting peer-to-peer communication using the same

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Applicant after: Xinhua three Technology Co., Ltd.

Address before: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Applicant before: Huasan Communication Technology Co., Ltd.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20160518