CN114448931B - Domain name resolution method, device and medium based on MLAG networking environment - Google Patents

Domain name resolution method, device and medium based on MLAG networking environment Download PDF

Info

Publication number
CN114448931B
CN114448931B CN202210147941.2A CN202210147941A CN114448931B CN 114448931 B CN114448931 B CN 114448931B CN 202210147941 A CN202210147941 A CN 202210147941A CN 114448931 B CN114448931 B CN 114448931B
Authority
CN
China
Prior art keywords
domain name
resolved
resolution
resolving
mlag
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
CN202210147941.2A
Other languages
Chinese (zh)
Other versions
CN114448931A (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.)
Inspur Network Technology (Shandong) Co.,Ltd.
Original Assignee
Inspur Cisco Networking 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 Inspur Cisco Networking Technology Co Ltd filed Critical Inspur Cisco Networking Technology Co Ltd
Priority to CN202210147941.2A priority Critical patent/CN114448931B/en
Publication of CN114448931A publication Critical patent/CN114448931A/en
Application granted granted Critical
Publication of CN114448931B publication Critical patent/CN114448931B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/163In-band adaptation of TCP data exchange; In-band control procedures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Landscapes

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

Abstract

The embodiment of the specification discloses a domain name resolution method, equipment and medium based on an MLAG networking environment, wherein the method comprises the following steps: when the current equipment in the MLAG networking environment receives a domain name resolution request sent by a client, acquiring a domain name to be resolved; recording a domain name to be resolved in a designated table entry of the current equipment, sending the domain name to a domain name server so as to resolve the domain name to be resolved through the domain name server, and sending a resolving result obtained by resolving to any networking equipment in an MLAG networking environment, wherein the resolving result comprises the corresponding relation between the domain name to be resolved and an IP address; when the opposite terminal equipment in the MLAG networking environment receives the analysis result, judging whether a domain name to be analyzed corresponding to the analysis result exists in a designated table entry of the opposite terminal equipment; if the specified list item of the opposite terminal equipment does not contain the domain name to be resolved, the resolving result is sent to the current equipment, so that the current equipment forwards the resolving result to the client side, and domain name resolution is completed.

Description

