[go: up one dir, main page]

CN109120745B - Shunting gateway link switching method and device, computer storage medium and equipment - Google Patents

Shunting gateway link switching method and device, computer storage medium and equipment Download PDF

Info

Publication number
CN109120745B
CN109120745B CN201811117080.3A CN201811117080A CN109120745B CN 109120745 B CN109120745 B CN 109120745B CN 201811117080 A CN201811117080 A CN 201811117080A CN 109120745 B CN109120745 B CN 109120745B
Authority
CN
China
Prior art keywords
dns
target
link
message
redirection
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
CN201811117080.3A
Other languages
Chinese (zh)
Other versions
CN109120745A (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.)
Comba Network Systems Co Ltd
Original Assignee
Comba Network Systems 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 Comba Network Systems Co Ltd filed Critical Comba Network Systems Co Ltd
Priority to CN201811117080.3A priority Critical patent/CN109120745B/en
Publication of CN109120745A publication Critical patent/CN109120745A/en
Application granted granted Critical
Publication of CN109120745B publication Critical patent/CN109120745B/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/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
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses

Landscapes

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

Abstract

本发明提供了一种分流网关链路切换方法、装置、计算机存储介质及设备,该方法包括:接收来自终端的非DNS报文;判断所述非DNS报文的目标IP是否与当前链路匹配;若所述目标IP与当前链路不匹配,则获取与当前链路匹配的重定向IP;采用所述重定向IP替换所述非DNS报文的目标IP,基于所述重定向IP将所述非DNS报文转发至网络侧。本发明解决了由于IP地址与新链路短期错位导致终端业务不通的问题,通过无感知切换链路,保障网络服务访问的连续性,提升终端客户切换体验。

Figure 201811117080

The present invention provides a method, device, computer storage medium and device for switching offload gateway links. The method includes: receiving a non-DNS message from a terminal; and judging whether the target IP of the non-DNS message matches the current link If described target IP does not match with current link, then obtain the redirection IP that matches with current link; Adopt described redirection IP to replace the target IP of described non-DNS message, based on described redirection IP, all The non-DNS packet is forwarded to the network side. The invention solves the problem that terminal services are blocked due to short-term dislocation of IP addresses and new links, and ensures the continuity of network service access and improves the switching experience of terminal customers by switching links without perception.

Figure 201811117080

Description

