CN108769293B - IP address resolution method and related device - Google Patents

IP address resolution method and related device Download PDF

Info

Publication number
CN108769293B
CN108769293B CN201811012849.5A CN201811012849A CN108769293B CN 108769293 B CN108769293 B CN 108769293B CN 201811012849 A CN201811012849 A CN 201811012849A CN 108769293 B CN108769293 B CN 108769293B
Authority
CN
China
Prior art keywords
address
target
type
connection
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811012849.5A
Other languages
Chinese (zh)
Other versions
CN108769293A (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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information Technology 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201811012849.5A priority Critical patent/CN108769293B/en
Publication of CN108769293A publication Critical patent/CN108769293A/en
Application granted granted Critical
Publication of CN108769293B publication Critical patent/CN108769293B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/10Mapping addresses of different types
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/251Translation of Internet protocol [IP] addresses between different IP versions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/659Internet protocol version 6 [IPv6] addresses

Landscapes

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

Abstract

The invention discloses an IP address resolution method, which is characterized in that after a target IP address corresponding to an address resolution request is determined, the type of the target IP address is further determined, and the type and the target IP address are returned to a receiver, so that the receiver can distinguish the IP address of the IPV6 type from the IP address of the IPV4 type, the problem of resolution failure is avoided, and the compatibility of IPV6 and IPV4 is effectively ensured. The application also provides an IP address resolution system, an IP address resolution device, an IP address resolution system and a computer readable storage medium, and the technical effects can be realized.

Description

IP address resolution method and related device
Technical Field
The present invention relates to the field of IP address resolution technologies, and in particular, to a method, a system, an apparatus, and a computer-readable storage medium for IP address resolution.
Background
In the network information era, physical hosts usually need to access each other through IP addresses, and currently, there are two forms of IP addresses, one is an IPV4 type, the IPV4 is the fourth version of Internet Protocol (IP), the address bit number of the IPV4 is 32 bits, that is, a computer with 2 powers at most can be connected to the network.
However, with the prevalence of computer networks, the number of IP addresses of IPV4 has not been able to meet the current requirement of the number of computers, so the IP address of IPV6 is gradually applied, and the number of bits of IPV6 is 128, so that it can provide almost unlimited IP addresses.
Since the IP address of IPV4 is not the same in form as the IP address of IPV6, when performing domain name resolution, the IP address of IPV6 cannot be resolved using the same method, and in the existing device, the domain name resolution service provided by the existing device still does not support IPV6, which results in limitation on the use of IPV 6.
Therefore, how to resolve IP addresses of IPV4 type and IPV6 type is a problem to be solved by those skilled in the art.
Disclosure of Invention
The invention aims to provide an IP address resolution method, an IP address resolution system, an IP address resolution device and a computer readable storage medium, which are used for solving the problem of how to resolve IP addresses of both IPV4 types and IPV6 types.
In order to achieve the above purpose, the embodiment of the present invention provides the following technical solutions:
an IP address resolution method, comprising:
receiving an address resolution request;
determining a target IP address corresponding to the address resolution request;
determining a type of the target IP address, wherein the type is an IPV4 type or an IPV6 type;
and returning the target IP address and the type of the target IP address to a receiver so that the receiver processes the target IP address according to the type of the target IP address.
Wherein the recipient comprises a PDNS.
Wherein the determining the target IP address corresponding to the address resolution request includes:
determining a target node IP address with the minimum connection number by using the connection number information corresponding to each cluster node IP address; the connection number information comprises cluster node IP addresses and corresponding connection numbers, and the connection numbers are the connection numbers which are monitored by utilizing a preset IPV6 interface and a preset IPV4 interface in real time and establish connection with the IP addresses of the cluster nodes.
The determining the target node IP address with the minimum connection number by using the connection number information corresponding to each cluster node IP address comprises the following steps:
determining connection information corresponding to an IP address of each cluster node, wherein the connection information comprises IP address information used for establishing connection between a client and a cluster;
converting the IP address of the IPV6 type in the IP address information into a target format;
counting the number of clients connected with the IP address of each cluster node, and taking the number as the connection number of the IP address of each cluster node;
and taking the cluster node IP address with the least connection number as a target IP address.
Wherein, after returning the target IP address and the type of the target IP address, the method further includes:
receiving the target IP address sent by the receiver;
when the target IP address is an IP address of an IPV6 type, converting the target IP address into a target format;
determining domain name information corresponding to the target IP address in a configuration file by using the target IP address in the target format;
and returning the domain name information to the receiver.
The present application also provides an IP address resolution system, including:
the first receiving module is used for receiving an address resolution request;
a first determining module, configured to determine a target IP address corresponding to the address resolution request;
a second determination module for determining a type of the target IP address, wherein the type is an IPV4 type or an IPV6 type;
and the first returning module is used for returning the target IP address and the type of the target IP address to a receiving party so that the receiving party processes the target IP address according to the type of the target IP address.
Wherein the recipient comprises a PDNS.
Wherein, still include:
a second receiving module, configured to receive the target IP address sent by the receiving party;
the conversion module is used for converting the target IP address into a target format when the target IP address is an IP address of an IPV6 type;
a third determining module, configured to determine, in a configuration file, domain name information corresponding to the target IP address using the target IP address in the target format;
and the second returning module is used for returning the domain name information to the receiving party.
The present application further provides an IP address resolution apparatus, including:
a memory for storing a computer program;
a processor for implementing the steps of the IP address resolution method when executing the computer program.
The present application further provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the IP address resolution method as described.
According to the scheme, the IP address resolution method provided by the invention comprises the following steps: receiving an address resolution request; determining a target IP address corresponding to the address resolution request; determining a type of the target IP address, wherein the type is an IPV4 type or an IPV6 type; and returning the target IP address and the type of the target IP address to a receiver so that the receiver processes the target IP address according to the type of the target IP address.
Therefore, according to the IP address resolution method provided in the embodiment of the present application, after the target IP address corresponding to the address resolution request is determined, the type of the target IP address is further determined, and both the type and the target IP address are returned to the receiving party, so that the receiving party can distinguish the IP address of IPV6 type from the IP address of IPV4 type, the problem of resolution failure is avoided, and the compatibility of IPV6 and IPV4 is effectively ensured.
The application also provides an IP address resolution system, an IP address resolution device, an IP address resolution system and a computer readable storage medium, and the technical effects can be realized.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of an IP address resolution method according to an embodiment of the present invention;
fig. 2 is a flowchart of a specific IP address resolution method according to an embodiment of the present invention;
fig. 3 is a flowchart of a specific IP address resolution method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an IP address resolution system according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an IP address resolution device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention discloses an IP address resolution method, a system, a device and a computer readable storage medium, which aim to solve the problem of how to resolve IP addresses of both IPV4 type and IPV6 type.
Referring to fig. 1, an IP address resolution method provided in an embodiment of the present invention specifically includes:
s101, receiving an address resolution request.
Firstly, an address resolution request is received, wherein the address resolution request is a request for resolving a domain name into an IP address, and the request comprises the domain name to be resolved. The address resolution request may be an address resolution request sent by a DNS (Domain Name System) resolution service component, which includes PDNS, i.e. PowerDNS, and is an open source DNS service component across platforms.
It should be noted that, when a client requests to establish a connection with a cluster server, a domain name is usually input by the client, a DNS resolution service determines an address resolution request by using the domain name, and then sends the address resolution request to a system, and the system resolves the domain name.
S102, determining a target IP address corresponding to the address resolution request.
And finding the IP address corresponding to the domain name according to the domain name information in the address resolution request, and taking the IP address as a target IP address.
It should be noted that, for the same service cluster, the same domain name is represented to the client, but the cluster includes a plurality of nodes, and the IP address of each node is different.
When a large number of user clients access the cluster, if the target IP addresses determined for all the clients are the same, a situation that one cluster node establishes connection with a large number of client lists occurs, thereby causing a problem of load imbalance of the cluster. Therefore, when a target IP address is determined for one address resolution request, different IP addresses need to be allocated to different requests, so that different clients are connected to different nodes, thereby avoiding the situation that a cluster node load is unbalanced because one node is connected to a large number of clients.
Therefore, in the scheme, two modes of determining the target IP address can be adopted, namely the target IP address can be determined in a polling mode, and the target IP address can also be determined by a connection number method.
The polling mode is to determine the target IP address determined when the analysis request is received last time, then determine the next IP address of the last target IP address, use this IP address as the target IP address, and determine the target IP address sequentially and circularly downwards when the request is received again.
The number of connected clients is determined, and the IP address of the node with the least number of connections is used as the target IP address, so that the client corresponding to the address resolution request establishes connection with the node with the least number of connections.
For the methods corresponding to polling and connection number, reference may be made to the prior art, and not described herein in any greater extent. However, in the present embodiment, since the resolution of the IPV6 type IP address is compatible, the IPV6 type IP address generally has multiple formats, that is, multiple representation methods, for example, colon representation: 2001:0250:3000:1000:0000:0000: 0005; 0-bit compression representation: 2001:250:3000:1000: : 5; inline IPV4 notation: : : FFFF: 192.168.0.1.
in the connection number method, if the IP address corresponding to the cluster node is an IPV6 type, and there are multiple IPV6 type representation formats, so when a client establishes a connection with a cluster node corresponding to the same IPV6 type IP address, the representation format of the IP address used by each client may be different, but the IP address actually corresponds to the same IP address, and therefore, in order to better count the number of connections, it is necessary to determine the IP address used by each client first, that is, determine the IP address at which the client establishes the connection first, and if the IP address is an IPV6 type, it is necessary to convert the IP address into a target format and then perform statistics. Therefore, the same IP address of the IPV6 type with different representation formats is converted into the same IP address in format, so that the number of connections corresponding to one IP address is more convenient to count.
The specific introduction of the method for counting connections applied in the present solution will be specifically described in the following embodiments, which will not be described herein again.
S103, determining the type of the target IP address, wherein the type is an IPV4 type or an IPV6 type.
Specifically, in order to make the resolution service compatible with the IP addresses of both IPV4 and IPV6, after the target IP address is determined, it is also necessary to determine the IP address type, that is, whether the target IP address is IPV4 type or IPV6 type. IPV4 type is A and IPV6 type is AAAA.
S104, returning the target IP address and the type of the target IP address to a receiver so that the receiver processes the target IP address according to the type of the target IP address.
It should be noted that, if the type corresponding to the destination IP address is not sent, when the IPV6 type address returns to the DNS resolution server, the server will process according to the IPV4 type IP address, and at this time, an error occurs, which causes a problem of failed resolution. For example, the PDNS may timeout when communicating with the loadbalance, and the PDNS may restart the loadbalance.
Therefore, in order to be compatible with the IP address of IPV6 type, in this scheme, the target IP address and the type corresponding to the target IP address need to be sent to the receiving party together, so that the receiving party can distinguish the IP address of IPV6 type from the IP address of IPV4 type, thereby avoiding the problem of failed resolution.
Therefore, according to the IP address resolution method provided in the embodiment of the present application, after the target IP address corresponding to the address resolution request is determined, the type of the target IP address is further determined, and both the type and the target IP address are returned to the receiving party, so that the receiving party can distinguish the IP address of IPV6 type from the IP address of IPV4 type, the problem of resolution failure is avoided, and the compatibility of IPV6 and IPV4 is effectively ensured.
A specific IP address resolution method provided in this embodiment of the present application is described below, and a specific IP address resolution method described below further defines and explains determination of a target IP address in the foregoing embodiment, and other steps are substantially the same as those in the foregoing embodiment, and specifically refer to the foregoing embodiment, and details will not be described here.
Referring to fig. 2, a specific IP address resolution method provided in the embodiment of the present application specifically includes:
s201, receiving an address resolution request.
S202, determining a target node IP address with the minimum connection number by using the connection number information corresponding to each cluster node IP address; the connection number information comprises cluster node IP addresses and corresponding connection numbers, and the connection numbers are the connection numbers which are monitored by utilizing a preset IPV6 interface and a preset IPV4 interface in real time and establish connection with the IP addresses of the cluster nodes.
In the scheme, an IPV6 interface and an IPV4 interface are added in advance, the two interfaces are respectively used for monitoring the connection number corresponding to the IP addresses of cluster nodes of different types, the IPV4 is used for monitoring the connection number corresponding to the IP address of the cluster node of the IPV4 type, and the IPV6 is used for monitoring the connection number corresponding to the IP address of the cluster node of the IPV6 type. The IPV4 interface can refer to the prior art, and the IPV6 interface can be realized by adding 'udp 6 [: ]: 1662'.
It should be noted that monitoring and storing the connection number corresponding to each type of current IP address may be performed in real time or at preset time intervals, but the operation of determining the target IP address with the minimum connection number in all cluster nodes is performed after receiving an address resolution request, that is, after receiving the address resolution request, the target node IP address with the minimum connection number is determined from the monitored information.
It should be noted that, if the IP address corresponding to the cluster node is of an IPV6 type, and there are multiple IPV6 types of representation formats, so that when a client establishes a connection with a cluster node corresponding to an IP address of the same IPV6 type, the representation format of the IP address used by each client may be different, but the IP address used by each client substantially corresponds to the same IP address, and therefore, in order to better count the number of connections, it is necessary to determine the IP address used by each client, that is, the IP address at which the client establishes the connection, and if the IP address is of an IPV6 type, it is necessary to convert the IP address into the same target format, and then perform statistics. Therefore, the same IP address of the IPV6 type with different identification formats is converted into the same IP address in format, so that the number of connections corresponding to one IP address is more convenient to count.
Therefore, in a specific embodiment, connection information corresponding to an IP address of each cluster node is first determined, where the connection information includes IP address information used by a client to establish a connection with a cluster;
converting the IP address of the IPV6 type in the IP address information into a target format;
counting the number of clients connected with the IP address of each cluster node, and taking the number as the connection number of the IP address of each cluster node;
and taking the cluster node IP address with the least connection number as a target IP address.
S203, determining the type of the target IP address, wherein the type is an IPV4 type or an IPV6 type.
S204, returning the target IP address and the type of the target IP address to a receiver so that the receiver processes the target IP address according to the type of the target IP address.
A specific IP address resolution method provided in the embodiments of the present application is introduced below, and a specific IP address resolution method described below and the embodiments described above may be referred to each other.
Referring to fig. 3, a specific IP address resolution method provided in the embodiment of the present application specifically includes:
s301, an address resolution request is received.
S302, determining a target IP address corresponding to the address resolution request.
S303, determining the type of the target IP address, wherein the type is an IPV4 type or an IPV6 type.
S304, returning the target IP address and the type of the target IP address to a receiver so that the receiver processes the target IP address according to the type of the target IP address.
S305, receiving the target IP address sent by the receiver.
It should be noted that, in the practical application of domain name resolution, besides the forward resolution mentioned in the above embodiment, that is, determining the IP address according to the domain name, there is also the reverse resolution, that is, determining the domain name by the IP address.
In the scheme, the system returns the IP address obtained by forward resolution to the receiver, namely the DNS resolution server, and then the receiver can also send the received IP address back to the system to verify whether the domain name corresponding to the IP address is the domain name which the client requests to access.
Specifically, the target IP address sent by the receiving party is received first, and the target IP address is the forward-resolved target IP address returned by the system to the receiving party.
S306, when the target IP address is an IP address of an IPV6 type, converting the target IP address into a target format.
Since IP addresses of IPV6 type come in a variety of formats, in order to facilitate matching of IP addresses to domain names, it is necessary to convert IP addresses of IPV6 type to a destination format.
S307, determining domain name information corresponding to the target IP address in a configuration file by using the target IP address in the target format.
Specifically, the corresponding domain name information may be determined in the configuration file by using the target IP address in the target format. It should be noted that, the configuration file is provided with a corresponding relationship between the domain name and the IP address, and the parsing operation can be completed according to the configuration file.
S308, the domain name information is returned to the receiver.
Specifically, the domain name information obtained by reverse resolution is returned to the receiving party.
In the following, an IP address resolution system provided in an embodiment of the present application is introduced, and an IP address resolution system described below and an IP address resolution method provided in the foregoing embodiment may be referred to each other.
Referring to fig. 4, an IP address resolution system provided in an embodiment of the present application specifically includes:
the first receiving module 401 is configured to receive an address resolution request.
A first determining module 402, configured to determine a target IP address corresponding to the address resolution request.
A second determining module 403, configured to determine a type of the target IP address, where the type is IPV4 type or IPV6 type.
A first returning module 404, configured to return the target IP address and the type of the target IP address to a receiving party, so that the receiving party processes the target IP address according to the type of the target IP address.
The IP address resolution system of this embodiment is configured to implement the foregoing IP address resolution method, and therefore a specific implementation manner of the IP address resolution system may be found in the foregoing embodiment portions of the IP address resolution method, for example, the first receiving module 401, the first determining module 402, the second determining module 403, and the first returning module 404 are respectively configured to implement steps S101, S102, S103, and S104 in the foregoing IP address resolution method, so that the specific implementation manner thereof may refer to descriptions of corresponding embodiments of each portion, and is not described herein again.
A specific IP address resolution system provided in the embodiment of the present application is introduced below, and a specific IP address resolution system described below adds a relevant module for reverse resolution on the basis of the above embodiment, and the contents of other modules may be mutually referred to the above embodiment, and are not described herein again.
The specific IP address resolution system provided in the embodiment of the present application, on the basis of the above embodiment, further includes:
a second receiving module, configured to receive the target IP address sent by the receiving party;
the conversion module is used for converting the target IP address into a target format when the target IP address is an IP address of an IPV6 type;
a third determining module, configured to determine, in a configuration file, domain name information corresponding to the target IP address using the target IP address in the target format;
and the second returning module is used for returning the domain name information to the receiving party.
The IP address resolution system of this embodiment is configured to implement the foregoing IP address resolution method, and therefore a specific implementation manner of the IP address resolution system may be found in the foregoing embodiment portions of the IP address resolution method, for example, the second receiving module, the converting module, the third determining module, and the second returning module are respectively configured to implement steps S305, S306, S307, and S308 in the foregoing IP address resolution method, so that the specific implementation manner thereof may refer to descriptions of corresponding embodiments of each portion, and details thereof are not repeated here.
An IP address resolution device provided in the embodiments of the present application is introduced below, and the IP address resolution device described below and the embodiments described above may be referred to each other.
Referring to fig. 5, an IP address resolution apparatus provided in an embodiment of the present application specifically includes:
a memory 100 for storing a computer program;
the processor 200, when executing the computer program, may implement the steps provided by the above embodiments.
Specifically, the memory 100 includes a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer-readable instructions, and the internal memory provides an environment for the operating system and the computer-readable instructions in the non-volatile storage medium to run. The processor 200 provides the IP address resolution device with computing and control capabilities, and may implement the steps provided by any of the above-described embodiments of the IP address resolution method.
On the basis of the above embodiment, as a preferred implementation, the data acquisition device further includes:
the input interface 300 is used for acquiring computer programs, parameters and instructions imported from the outside, and storing the computer programs, parameters and instructions into the memory through the control of the processor. The input interface 300 may be connected to an input device for receiving parameters or instructions manually input by a user. The input device may be a touch layer covered on a display screen, or a button, a track ball or a touch pad arranged on a terminal shell, or a keyboard, a touch pad or a mouse, etc. Specifically, in this embodiment, a configuration file for resolving a domain name or an IP address may be configured through the input device.
And a display unit 400 for displaying the data sent by the processor. The display unit 400 may be a display screen on a PC, a liquid crystal display screen, or an electronic ink display screen. Specifically, in this embodiment, the display unit 400 may display the processing condition of the address resolution request.
And a network port 500 for performing communication connection with each external terminal device. The communication technology adopted by the communication connection can be a wired communication technology or a wireless communication technology, such as a mobile high definition link (MHL) technology, a Universal Serial Bus (USB), a High Definition Multimedia Interface (HDMI), a wireless fidelity (WiFi), a bluetooth communication technology, a low power consumption bluetooth communication technology, an ieee802.11 s-based communication technology, and the like. In this embodiment, the IP address resolution device may transmit data such as an address resolution request and a resolution result with the receiving party through the network port.
The present application also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, may implement the steps provided by the above-described embodiments. The storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (8)

1. An IP address resolution method, comprising:
receiving an address resolution request;
determining a target IP address corresponding to the address resolution request;
determining a type of the target IP address, wherein the type is an IPV4 type or an IPV6 type;
returning the target IP address and the type of the target IP address to a receiver so that the receiver processes the target IP address according to the type of the target IP address;
wherein the determining the target IP address corresponding to the address resolution request includes:
determining a target node IP address with the minimum connection number by using the connection number information corresponding to each cluster node IP address; the connection number information comprises cluster node IP addresses and corresponding connection numbers, and the connection numbers are the connection numbers which are monitored by utilizing a preset IPV6 interface and a preset IPV4 interface in real time and establish connection with the IP addresses of the cluster nodes;
the determining the target node IP address with the minimum connection number by using the connection number information corresponding to each cluster node IP address includes:
determining connection information corresponding to an IP address of each cluster node, wherein the connection information comprises IP address information used for establishing connection between a client and a cluster;
converting the IP address of the IPV6 type in the IP address information into a target format;
counting the number of clients connected with the IP address of each cluster node, and taking the number as the connection number of the IP address of each cluster node;
and taking the cluster node IP address with the least connection number as a target IP address.
2. The method of claim 1, wherein the recipient comprises a PDNS.
3. The method according to any of claims 1-2, wherein after returning the target IP address and the type of the target IP address, further comprising:
receiving the target IP address sent by the receiver;
when the target IP address is an IP address of an IPV6 type, converting the target IP address into a target format;
determining domain name information corresponding to the target IP address in a configuration file by using the target IP address in the target format;
and returning the domain name information to the receiver.
4. An IP address resolution system, comprising:
the first receiving module is used for receiving an address resolution request;
a first determining module, configured to determine a target IP address corresponding to the address resolution request;
a second determination module for determining a type of the target IP address, wherein the type is an IPV4 type or an IPV6 type;
the first returning module is used for returning the target IP address and the type of the target IP address to a receiving party so that the receiving party can process the target IP address according to the type of the target IP address;
the first determining module is specifically configured to determine a target node IP address with the smallest connection number by using the connection number information corresponding to each cluster node IP address; the connection number information comprises cluster node IP addresses and corresponding connection numbers, and the connection numbers are the connection numbers which are monitored by utilizing a preset IPV6 interface and a preset IPV4 interface in real time and establish connection with the IP addresses of the cluster nodes;
the first determining module is specifically configured to determine connection information corresponding to an IP address of each cluster node, where the connection information includes IP address information used by a client to establish connection with a cluster; converting the IP address of the IPV6 type in the IP address information into a target format; counting the number of clients connected with the IP address of each cluster node, and taking the number as the connection number of the IP address of each cluster node; and taking the cluster node IP address with the least connection number as a target IP address.
5. The system of claim 4, wherein the recipient comprises a PDNS.
6. The system of claim 4 or 5, further comprising:
a second receiving module, configured to receive the target IP address sent by the receiving party;
the conversion module is used for converting the target IP address into a target format when the target IP address is an IP address of an IPV6 type;
a third determining module, configured to determine, in a configuration file, domain name information corresponding to the target IP address using the target IP address in the target format;
and the second returning module is used for returning the domain name information to the receiving party.
7. An IP address resolution device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the IP address resolution method according to any one of claims 1 to 3 when executing the computer program.
8. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the IP address resolution method according to any one of claims 1 to 3.
CN201811012849.5A 2018-08-31 2018-08-31 IP address resolution method and related device Active CN108769293B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811012849.5A CN108769293B (en) 2018-08-31 2018-08-31 IP address resolution method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811012849.5A CN108769293B (en) 2018-08-31 2018-08-31 IP address resolution method and related device

Publications (2)

Publication Number Publication Date
CN108769293A CN108769293A (en) 2018-11-06
CN108769293B true CN108769293B (en) 2022-02-25

Family

ID=63967894

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811012849.5A Active CN108769293B (en) 2018-08-31 2018-08-31 IP address resolution method and related device

Country Status (1)

Country Link
CN (1) CN108769293B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111031148B (en) * 2019-12-11 2022-05-24 中天通信技术有限公司 Address resolution method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101110827A (en) * 2007-08-24 2008-01-23 张建中 Method, device and system for multidimensional address domain name analysis
CN102196051A (en) * 2010-03-03 2011-09-21 ***通信集团公司 Terminal communication method, system and device
CN104144123A (en) * 2013-05-10 2014-11-12 中国电信股份有限公司 Method and system for having access to internet and routing type gateway device
CN104506665A (en) * 2014-12-03 2015-04-08 中国联合网络通信集团有限公司 Method and system for distinguishing IPv4 address from IPv6 address

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100534070C (en) * 2007-08-23 2009-08-26 创新科存储技术(深圳)有限公司 Method and system for implementing application server load balancing
CN101340327B (en) * 2008-08-21 2011-11-30 腾讯科技(深圳)有限公司 Method and system for implementing load balance of network server
CN101815104A (en) * 2010-03-19 2010-08-25 中兴通讯股份有限公司 Network protocol address feedback method and domain name resolution server
US20140258491A1 (en) * 2013-03-11 2014-09-11 Bluebox Security Inc. Methods and apparatus for hostname selective routing in dual-stack hosts

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101110827A (en) * 2007-08-24 2008-01-23 张建中 Method, device and system for multidimensional address domain name analysis
CN102196051A (en) * 2010-03-03 2011-09-21 ***通信集团公司 Terminal communication method, system and device
CN104144123A (en) * 2013-05-10 2014-11-12 中国电信股份有限公司 Method and system for having access to internet and routing type gateway device
CN104506665A (en) * 2014-12-03 2015-04-08 中国联合网络通信集团有限公司 Method and system for distinguishing IPv4 address from IPv6 address

Also Published As

Publication number Publication date
CN108769293A (en) 2018-11-06

Similar Documents

Publication Publication Date Title
US7245622B2 (en) Allowing IPv4 clients to communicate over an IPv6 network when behind a network address translator with reduced server workload
US20130346591A1 (en) Clientless Cloud Computing
US10498694B2 (en) Mapping IPv4 knowledge to IPv6
CN105391811A (en) DNS (domain name resolution) method, access method for application server, and terminal
US10320951B2 (en) Systems and methods for establishing a virtual local area network
CN107124483A (en) Domain name analytic method and server
CN104969515A (en) Methods and gateways for processing DNS request
CN111049947B (en) Message forwarding method and device, electronic equipment and storage medium
CN103503421A (en) SCTP association endpoint relocation in a load balancing system
CN112134826B (en) Communication method, computer device, and computer-readable storage medium
CN107800745B (en) Method, apparatus, and computer-readable storage medium for service announcement and service discovery based on mDNS
CN113452778B (en) Session holding method, device, equipment, system and storage medium
CN109246024B (en) Method, device, terminal equipment and storage medium for load sharing in networking
CN108769293B (en) IP address resolution method and related device
CN109413227B (en) IPv4 user access IPv6 network intercommunication device and equipment based on multi-IPv 6 network
CN110730244A (en) Networking method and system of DHT (distributed hash table) system, network equipment and storage medium
CN114189492A (en) Network card pressure testing method and system based on network address translation technology
CN108141704B (en) Location identification of previous network message processors
CN112019641B (en) Data transmission method and device
CN115225606A (en) Domain name access method and system of cross-network protocol of container cloud platform
CN113784201A (en) Auxiliary screen device networking processing method and device, intelligent terminal and medium
CN107317869B (en) Method, device and system for detecting node NAT type
CN110798542A (en) Method and system for acquiring IP address
CN102377835B (en) Communication method and device for network element group network
CN115225530B (en) Asset state monitoring method, device, equipment and medium

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