Domain name resolution method, device and medium based on MLAG networking environment
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a domain name resolution method, device, and medium based on an MLAG networking environment.
Background
The cross-device link aggregation group (Multichassis Link Aggregation Group, MLAG) is a mechanism for realizing cross-device link aggregation, and performs cross-device link aggregation on two devices, so that the link reliability is improved from a single board level to a device level, and a dual-activity system is formed. Two devices running the MLAG become one device in the logic of forwarding traffic, and have the advantages of increasing bandwidth, improving link reliability and load sharing. The method can realize the link redundancy of link binding and the redundancy of single-point equipment failure.
The virtual routing redundancy protocol (Virtual Router Redundancy Protocol, VRRP) is a routing protocol that solves the problem of single point failure in configuring static gateways in a local area network. In the networking environment of MLAG and VRRP, when one of the MLAG devices receives a domain name system (Domain Name System, DNS) request message, the request message is repackaged and sent to an external DNS resolution server. Because the source IP of the request message sent by the MLAG device is virtual IP under the VRRP environment, all MLAG devices have the same virtual IP. When an external DNS resolution server transmits a response message, it may be transmitted to another device in the MLAG device. Because the other device does not receive the DNS request message, the other device recognizes the response message corresponding to the DNS request message as an unknown message, and discards the message. Therefore, in the networking environment of MLAG and VRRP, there may be a case where the client fails to receive the domain name resolution result, resulting in resolution failure.
Disclosure of Invention
One or more embodiments of the present disclosure provide a domain name resolution method, device, and medium based on an MLAG networking environment, which are used to solve the following technical problems: in the networking environment of MLAG and VRRP, there may be a case where the client fails to receive the domain name resolution result, resulting in resolution failure.
One or more embodiments of the present disclosure adopt the following technical solutions:
one or more embodiments of the present disclosure provide a domain name resolution method based on an MLAG networking environment, where the method includes: when the current equipment in the MLAG networking environment receives a domain name resolution request sent by a client, acquiring a domain name to be resolved; recording the domain name to be resolved in a designated table entry of the current equipment, and sending the recorded domain name to a domain name server so as to resolve the domain name to be resolved through the domain name server, and sending a resolving result obtained by resolving to any networking equipment in the MLAG networking environment, wherein the resolving result comprises the corresponding relation between the domain name to be resolved and an IP address; when opposite terminal equipment in an MLAG networking environment receives the analysis result, judging whether a domain name to be analyzed corresponding to the analysis result exists in a designated table entry of the opposite terminal equipment; and if the to-be-resolved domain name does not exist in the appointed table entry of the opposite terminal equipment, sending the resolving result to the current equipment so that the current equipment forwards the resolving result to the client side to complete domain name resolving.
Further, before the domain name to be resolved is recorded in the designated table entry of the current device and sent to the domain name server, the method further includes: judging whether the domain name to be resolved is in a static resolving table item preconfigured by the current equipment, wherein the preconfigured static resolving table item comprises a corresponding relation between the preconfigured domain name and an IP address; and if the domain name to be resolved is not in the static resolution table item preconfigured by the current equipment, recording the domain name to be resolved in the appointed table item of the current equipment, wherein the appointed table item is used for recording the domain name to be resolved which is not configured in the static resolution table item of the current equipment.
Further, after the determining whether the domain name to be resolved is in the static resolution table item preconfigured by the current device, the method further includes: if the domain name to be resolved is in a static resolution table item pre-configured by the current equipment, determining a resolution IP address corresponding to the domain name to be resolved according to the corresponding relation between the domain name to be resolved and the IP address in the static resolution table item; and sending the resolved IP address corresponding to the domain name to be resolved to the client.
Further, after the parsing result is sent to any one networking device in the MLAG networking environment, the method further includes: when the current equipment in the MLAG networking environment receives the analysis result, acquiring a domain name to be analyzed in the analysis result and a corresponding relation between the domain name to be analyzed and an IP address; comparing the domain name to be resolved in the resolving result with the domain name to be resolved in the appointed table entry of the current equipment; if the domain name to be resolved in the resolving result is consistent with the domain name to be resolved in the appointed table item of the current equipment in comparison, determining the resolving IP address corresponding to the domain name to be resolved according to the corresponding relation between the domain name to be resolved and the IP address in the resolving result; and sending the resolved IP address corresponding to the domain name to be resolved to the client.
Further, before the parsing result is sent to the current device, the method further includes: and acquiring the corresponding relation between the domain name to be resolved and the IP address in the resolving result, and respectively storing the corresponding relation between the domain name to be resolved and the IP address in the static resolving table entry of the opposite terminal equipment and the static resolving table entry of the current equipment.
Further, after the domain name resolution is completed, the method further includes: when any one networking device in the MLAG networking environment receives the domain name resolution request of the domain name to be resolved again, determining the corresponding relation between the domain name to be resolved and the IP address according to the static resolution list item of any one networking device in the MLAG networking environment; and according to the corresponding relation between the domain name to be resolved and the IP address, transmitting the resolved IP address corresponding to the domain name to be resolved to the client.
Further, the current device and the peer device are connected through a peer-link port, and the sending the analysis result to the current device specifically includes: acquiring the corresponding relation between the domain name to be resolved and the IP address in the resolving result; packaging the corresponding relation between the domain name to be resolved and the IP address into an MLAG protocol message; and sending the MLAG protocol message to the current equipment through the peer-link port.
Further, before the current device in the MLAG networking environment receives the domain name resolution request sent by the client, the method further includes: and simultaneously starting a domain name resolution proxy function of the current equipment and the opposite terminal equipment, and carrying out port monitoring on the current equipment and the opposite terminal equipment which are started with the domain name resolution proxy function.
One or more embodiments of the present specification provide a domain name resolution apparatus based on an MLAG networking environment, including:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
when the current equipment in the MLAG networking environment receives a domain name resolution request sent by a client, acquiring a domain name to be resolved; recording the domain name to be resolved in a designated table entry of the current equipment, and sending the recorded domain name to a domain name server so as to resolve the domain name to be resolved through the domain name server, and sending a resolving result obtained by resolving to any networking equipment in the MLAG networking environment, wherein the resolving result comprises the corresponding relation between the domain name to be resolved and an IP address; when opposite terminal equipment in an MLAG networking environment receives the analysis result, judging whether a domain name to be analyzed corresponding to the analysis result exists in a designated table entry of the opposite terminal equipment; and if the to-be-resolved domain name does not exist in the appointed table entry of the opposite terminal equipment, sending the resolving result to the current equipment so that the current equipment forwards the resolving result to the client side to complete domain name resolving.
One or more embodiments of the present specification provide a non-volatile computer storage medium storing computer-executable instructions configured to:
when the current equipment in the MLAG networking environment receives a domain name resolution request sent by a client, acquiring a domain name to be resolved; recording the domain name to be resolved in a designated table entry of the current equipment, and sending the recorded domain name to a domain name server so as to resolve the domain name to be resolved through the domain name server, and sending a resolving result obtained by resolving to any networking equipment in the MLAG networking environment, wherein the resolving result comprises the corresponding relation between the domain name to be resolved and an IP address; when opposite terminal equipment in an MLAG networking environment receives the analysis result, judging whether a domain name to be analyzed corresponding to the analysis result exists in a designated table entry of the opposite terminal equipment; and if the to-be-resolved domain name does not exist in the appointed table entry of the opposite terminal equipment, sending the resolving result to the current equipment so that the current equipment forwards the resolving result to the client side to complete domain name resolving.
The above-mentioned at least one technical scheme that this description embodiment adopted can reach following beneficial effect: under the environment of MLAG and VRRP, after the message of the external server returns to the opposite terminal equipment, the message is not directly discarded, but the message information is synchronized to the opposite terminal, so that the main equipment can reply to the client terminal according to the synchronized information, and the client terminal can also obtain a response. After receiving the DNS request, the current device or the peer device sends information to the peer device, and both sides store the dynamically resolved information so as to resolve the same request of the client.
Drawings
In order to more clearly illustrate the embodiments of the present description or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some of the embodiments described in the present description, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art. In the drawings:
fig. 1 is a schematic diagram of a MLAG networking environment provided in an embodiment of the present disclosure;
fig. 2 is a flow chart of a domain name resolution method based on an MLAG networking environment according to an embodiment of the present disclosure;
fig. 3 is a flowchart of another domain name resolution method based on MLAG networking environment according to an embodiment of the present disclosure
Fig. 4 is a schematic diagram of content composition of a synchronous DNS packet of an MLAG according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a domain name resolution device based on an MLAG networking environment according to an embodiment of the present disclosure.
Detailed Description
In order to make the technical solutions in the present specification better understood by those skilled in the art, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only some embodiments of the present specification, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present disclosure.
The cross-device link aggregation group (Multichassis Link Aggregation Group, MLAG) is a mechanism for realizing cross-device link aggregation, and performs cross-device link aggregation on two devices, so that the link reliability is improved from a single board level to a device level, and a dual-activity system is formed. Two devices running the MLAG become one device in the logic of forwarding traffic, and have the advantages of increasing bandwidth, improving link reliability and load sharing. The method can realize the link redundancy of link binding and the redundancy of single-point equipment failure.
Stacking can result in long lost packets due to upgrade, replacement, etc., as compared to stacking. The control plane of the MLAG is separated, which means that two devices of the group of MLAGs can switch traffic down separately and then upgrade and replace in sequence, and service continuity can be maintained in the process. The MLAG has the advantages of stack disruption, high link utilization, device-level redundancy and the like, and meanwhile, the MLAG has no defect that single upgrade replacement of a stack control plane can interrupt service. Compared with the traditional network, the MLAG has the following advantages: firstly, bandwidth is increased, two devices are aggregated across devices, and the bandwidth of network traffic can be improved. And secondly, the reliability of the link is improved, and the backup equipment can ensure the normal operation of the flow under the condition that a single equipment fails. Finally, the MLAG realizes redundancy backup and provides two-layer redundancy protection of Active-Active.
The virtual routing redundancy protocol (Virtual Router Redundancy Protocol, VRRP) is a routing protocol that solves the problem of single point failure in configuring static gateways in a local area network. In the networking environment of MLAG and VRRP, when one of the MLAG devices receives a domain name system (Domain Name System, DNS) request message, the request message is repackaged and sent to an external DNS resolution server. Under the VRRP environment, the source IP of the request message sent by the MLAG device is virtual IP, and all MLAG devices have the same virtual IP. When an external DNS resolution server transmits a response message, it may be transmitted to another device in the MLAG device. The other device does not receive the DNS request message, so that the other device recognizes the response message corresponding to the DNS request message as an unknown message, and discards the message. Therefore, in the networking environment of MLAG and VRRP, there are cases where the client cannot receive the domain name resolution result.
The embodiment of the specification provides a domain name resolution method based on an MLAG networking environment, which is applied to the MLAG networking environment using a virtual router redundancy protocol, and fig. 1 is a schematic diagram of the composition of the MLAG networking environment provided by the embodiment of the specification, as shown in fig. 1, networking equipment of the MLAG networking environment comprises equipment SWA and equipment SWB, the equipment SWA and the equipment SWB are switches, and the equipment SWA and the equipment SWB are opposite terminals, wherein the current equipment and the opposite terminal equipment are connected through a peer-link port. In the MLAG environment shown in fig. 1, the current device and the peer device are two MLAG networking devices, and DNS configurations on the two devices are the same. When a client needs to access an external network, it is necessary to acquire the IP of the external network through DNS resolution.
Fig. 2 is a flow chart of a domain name resolution method based on an MLAG networking environment according to an embodiment of the present disclosure, as shown in fig. 2, where the method includes the following steps:
in step S201, when the current device in the MLAG networking environment receives the domain name resolution request sent by the client, the domain name to be resolved is obtained.
Specifically, before step S201, the method further includes: and simultaneously starting the domain name resolution proxy function of the current equipment and the opposite terminal equipment, and monitoring ports of the current equipment and the opposite terminal equipment which are started with the domain name resolution proxy function.
The current device and the opposite device are two MLAG networking devices, and DNS configurations on the two devices are the same. When a client needs to access an external network, it is necessary to acquire the IP of the external network through DNS resolution. For the switch, after the DNS request packet arrives at the switch, the switch does not process the packet, but directly forwards the packet to the external network for DNS resolution, i.e. the switch only forwards the packet, but does not process the packet. After the domain name resolution proxy (DNS proxy) function is started, the switch monitors all ports, and if a DNS request message is received, the DNS request message is uploaded to process the message.
In one embodiment of the present disclosure, after the current device and the peer device simultaneously turn on the domain name resolution proxy function, all ports of the current device and the peer device begin to be monitored. The monitored port information can be modified in the configuration file, and the port appointed by the monitoring is set.
In one embodiment of the present disclosure, when a current device in the MLAG networking environment receives a domain name resolution request sent by a client, a domain name to be resolved is obtained. When the client needs to access the external network, a DNS resolution request is initiated by sending a DNS request message. After receiving the DNS request message, the switch sends the message to upper software, and the upper software extracts the domain name in the message to obtain the domain name to be resolved. Note that, the switch that receives the DNS request message may be a current device or an opposite device, and in this embodiment of the present disclosure, a domain name resolution request is described by taking the current device as an example.
Step S202, the domain name to be resolved is recorded in a designated table entry of the current equipment and sent to a domain name server so as to resolve the domain name to be resolved through the domain name server, and a resolving result obtained by resolving is sent to any networking equipment in the MLAG networking environment.
It should be noted that, the resolution result includes the correspondence between the domain name to be resolved and the IP address.
After obtaining the domain name to be resolved, the current device may perform static resolution or dynamic resolution on the domain name to be resolved. It should be noted that static resolution refers to that, on the switch, a correspondence between a domain name and an IP may be configured, and after the switch completes static resolution of the domain name, the switch may generate corresponding static resolution entries according to the static configuration, where the entries may be stored on the switch until the configuration is deleted. And the dynamic analysis is that the switch repackages the DNS request message according to the IP address of the configured external DNS server, sends the DNS request to the corresponding external DNS server, and returns a DNS reply message to the switch after the external DNS server is analyzed. After receiving the DNS reply message, the switch analyzes the message to obtain the domain name and the IP in the message.
Specifically, the domain name to be resolved is recorded in a designated table entry of the current equipment, and before the domain name is sent to a domain name server, whether the domain name to be resolved is in a static resolving table entry preconfigured in the current equipment is judged, wherein the preconfigured static resolving table entry comprises a corresponding relation between the preconfigured domain name and an IP address; if the domain name to be resolved is not in the static resolution table item preconfigured by the current equipment, recording the domain name to be resolved in the appointed table item of the current equipment, wherein the appointed table item is used for recording the domain name to be resolved which is not configured in the static resolution table item of the current equipment. If the domain name to be resolved is in a static resolution table item pre-configured by the current equipment, determining a resolution IP address corresponding to the domain name to be resolved according to the corresponding relation between the domain name to be resolved and the IP address in the static resolution table item; and sending the resolved IP address corresponding to the domain name to be resolved to the client.
In one embodiment of the present disclosure, it is first determined whether the current device can perform static resolution on the domain name to be resolved, that is, whether the domain name to be resolved is in a static resolution table preconfigured by the current device. If the domain name to be resolved is not in the static resolution list item preconfigured by the current equipment, the current equipment is not capable of carrying out static resolution on the domain name to be resolved, and the domain name to be resolved is recorded in the appointed list item of the current equipment so as to carry out dynamic resolution through an external resolution server. The designated table entry is used for recording the domain name to be resolved which is not configured in the static resolution table entry of the current equipment. That is, the domain name to be resolved that is not configured in the static table entry of the current device is the domain name to be resolved that is to be sent to the external server for resolution.
If the current equipment can perform static resolution on the domain name to be resolved, namely the domain name to be resolved is in a static resolution table pre-configured by the current equipment, determining the resolution IP address corresponding to the domain name to be resolved according to the corresponding relation between the domain name to be resolved and the IP address in the static resolution table through static resolution. And sending the resolved IP address corresponding to the domain name to be resolved to the client, and completing the resolving process of the domain name to be resolved through static resolving of the current equipment.
In one embodiment of the present disclosure, if the current device cannot perform static resolution on the domain name to be resolved, the domain name to be resolved needs to be sent to the domain name server for resolution, so as to avoid that the current device discards a response message replied by the domain name server as an unknown message, and records the domain name to be resolved in a specified table entry of the current device before sending the domain name.
In one embodiment of the present description, the domain name to be resolved is sent to a domain name server, and the domain name to be resolved is resolved by the domain name server. It should be noted that there may be multiple domain name servers, when the current device sends the domain name to be resolved to the domain name servers, the domain name servers may be selected randomly, or IP addresses of the domain name resolution servers may be configured on each switch, and the domain name resolution server that may be used by the current device is specified. For example, the IP addresses of the domain name resolution servers configured on the current device in advance are IP1, IP2 and IP3, the IP addresses of the domain name resolution servers configured on the opposite terminal device are IP4 and IP5, respectively, when the opposite terminal device receives the domain name resolution request message, the domain name to be resolved is sent to one of the domain name resolution servers corresponding to IP4 and IP5, and when the current device receives the domain name resolution request message, the domain name to be resolved is sent to one of the domain name resolution servers corresponding to IP1, IP2 and IP 3. If the number of the domain name resolution servers corresponding to the switch equipment is multiple, the selection can be performed randomly, and idle domain name resolution servers can be selected according to the current working state of the domain name resolution servers, so that the resolution efficiency is improved. That is, the switch device may repackage the domain name resolution request packet according to the configured IP address of the domain name resolution server, and send the DNS request to the domain name resolution server.
It should be noted that, since the embodiment of the present disclosure uses the virtual routing redundancy protocol (Virtual Router Redundancy Protocol, VRRP) protocol, in this protocol, the source IP when sending a message is virtual IP, that is, when the current device sends a message to the domain name resolution server, virtual IP is used for sending. In addition, the current device and the opposite terminal device are switch devices in the MLAG networking environment, and virtual IPs of the current device and the opposite terminal device are the same, so when the domain name resolution server replies a response message, the response message may be sent to the current device or may be sent to the opposite terminal device. That is, the domain name to be resolved is resolved by the domain name resolution server to obtain a corresponding resolution result, and the resolution result is sent to any one networking device in the MLAG networking environment, and it should be noted that the resolution result may be encapsulated into a response message and returned to the switch device in the form of the response message.
Specifically, after sending the analysis result to any one networking device in the MLAG networking environment, the method further includes: when the current equipment in the MLAG networking environment receives the analysis result, acquiring a domain name to be analyzed in the analysis result and a corresponding relation between the domain name to be analyzed and an IP address; comparing the domain name to be resolved in the resolving result with the domain name to be resolved in the appointed table item of the current equipment; if the domain name to be resolved in the resolving result is consistent with the domain name to be resolved in the appointed table item of the current equipment, determining the resolving IP address corresponding to the domain name to be resolved according to the corresponding relation between the domain name to be resolved and the IP address in the resolving result; and sending the resolved IP address corresponding to the domain name to be resolved to the client.
In one embodiment of the present disclosure, when a domain name resolution server sends a response message corresponding to a resolution result to a current device, a domain name to be resolved in the resolution result and a correspondence between the domain name to be resolved and an IP address are first obtained, and whether the domain name to be resolved is a domain name that needs to be resolved by the domain name resolution server and is recorded before is determined, that is, the domain name to be resolved in the resolution result is compared with the domain name to be resolved in a specified table of the current device, if the comparison is consistent, it is determined that the domain name to be resolved is recorded in advance, and then an resolved IP address corresponding to the domain name to be resolved is determined according to the correspondence between the domain name to be resolved and the IP address in the resolution result. And sending the resolved IP address to the client to realize the access of the client to the resolved IP address corresponding to the domain name to be resolved.
Step S203, when the opposite terminal device in the MLAG networking environment receives the analysis result, judging whether the domain name to be analyzed corresponding to the analysis result exists in the appointed table entry of the opposite terminal device.
When the domain name resolution server sends a response message corresponding to the resolution result to the opposite terminal device, it is required to judge in advance whether the domain name to be resolved is recorded in advance in a designated table entry of the opposite terminal device. That is, it is necessary to determine that, in the specified entry of the switch device, the switch device that transmits the resolution request to the domain name resolution server and the switch device that receives the resolution result of the domain name resolution server are not the same device. If the domain name to be resolved is recorded in the appointed table entry of the switch equipment in advance, the switch equipment for sending the request and receiving the resolving result is the same equipment; if the domain name to be resolved is not recorded in the designated table entry of the switch device in advance, the switch device sending the request and receiving the resolving result is described as different devices.
Step S204, if the specified list item of the opposite terminal equipment does not contain the domain name to be resolved, the resolving result is sent to the current equipment, so that the current equipment forwards the resolving result to the client side, and domain name resolution is completed.
In one embodiment of the present disclosure, if the to-be-resolved domain name does not exist in the specified table entry of the peer device, in order to avoid that the peer device discards the message corresponding to the resolution result as an unknown message, sends the resolution result to the current device, synchronizes the resolution result, and forwards the resolution result to the client through the current device, so as to complete domain name resolution.
The method for sending the analysis result to the current equipment specifically comprises the following steps: acquiring the corresponding relation between the domain name to be resolved and the IP address in the resolving result; packaging the corresponding relation between the domain name to be resolved and the IP address into an MLAG protocol message; and sending the MLAG protocol message to the current equipment through the peer-link port.
In one embodiment of the present disclosure, when the opposite terminal device receives the corresponding message, the response message is parsed to obtain a parsing result, where the parsing result includes a correspondence between a domain name to be parsed and an IP address. And packaging the corresponding relation between the domain name to be resolved and the IP address into an MLAG protocol message, and sending the MLAG protocol message to the current equipment through the peer-link port. The current equipment analyzes the received MLAG protocol message to obtain the corresponding relation between the domain name to be analyzed and the IP address. Obtaining a domain name to be resolved in an MLAG protocol message, and matching the domain name with a domain name in a designated list item of the current equipment, wherein the matching is that the domain name to be resolved in the message is a domain name recorded in the designated list item in advance, and then the resolved IP corresponding to the domain name to be resolved is sent to the client so that the client can access an external network.
In order to avoid the need to repeat the above steps after receiving the domain name to be resolved next time, after resolving to obtain the corresponding relationship between the domain name to be resolved and the IP address, the corresponding relationship may be stored in a static resolving table entry of the switch device. In addition, after the equipment is restarted, the MLAG equipment is reconnected, the DNS function is not affected, only one analysis is needed again, and the dynamic information of the current equipment and the dynamic information of the opposite-end equipment are kept consistent.
Specifically, before sending the analysis result to the current device, the method further includes: and acquiring the corresponding relation between the domain name to be resolved and the IP address in the resolving result, and respectively storing the corresponding relation between the domain name to be resolved and the IP address in a static resolving table entry of the opposite terminal equipment and a static resolving table entry of the current equipment. When any one networking device in the MLAG networking environment receives a domain name resolution request of the domain name to be resolved again, determining the corresponding relation between the domain name to be resolved and the IP address according to the static resolution list item of any one networking device in the MLAG networking environment; and according to the corresponding relation between the domain name to be resolved and the IP address, sending the resolved IP address corresponding to the domain name to be resolved to the client.
In one embodiment of the present disclosure, before the resolution result is sent to the current device, because the correspondence between the domain name to be resolved and the IP address is pre-stored in the static resolution table entries of the current device and the peer device, that is, when the current device or the peer device receives the resolution request of the domain name to be resolved again, the domain name resolution is performed through static resolution, and when the same domain name resolution request is received, the resolution speed is increased, and the resolution request can be timely fed back to the client.
Through the technical scheme, after the message of the external server returns to the opposite terminal equipment under the environment of the MLAG and the VRRP, the message is not directly discarded, and the message information is synchronized to the opposite terminal, so that the main equipment can reply to the client terminal according to the synchronized information, and the client terminal can also obtain a response. After receiving the DNS request, the current device or the peer device sends information to the peer device, and both sides store the dynamically resolved information so as to resolve the same request of the client.
The embodiment of the present disclosure further provides another domain name resolution method based on the MLAG networking environment, and fig. 3 is a schematic flow diagram of another domain name resolution method based on the MLAG networking environment provided in the embodiment of the present disclosure, as shown in fig. 3. After the switch starts the DNS proxy function, it starts to monitor all ports, or may monitor a specific port, and may be modified according to the configuration file.
When the client needs to access the external network, a DNS request needs to be initiated, a DNS request message is sent outwards, and after the switch receives the DNS request message, the switch sends the message to upper software, and the upper software extracts the domain name in the message. After domain name extraction, the switch may perform static resolution or dynamic resolution on the domain name. The static analysis is that the corresponding relation between the domain name and the IP can be configured on the switch, when the switch completes the static analysis of the domain name, the switch generates a corresponding static analysis list item according to the static configuration, and the static analysis list item is stored on the switch until the configuration is deleted.
After extracting the domain name in the message, firstly performing static analysis to judge whether the domain name in the message is matched with the domain name in the static configuration, and if the matched static table entry exists, obtaining the IP address after domain name analysis according to the corresponding relation between the domain name in the static table entry and the IP. After obtaining the IP of domain name resolution, the switch encapsulates the DNS reply message, replies the domain name and the resolved IP to the client, and the client uses the IP to access the destination network.
The dynamic analysis can repackage the domain name which cannot be analyzed statically and send the domain name to an external domain name server, and because the repackaged DNS request is sent by a switch which is in the environments of MLAG and VRRP, the source IP of the sent DNS request message is virtual IP, and after the external domain name server receives the DNS request message, the external domain name server replies a DNS reply message according to the source IP of the message. Because of the consistency of virtual IP on the primary and secondary devices of the MLAG, the response message from the external domain name server may be returned to the peer device. The opposite terminal device does not receive the DNS request, so that no related domain name record exists, and the message is considered to be an unknown message, so that the message is discarded. Because the master device is not receiving the DNS reply message, and is always in a waiting reply state, the master device cannot reply the DNS reply message to the client, so that the client cannot obtain the resolved address, and the client cannot normally access the external network.
If the MLAG opposite terminal equipment receives the DNS reply message, the message is discarded because no matched domain name record exists after the message is resolved, and the client terminal can not wait for the resolving result. Therefore, after receiving the DNS reply message of the unrecorded domain name, the opposite terminal device can process the DNS reply message of the unrecorded domain name. After analysis, the corresponding relation between the domain name and the IP is recorded, and then the domain name and the IP are sent to the opposite terminal through the peerlink port.
The domain name resolution information is synchronized to the opposite terminal through the peerlink port mainly through an MLAG protocol message, after the upper software finishes resolving the DNS reply message, the domain name and the IP information are sent to an MLAG module, the MLAG module is repackaged into the MLAG protocol message, the MLAG module is sent to the opposite terminal equipment through the peerlink port, the opposite terminal resolves relevant processing information from the received MLAG protocol message, and the resolved information is sent to the DNS processing flow again. As shown in fig. 4, fig. 4 is a schematic diagram of content composition of a synchronous DNS packet of an MLAG according to an embodiment of the present disclosure, where content of the synchronous DNS packet of the MLAG includes the following information: mlag version: protocol version number, message Type: message type, message len: total message length and Action: information type, mlag id: identify the MLAG member where the port is located, domain-name: domain name and IP-address: and resolving the corresponding IP address by the domain name. The protocol version number is used to identify the version of the M-LAG that the device is running; the message type, the message of the type of marking; the MLAG member where the port is located is identified, the identification is the actual MLAG member ID in the double-homing access, and the value is 0 in the single-homing access.
After receiving the peerlink message, the opposite end analyzes the message content in the MLAG protocol message, judges with the domain name recorded before according to the domain name and IP in the message, encapsulates the IP into a reply message and replies to the client end after matching. Therefore, after the next time the client requests the message with the same domain name resolution, no matter the master equipment receives the message, the corresponding domain name and IP are available, the request of the client can be timely replied, and the resolution speed is increased.
The embodiment of the present disclosure further provides a domain name resolution device based on an MLAG networking environment, as shown in fig. 5, where the device mainly includes:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
when the current equipment in the MLAG networking environment receives a domain name resolution request sent by a client, acquiring a domain name to be resolved; recording a domain name to be resolved in a designated table entry of the current equipment, sending the domain name to a domain name server so as to resolve the domain name to be resolved through the domain name server, and sending a resolving result obtained by resolving to any networking equipment in an MLAG networking environment, wherein the resolving result comprises the corresponding relation between the domain name to be resolved and an IP address; when the opposite terminal equipment in the MLAG networking environment receives the analysis result, judging whether a domain name to be analyzed corresponding to the analysis result exists in a designated table entry of the opposite terminal equipment; if the specified list item of the opposite terminal equipment does not contain the domain name to be resolved, the resolving result is sent to the current equipment, so that the current equipment forwards the resolving result to the client side, and domain name resolution is completed.
The present specification embodiments also provide a non-volatile computer storage medium storing computer-executable instructions configured to: when the current equipment in the MLAG networking environment receives a domain name resolution request sent by a client, acquiring a domain name to be resolved; recording a domain name to be resolved in a designated table entry of the current equipment, sending the domain name to a domain name server so as to resolve the domain name to be resolved through the domain name server, and sending a resolving result obtained by resolving to any networking equipment in an MLAG networking environment, wherein the resolving result comprises the corresponding relation between the domain name to be resolved and an IP address; when the opposite terminal equipment in the MLAG networking environment receives the analysis result, judging whether a domain name to be analyzed corresponding to the analysis result exists in a designated table entry of the opposite terminal equipment; if the specified list item of the opposite terminal equipment does not contain the domain name to be resolved, the resolving result is sent to the current equipment, so that the current equipment forwards the resolving result to the client side, and domain name resolution is completed.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for apparatus, devices, non-volatile computer storage medium embodiments, the description is relatively simple, as it is substantially similar to method embodiments, with reference to the section of the method embodiments being relevant.
The foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
The foregoing is merely one or more embodiments of the present description and is not intended to limit the present description. Various modifications and alterations to one or more embodiments of this description will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, or the like, which is within the spirit and principles of one or more embodiments of the present description, is intended to be included within the scope of the claims of the present description.