Shunting gateway link switching method and device, computer storage medium and equipment
Technical Field
The present invention relates to the field of network communication technologies, and in particular, to a method and an apparatus for switching a offload gateway link, a computer storage medium, and a device.
Background
In the field of network transmission, the problem that a certain network has an overlarge load and needs to be shunted often occurs, and the shunt gateway plays the roles of data aggregation and shunt guidance. However, when the alternative distribution networks belong to different ISPs (Internet Service providers), such as a china mobile, a china unicom. The IP addresses corresponding to services of a certain ASP (Application Service Provider) of the two networks may be different. After the terminal successfully queries a Domain Name System (DNS) for the first time, the terminal does not perform a query any more when the record is not overtime. During the period, link switching occurs in the shunting gateway, for example, from china mobile to china unicom, and the terminal still uses the original IP access, so that the problem of service non-continuity occurs.
It can be seen that the existing offload gateway implementation at least has the following disadvantages:
(1) the shunt gateways in the existing network transmission are mostly fixed shunt, and few special scenes with real-time switching occur, once the shunt is configured to a certain network, the shunt is rarely changed in the later period, and when changes occur, the terminal DNS records are overtime to trigger DNS query again, and no problem exists.
(2) If the existing shunting gateway in network transmission supports real-time link switching, the problem of terminal service obstruction caused by DNS dislocation can be caused.
Disclosure of Invention
In view of the above, the present invention is proposed to provide a offload gateway link switching method, apparatus, computer storage medium and device that overcome or at least partially solve the above problems.
One aspect of the present invention provides a method for switching a link of a offload gateway, including the following steps:
receiving a non-DNS message from a terminal;
judging whether the target IP of the non-DNS message is matched with the current link or not;
if the target IP is not matched with the current link, acquiring a redirection IP matched with the current link;
and replacing the target IP of the non-DNS message with the redirection IP, and forwarding the non-DNS message to a network side based on the redirection IP.
Optionally, the determining whether the target IP of the non-DNS packet matches the current link includes:
and judging whether the target IP is matched with the current link or not according to a preset DNS multi-path association table, wherein the DNS multi-path association table comprises a corresponding relation between an IP address and a link identifier of the matched link.
Optionally, the obtaining of the redirect IP matched with the current link includes:
searching a target domain name corresponding to the target IP according to a preset DNS multi-path association table, wherein the DNS multi-path association table also comprises a corresponding relation between an IP address and a domain name;
and searching the IP address corresponding to the current link under the target domain name according to the DNS multi-path association table.
Optionally, the method further comprises:
and if the target domain name corresponding to the target IP does not exist in the DNS multi-path association table or the IP address corresponding to the target domain name of the current link does not exist in the DNS multi-path association table, forwarding the non-DNS message to a network side based on the target IP.
Optionally, before receiving the non-DNS packet from the terminal, the method further includes:
receiving a DNS query message from a terminal, wherein the DNS query message contains a domain name to be analyzed;
sending the DNS query message to DNS servers corresponding to different links, so that each DNS server can determine the IP address of the domain name to be analyzed according to a pre-stored association relation;
receiving DNS query results returned by each DNS server, and creating the DNS multi-path association table according to the received DNS query results, wherein the DNS query results comprise IP addresses of domain names to be resolved.
Optionally, after obtaining the redirect IP matched with the current link, the method further includes:
acquiring a source IP and a target IP of the non-DNS message;
and generating a link switching record according to the source IP, the target IP and the obtained redirection IP.
Optionally, the method further comprises:
receiving a non-DNS message from a network side;
acquiring a source IP and a target IP of the non-DNS message at the network side, and searching a link switching record of a corresponding terminal according to the source IP and/or the target IP of the non-DNS message at the network side;
and replacing the source IP of the non-DNS message at the network side by the target IP in the link switching record, and forwarding the non-DNS message at the network side to a corresponding terminal based on the target IP in the link switching record.
In another aspect of the present invention, an apparatus for switching a link of a offload gateway is provided, including:
the receiving module is used for receiving a non-DNS message from a terminal;
the judging module is used for judging whether the target IP of the non-DNS message is matched with the current link or not;
the acquisition module is used for acquiring a redirection IP matched with the current link when the target IP is not matched with the current link;
and the redirection module is used for replacing the target IP of the non-DNS message by adopting the redirection IP and forwarding the non-DNS message to a network side based on the redirection IP.
Optionally, the determining module is specifically configured to determine whether the target IP is matched with the current link according to a preset DNS multi-path association table, where the DNS multi-path association table includes a correspondence between an IP address and a link identifier of a matched link.
Optionally, the obtaining module includes:
the first searching unit is used for searching a target domain name corresponding to the target IP according to a preset DNS multi-path association table, and the DNS multi-path association table also comprises a corresponding relation between an IP address and a domain name;
and the second searching unit is used for searching the IP address corresponding to the current link under the target domain name according to the DNS multi-path association table.
Optionally, the redirecting module is further configured to forward the non-DNS packet to a network side based on the target IP when the target domain name corresponding to the target IP does not exist in the DNS multi-path association table or the IP address corresponding to the target domain name of the current link does not exist in the DNS multi-path association table.
Optionally, the receiving module is further configured to receive a DNS query packet from the terminal before receiving a non-DNS packet from the terminal, where the DNS query packet includes a domain name to be resolved;
the device further comprises: the sending module is used for sending the DNS query message to DNS servers corresponding to different links so that each DNS server can determine the IP address of the domain name to be analyzed according to a pre-stored association relation;
the receiving module is further configured to receive DNS query results returned by the DNS servers;
the device further comprises: and the DNS multi-path association module is used for creating the DNS multi-path association table according to the received DNS query result, wherein the DNS query result comprises the IP address of the domain name to be resolved.
Optionally, the apparatus further comprises:
the recording module is used for acquiring a source IP and a target IP of the non-DNS message after acquiring the redirection IP matched with the current link; and generating a link switching record according to the source IP, the target IP and the obtained redirection IP.
Optionally, the receiving module is further configured to receive a non-DNS packet from a network side;
the obtaining module is further configured to obtain a source IP and a target IP of the non-DNS packet on the network side, and search a link switching record of a corresponding terminal according to the source IP and/or the target IP of the non-DNS packet on the network side;
the redirection module is further configured to replace a source IP of the non-DNS packet on the network side with a target IP in the link switching record, and forward the non-DNS packet on the network side to a corresponding terminal based on the target IP in the link switching record.
Furthermore, the invention also provides a computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method as described above.
Furthermore, the present invention also provides an apparatus comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method as described above when executing the program.
According to the shunting gateway link switching method, the shunting gateway link switching device, the computer storage medium and the shunting gateway link switching equipment, whether the terminal access IP address is matched with the current link or not is judged, and data redirection processing is performed when the terminal access IP address is not matched with the current link, so that smooth transition of shunting gateway link switching is realized, the problem that terminal services are not communicated due to short-term dislocation of the IP address and a new link is solved, continuity of network service access is guaranteed through unaware switching of the link, and switching experience of terminal clients is improved.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a network architecture diagram applicable to a shunt gateway link switching method according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for switching a shunt gateway link according to an embodiment of the present invention;
FIG. 3 is a flowchart of a DNS multipath query process according to an embodiment of the present invention;
fig. 4 is a flowchart illustrating uplink transmission execution in a method for switching a shunt gateway link according to an embodiment of the present invention;
fig. 5 is a flow chart of downlink transmission execution in a method for switching a shunt gateway link according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a shunting gateway link switching device according to an embodiment of the present invention;
fig. 7 is a schematic diagram of an apparatus of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
The embodiment of the invention provides a method for switching a shunting gateway link, which solves the problem that terminal services are different due to the fact that a terminal acquires a DNS (domain name system) and the shunting gateway switches the link in a scene that a shunting terminal network belongs to different ISPs (internet service providers), realizes the non-perception characteristic in the switching of the shunting link of the gateway, and ensures the continuity of the terminal services.
Fig. 1 is a diagram of a network architecture to which the method provided in the embodiment of the present invention is applied. The invention relates to a DNS-based shunt gateway link switching method, wherein the whole network transmission architecture is shown in figure 1, terminal equipment accesses a shunt network through a shunt gateway, and the shunt network comprises different ISPs (Internet Service providers), such as China Mobile and China Unicom. The terminal device may be a mobile phone terminal, a PC terminal, or other terminal devices, and the present invention is not limited in particular.
Fig. 2 is a flowchart of a offload gateway link switching method according to an embodiment of the present invention. Referring to fig. 2, the method for switching a shunt gateway link according to the embodiment of the present invention specifically includes the following steps:
and S11, receiving the non-DNS message from the terminal.
The non-DNS message of the terminal carries a target IP and a source IP of the message.
S12, judging whether the target IP of the non-DNS message is matched with the current link.
In practical application, the problem that the terminal service is not available due to the fact that the shunt gateway switches the link in real time. For example, before the DNS record of the terminal times out, the original IP is still used to access the network service, such as WeChat, New wave, etc., and the original IP is not matched with the newly switched link, which results in the failure of the terminal service. Therefore, the invention judges whether the target IP is matched with the current link or not according to the DNS multi-path association table by inquiring the preset DNS multi-path association table, namely, whether the target IP is the IP address corresponding to the current link or not is determined.
The DNS multipath association table comprises a corresponding relation between an IP address and a link identifier of a matched link.
S13, if the target IP is not matched with the current link, acquiring a redirection IP matched with the current link; otherwise, based on that the target IP is directly on the current link, forwarding the non-DNS message to the network side.
In the embodiment of the present invention, obtaining a redirection IP matched with a current link may be implemented by the following steps, specifically including: searching a target domain name corresponding to the target IP according to a preset DNS multi-path association table, wherein the DNS multi-path association table also comprises a corresponding relation between an IP address and a domain name; and searching the IP address corresponding to the current link under the target domain name according to the DNS multi-path association table.
The structure of the DNS multi-way association table is explained below by a specific example. As shown in table 1:
TABLE 1
Figure BDA0001810874270000071
Wherein, for the same domain name: www.helloworld.com, the shunting gateway corresponds to multiple links, for example, link 1, link 2 and link 3 respectively correspond to different IP addresses, and the DNS multi-way association table is used to record the correspondence between IP addresses and link identifiers of matching links, and the correspondence between IP addresses and domain names.
S14, replacing the target IP of the non-DNS message with the redirection IP, and forwarding the non-DNS message to a network side based on the redirection IP.
Further, if a target domain name corresponding to the target IP does not exist in the DNS multi-path association table, or an IP address corresponding to the target domain name of the current link does not exist in the DNS multi-path association table, forwarding the non-DNS packet to a network side based on the target IP.
The method aims to solve the problem that in a scene that a shunting network can be attached to different ISPs, a shunting gateway switches a link in real time to cause that terminal services are not communicated. Before the terminal DNS record is overtime, the original IP is still adopted to access network services, such as WeChat, New wave and the like, and the original IP is not matched with a newly switched link, so that the terminal service is obstructed, the user experience is extremely influenced, and even customer complaints are caused. Judging whether the target IP is matched with the current link or not according to a preset DNS multi-path association table, searching a target domain name corresponding to the target IP according to the preset DNS multi-path association table when the target IP is not matched with the current link, and searching a redirection IP corresponding to the current link under the target domain name according to the preset DNS multi-path association table; and the message is forwarded to the network side according to the redirection IP, and the client side is unaware, so that the user experience is greatly improved.
The shunting gateway link switching method provided by the embodiment of the invention realizes smooth transition of shunting gateway link switching by judging whether the terminal access IP address is matched with the current link or not and executing data redirection processing when the terminal access IP address is not matched with the current link, solves the problem of terminal service obstruction caused by short-term dislocation of the IP address and a new link, ensures continuity of network service access and improves terminal customer switching experience through unaware switching links.
In the embodiment of the present invention, before receiving a non-DNS message from a terminal, the method further includes a DNS multi-path query process, and the specific implementation steps are as follows: receiving a DNS query message from a terminal, wherein the DNS query message contains a domain name to be analyzed; sending the DNS query message to DNS servers corresponding to different links, so that each DNS server can determine the IP address of the domain name to be analyzed according to a pre-stored association relation; receiving DNS query results returned by each DNS server, and creating the DNS multi-path association table according to the received DNS query results, wherein the DNS query results comprise IP addresses of domain names to be resolved.
As shown in fig. 3, in the embodiment of the present invention, the process of DNS multi-path query takes a terminal querying a DNS as a trigger, and performs DNS query/record/update on a local "DNS multi-path association table" in multiple links at the same time, and returns a DNS query result of a current link of the terminal. As shown in table 1, for the example of the DNS multi-way association table of the present invention, where table 1 takes www.helloworld.com domain names as an example, the DNS query results of multiple links may be different, and once different switches result in traffic unavailability.
In this embodiment, the distribution gateway may select different links according to different terminal divisions, may forcibly select a certain link, and may switch links at any time; the shunt gateway is responsible for executing multi-path query and correlation query results on different links for a terminal DNS request when receiving a DNS query message from a terminal, and creating the DNS multi-path correlation table; when receiving a DNS query message from a terminal, screening whether a terminal access IP address is matched with a current link or not, if not, judging that link switching occurs midway, executing data redirection processing to ensure continuity of network service access, embodying insensibility of a switching link, and improving terminal client switching experience.
Further, after acquiring the redirection IP matched with the current link, acquiring a source IP and a target IP of the non-DNS message; and generating a link switching record according to the source IP, the target IP and the obtained redirection IP so as to carry out redirection reverse operation on the received non-DNS message at the network side in the subsequent downlink transmission process.
Specifically, the method for implementing the downlink transmission process specifically comprises the following steps: receiving a non-DNS message from a network side; acquiring a source IP and a target IP of the non-DNS message at the network side, and searching a link switching record of a corresponding terminal according to the source IP and/or the target IP of the non-DNS message at the network side; and replacing the source IP of the non-DNS message at the network side by the target IP in the link switching record, and forwarding the non-DNS message at the network side to a corresponding terminal based on the target IP in the link switching record.
The following describes the data transmission and forwarding process of the present invention in detail by using a specific embodiment, and the embodiment includes the following steps:
the uplink transmission executing step, as shown in fig. 4, includes:
step S101, receiving a non-DNS message from a local terminal, and turning to step S102;
wherein, the DNS message is processed by multi-path inquiry by the DNS multi-path correlation unit.
Step S102, inquiring a DNS multipath association table, and turning to step S103;
step S103, judging whether the message target IP is matched with the IP address corresponding to the current link, if so, turning to S109, and otherwise, turning to S104;
step S104, inquiring a DNS multi-path association table, inquiring a corresponding domain name according to the message target IP, and turning to step S105;
step S105, whether the result is found is judged, if yes, S106 is carried out, and if not, S109 is carried out;
step S106, inquiring a DNS multi-path association table, inquiring an IP in a current link according to a domain name, and turning to step S107;
step S107, whether the result is found is judged, if yes, S108 is carried out, and if not, S109 is carried out;
step S108, replacing the original target IP with the searched IP record source IP/target IPs before and after modification, generating a link switching record, and turning to step S109;
step S109, on the current link, the message is forwarded to the network side.
The downlink transmission executing step, as shown in fig. 5, includes:
step S201, receiving a non-DNS message from a network server, and turning to S202;
wherein, the DNS message is processed by multi-path inquiry by the DNS multi-path correlation unit.
Step S202, inquiring the link switching record generated in S108, and turning to the step S203, wherein the table is a < source IP/target IP before and after modification >;
step S203, judging whether the message source/target IP exists in the link switching record, namely judging whether the message source/target IP exists in the table, if so, turning to S204, otherwise, turning to S205;
since S108 is in the uplink data stream and the present step is in the downlink data stream, the source IP and the target IP are in reverse correspondence, that is, the uplink source IP corresponds to the downlink target IP, and the uplink target IP corresponds to the downlink source IP.
The procedure in the description table at S108 for determining whether or not the message source/target IP is as follows:
if the message target IP corresponds to the source IP of a certain record in the table, and the source IP of the message corresponds to the modified target IP of the record, it indicates that the determination of S203 is present, otherwise, it is absent.
Step S204, replacing the original active IP with the found IP, namely, the reverse operation of redirection, and turning to step S205;
wherein, the searched IP refers to the target IP before the modification of the searched record item.
Step S205, forwarding the packet to the terminal side.
The method for switching the shunt gateway link based on DNS optimization solves the problem that the terminal service is not available after the link is switched among the cross-ISP networks, and provides technical support for the shunt gateway to be switched at will in a multi-path network at any time, so that the technical requirements of more complex and diversified customized link selection and switching are met, and a technical support point is provided for the fusion and networking of different operator networks.
For simplicity of explanation, the method embodiments are described as a series of acts or combinations, but those skilled in the art will appreciate that the embodiments are not limited by the order of acts described, as some steps may occur in other orders or concurrently with other steps in accordance with the embodiments of the invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Fig. 6 schematically shows a structural diagram of a offload gateway link switching device according to an embodiment of the present invention. Referring to fig. 6, the offloading gateway link switching apparatus according to the embodiment of the present invention specifically includes a receiving module 301, a determining module 302, an obtaining module 303, and a redirecting module 304, where:
a receiving module 301, configured to receive a non-DNS message from a terminal;
a judging module 302, configured to judge whether a target IP of the non-DNS packet matches a current link;
an obtaining module 303, configured to obtain a redirection IP matched with the current link when the target IP is not matched with the current link;
a redirection module 304, configured to replace a target IP of the non-DNS packet with the redirection IP, and forward the non-DNS packet to a network side based on the redirection IP.
In this embodiment of the present invention, the determining module 302 is specifically configured to determine whether the target IP is matched with the current link according to a preset DNS multi-path association table, where the DNS multi-path association table includes a correspondence between an IP address and a link identifier of a matched link.
In this embodiment of the present invention, the obtaining module 303 includes:
the first searching unit is used for searching a target domain name corresponding to the target IP according to a preset DNS multi-path association table, and the DNS multi-path association table also comprises a corresponding relation between an IP address and a domain name;
and the second searching unit is used for searching the IP address corresponding to the current link under the target domain name according to the DNS multi-path association table.
In this embodiment of the present invention, the redirection module 304 is further configured to forward the non-DNS packet to a network side based on the target IP when the target domain name corresponding to the target IP does not exist in the DNS multi-path association table or the IP address corresponding to the target domain name of the current link does not exist in the DNS multi-path association table.
In this embodiment of the present invention, the receiving module 301 is further configured to receive a DNS query message from a terminal before receiving a non-DNS message from the terminal, where the DNS query message includes a domain name to be resolved;
the device also comprises a sending module which is not shown in the attached drawing and is used for sending the DNS query message to DNS servers corresponding to different links so that each DNS server can determine the IP address of the domain name to be analyzed according to the pre-stored association relation;
the receiving module 301 is further configured to receive a DNS query result returned by each DNS server;
the device further comprises a DNS multi-path association module, not shown in the drawings, for creating the DNS multi-path association table according to the received DNS query result, where the DNS query result includes an IP address of a domain name to be resolved.
In the embodiment of the present invention, the apparatus further includes a recording module, configured to obtain a source IP and a target IP of the non-DNS packet after obtaining a redirect IP that matches a current link; and generating a link switching record according to the source IP, the target IP and the obtained redirection IP.
Further, the receiving module 301 is further configured to receive a non-DNS packet from a network side;
the obtaining module 303 is further configured to obtain a source IP and a target IP of the non-DNS packet at the network side, and search a link switching record of a corresponding terminal according to the source IP and/or the target IP of the non-DNS packet at the network side;
the redirection module 304 is further configured to replace a source IP of the non-DNS packet on the network side with a target IP in the link switching record, and forward the non-DNS packet on the network side to a corresponding terminal based on the target IP in the link switching record.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
According to the shunting gateway link switching method and device provided by the embodiment of the invention, smooth transition of shunting gateway link switching is realized by judging whether the terminal access IP address is matched with the current link or not and executing data redirection processing when the terminal access IP address is not matched with the current link, the problem of terminal service non-continuity caused by short-term dislocation of the IP address and a new link is solved, the continuity of network service access is ensured through the non-perception switching link, and the terminal customer switching experience is improved.
Furthermore, an embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps of the method as described above.
In this embodiment, if the module/unit integrated by the shunting gateway link switching device is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
Fig. 7 is a schematic diagram of an apparatus provided in an embodiment of the present invention. The device provided by the embodiment of the present invention includes a memory 401, a processor 402, and a computer program stored on the memory 401 and executable on the processor 402, where the processor 402 implements the steps in the above-mentioned embodiments of the offload gateway link switching method when executing the computer program, for example, S11 shown in fig. 2, and receives a non-DNS message from a terminal. S12, judging whether the target IP of the non-DNS message is matched with the current link. S13, if the target IP is not matched with the current link, acquiring a redirection IP matched with the current link; otherwise, based on that the target IP is directly on the current link, forwarding the non-DNS message to the network side. S14, replacing the target IP of the non-DNS message with the redirection IP, and forwarding the non-DNS message to a network side based on the redirection IP. Alternatively, the processor 402 implements the functions of the modules/units in the embodiments of the offloading gateway link switching device when executing the computer program, for example, the receiving module 301, the determining module 302, the obtaining module 303, and the redirecting module 304 shown in fig. 6.
Illustratively, the computer program may be partitioned into one or more modules/units that are stored in the memory and executed by the processor to implement the invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used for describing the execution process of the computer program in the shunting gateway link switching device. For example, the computer program may be divided into a receiving module 301, a determining module 302, an obtaining module 303, and a redirecting module 304.
The device may be a desktop computer, a notebook, a palm top computer, a cloud server, or other computing device. The apparatus may include, but is not limited to, a processor, a memory. It will be appreciated by those skilled in the art that the schematic diagram 7 is merely an example of the device and does not constitute a limitation of the device, and may include more or less components than those shown, or some components in combination, or different components, for example, the device may also include input output devices, network access devices, buses, etc.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like that is the control center for the device and that connects the various parts of the overall device using various interfaces and lines.
The memory may be used to store the computer programs and/or modules, and the processor may implement the various functions of the apparatus by running or executing the computer programs and/or modules stored in the memory, as well as by invoking data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
In the embodiments of the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the described units or division of units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical or other form.
Those skilled in the art will appreciate that while some embodiments herein include some features included in other embodiments, rather than others, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (11)

