CN114650271B - Global load DNS neighbor site learning method and device - Google Patents
Global load DNS neighbor site learning method and device Download PDFInfo
- Publication number
- CN114650271B CN114650271B CN202210291148.XA CN202210291148A CN114650271B CN 114650271 B CN114650271 B CN 114650271B CN 202210291148 A CN202210291148 A CN 202210291148A CN 114650271 B CN114650271 B CN 114650271B
- Authority
- CN
- China
- Prior art keywords
- message data
- server
- global load
- type
- destination port
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- Computer And Data Communications (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The disclosure relates to a global load DNS neighbor site learning method, a global load DNS neighbor site learning device, an electronic device and a computer readable medium. The method comprises the following steps: the global load DNS equipment acquires message data from a neighbor site; determining IP type and server information of a destination port based on the message data; when the IP type is not matched with the server information, the source IP address of the message data is adjusted; storing domain name information of the adjusted 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 perform domain name learning and establish neighbor sites under the condition that the global load DNS local site and the neighbor sites use different protocol stacks.
Description
Technical Field
The application relates to the field of network information processing, in particular to a global load DNS neighbor site learning method, a global load DNS neighbor site learning device, electronic equipment and a computer readable medium.
Background
The main purpose of global load balancing (gsl.b., global Server Load Balance) is to direct user requests to the nearest node (or region) throughout the network. Thus, proximity determination is a 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 in a specific area to provide service.
In an actual application scene, a client requests record information corresponding to a domain name from a global load device, and the DNS-based global load device combines the stability of a network environment and returns the record information to the client through a corresponding scheduling algorithm, so that the client is guided to access a more stable server, and a load function is realized. The adjacent global load equipment can configure site information and neighbor information, and according to different learning modes, the adjacent global load equipment can mutually learn the mapping relation between domain names and record information or learn the health state of the domain name information, so that the global load function has higher flexibility and robustness.
The existing global load DNS site learning only supports neighbor interaction under the same protocol stack, and the situation that the neighbor establishment fails can be caused when different protocol stacks are used for the local site and the neighbor site, so that domain name learning cannot be performed.
Therefore, a new global load DNS neighbor site learning method, apparatus, electronic device, and computer readable medium are needed.
The above information disclosed in the background section is only for enhancement of understanding of the background of the application and therefore it may contain information that does not form the prior art that is already known to a person of ordinary skill in the art.
Disclosure of Invention
In view of the above, the present application provides a global load DNS neighbor site learning method, apparatus, electronic device, and computer readable medium, which are capable of performing domain name learning and establishing a neighbor site when a global load DNS local site and a neighbor site use different protocol stacks.
Other features and advantages of the application will be apparent from the following detailed description, or may be learned by the practice of the application.
According to one aspect of the present application, a global load DNS neighbor site learning method is provided, including: the global load DNS equipment acquires message data from a neighbor site; determining IP type and server information of a destination port based on the message data; when the IP type is not matched with the server information, the source IP address of the message data is adjusted; storing domain name information of the adjusted 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, socket connection is established with the destination port; and transmitting 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, obtaining 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; and determining the server information of the 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: the socket server of the global load DNS device binds a plurality of server addresses and corresponding port numbers.
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 domain name information of the adjusted message data locally includes: the socket server of the global load DNS device binds the plurality of client addresses and the adjusted addresses.
In one exemplary embodiment of the application, the global load DNS device supports a dual stack protocol.
According to an aspect of the present application, there is provided a global load DNS neighbor site learning apparatus, including: the message module is used for the global load DNS equipment to acquire message data from the neighbor sites; 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 transmitting the message data to a destination port based on the connection.
According to an aspect of the present application, there is provided an electronic device including: one or more processors; a storage means for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the methods as described above.
According to an aspect of the application, a computer-readable medium is proposed, on which a computer program is stored, which program, when being executed by a processor, implements a method as described above.
According to the global load DNS neighbor site learning method, the device, the electronic equipment and the computer readable medium, message data are acquired from neighbor sites through the global load DNS equipment; determining IP type and server information of a destination port based on the message data; when the IP type is not matched with the server information, the source IP address of the message data is adjusted; storing domain name information of the adjusted message data locally; the method for transmitting the message data to the destination port can perform 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 as claimed.
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 obtained from these drawings without inventive effort for a person of ordinary skill in the art.
Fig. 1 is a system block diagram illustrating a global load DNS neighbor site learning method and apparatus according to an exemplary embodiment.
Fig. 2 is a flow chart illustrating a global load DNS neighbor site learning method according to an exemplary embodiment.
Fig. 3 is a flowchart illustrating a global load DNS neighbor site learning method according to another exemplary embodiment.
Fig. 4 is a schematic diagram illustrating a global load DNS neighbor site learning method according to another exemplary embodiment.
Fig. 5 is a block diagram illustrating a global load DNS neighbor site learning device according to an example embodiment.
Fig. 6 is a block diagram of an electronic device, according to an example embodiment.
Fig. 7 is a block diagram of a computer-readable medium shown according to an example embodiment.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments can be embodied in many 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 the example embodiments to those skilled in the art. The same reference numerals in the drawings denote the same or similar parts, 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 application may be practiced without one or more of the specific details, or with other methods, components, devices, steps, etc. In other instances, well-known methods, devices, implementations, or operations are not shown or described in detail to avoid obscuring aspects of the application.
The block diagrams depicted in the figures are merely functional entities and do not necessarily correspond to physically separate entities. That is, the functional entities may be implemented in software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
The flow diagrams depicted in the figures are exemplary only, and do not necessarily include all of the elements and operations/steps, nor must they 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 order of actual execution may be changed according to actual situations.
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 element. Accordingly, a first component discussed below could be termed a second component without departing from the teachings of the present inventive concept. As used herein, the term "and/or" includes any one of the associated listed items and all combinations of one or more.
Those skilled in the art will appreciate that the drawings are schematic representations of example embodiments and that the modules or flows in the drawings are not necessarily required to practice the application and therefore should not be taken to limit the scope of the application.
The technical abbreviations involved in the present application are explained as follows:
domain Name System domain name system, which is a distributed database mapping domain names and IP addresses to each other, enables people to access the internet more conveniently. Although the IP address can be used as a unique identifier of a node in the internet, a string of numbers is difficult to memorize for the user, so that the user has the birth of a domain name, the domain name is a significant string of character strings, and usually, the character strings identify service items at the server end, so that the user can memorize and use conveniently, and the domain name system can map the domain name to a corresponding IP address to tell the user about the internet node which should be actually accessed. 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 user request is directed to a near or relatively stable service end of the network environment, so that the high-efficiency utilization of the service end and the stability of data transmission are improved, good user experience is provided, and the guarantee of the service quality of a remote server group is realized. The following technologies are more commonly used at present: global load based on DNS, based on HTTP redirection, IP routing.
The Dual Stack Dual protocol Stack indicates that the device supports both an IPv4 protocol and an IPv6 protocol, and has the function of processing two protocol addresses simultaneously. With the development of the internet, the advent of IPv6 solves the problem of the shortage of IPv4 addresses in the future, but IPv6 is impossible to replace IPv4 immediately, so that IPv4 and IPv6 coexist in one environment for a considerable period of time. To provide a smooth transition process that minimizes the impact on existing users, a good transition mechanism is needed. IPv6 and IPv4 are network layer protocols that are functionally similar, both being applied to the same physical platform and carrying the same transport layer protocol TCP or UDP. The node of the technology runs two sets of protocol stacks of IPv4 and IPv6 at the same time, 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 global load DNS site connection establishment currently only supports communication between the same protocol stacks, and the neighbor across the protocol stacks cannot be successfully established, so that dual stacks are temporarily not supported. In view of the technical defects in the prior art, the application provides a global load DNS neighbor site learning method and device, 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 universality of global load DNS site neighbor interaction.
The present application will be described in detail below with the aid of specific examples.
Fig. 1 is a system block diagram illustrating a global load DNS neighbor site learning method, apparatus, according to an example embodiment.
As shown in fig. 1, the system architecture 10 may include end devices 101, 102, 103, a network 104 and global load DNS sites 105, 106, 107, application servers 108, 109, 110. The network 104 is arranged between the terminal devices 101, 102, 103 and the global load DNS sites 105, 106, 107; global load DNS sites 105, 106, 107; the global load DNS sites 105, 106, 107 and the media providing the communication links between the application servers 108, 109, 110. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user can interact with the application servers 108, 109, 110 through the global load DNS sites 105, 106, 107 using the terminal devices 101, 102, 103 to receive or send messages, etc. Various communication client applications, such as shopping class applications, web browser applications, search class applications, instant messaging tools, mailbox clients, social platform software, etc., may be installed on the terminal devices 101, 102, 103.
The terminal devices 101, 102, 103 may be a variety of electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and 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 class websites browsed by the user using the terminal devices 101, 102, 103. The background management server may analyze and process 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 background servers of the same shopping class 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 access to a shopping site, the global load DNS site 105, 106, 107 obtains access requests for the terminal device 101, 102, 103, and then transmits the access requests between 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 global load DNS sites 105, 106, 107 can store domain name information sent by neighbors to the local through domain name learning, and the domain name information stored to the local can be replied to the terminal devices 101, 102, 103.
Global load DNS site 105 (which may also be 106 or 107) may obtain the message data, for example, by global load DNS site 106 (or 107); the global load DNS site 105 may determine, for example, based on the message data, the IP type and server information of the destination port; the global load DNS site 105 may adjust the source IP address of the message data, for example, when the IP type and the server side information do not match; the global load DNS site 105 may, for example, store the adjusted message data and its corresponding domain name information locally; the global load DNS site 105 may, for example, send the message data to the 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 transmitting the message data to a destination port based on the connection.
The global load DNS sites 105, 106, 107 may be servers of one entity, and may also be a plurality of servers, for example, it should be noted that the global load DNS neighbor site learning method provided by the embodiment of the present application may be executed by the global load DNS sites 105, 106, 107, and accordingly, the global load DNS neighbor site learning device may be set in the global load DNS sites 105, 106, 107.
Fig. 2 is a flow chart illustrating a global load DNS neighbor site learning method according to 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 acquires message data from its neighbor stations. The global load DNS device in the present application is for supporting a dual stack protocol.
In the present application, global load DNS site learning can support two learning modes: server mode and Client mode. The Server mode sends local domain name information to the neighbor, can store the domain name information sent by the neighbor to the local, and can reply to the client by the domain name information stored to the local; the Client mode sends the associated 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 states associated with the Client-mode cluster device more efficiently reflect the stability of the Server, and the Server-mode cluster device is more dedicated to more quickly and efficiently replying to the Client DNS request.
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, the IP header and the TCP header of the packet data may be obtained according to the parsing result; determining the IP type based on the IP header; and determining the server information of the destination port based on the TCP header.
In one embodiment, further comprising: the socket server of the global load DNS device binds a plurality of server addresses and corresponding port numbers.
In S206, when the IP type and the server information do not match, the source IP address of the packet data is adjusted. The IP address type of the server may be 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 message data and the domain name information corresponding to the message data are stored locally. The socket server of the global load DNS device may, for example, bind and store locally the plurality of client addresses and the adjusted addresses.
In S210, when the IP type and the server information match, a socket connection is established with the destination port.
In S212, the packet data is sent to the destination port.
In one embodiment, the socket server may monitor the address and port number to be bound to the socket, and if the destination protocol and port of the message match with the server information, proceed with the following determination: if the IP type of the socket is consistent with the IP type of the server, the socket connection or the data transmission is carried out; if not, carrying out IP address conversion, and mapping the source IP address of the message into an IP address consistent with the IP type of the server.
According to the global load DNS neighbor site learning method, the global load DNS equipment acquires message data from neighbor sites; determining IP type and server information of a destination port based on the message data; when the IP type is not matched with the server information, the source IP address of the message data is adjusted; storing domain name information of the adjusted message data locally; the method for transmitting the message data to the destination port can perform 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 the present application describes how to make and use specific examples, but the principles of the present application are not limited to any 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 flowchart illustrating a global load DNS neighbor site learning method according to another exemplary embodiment. The flow 30 shown in fig. 3 is a detailed description of S204 "determine IP type and server side information of destination port based on the message data" in the flow 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 packet data are obtained according to the analysis 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 the data link layer of the global load DNS, the message data is analyzed, and the Ethernet header, the IP header, the TCP header, the application data and the Ethernet tail of the message are obtained.
In one embodiment, the IP type of the message data may be determined by an IP header and the message may then be delivered to the network layer.
In one embodiment, the destination port may also be determined by a TCP header to determine which services the destination port to be accessed corresponds to.
Fig. 4 is a schematic diagram illustrating a global load DNS neighbor site learning method according to another exemplary embodiment. By means of fig. 4, the detailed description of the present application will be made taking the client as an IPv4 type and the server as an IPv6 type as an example.
And the receiving data link of the global load DNS server acquires the IP corresponding to each frame of message by checking the Ethernet type field of the message.
When the IP type is IPv4 and the destination port of the IPv4 datagram obtained through TCP information corresponds to an IPv6 socket, it is necessary to convert the source IPv4 address in the header of the IPv4 datagram into an IPv6 address of an equivalent IPv4 map.
The accept system is used for taking one connection from the connection queue which has completed three-way handshake after socket connection is established, and carrying out subsequent service; during the calling process, a socket, an associated file and a transmission control block are redistributed, and if the application layer needs to acquire the opposite terminal information, the opposite terminal 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 IPv4 datagrams. In this case, the neighbor site does not perceive itself to be in communication with the IPv4 client, nor does the client know to communicate with the IPv6 server.
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 global load DNS recognizes that the IPv6 address of the client is the source address in the original IPv6 header, and no mapping is required, and the rest of the datagrams on the connection are IPv6 datagrams.
Those skilled in the art will appreciate that all or part of the steps implementing the above described embodiments are implemented as a computer program executed by a CPU. When executed by a CPU, performs the functions defined by the above-described method provided by the present application. The program may be stored in a computer readable storage medium, which may be a read-only memory, a magnetic disk or an optical disk, etc.
Furthermore, it should be noted that the above-described figures are merely illustrative of the processes involved in the method according to the exemplary embodiment of the present application, and are not intended to be limiting. It will be readily appreciated that the processes shown in the above figures do not indicate or limit the temporal order of these processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, for example, among a plurality of modules.
The following are examples of the apparatus of the present application that may be used to perform the method embodiments of the present application. For details not disclosed in the embodiments of the apparatus of the present application, please refer to the embodiments of the method of the present application.
Fig. 5 is a block diagram illustrating a global load DNS neighbor site learning device according to an example embodiment. As shown in fig. 5, the global load DNS neighbor site learning device 50 includes: message module 502, information module 504, adjustment module 506, send module 508, connection module 510.
The message module 502 is configured to obtain message data by a global load DNS device from a neighboring site thereof; the global load DNS device in the present application is for supporting a dual stack protocol.
The information module 504 is configured to determine, based on the message data, an IP type and server information of a destination port; 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 message data when the IP type and the server information are not matched; the adjustment 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 packet data to a destination port.
The connection module 510 is configured to establish socket connection with the destination port when the IP type matches the server information; and transmitting 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 from neighbor sites through global load DNS equipment; determining IP type and server information of a destination port based on the message data; when the IP type is not matched with the server information, the source IP address of the message data is adjusted; storing domain name information of the adjusted message data locally; the method for transmitting the message data to the destination port can perform 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 of an electronic device, according to an example embodiment.
An electronic device 600 according to this embodiment of the application is described below with reference to fig. 6. The electronic device 600 shown in fig. 6 is merely an example, and should not be construed as limiting the functionality and scope of use of embodiments of the present application.
As shown in fig. 6, the electronic device 600 is in the form of a general purpose computing device. Components of electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one memory unit 620, a bus 630 connecting the different system components (including the memory unit 620 and the processing unit 610), a display unit 640, etc.
Wherein the storage unit stores program code that is executable by the processing unit 610 such that the processing unit 610 performs 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 as shown in fig. 2, 3.
The memory unit 620 may include readable media in the form of volatile memory units, such as Random Access Memory (RAM) 6201 and/or cache memory unit 6202, and may further include Read Only Memory (ROM) 6203.
The storage 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 or some combination of which may include an implementation of a network environment.
Bus 630 may be a local bus representing 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 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.), devices that enable a user to interact with the electronic device 600, and/or any devices (e.g., routers, modems, etc.) that the electronic device 600 can communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 650. Also, electronic device 600 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through network adapter 660. The network adapter 660 may communicate with other modules of the electronic device 600 over the bus 630. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 600, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, 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 (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, and includes several instructions to cause a computing device (may be a personal computer, a server, or a network device, etc.) to perform the above-described method according to the embodiment of the present application.
In general, the current global load DNS site connection establishment only supports communication between the same protocol stacks, and the neighbor crossing the protocol stacks cannot be successfully established, so that the dual stack is temporarily not supported. Therefore, the connection between neighbors of different protocol stacks can be established through the mapping of IPv4 and IPv6 addresses, and the flexibility and the universality of global load DNS site neighbor interaction are improved. For this reason, when the message is transferred to the data link layer, the main contents of the message are ethernet header, IP header, TCP header, and application data and ethernet trailer. Judging the IP type through the IP header, and transmitting the message to a network layer; and judging the destination port through the TCP header, and determining which corresponding services are accessed. The socket server monitors the address and port number to be bound to the socket, and if the destination protocol and port of the message are matched with the information of the server, the following judgment is carried out: if the IP type of the socket is consistent with the IP type of the server, the socket connection or the data transmission is carried out; if not, carrying out IP address conversion, and mapping the source IP address of the message into an IP address consistent with the IP type of the server. Taking the client as an IPv4 type and the server as an IPv6 type as an example, a receiving data link of the server transmits each frame to a corresponding IP module by looking up an Ethernet type field. The IPv4 module detects, in combination with the TCP module thereon, that the destination port of the IPv4 datagram corresponds to an IPv6 socket, and then converts the source IPv4 address in the IPv4 header of the datagram into an IPv6 address of an equivalent IPv4 map. When the accept system call returns this accepted IPv4 client connection to the server process, this 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 to communicate with the IPv4 client at all, nor does the client know itself to communicate with the IPv6 server), and the rest of the datagrams on this connection are IPv4 datagrams. For an IPv6 client, when an accept system call returns an accepted IPv6 client connection to a server process, the IPv6 address of the client is the source address in the original IPv6 header, mapping is not needed, and the rest datagrams on the connection are IPv6 datagrams. The method and the device expand the communication range of DNS site neighbor interaction, realize information interaction of the IPv4 site and the IPv6 site, better adapt to the network environment where the IPv4 and the IPv6 coexist, are beneficial to development of transition stages from the IPv4 to the 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 can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk 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 data signal propagated in baseband or as part of a carrier wave, with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable storage medium may also be any readable medium 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, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device 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 an external computing device (e.g., connected via the Internet using an Internet service provider).
The computer-readable medium carries one or more programs, which when executed by one of the devices, cause the computer-readable medium to perform the functions of: the global load DNS equipment acquires message data from a neighbor site; determining IP type and server information of a destination port based on the message data; when the IP type is not matched with the server information, the source IP address of the message data is adjusted; storing domain name information of the adjusted 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, socket connection is established with the destination port; and transmitting the message data to a destination port based on the connection.
Those skilled in the art will appreciate that the modules may be distributed throughout several devices as described in the embodiments, and that corresponding variations may be implemented in one or more devices that are unique to the embodiments. The modules of the above embodiments may be combined into one module, or may be further split into a plurality of sub-modules.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, and includes several instructions to cause a computing device (may be a personal computer, a server, a mobile terminal, or a network device, etc.) to perform the method according to the embodiments of the present application.
The exemplary embodiments of the present application have been particularly shown and described above. It is to be understood that this application is not limited to the precise arrangements, instrumentalities and instrumentalities described herein; on the contrary, the application is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.
Claims (8)
1. A global load DNS neighbor site learning method, comprising:
the global load DNS equipment acquires message data from a neighbor site;
determining IP type and server information of a destination port based on the message data;
when the IP type and the server side information are not matched, adjusting the source IP address of the message data, including: 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;
storing the adjusted message data and the domain name information corresponding to the message data locally, wherein the method comprises the following steps: the socket server of the global load DNS equipment binds and stores a plurality of client addresses and the adjusted addresses locally;
and sending the message data to a destination port.
2. The method as recited in claim 1, further comprising:
when the IP type is matched with the server information, socket connection is established with the destination port;
and transmitting the message data to a destination port based on the connection.
3. The method of claim 1, wherein determining the IP type and the server side information of the destination port based on the message 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 IP type and the server information of 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;
and determining the server information of the destination port based on the TCP header.
5. The method of claim 4, further comprising, prior to determining the server information for a destination port based on the TCP header:
the socket server of the global load DNS device binds a plurality of server addresses and corresponding port numbers.
6. The method of claim 1, wherein the global load DNS device supports a dual stack protocol.
7. A global load DNS neighbor site learning device, comprising:
the message module is used for the global load DNS equipment to acquire message data from the neighbor sites;
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 configured to adjust a source IP address of the message data when the IP type and the server information are not matched, and includes: the IP address type of the server is obtained, the source IP address of the message data is adjusted according to the IP address type of the server, and the adjusted message data and the domain name information corresponding to the message data are stored locally, comprising: the socket server of the global load DNS equipment binds and stores a plurality of client addresses and the adjusted addresses locally;
and the sending module is used for sending the message data to a destination port.
8. The apparatus as recited in claim 7, 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 transmitting the message data to a destination port based on the connection.
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 CN114650271A (en) | 2022-06-21 |
CN114650271B true 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 (9)
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 tunneling 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 |
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 |
CN113691589A (en) * | 2021-07-27 | 2021-11-23 | 杭州迪普科技股份有限公司 | Message transmission method, device and system |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8825859B2 (en) * | 2009-12-23 | 2014-09-02 | Citrix Systems, Inc. | System and methods for mixed mode of IPv6 and IPv4 DNS of global server load balancing |
US10101981B2 (en) * | 2015-05-08 | 2018-10-16 | Citrix Systems, Inc. | Auto discovery and configuration of services in a load balancing appliance |
US9628442B2 (en) * | 2015-06-22 | 2017-04-18 | Cisco Technology, Inc. | DNS snooping to create IP address-based trust database used to select deep packet inspection and storage of IP packets |
US10965592B2 (en) * | 2019-05-31 | 2021-03-30 | Juniper Networks, Inc. | Inter-network service chaining |
-
2022
- 2022-03-23 CN CN202210291148.XA patent/CN114650271B/en active Active
Patent Citations (9)
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 tunneling 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 |
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 |
CN113691589A (en) * | 2021-07-27 | 2021-11-23 | 杭州迪普科技股份有限公司 | Message transmission method, device and system |
Non-Patent Citations (3)
Title |
---|
On the DNS Deployment of Modern Web Services;Shuai Hao;《IEEE》;全文 * |
基于SDN的CDN请求路由方法研究;郭俊杰;《中国优秀硕士学位论文全文数据库信息科技辑》;全文 * |
移动电子政务架构安全性及其数据同步研究;童开峰;《中国优秀硕士学位论文全文数据库信息科技辑》;全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN114650271A (en) | 2022-06-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
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 | |
CN113691589B (en) | Message transmission method, device and system | |
US9565161B2 (en) | Automatically replacing localhost as hostname in URL with fully qualified domain name or IP address | |
CN113259479B (en) | Data processing method and equipment | |
CN111917900A (en) | Request processing method and device for domain name proxy | |
CN112003945A (en) | Service request response method and device | |
CN112104640B (en) | Data processing method, device and equipment of gateway and readable storage medium | |
US6950873B2 (en) | Apparatus and method for port sharing a plurality of server processes | |
CN111726400A (en) | Reverse connection method, device and server-side system | |
CN111885190B (en) | Service request processing method and system | |
CN113179317B (en) | Test system and method for content rewriting device | |
CN113452778B (en) | Session holding method, device, equipment, system and storage medium | |
JP2003141002A (en) | Url length conversion system and program | |
CN107222365B (en) | Data processing method and device and server | |
CN111800518B (en) | Client IP address insertion method and device | |
CN114650271B (en) | Global load DNS neighbor site learning method and device | |
CN110572394B (en) | Access control method and device | |
CN109005250B (en) | Method and device for accessing server | |
US10958580B2 (en) | System and method of performing load balancing over an overlay network | |
CN109600452B (en) | Server cluster, message pushing method and related server | |
JP2023522785A (en) | Harmony Comprehensive Proxy Service | |
CN114124883A (en) | Data access method and device based on cloud storage address, computer equipment and medium | |
CN113271300A (en) | Authentication system and method | |
US20130326027A1 (en) | Information processing apparatus, communication system, and communication method |
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 |