Claims (10)

1. The domain name resolution method based on the MLAG networking environment is characterized by being applied to the MLAG networking environment using a virtual router redundancy protocol, wherein networking equipment of the MLAG networking environment comprises current equipment and opposite-end equipment, and the method comprises the following steps:
When the current equipment in the MLAG networking environment receives a domain name resolution request sent by a client, acquiring a domain name to be resolved;
recording the domain name to be resolved in a designated table entry of the current equipment, and sending the recorded domain name to a domain name server so as to resolve the domain name to be resolved through the domain name server, and sending a resolving result obtained by resolving to any networking equipment in the MLAG networking environment, wherein the resolving result comprises the corresponding relation between the domain name to be resolved and an IP address;
when opposite terminal equipment in the MLAG networking environment receives the analysis result, judging whether a domain name to be analyzed corresponding to the analysis result exists in a designated table entry of the opposite terminal equipment;
and if the to-be-resolved domain name does not exist in the appointed table entry of the opposite terminal equipment, sending the resolving result to the current equipment so that the current equipment forwards the resolving result to the client side to complete domain name resolving.
2. The method for domain name resolution based on MLAG networking environment according to claim 1, wherein said recording the domain name to be resolved in a specified entry of the current device, and before sending to a domain name server, the method further comprises:
Judging whether the domain name to be resolved is in a static resolving table item preconfigured by the current equipment, wherein the preconfigured static resolving table item comprises a corresponding relation between the preconfigured domain name and an IP address;
and if the domain name to be resolved is not in the static resolution table item preconfigured by the current equipment, recording the domain name to be resolved in the appointed table item of the current equipment, wherein the appointed table item is used for recording the domain name to be resolved which is not configured in the static resolution table item of the current equipment.
3. The method for domain name resolution based on MLAG networking environment according to claim 2, wherein said determining whether the domain name to be resolved is in a static resolution table pre-configured by the current device, further comprises:
if the domain name to be resolved is in a static resolution table item pre-configured by the current equipment, determining a resolution IP address corresponding to the domain name to be resolved according to the corresponding relation between the domain name to be resolved and the IP address in the static resolution table item;
and sending the resolved IP address corresponding to the domain name to be resolved to the client.
4. The domain name resolution method based on the MLAG networking environment according to claim 2, wherein after the resolution result is sent to any networking device in the MLAG networking environment, the method further comprises:
When the current equipment in the MLAG networking environment receives the analysis result, acquiring a domain name to be analyzed in the analysis result and a corresponding relation between the domain name to be analyzed and an IP address;
comparing the domain name to be resolved in the resolving result with the domain name to be resolved in the appointed table entry of the current equipment;
if the domain name to be resolved in the resolving result is consistent with the domain name to be resolved in the appointed table item of the current equipment in comparison, determining the resolving IP address corresponding to the domain name to be resolved according to the corresponding relation between the domain name to be resolved and the IP address in the resolving result;
and sending the resolved IP address corresponding to the domain name to be resolved to the client.
5. The method for domain name resolution based on MLAG networking environment according to claim 1, wherein before said sending the resolution result to the current device, the method further comprises:
and acquiring the corresponding relation between the domain name to be resolved and the IP address in the resolving result, and respectively storing the corresponding relation between the domain name to be resolved and the IP address in the static resolving table entry of the opposite terminal equipment and the static resolving table entry of the current equipment.
6. The method for domain name resolution based on MLAG networking environment as claimed in claim 5, wherein after said completion of domain name resolution, said method further comprises:
when any one networking device in the MLAG networking environment receives the domain name resolution request of the domain name to be resolved again, determining the corresponding relation between the domain name to be resolved and the IP address according to the static resolution list item of any one networking device in the MLAG networking environment;
and according to the corresponding relation between the domain name to be resolved and the IP address, transmitting the resolved IP address corresponding to the domain name to be resolved to the client.
7. The domain name resolution method based on the MLAG networking environment according to claim 1, wherein the current device and the peer device are connected through a peer-link port, and the sending the resolution result to the current device specifically includes:
acquiring the corresponding relation between the domain name to be resolved and the IP address in the resolving result;
packaging the corresponding relation between the domain name to be resolved and the IP address into an MLAG protocol message;
and sending the MLAG protocol message to the current equipment through the peer-link port.
8. The domain name resolution method based on the MLAG networking environment according to claim 1, wherein when the current device in the MLAG networking environment receives a domain name resolution request sent by a client, before obtaining the domain name to be resolved, the method further comprises:
and simultaneously starting a domain name resolution proxy function of the current equipment and the opposite terminal equipment, and carrying out port monitoring on the current equipment and the opposite terminal equipment which are started with the domain name resolution proxy function.
9. A domain name resolution device based on an MLAG networking environment, the device comprising:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
when the current equipment in the MLAG networking environment receives a domain name resolution request sent by a client, acquiring a domain name to be resolved;
recording the domain name to be resolved in a designated table entry of the current equipment, and sending the recorded domain name to a domain name server so as to resolve the domain name to be resolved through the domain name server, and sending a resolving result obtained by resolving to any networking equipment in the MLAG networking environment, wherein the resolving result comprises the corresponding relation between the domain name to be resolved and an IP address;
When opposite terminal equipment in an MLAG networking environment receives the analysis result, judging whether a domain name to be analyzed corresponding to the analysis result exists in a designated table entry of the opposite terminal equipment;
and if the to-be-resolved domain name does not exist in the appointed table entry of the opposite terminal equipment, sending the resolving result to the current equipment so that the current equipment forwards the resolving result to the client side to complete domain name resolving.
10. A non-transitory computer storage medium storing computer-executable instructions configured to:
when the current equipment in the MLAG networking environment receives a domain name resolution request sent by a client, acquiring a domain name to be resolved;
recording the domain name to be resolved in a designated table entry of the current equipment, and sending the recorded domain name to a domain name server so as to resolve the domain name to be resolved through the domain name server, and sending a resolving result obtained by resolving to any networking equipment in the MLAG networking environment, wherein the resolving result comprises the corresponding relation between the domain name to be resolved and an IP address;
when opposite terminal equipment in an MLAG networking environment receives the analysis result, judging whether a domain name to be analyzed corresponding to the analysis result exists in a designated table entry of the opposite terminal equipment;
And if the to-be-resolved domain name does not exist in the appointed table entry of the opposite terminal equipment, sending the resolving result to the current equipment so that the current equipment forwards the resolving result to the client side to complete domain name resolving.
CN202210147941.2A 2022-02-17 2022-02-17 Domain name resolution method, device and medium based on MLAG networking environment Active CN114448931B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210147941.2A CN114448931B (en) 2022-02-17 2022-02-17 Domain name resolution method, device and medium based on MLAG networking environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210147941.2A CN114448931B (en) 2022-02-17 2022-02-17 Domain name resolution method, device and medium based on MLAG networking environment

