CN114650271A - Global load DNS neighbor site learning method and device - Google Patents

Global load DNS neighbor site learning method and device Download PDF

Info

Publication number
CN114650271A
CN114650271A CN202210291148.XA CN202210291148A CN114650271A CN 114650271 A CN114650271 A CN 114650271A CN 202210291148 A CN202210291148 A CN 202210291148A CN 114650271 A CN114650271 A CN 114650271A
Authority
CN
China
Prior art keywords
message data
global load
destination port
type
server
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
CN202210291148.XA
Other languages
Chinese (zh)
Other versions
CN114650271B (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.)
Hangzhou DPTech Technologies Co Ltd
Original Assignee
Hangzhou DPTech 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 DPTech Technologies Co Ltd filed Critical Hangzhou DPTech Technologies Co Ltd
Priority to CN202210291148.XA priority Critical patent/CN114650271B/en
Publication of CN114650271A publication Critical patent/CN114650271A/en
Application granted granted Critical
Publication of CN114650271B publication Critical patent/CN114650271B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The disclosure relates to a global load DNS neighbor site learning method, a global load DNS neighbor site learning device, electronic equipment and a computer readable medium. The method comprises the following steps: the global load DNS equipment acquires message data from a neighbor site thereof; determining the IP type and the server information of a destination port based on the message data; when the IP type is not matched with the server information, adjusting the source IP address of the message data; storing the adjusted domain name information of the message data locally; and sending the message data to a destination port. The global load DNS neighbor site learning method, the global load DNS neighbor site learning device, the electronic equipment and the computer readable medium can be used for performing domain name learning and establishing a neighbor site under the condition that a global load DNS local site and the neighbor site use different protocol stacks.

Description