1. A method for switching a link of a shunt gateway is characterized by comprising the following steps:
receiving a non-DNS message from a terminal;
judging whether the target IP of the non-DNS message is matched with the current link or not;
if the target IP is not matched with the current link, acquiring a redirection IP matched with the current link;
replacing the target IP of the non-DNS message with the redirection IP, and forwarding the non-DNS message to a network side based on the redirection IP; wherein,
the obtaining of the redirection IP matched with the current link comprises:
searching a target domain name corresponding to the target IP according to a preset DNS multi-path association table, wherein the DNS multi-path association table also comprises a corresponding relation between an IP address and a domain name;
and searching the IP address corresponding to the current link under the target domain name according to the DNS multi-path association table.
2. The method of claim 1, wherein the determining whether the target IP of the non-DNS packet matches the current link comprises:
and judging whether the target IP is matched with the current link or not according to a preset DNS multi-path association table, wherein the DNS multi-path association table comprises a corresponding relation between an IP address and a link identifier of the matched link.
3. The method of claim 1, further comprising:
and if the target domain name corresponding to the target IP does not exist in the DNS multi-path association table or the IP address corresponding to the target domain name of the current link does not exist in the DNS multi-path association table, forwarding the non-DNS message to a network side based on the target IP.
4. The method according to claim 1 or 2, characterized in that before receiving a non-DNS message from a terminal, the method further comprises:
receiving a DNS query message from a terminal, wherein the DNS query message contains a domain name to be analyzed;
sending the DNS query message to DNS servers corresponding to different links, so that each DNS server can determine the IP address of the domain name to be analyzed according to a pre-stored association relation;
receiving DNS query results returned by each DNS server, and creating the DNS multi-path association table according to the received DNS query results, wherein the DNS query results comprise IP addresses of domain names to be resolved.
5. The method of claim 1, wherein after obtaining the redirect IP matching the current link, further comprising:
acquiring a source IP and a target IP of the non-DNS message;
and generating a link switching record according to the source IP, the target IP and the obtained redirection IP.
6. The method of claim 5, further comprising:
receiving a non-DNS message from a network side;
acquiring a source IP and a target IP of the non-DNS message at the network side, and searching a link switching record of a corresponding terminal according to the source IP and/or the target IP of the non-DNS message at the network side;
and replacing the source IP of the non-DNS message at the network side by the target IP in the link switching record, and forwarding the non-DNS message at the network side to a corresponding terminal based on the target IP in the link switching record.
7. A device for switching a link of a offload gateway, comprising:
the receiving module is used for receiving a non-DNS message from a terminal;
the judging module is used for judging whether the target IP of the non-DNS message is matched with the current link or not;
the acquisition module is used for acquiring a redirection IP matched with the current link when the target IP is not matched with the current link;
the redirection module is used for replacing a target IP of the non-DNS message by adopting the redirection IP and forwarding the non-DNS message to a network side based on the redirection IP; wherein,
the judging module is further configured to judge whether the target IP is matched with the current link according to a preset DNS multi-path association table, where the DNS multi-path association table includes a correspondence between an IP address and a link identifier of a matched link.
8. The apparatus of claim 7, further comprising:
the recording module is used for acquiring a source IP and a target IP of the non-DNS message after acquiring the redirection IP matched with the current link; and generating a link switching record according to the source IP, the target IP and the obtained redirection IP.
9. The apparatus of claim 8, wherein the receiving module is further configured to receive a non-DNS packet from a network side;
the obtaining module is further configured to obtain a source IP and a target IP of the non-DNS packet on the network side, and search a link switching record of a corresponding terminal according to the source IP and/or the target IP of the non-DNS packet on the network side;
the redirection module is further configured to replace a source IP of the non-DNS packet on the network side with a target IP in the link switching record, and forward the non-DNS packet on the network side to a corresponding terminal based on the target IP in the link switching record.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 6.
11. An apparatus comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the method according to any one of claims 1-6 when executing the program.
CN201811117080.3A 2018-09-25 2018-09-25 Shunting gateway link switching method and device, computer storage medium and equipment Active CN109120745B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811117080.3A CN109120745B (en) 2018-09-25 2018-09-25 Shunting gateway link switching method and device, computer storage medium and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811117080.3A CN109120745B (en) 2018-09-25 2018-09-25 Shunting gateway link switching method and device, computer storage medium and equipment