Publications (2)

Publication Number Publication Date
CN114448931A CN114448931A (en) 2022-05-06
CN114448931B true CN114448931B (en) 2023-11-21

Family

ID=81373357

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210147941.2A Active CN114448931B (en) 2022-02-17 2022-02-17 Domain name resolution method, device and medium based on MLAG networking environment

Country Status (1)

Country Link
CN (1) CN114448931B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102347876A (en) * 2011-09-30 2012-02-08 鞠洪尧 Multilink aggregation control device for cloud computing network
CN103905574A (en) * 2012-12-27 2014-07-02 中国移动通信集团公司 DNS service access method and DNS data synchronization method and device
CN109889499A (en) * 2019-01-17 2019-06-14 Oppo广东移动通信有限公司 File transmitting method and relevant apparatus
CN110351127A (en) * 2019-06-28 2019-10-18 迈普通信技术股份有限公司 A kind of method of Graceful Restart, equipment and system
CN111682927A (en) * 2020-04-27 2020-09-18 浪潮思科网络科技有限公司 Message synchronization method, device, equipment and medium based on MLAG environment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10250488B2 (en) * 2016-03-01 2019-04-02 International Business Machines Corporation Link aggregation management with respect to a shared pool of configurable computing resources

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102347876A (en) * 2011-09-30 2012-02-08 鞠洪尧 Multilink aggregation control device for cloud computing network
CN103905574A (en) * 2012-12-27 2014-07-02 中国移动通信集团公司 DNS service access method and DNS data synchronization method and device
CN109889499A (en) * 2019-01-17 2019-06-14 Oppo广东移动通信有限公司 File transmitting method and relevant apparatus
CN110351127A (en) * 2019-06-28 2019-10-18 迈普通信技术股份有限公司 A kind of method of Graceful Restart, equipment and system
CN111682927A (en) * 2020-04-27 2020-09-18 浪潮思科网络科技有限公司 Message synchronization method, device, equipment and medium based on MLAG environment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于链路响应的负载均衡网络实现;鞠洪尧;;齐齐哈尔大学学报(自然科学版)(第03期);全文 *