Global load DNS neighbor site learning method and device
Technical Field
The present application relates to the field of network information processing, and in particular, to a method and an apparatus for learning a global load DNS neighbor site, an electronic device, and a computer-readable medium.
Background
Global Load balancing (gsl.b) is primarily aimed at directing users' requests to the nearest node (or area) throughout the network. Thus, proximity determination is the primary function of global load balancing. Local load balancing is generally limited to a certain area, and the goal is to find a most suitable node to provide service in a specific area.
In an actual application scenario, a client requests record information corresponding to a domain name from global load equipment, and the DNS-based global load equipment returns relatively similar or reliable record information to the client through a corresponding scheduling algorithm in combination with the stability of a network environment, so as to guide the client to access a more stable server, thereby implementing a load function. The adjacent global load devices can configure site information and neighbor information, and can learn the mapping relation between the domain name and the record information or the health state of the domain name information with the neighbor global load devices according to different learning modes, so that the global load function has more flexibility and robustness.
The existing global load DNS site learning only supports neighbor interaction under the same protocol stack at present, and the condition that a local site and a neighbor site use different protocol stacks can cause the condition of neighbor establishment failure and can not learn the domain name.
Therefore, a new global load DNS neighbor site learning method, apparatus, electronic device, and computer readable medium are needed.
The above information disclosed in this background section is only for enhancement of understanding of the background of the application and therefore it may contain information that does not constitute prior art that is already known to a person of ordinary skill in the art.
Disclosure of Invention
In view of this, the present application provides a method, an apparatus, an electronic device, and a computer readable medium for learning a global load DNS neighbor site, which can perform domain name learning and establish a neighbor site when a local site of a global load DNS and the neighbor site use different protocol stacks.
Other features and advantages of the present application will be apparent from the following detailed description, or may be learned by practice of the application.
According to an aspect of the present application, a method for learning a global load DNS neighbor site is provided, where the method includes: the global load DNS equipment acquires message data from a neighbor site thereof; determining the IP type and the server information of a destination port based on the message data; when the IP type is not matched with the server information, adjusting the source IP address of the message data; storing the adjusted domain name information of the message data locally; and sending the message data to a destination port.
In an exemplary embodiment of the present application, further comprising: when the IP type is matched with the server information, establishing socket connection with the destination port; and sending the message data to a destination port based on the connection.
In an exemplary embodiment of the present application, determining the IP type and the server information of the destination port based on the packet data includes: analyzing the message data at a data link layer; and acquiring the IP type and the server information of the destination port according to the analysis result.
In an exemplary embodiment of the present application, acquiring server information of an IP type and a destination port according to a parsing result includes: acquiring an IP header and a TCP header of the message data according to the analysis result; determining the IP type based on the IP header; determining the server information for a destination port based on the TCP header.
In an exemplary embodiment of the present application, before determining the server information of the destination port based on the TCP header, the method further includes: and the socket server of the global load DNS device binds a plurality of server addresses and corresponding port numbers thereof.
In an exemplary embodiment of the present application, adjusting the source IP address of the packet data includes: acquiring the IP address type of the server; and adjusting the source IP address of the message data according to the IP address type of the server.
In an exemplary embodiment of the present application, storing the adjusted domain name information of the packet data locally includes: and the socket server side of the global load DNS device binds a plurality of client addresses and the adjusted addresses thereof.
In an exemplary embodiment of the present application, the global load DNS device supports a dual stack protocol.
According to an aspect of the present application, a global load DNS neighbor site learning apparatus is provided, the apparatus including: the message module is used for acquiring message data by the neighbor sites of the global load DNS equipment; the information module is used for determining the IP type and the server information of the destination port based on the message data; the adjusting module is used for adjusting the source IP address of the message data when the IP type is not matched with the server information; and the sending module is used for sending the message data to a destination port.
In an exemplary embodiment of the present application, further comprising: the connection module is used for establishing socket connection with the destination port when the IP type is matched with the server information; and sending the message data to a destination port based on the connection.
According to an aspect of the present application, an electronic device is provided, the electronic device including: one or more processors; storage means for storing one or more programs; when executed by one or more processors, cause the one or more processors to implement a method as above.
According to an aspect of the application, a computer-readable medium is proposed, on which a computer program is stored which, when being executed by a processor, carries out the method as above.
According to the global load DNS neighbor site learning method, the global load DNS neighbor site learning device, the electronic equipment and the computer readable medium, message data are acquired by neighbor sites of the global load DNS equipment; determining the IP type and the server information of a destination port based on the message data; when the IP type is not matched with the server information, adjusting the source IP address of the message data; storing the adjusted domain name information of the message data locally; the mode of sending the message data to the destination port can carry out domain name learning and establish the neighbor site under the condition that the global load DNS local site and the neighbor site use different protocol stacks.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The above and other objects, features and advantages of the present application will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings. The drawings described below are only some embodiments of the present application and other drawings may be derived by those skilled in the art without inventive effort.
Fig. 1 is a system block diagram illustrating a global load DNS neighbor site learning method and apparatus according to an example embodiment.
Figure 2 is a flow diagram illustrating a method for global load DNS neighbor site learning in accordance with an exemplary embodiment.
Fig. 3 is a flow chart illustrating a method of global load DNS neighbor site learning in accordance with another exemplary embodiment.
Fig. 4 is a diagram illustrating a global load DNS neighbor site learning method in accordance with another exemplary embodiment.
Fig. 5 is a block diagram illustrating a global load DNS neighbor site learning apparatus in accordance with an example embodiment.
FIG. 6 is a block diagram illustrating an electronic device in accordance with an example embodiment.
FIG. 7 is a block diagram illustrating a computer-readable medium in accordance with an example embodiment.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The same reference numerals denote the same or similar parts in the drawings, and thus, a repetitive description thereof will be omitted.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the application. One skilled in the relevant art will recognize, however, that the subject matter of the present application can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the application.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
It will be understood that, although the terms first, second, third, etc. may be used herein to describe various components, these components should not be limited by these terms. These terms are used to distinguish one element from another. Thus, a first component discussed below may be termed a second component without departing from the teachings of the present concepts. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
It will be appreciated by those skilled in the art that the drawings are merely schematic representations of exemplary embodiments, and that the blocks or processes shown in the drawings are not necessarily required to practice the present application and are, therefore, not intended to limit the scope of the present application.
The technical abbreviations referred to in this application are explained as follows:
the Domain Name System, which is a distributed database that maps Domain names and IP addresses to each other, enables a person to more conveniently access the internet. Although the IP address can be used as a unique identifier of a node in the internet, for a user, a string of numbers is difficult to memorize, so that a domain name is born, the domain name is a meaningful string of character strings, usually, the character strings identify a service item at a server end, the user can conveniently memorize and use the service item, and a domain name system can map the domain name to a corresponding IP address to tell the user about an internet node which the user actually should access. The effect is equivalent for the user to access the domain name and to access the IP address.
Global Server Load Balancing Global Load Balancing, in a network environment, according to static or dynamic data information and a selected scheduling algorithm, a request of a user is directed to a near or stable Server side in the network environment, efficient utilization of the Server side and stability of data transmission are improved, good user experience is provided, and service quality of a remote Server group is guaranteed. At present, the following techniques are commonly used: DNS-based, HTTP-redirection-based, global load of IP routing.
The Dual Stack indicates that the device supports both the IPv4 protocol and the IPv6 protocol, and has a function of processing two protocol addresses simultaneously. With the development of the internet, the appearance of IPv6 solves the problem of shortage of IPv4 addresses in the future, but IPv6 cannot replace IPv4 immediately, so that IPv4 and IPv6 coexist in one environment for a considerable period of time. A good switching mechanism is needed to provide a smooth switching process with minimal impact on existing users. IPv6 and IPv4 are functionally similar network layer protocols, both of which apply to the same physical platform and carry the same transport layer protocol, TCP or UDP. The node of the technology simultaneously runs two sets of protocol stacks of IPv4 and IPv6, which is the most direct way for the IPv6 node to keep compatibility with the pure IPv4 node.
As described in the background description, the establishment of the global load DNS site connection only supports communication between the same protocol stacks at present, and a neighbor crossing the protocol stacks cannot be successfully established, and does not support dual stacks temporarily. In view of technical defects in the prior art, the application provides a method and a device for learning a global load DNS neighbor site, which can realize the creation of connection between neighbors of different protocol stacks through the mapping of IPv4 and IPv6 addresses, and improve the flexibility and the universality of interaction of the global load DNS neighbor site.
The content of the present application is described in detail below with the aid of specific examples.
Fig. 1 is a system block diagram illustrating a method and apparatus for global load DNS neighbor site learning according to an example embodiment.
As shown in fig. 1, the system architecture 10 may include terminal devices 101, 102, 103, a network 104 and global load DNS sites 105, 106, 107, application servers 108, 109, 110. Network 104 is used to connect between terminal devices 101, 102, 103 and global load DNS sites 105, 106, 107; global load between DNS sites 105, 106, 107; the medium providing the communication link between the global load DNS sites 105, 106, 107 and the application servers 108, 109, 110. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user can use the terminal device 101, 102, 103 to interact with the application server 108, 109, 110 through the global load DNS site 105, 106, 107, to receive or send messages, etc. The terminal devices 101, 102, 103 may have various communication client applications installed thereon, such as a shopping application, a web browser application, a search application, an instant messaging tool, a mailbox client, social platform software, and the like.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The application servers 108, 109, 110 may be servers providing various services, such as a background management server providing support for shopping-like websites browsed by users using the terminal devices 101, 102, 103. The background management server may analyze and perform other processing on the received data such as the product information query request, and feed back the processing result to the terminal devices 101, 102, and 103. The application servers 108, 109, 110 may be backend servers of the same shopping-like website, and the application servers 108, 109, 110 may be located in different physical locations, but may perform the same service functions.
When a terminal device 101, 102, 103 requests to access a certain shopping website, the global load DNS site 105, 106, 107 obtains the access request of the terminal device 101, 102, 103, and then transmits the access request among the global load DNS sites 105, 106, 107 to select an optimal link path for the terminal device 101, 102, 103 to access the application server 108 or 109, 110.
The domain name information sent by the neighbor can be stored locally between the global load DNS sites 105, 106, 107 through domain name learning, and the domain name information stored locally can be replied to the terminal devices 101, 102, 103.
Global load DNS site 105 (which may also be 106 or 107) may obtain message data, for example, by global load DNS site 106 (or 107); global load DNS site 105 may determine, for example, based on the packet data, the IP type and server information for the destination port; the global load DNS site 105 may, for example, adjust the source IP address of the packet data when the IP type and the server information do not match; the global load DNS site 105 may, for example, store the adjusted packet data and the domain name information corresponding thereto locally; global load DNS site 105 may, for example, send the message data to a destination port.
Global load DNS site 105 may, for example, establish a socket connection with the destination port when the IP type and the server information match; and sending the message data to a destination port based on the connection.
The global load DNS sites 105, 106, and 107 may be a server of an entity, or may be composed of a plurality of servers, for example, it should be noted that the global load DNS neighbor site learning method provided in the embodiment of the present application may be executed by the global load DNS sites 105, 106, and 107, and accordingly, the global load DNS neighbor site learning apparatus may be disposed in the global load DNS sites 105, 106, and 107.
Figure 2 is a flow diagram illustrating a method for global load DNS neighbor site learning in accordance with an exemplary embodiment. The global load DNS neighbor site learning method 20 includes at least steps S202 to S208.
As shown in fig. 2, in S202, the global load DNS device obtains message data from its neighbor site. The global load DNS device in the present application is a device supporting dual stack protocols.
In the present application, global load DNS site learning may support two learning modes: a Server mode and a Client mode. The Server mode sends local domain name information to the neighbor and can store the domain name information sent by the neighbor to the local, and the domain name information stored to the local can be replied to the client; the Client mode sends the related content of the local domain name information record information to the neighbor, but does not learn the domain name information sent by the neighbor. Common application scenarios are: the cluster equipment in the Server mode is closer to the Client, and the cluster equipment in the Client mode is closer to the Server. The link and virtual service state associated with the cluster device in the Client mode reflect the stability of the Server more efficiently, and the cluster device in the Server mode aims to reply the Client DNS request more quickly and efficiently.
In S204, the IP type and the server information of the destination port are determined based on the packet data. Analyzing the message data at a data link layer; and acquiring the IP type and the server information of the destination port according to the analysis result.
More specifically, an IP header and a TCP header of the message data may be obtained according to the parsing result; determining the IP type based on the IP header; determining the server information for a destination port based on the TCP header.
In one embodiment, further comprising: and the socket server side of the global load DNS device binds a plurality of server side addresses and port numbers corresponding to the server side addresses.
In S206, when the IP type does not match the server information, the source IP address of the packet data is adjusted. The type of the IP address of the server is obtained, for example; and adjusting the source IP address of the message data according to the IP address type of the server.
In S208, the adjusted packet data and the domain name information corresponding thereto are stored locally. The socket server of the global load DNS device may, for example, bind and store the plurality of client addresses and their adjusted addresses locally.
In S210, when the IP type matches the server information, a socket connection is established with the destination port.
In S212, the message data is sent to the destination port.
In one embodiment, the address and the port number that the socket needs to be bound to may be monitored based on the socket server, and if the destination protocol and the port of the packet match with the server information, the following determination is continued: if the type of the data is consistent with the IP type of the server, the connection of the socket or the data transmission is carried out; if not, the IP address is converted, and the source IP address of the message is mapped into the IP address with the same type as the IP of the server.
According to the learning method of the global load DNS neighbor site, message data are acquired by the neighbor site through the global load DNS equipment; determining the IP type and the server information of a destination port based on the message data; when the IP type is not matched with the server information, adjusting the source IP address of the message data; storing the adjusted domain name information of the message data locally; the mode of sending the message data to the destination port can carry out domain name learning and establish the neighbor site under the condition that the global load DNS local site and the neighbor site use different protocol stacks.
It should be clearly understood that this application describes how to make and use particular examples, but the principles of this application are not limited to any of the details of these examples. Rather, these principles can be applied to many other embodiments based on the teachings of the present disclosure.
Fig. 3 is a flow chart illustrating a method of global load DNS neighbor site learning in accordance with another exemplary embodiment. The process 30 shown in fig. 3 is a detailed description of "determining the IP type and the server information of the destination port based on the packet data" in S204 in the process shown in fig. 2.
As shown in fig. 3, in S302, the message data is parsed at the data link layer.
In S304, the IP header and the TCP header of the message data are acquired according to the parsing result.
In S306, the IP type is determined based on the IP header.
In S308, the server information of the destination port is determined based on the TCP header.
When the message is transmitted to a data link layer of the global load DNS, the message data is analyzed, and an Ethernet header, an IP header, a TCP header, application data and an Ethernet tail of the message are obtained.
In one embodiment, the IP type of the message data can be determined by the IP header and then the message is delivered to the network layer.
In one embodiment, the destination port may also be determined by the TCP header to determine which services are corresponding to the destination port to be accessed.
Fig. 4 is a diagram illustrating a global load DNS neighbor site learning method in accordance with another exemplary embodiment. With reference to fig. 4, the detailed description of the present application is made by taking an example where the client is IPv4 type and the server is IPv6 type.
And a receiving data link of the global load DNS server acquires the IP corresponding to each frame of message by looking up the Ethernet type field of the message.
When the IP type is IPv4, and the destination port of the IPv4 datagram acquired by TCP information corresponds to an IPv6 socket, the source IPv4 address in the header of the IPv4 datagram needs to be converted into an equivalent IPv4 mapped IPv6 address.
The accept system is used for taking one connection from the connection queue which completes three-way handshake after the socket connection is established, and performing subsequent service; in the calling process, a socket, associated files and a transmission control block are redistributed, and if the application layer needs to acquire the opposite-end information, the opposite-end information is copied to the user space.
In one embodiment, when the accept system call returns this accepted IPv4 client connection to the server process, this mapped address will be returned as the client's IPv6 address to the IPv6 socket of the global load DNS server neighbor site, and the remaining datagrams on this connection are all IPv4 datagrams. In this case, the neighboring site does not perceive itself as communicating with the IPv4 client, nor does the client know itself to communicate with the server of IPv 6.
In one embodiment, for an IPv6 client, when an accept system call returns an accepted IPv6 client connection to the global load DNS process, the IPv6 address of the client identified in the global load DNS is the source address in the original IPv6 header, and no mapping is required, and the remaining datagrams on the connection are IPv6 datagrams.
Those skilled in the art will appreciate that all or part of the steps implementing the above embodiments are implemented as computer programs executed by a CPU. When executed by the CPU, performs the functions defined by the methods provided herein. The program may be stored in a computer readable storage medium, which may be a read-only memory, a magnetic or optical disk, or the like.
Furthermore, it should be noted that the above-mentioned figures are only schematic illustrations of the processes involved in the method according to exemplary embodiments of the present application, and are not intended to be limiting. It will be readily appreciated that the processes illustrated in the above figures are not intended to indicate or limit the temporal order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
Fig. 5 is a block diagram illustrating a global load DNS neighbor site learning apparatus in accordance with an example embodiment. As shown in fig. 5, the global load DNS neighbor site learning apparatus 50 includes: a message module 502, an information module 504, an adjustment module 506, a sending module 508, and a connection module 510.
The message module 502 is used for the global load DNS device to obtain message data from its neighbor stations; the global load DNS device in the present application is a device supporting a dual stack protocol.
The information module 504 is configured to determine an IP type and server information of a destination port based on the packet data; the information module 504 is further configured to parse the message data at a data link layer; and acquiring the IP type and the server information of the destination port according to the analysis result.
The adjusting module 506 is configured to adjust a source IP address of the packet data when the IP type is not matched with the server information; the adjusting module 506 is further configured to obtain an IP address type of the server; and adjusting the source IP address of the message data according to the IP address type of the server.
The sending module 508 is configured to send the message data to a destination port.
The connection module 510 is configured to establish a socket connection with the destination port when the IP type matches the server information; and sending the message data to a destination port based on the connection.
According to the global load DNS neighbor site learning device, message data are acquired by neighbor sites of the global load DNS equipment; determining the IP type and the server information of a destination port based on the message data; when the IP type is not matched with the server information, adjusting the source IP address of the message data; storing the adjusted domain name information of the message data locally; the mode of sending the message data to the destination port can carry out domain name learning and establish the neighbor site under the condition that the global load DNS local site and the neighbor site use different protocol stacks.
FIG. 6 is a block diagram illustrating an electronic device in accordance with an example embodiment.
An electronic device 600 according to this embodiment of the present application is described below with reference to fig. 6. The electronic device 600 shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 6, the electronic device 600 is embodied in the form of a general purpose computing device. The components of the electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 that connects the various system components (including the storage unit 620 and the processing unit 610), a display unit 640, and the like.
Wherein the storage unit stores program code executable by the processing unit 610 to cause the processing unit 610 to perform steps according to various exemplary embodiments of the present application described in the present specification. For example, the processing unit 610 may perform the steps shown in fig. 2 and 3.
The storage unit 620 may include readable media in the form of volatile storage units, such as a random access memory unit (RAM)6201 and/or a cache storage unit 6202, and may further include a read-only memory unit (ROM) 6203.
The memory unit 620 may also include a program/utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 630 may be one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 600 may also communicate with one or more external devices 600' (e.g., keyboard, pointing device, bluetooth device, etc.), such that a user can communicate with devices with which the electronic device 600 interacts, and/or any device (e.g., router, modem, etc.) with which the electronic device 600 can communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 650. Also, the electronic device 600 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via the network adapter 660. The network adapter 660 may communicate with other modules of the electronic device 600 via the bus 630. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, to name a few.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, as shown in fig. 7, the technical solution according to the embodiment of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, or a network device, etc.) to execute the above method according to the embodiment of the present application.
Generally, the existing global load DNS site connection establishment only supports communication between the same protocol stacks, and neighbors across the protocol stacks cannot be successfully established, so that double stacks are not supported temporarily. Therefore, through the mapping of IPv4 and IPv6 addresses, the connection between neighbors of different protocol stacks can be created, and the flexibility and universality of interaction of the neighbors of the global load DNS site are improved. For this reason, in the present disclosure, when a message is transmitted to a data link layer, the main contents of the message are an ethernet header, an IP header, a TCP header, and application data and an ethernet trailer. Judging the IP type through the IP header, and transmitting the message to a network layer; the destination port is judged through the TCP header, and the corresponding service to be accessed is determined. The socket server monitors the address and the port number which are required to be bound by the socket, and if the destination protocol and the port of the message are matched with the server information, the following judgment is carried out: if the type of the data is consistent with the IP type of the server, the connection of the socket or the data transmission is carried out; and if not, carrying out IP address conversion, and mapping the source IP address of the message into an IP address with the same type as the IP of the server. Taking the example that the client is of the IPv4 type and the server is of the IPv6 type, the receiving data link of the server passes each frame to the corresponding IP module by looking at the ethernet type field. The IPv4 module, in conjunction with the TCP module thereon, detects that the destination port of the IPv4 datagram corresponds to an IPv6 socket, and then converts the source IPv4 address in the datagram IPv4 header into an equivalent IPv6 address mapped by IPv 4. When the accept system call returns the accepted IPv4 client connection to the server process, the mapped address will be returned to the server's IPv6 socket as the client's IPv6 address (i.e., the server does not know itself at all that it is communicating with an IPv4 client, nor does the client know itself that it is communicating with an IPv6 server), and the remaining datagrams on the connection are IPv4 datagrams. For the IPv6 client, when the accept system call returns the accepted IPv6 client connection to the server process, the IPv6 address of the client is the source address in the original IPv6 header, no mapping is needed, and the rest of the datagrams on the connection are IPv6 datagrams. The method and the device expand the communication range of the neighbor interaction of the DNS site, realize the information interaction of the IPv4 site and the IPv6 site, better adapt to the network environment with coexisting IPv4 and IPv6, are beneficial to the transition stage development from IPv4 to IPv6, and improve the flexibility of neighbor site establishment.
The software product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In situations involving remote computing devices, the remote computing devices may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to external computing devices (e.g., through the internet using an internet service provider).
The computer readable medium carries one or more programs which, when executed by a device, cause the computer readable medium to perform the functions of: the global load DNS equipment acquires message data from a neighbor site thereof; determining the IP type and the server information of a destination port based on the message data; when the IP type is not matched with the server information, adjusting the source IP address of the message data; storing the adjusted domain name information of the message data locally; and sending the message data to a destination port. The computer readable medium may also implement the following functions: when the IP type is matched with the server information, establishing socket connection with the destination port; and sending the message data to a destination port based on the connection.
Those skilled in the art will appreciate that the modules described above may be distributed in the apparatus according to the description of the embodiments, or may be modified accordingly in one or more apparatuses unique from the embodiments. The modules of the above embodiments may be combined into one module, or further split into multiple sub-modules.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiment of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiment of the present application.
Exemplary embodiments of the present application are specifically illustrated and described above. It is to be understood that the application is not limited to the details of construction, arrangement, or method of implementation described herein; on the contrary, the intention is to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