Publications (2)

Publication Number Publication Date
CN109120745A CN109120745A (en) 2019-01-01
CN109120745B true CN109120745B (en) 2021-09-21

Family

ID=64856182

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811117080.3A Active CN109120745B (en) 2018-09-25 2018-09-25 Shunting gateway link switching method and device, computer storage medium and equipment

Country Status (1)

Country Link
CN (1) CN109120745B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110311815B (en) * 2019-06-25 2021-12-14 厦门四信通信科技有限公司 Method, device, equipment and storage medium for realizing switching of Ethernet working mode

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1679302A (en) * 2002-07-03 2005-10-05 艾利森公司 System and method for dynamic simultaneous connection to multiple service providers
CN102761476A (en) * 2012-03-30 2012-10-31 杭州华三通信技术有限公司 Load balancing method and device
CN103401800A (en) * 2013-07-31 2013-11-20 杭州华三通信技术有限公司 Link load balancing method and link load balancing device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6665702B1 (en) * 1998-07-15 2003-12-16 Radware Ltd. Load balancing

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1679302A (en) * 2002-07-03 2005-10-05 艾利森公司 System and method for dynamic simultaneous connection to multiple service providers
CN102761476A (en) * 2012-03-30 2012-10-31 杭州华三通信技术有限公司 Load balancing method and device
CN103401800A (en) * 2013-07-31 2013-11-20 杭州华三通信技术有限公司 Link load balancing method and link load balancing device