Also Published As

Publication number Publication date
CN114448931A (en) 2022-05-06

Similar Documents

Publication Publication Date Title
US9608841B2 (en) Method for real-time synchronization of ARP record in RSMLT cluster
EP3225014B1 (en) Source ip address transparency systems and methods
EP3694145B1 (en) Method and device for sending messages
KR20180054801A (en) Systems and methods for maintaining a session via an intermediary device
JP2004179812A (en) Address translation apparatus and address translation rule management system
EP2451125B1 (en) Method and system for realizing network topology discovery
US20080162516A1 (en) Relay apparatus and communication method
JP2004280738A (en) Proxy response device
US10178015B2 (en) Methods, systems, and computer readable media for testing network equipment devices using connectionless protocols
CN113839862B (en) Method, system, terminal and storage medium for synchronizing ARP information between MCLAG neighbors
WO2021008591A1 (en) Data transmission method, device, and system
US20080205376A1 (en) Redundant router having load sharing functionality
CN107547373B (en) Message forwarding method, device, equipment and machine readable storage medium
CN111193813B (en) Test request processing method and device for determining NAT type and computer equipment
CN109120556B (en) A kind of method and system of cloud host access object storage server
CN114448931B (en) Domain name resolution method, device and medium based on MLAG networking environment
US10924397B2 (en) Multi-VRF and multi-service insertion on edge gateway virtual machines
CN116346587A (en) Service grid disaster recovery method, equipment and medium
US20040153502A1 (en) Enhanced DNS server
CN114928615B (en) Load balancing method, device, equipment and readable storage medium
US12088493B2 (en) Multi-VRF and multi-service insertion on edge gateway virtual machines
CN115567383A (en) Network configuration method, host server, device, and storage medium
CN108965363B (en) Method and equipment for processing message
KR102097102B1 (en) Next generation address inforamtion synchronization system and method
CN110545240A (en) Method for establishing label forwarding table and forwarding message based on distributed aggregation system

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
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 250101 s01-6 / F, No. 1036, Langchao Road, high tech Zone, Jinan City, Shandong Province

Patentee after: Inspur Network Technology (Shandong) Co.,Ltd.

Country or region after: China

Address before: 250101 s01-6 / F, No. 1036, Langchao Road, high tech Zone, Jinan City, Shandong Province

Patentee before: INSPUR CISCO NETWORK TECHNOLOGY Co.,Ltd.

Country or region before: China