Claims (10)

1. A global load DNS neighbor site learning method is characterized by comprising the following steps:
the global load DNS equipment acquires message data from a neighbor site thereof;
determining the IP type and the server information of a destination port based on the message data;
when the IP type is not matched with the server information, adjusting the source IP address of the message data;
storing the adjusted message data and the domain name information corresponding to the message data in the local;
and sending the message data to a destination port.
2. The method of claim 1, further comprising:
when the IP type is matched with the server information, establishing socket connection with the destination port;
and sending the message data to a destination port based on the connection.
3. The method of claim 1, wherein determining the server information for the IP type and the destination port based on the packet data comprises:
analyzing the message data at a data link layer;
and acquiring the IP type and the server information of the destination port according to the analysis result.
4. The method of claim 3, wherein obtaining the server information of the IP type and the destination port according to the parsing result comprises:
acquiring an IP header and a TCP header of the message data according to the analysis result;
determining the IP type based on the IP header;
determining the server information for a destination port based on the TCP header.
5. The method of claim 4, wherein prior to determining the server information for a destination port based on the TCP header, further comprising:
and the socket server of the global load DNS device binds a plurality of server addresses and corresponding port numbers thereof.
6. The method of claim 1, wherein adjusting the source IP address of the message data comprises:
acquiring the IP address type of the server;
and adjusting the source IP address of the message data according to the IP address type of the server.
7. The method of claim 1, wherein locally storing the adjusted message data and the domain name information corresponding thereto comprises:
and the socket server side of the global load DNS device binds and stores the plurality of client addresses and the adjusted addresses thereof in local.
8. The method of claim 1, wherein the global load DNS device supports a dual stack protocol.
9. A global load DNS neighbor learning apparatus, comprising:
the message module is used for acquiring message data by the neighbor sites of the global load DNS equipment;
the information module is used for determining the IP type and the server information of the destination port based on the message data;
the adjusting module is used for adjusting the source IP address of the message data when the IP type is not matched with the server information;
and the sending module is used for sending the message data to a destination port.
10. The apparatus of claim 9, further comprising:
the connection module is used for establishing socket connection with the destination port when the IP type is matched with the server information; and sending the message data to a destination port based on the connection.
CN202210291148.XA 2022-03-23 2022-03-23 Global load DNS neighbor site learning method and device Active CN114650271B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210291148.XA CN114650271B (en) 2022-03-23 2022-03-23 Global load DNS neighbor site learning method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210291148.XA CN114650271B (en) 2022-03-23 2022-03-23 Global load DNS neighbor site learning method and device