Also Published As

Publication number Publication date
CN109120745A (en) 2019-01-01

Similar Documents

Publication Publication Date Title
US10708767B2 (en) Anycast manifest retrieval, unicast content retrieval
US20150264009A1 (en) Client-selectable routing using dns requests
WO2021043191A1 (en) Domain name system server determination method, request processing method and apparatus, and system
US11805093B2 (en) Systems and methods for processing requests for content of a content distribution network
EP2394409A1 (en) Network aware peer to peer
US11431765B2 (en) Session migration—based scheduling method and server
CN105493462B (en) A content distribution method, apparatus and system
JP2024099534A (en) NETWORK NODE FOR INDIRECT COMMUNICATION AND METHOD THEREIN - Patent application
CN115706741A (en) Method and device for returning slice file
CN109120745B (en) Shunting gateway link switching method and device, computer storage medium and equipment
CN110392069A (en) CDN service scheduling processing method and CDN server
US20190037044A1 (en) Content distribution and delivery optimization in a content delivery network (cdn)
CN108632680B (en) A scheduling method for live content, a scheduling server and a terminal
US10129320B2 (en) QoS improvement method, apparatus, and system
JP2009514260A (en) Communication system, peer-to-peer message filter calculator and peer-to-peer message processing method
EP4057577A1 (en) Addressing method, addressing system and addressing apparatus
US20110004699A1 (en) Method, system and session control unit for relieving network traffic
US20220368669A1 (en) Filtering and organizing process for domain name system query collection
EP3940557B1 (en) Method of distributing files through a content delivery network based also on artificial intelligence algorithms, telematic system and servers that allow to implement it
CN115277815B (en) Information processing method, device and communication equipment
WO2022237729A1 (en) Domain name parsing method and system, electronic apparatus, device, and medium
EP3342224B1 (en) Method and apparatus for address resolution of multicast/broadcast resources using domain name systems
CN116800718B (en) Domain name query method, device, non-volatile storage medium and electronic device
HK40061434A (en) Domain name resolution method, electronic device and 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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200131

Address after: 510663 Guangzhou Science City, Guangdong Shenzhou Road, No. 10

Applicant after: Comba Telecom System (China) Ltd.

Address before: 510663 Shenzhou Road 10, Guangzhou Science City, Guangdong, Guangzhou

Applicant before: Comba Telecom System (China) Ltd.

Applicant before: COMBA TELECOM SYSTEMS (GUANGZHOU) Ltd.

Applicant before: COMBA TELECOM TECHNOLOGY (GUANGZHOU) Ltd.

Applicant before: TIANJIN COMBA TELECOM SYSTEMS Ltd.

CB02 Change of applicant information
CB02 Change of applicant information

Address after: 510663 Shenzhou Road 10, Science City, Guangdong, Guangzhou

Applicant after: Jingxin Network System Co.,Ltd.

Address before: 510663 Shenzhou Road 10, Science City, Guangdong, Guangzhou

Applicant before: Comba Telecom System (China) Ltd.

GR01 Patent grant
GR01 Patent grant