Publications (2)

Publication Number Publication Date
CN114650271A true CN114650271A (en) 2022-06-21
CN114650271B CN114650271B (en) 2023-12-05

Family

ID=81995080

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210291148.XA Active CN114650271B (en) 2022-03-23 2022-03-23 Global load DNS neighbor site learning method and device

Country Status (1)

Country Link
CN (1) CN114650271B (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1512377A (en) * 2002-12-31 2004-07-14 联想(北京)有限公司 No.7 layer load equalization method based on socket butt joint in kernel
CN1525699A (en) * 2003-09-17 2004-09-01 中国科学院计算技术研究所 An automatic tunnel method capable of traversing network address translation
WO2006105718A1 (en) * 2005-04-04 2006-10-12 Huawei Technologies Co., Ltd. A method for realizing the mpls-vpn across the hybrid network
CN1852213A (en) * 2005-11-14 2006-10-25 华为技术有限公司 Method for realizing virtual special network of over-muti-autonomous system mixed network
CN102075445A (en) * 2011-02-28 2011-05-25 杭州华三通信技术有限公司 Load balancing method and device
US20110153831A1 (en) * 2009-12-23 2011-06-23 Rishi Mutnuru Systems and methods for mixed mode of ipv6 and ipv4 dns of global server load balancing
US20160328222A1 (en) * 2015-05-08 2016-11-10 Citrix Systems, Inc. Auto discovery and configuration of services in a load balancing appliance
US20160373409A1 (en) * 2015-06-22 2016-12-22 Cisco Technology, Inc. Dns snooping to create ip address-based trust database used to select deep packet inspection and storage of ip packets
EP3603033A1 (en) * 2017-03-22 2020-02-05 Citrix Systems, Inc. A method for dns response reordering based on path quality and connection priority for better qos
WO2020140433A1 (en) * 2019-01-02 2020-07-09 北京宏图佳都通信设备有限公司 Ipv4/ipv6 address translation system
CN111432045A (en) * 2020-03-19 2020-07-17 杭州迪普科技股份有限公司 Method, device and equipment for testing server scheduling algorithm of domain name system
US20200382420A1 (en) * 2019-05-31 2020-12-03 Juniper Networks, Inc. Inter-network service chaining
CN113691589A (en) * 2021-07-27 2021-11-23 杭州迪普科技股份有限公司 Message transmission method, device and system

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1512377A (en) * 2002-12-31 2004-07-14 联想(北京)有限公司 No.7 layer load equalization method based on socket butt joint in kernel
CN1525699A (en) * 2003-09-17 2004-09-01 中国科学院计算技术研究所 An automatic tunnel method capable of traversing network address translation
WO2006105718A1 (en) * 2005-04-04 2006-10-12 Huawei Technologies Co., Ltd. A method for realizing the mpls-vpn across the hybrid network
CN1852213A (en) * 2005-11-14 2006-10-25 华为技术有限公司 Method for realizing virtual special network of over-muti-autonomous system mixed network
US20110153831A1 (en) * 2009-12-23 2011-06-23 Rishi Mutnuru Systems and methods for mixed mode of ipv6 and ipv4 dns of global server load balancing
CN102075445A (en) * 2011-02-28 2011-05-25 杭州华三通信技术有限公司 Load balancing method and device
US20160328222A1 (en) * 2015-05-08 2016-11-10 Citrix Systems, Inc. Auto discovery and configuration of services in a load balancing appliance
US20160373409A1 (en) * 2015-06-22 2016-12-22 Cisco Technology, Inc. Dns snooping to create ip address-based trust database used to select deep packet inspection and storage of ip packets
EP3603033A1 (en) * 2017-03-22 2020-02-05 Citrix Systems, Inc. A method for dns response reordering based on path quality and connection priority for better qos
WO2020140433A1 (en) * 2019-01-02 2020-07-09 北京宏图佳都通信设备有限公司 Ipv4/ipv6 address translation system
US20200382420A1 (en) * 2019-05-31 2020-12-03 Juniper Networks, Inc. Inter-network service chaining
CN111432045A (en) * 2020-03-19 2020-07-17 杭州迪普科技股份有限公司 Method, device and equipment for testing server scheduling algorithm of domain name system
CN113691589A (en) * 2021-07-27 2021-11-23 杭州迪普科技股份有限公司 Message transmission method, device and system

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
SHUAI HAO: "On the DNS Deployment of Modern Web Services", 《IEEE》 *
童开峰: "移动电子政务架构安全性及其数据同步研究", 《中国优秀硕士学位论文全文数据库信息科技辑》 *
郭俊杰: "基于SDN的CDN请求路由方法研究", 《中国优秀硕士学位论文全文数据库信息科技辑》 *

Also Published As

Publication number Publication date
CN114650271B (en) 2023-12-05

Similar Documents

Publication Publication Date Title
US7496497B2 (en) Method and system for selecting web site home page by extracting site language cookie stored in an access device to identify directional information item
CN110049022B (en) Domain name access control method and device and computer readable storage medium
CN109543121B (en) Method and device for calling outer link url (real time communication) resources
US20130254258A1 (en) Offloading application components to edge servers
US20070014241A1 (en) Resolver caching of a shortest path to a multihomed server as determined by a router
CN109561078A (en) A kind of exterior chain url resource transfer method and device
CN108183975A (en) A kind of method and system of domain name mapping
CN113691589B (en) Message transmission method, device and system
CN111917900B (en) Domain name agent request processing method and device
US6950873B2 (en) Apparatus and method for port sharing a plurality of server processes
CN113452778B (en) Session holding method, device, equipment, system and storage medium
CN111885190B (en) Service request processing method and system
CN110572394B (en) Access control method and device
CN109005250B (en) Method and device for accessing server
CN114650271B (en) Global load DNS neighbor site learning method and device
CN113179317B (en) Test system and method for content rewriting device
CN108141704B (en) Location identification of previous network message processors
CN114338529B (en) Five-tuple rule matching method and device
JP2023522785A (en) Harmony Comprehensive Proxy Service
US10958580B2 (en) System and method of performing load balancing over an overlay network
CN109600452B (en) Server cluster, message pushing method and related server
CN113765972A (en) Data request response method, device, system, server and storage medium
CN112019641A (en) Data transmission method and device
CN115118775B (en) Browser access request processing method and device and electronic equipment
CN113691462B (en) Response method and device of Internet group management protocol

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant