CN114500632A - Communication method and communication device - Google Patents

Communication method and communication device Download PDF

Info

Publication number
CN114500632A
CN114500632A CN202210080750.9A CN202210080750A CN114500632A CN 114500632 A CN114500632 A CN 114500632A CN 202210080750 A CN202210080750 A CN 202210080750A CN 114500632 A CN114500632 A CN 114500632A
Authority
CN
China
Prior art keywords
channel
message
port
server
address
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.)
Pending
Application number
CN202210080750.9A
Other languages
Chinese (zh)
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.)
Chongqing Aoputai Communication Technology Co ltd
Original Assignee
Chongqing Aoputai Communication 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 Chongqing Aoputai Communication Technology Co ltd filed Critical Chongqing Aoputai Communication Technology Co ltd
Priority to CN202210080750.9A priority Critical patent/CN114500632A/en
Publication of CN114500632A publication Critical patent/CN114500632A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/148Migration or transfer of sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/143Termination or inactivation of sessions, e.g. event-controlled end of session
    • H04L67/145Termination or inactivation of sessions, e.g. event-controlled end of session avoiding end of session, e.g. keep-alive, heartbeats, resumption message or wake-up for inactive or interrupted session

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides a communication method and a communication device, and relates to the field of communication. The method comprises the following steps: the first equipment sends a first ICMP message to the second equipment through a first channel; the first equipment determines whether the first channel is interrupted or not according to the receiving condition of the first response message from the second equipment; the first device communicates with the second device through the first channel under the condition that the first channel is not interrupted; or the first device communicates with the second device through the second channel in case the first channel is interrupted. By the method, the connection condition of the plurality of channels between the first device and the server can be detected, the problem of channel interruption is timely solved, normal communication between the device and the server is guaranteed, and the reliability of communication between the device and the server and the management quality of the device by the server are improved.

Description

Communication method and communication device
Technical Field
The present application relates to the field of communications, and in particular, to a communication method and a communication apparatus.
Background
The point-to-point protocol (PPP) is widely used in the communication field. The devices may be connected by PPP links. Two devices connected to the same link are respectively preconfigured with a default Internet Protocol (IP) address and interconnected based on a PPP link. Two devices at two ends of a PPP link can detect the connection condition of the link between the two devices through a heartbeat mechanism, and if the two devices respectively receive a heartbeat packet sent by the opposite device, the link connection is normal; if one of the two devices does not receive the heartbeat packet sent by the opposite device, the link is interrupted.
In a channel formed by connecting a plurality of devices, a server side manages IP addresses of all routing devices in a unified manner, distributed port IP addresses of the routing devices are configured in a preset routing table to achieve routing, the devices acquire the port IP addresses of the devices one by one through the server, network segment address information of the server is acquired based on server address distribution messages, a server address routing table item is determined from the preset routing table, and the server routing table item also comprises first port information. When a link between any two devices is broken or any one or more devices fail, the channel cannot work normally, that is, the devices (for example, referred to as device a) at the two ends of the channel and the server cannot communicate normally. At this point, it is necessary to switch to the standby channel to ensure normal communication between device a and the server.
However, since the PPP heartbeat packet cannot be sent across the devices, device a cannot sense that the other links except the link to which it is connected are interrupted, and cannot sense whether the devices in the other links are out of order. Therefore, the device a cannot timely sense whether the channel is normal, and cannot timely switch the channel, so that normal communication with the server is realized. This may cause a delay in communication between the device and the server, poor performance of communication between the device and the server, and poor quality of management of the device by the server.
Disclosure of Invention
The application provides a communication method and a communication device, which are used for detecting channel abnormity in time, further switching channels in time and improving the communication performance of a network.
In a first aspect, the present application provides a method comprising: a first device sends a first Internet Control Message Protocol (ICMP) message to a second device through a first channel, where the first channel includes one or more devices located between the first device and the second device, and a point-to-point PPP link or an ethernet link connected between adjacent devices; the first equipment determines whether the first channel is interrupted or not according to the receiving condition of a first response message from the second equipment, wherein the first response message is a response message aiming at the first ICMP message; and the first device communicates with the second device through the first channel without interrupting the first channel; or the first device communicates with the second device through a second channel under the condition that the first channel is interrupted, wherein the second channel is a standby channel of the first channel, and the link experienced by the second channel is different from that experienced by the first channel.
Based on the communication method, the device can detect the connection condition of other links except the link connected with the device, and when the interruption of the currently used channel is detected, the device can be switched to the standby channel to keep normal communication between the devices, so that the communication delay between the first device and the server is reduced, and the communication reliability between the device and the server is improved.
With reference to the first aspect, in some possible implementation manners of the first aspect, determining, by the first device, whether the first channel is interrupted according to a reception condition of the first response packet from the second device includes: if a first response message from the second device is received within a preset time length, determining that the first channel is not interrupted; or if the first response message from the second equipment is not received within the preset time length, determining that the first channel is interrupted; the preset duration is timed from the first transmission of the first ICMP message.
With reference to the first aspect, in some possible implementation manners of the first aspect, the sending, by the first device, the first ICMP packet to the second device through the first channel includes: and repeatedly transmitting the first ICMP message to the second equipment through the first channel at the predefined transmission frequency.
With reference to the first aspect, in some possible implementations of the first aspect, the method further includes: and when the sending times of the first ICMP message reach a preset threshold, determining that a preset time length is reached.
The first channel is connected to a first port of the first device, the second channel is connected to a second port of the first device, the first port and the second port are two of a plurality of ports of the first device, and the first port is a port which is firstly allocated to an IP address by the server in the plurality of ports.
With reference to the first aspect, in some possible implementations of the first aspect, the method further includes: acquiring an IP address of each port in a plurality of ports from a server; sending a second ICMP message by taking the obtained IP address as a destination address; and under the condition of receiving a second response message, after the address rejection message is sent to the server, requesting the server to obtain a new IP address again, wherein the second response message is a response message aiming at the second ICMP.
With reference to the first aspect, in some possible implementation manners of the first aspect, after the first device communicates with the second device through the second channel in a case that the first channel is interrupted, the method further includes: releasing the routing network segment configuration of the first port; and after the first channel is recovered to be normal, the IP address is acquired for the first port again, and the recovered first channel is a standby channel of the second channel.
In a second aspect, the present application provides a communication device comprising means or elements for implementing the method of the first aspect or any one of its possible implementations. It should be understood that the respective modules or units may implement the respective functions by executing the computer program.
In a third aspect, the present application provides a communication apparatus comprising a processor configured to execute a computer program to perform the first aspect and any one of the possible implementations of the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium comprising a computer program which, when run on a computer, causes the computer to perform the method of the first aspect and any one of the possible implementations of the first aspect.
In a fifth aspect, the present application provides a computer program product comprising a computer program which, when run on a computer, causes the computer to perform the method of the first aspect as well as any one of the possible implementations of the first aspect.
It should be understood that the second aspect to the fifth aspect of the present application correspond to the technical solutions of the first aspect of the present application, and the beneficial effects achieved by the aspects and the corresponding possible implementations are similar and will not be described again.
Drawings
Fig. 1 is a schematic view of a scenario of a communication method provided in an embodiment of the present application;
fig. 2 is a schematic flow chart of a communication method provided by an embodiment of the present application;
fig. 3 is a schematic block diagram of a communication device provided by an embodiment of the present application;
fig. 4 is another schematic block diagram of a communication device provided in an embodiment of the present application.
Detailed Description
To make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments.
Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the embodiments of the present application, the terms "first", "second", and the like are used for distinguishing similar objects, and are not necessarily used for describing a particular order or sequence. Furthermore, the terms "comprises" and any variations thereof, are intended to cover non-exclusive inclusions.
The method is applied to a channel formed by connecting PPP links of a plurality of devices, the PPP is used for establishing connection and sending data between two network nodes in a dialing or special line mode, is a solution for simply connecting various types of hosts, bridges and routers, and is one of the most widely applied protocols in the wide area network at present.
Fig. 1 is a scene schematic diagram of a communication method provided in an embodiment of the present application. As shown in fig. 1, the scenario shows edge device 110, intermediate device 121, intermediate device 122, network cloud 130, and server 140. The edge device 110 includes a first port 1101 and a second port 1102, where the two ports correspond to two different PPP links respectively. Edge device 110 and intermediate device 121 are connected via a PPP link; edge device 110 and intermediate device 122 are connected via a PPP link; intermediate device 121 and server 140 are connected across network cloud 130 via an ethernet link or PPP link, and intermediate device 122 and server 140 are connected across network cloud 130 via an ethernet link or PPP link.
The server 140 may be a Dynamic Host Configuration Protocol (DHCP) server or a network management server.
In the embodiment of the present application, a channel is a connection path between two devices, one or more intermediate devices may be spaced between the two devices, and adjacent devices may be connected through a PPP link or an ethernet link. Thus, a tunnel may include one or more intermediate devices and PPP or ethernet links between the devices.
As shown in fig. 1, there are two channels between the edge device 110 and the server 140, namely a channel connected between the edge device 110 and the server 140 and connected to the network cloud 130 via the intermediate device 121, and a channel connected between the edge device 110 and the server 140 and connected to the network cloud 130 via the intermediate device 122. The links experienced by the two channels are different, and the other channel cannot work normally due to the failure of the link or the equipment in one channel, so the two channels can be mutually standby channels. It will be appreciated that the links experienced by the two channels are different and therefore the intermediate devices through which they pass are also different.
Here, the edge device 110 may be directly connected to the intermediate devices 121 and 122 through the PPP link, but is indirectly connected to the server 140 by the intermediate device 121 or 122 and the network cloud 130 spaced from the server 140. Herein, a link directly connected to a device is referred to as a near-end link, and a device connected to the device through the near-end link is referred to as a near-end device; and recording a link indirectly connected with the equipment as a remote link, and recording the equipment connected with the equipment through the remote link as remote equipment. As in fig. 1, with respect to edge device 110, the links connected between edge device 110 and intermediate device 121, and the links connected between edge device 110 and intermediate device 122, are near-end links; intermediate devices 121 and 122 are proximal devices; the links connected between intermediate device 121 and network cloud 130, as well as the links connected between intermediate device 122 and network cloud 130, and the links connected between network cloud 130 and server 140 are remote links.
It should be understood that server 140 may be independent of network cloud 130, as shown in fig. 1, and that server 140 may also be deployed in conjunction with network cloud 130. In the case of unified deployment, two channels also exist between the PE device 110 and the server 140, which may be referred to the above related description and are not described herein again.
It should also be understood that the edge device 110 may have more ports, not shown, besides the first port 1101 and the second port 1102, and the present scenario may also include more intermediate devices, not shown, and PPP links, not limited to this application.
Edge device 110 may detect the connection condition of the PPP link through a heartbeat mechanism. Illustratively, the edge device 110 establishes PPP link connection with the intermediate device 121 through the first port 1101, and sends a heartbeat packet to the intermediate device 121, and if the edge device 110 receives the heartbeat packet sent by the intermediate device 121, it indicates that the link connection is normal; if the edge device 110 does not receive the heartbeat packet sent by the intermediate device 121, it indicates a link failure. The edge device 110, upon detecting the link down, may switch to the second port 1102 and the intermediate device 122 to establish a PPP link connection to maintain a normal connection with the server 140.
Since heartbeat packets cannot be sent across devices, the edge device 110 cannot sense other link interruptions except for the link to which it is connected, i.e., cannot sense a far-end link interruption, nor can it sense whether the far-end device has failed. Therefore, when a far-end link or a far-end device fails, the edge device 110 cannot timely sense whether a channel is normal, and cannot timely switch the channel, which may cause communication delay of a user, poor communication performance, and poor user experience.
In view of this, the present application provides a communication method, which determines whether a channel is connected normally by sending an ICMP message to a server and receiving an echo message. If the response message can be received, the channel connection is normal; if the response message is not received, the channel connection is interrupted. Therefore, the detection of the entire channel can be realized. Once the current channel is interrupted, the standby channel can be switched in time to keep normal communication between the equipment and the server, so that the communication delay between the equipment and the server is reduced, and the management quality of the server on the equipment is improved.
Fig. 2 is a schematic flow chart of a communication method provided in an embodiment of the present application. As shown in fig. 2, the method 200 may include steps 210 to 230, which may be performed by the first device, a component (e.g., a chip system, etc.) disposed in the first device, or a module capable of implementing all or part of the functions of the first device. This is not a limitation of the present application.
Illustratively, the first device may be the edge device 110 of fig. 1. The first device and the server are connected with a first channel and a second channel across a network cloud, and links experienced between the first channel and the second channel are different and can be mutually standby. The second device may be, for example, the server 140 in fig. 1, or may also be other devices that are reachable by the route, which is not limited in this application.
The individual steps in method 200 are described in detail below.
In step 210, the first device sends a first ICMP message to the second device via the first channel.
Wherein the first channel includes one or more devices between the first device and the second device, and a PPP link or an ethernet link connected between adjacent devices.
Optionally, step 210 specifically includes: and repeatedly transmitting the first ICMP message to the second equipment through the first channel at the predefined transmission frequency.
For example, the first device repeatedly sends the first ICMP packet to the second device through the first channel every 10 seconds.
By way of example and not limitation, the first ICMP message is an echo request (echo request) message identified by an ICMP specified type (type) field "8". It should be understood that the first ICMP message is not limited thereto, and may also be, for example, a timestamp request (timestamp request) message, an information request (information request) message, or the like. As long as the opposite end equipment needs to send an echo message after receiving the ICMP message, the first ICMP message can be used.
In step 220, the first device determines whether the first channel is interrupted according to the receiving condition of the first response packet from the second device.
Wherein, the first response message is a response message aiming at the first ICMP message.
In the above example, the first ICMP message is an echo request message, and correspondingly, the first response message is an echo reply (echo reply) message, which is identified by a type field "0" specified by ICMP. It should be understood that the first response packet is not limited thereto, for example, the response packet corresponding to the timestamp request packet is a timestamp response (timestamp response) packet, the response packet corresponding to the information request packet is an information response (information response) packet, and the like.
Optionally, step 220 comprises: if a first response message from the second device is received within a preset time length, determining that the first channel is not interrupted; or if the first response message from the second device is not received within the preset time length, determining that the first channel is interrupted.
The preset duration may be timed from the first transmission of the first ICMP packet.
For example, the preset duration is 30 seconds, and if the first device receives the first response message from the second device within 30 seconds after the first ICMP message is sent for the first time, it is determined that the first channel is not interrupted; and if the first equipment does not receive the first response message from the second equipment within 30 seconds after the first ICMP message is sent for the first time, determining that the first channel is interrupted.
Optionally, when the number of times of sending the first ICMP message reaches a preset threshold, it is determined that a preset time length is reached.
For example, the preset threshold is 3 times, and after the first device sends the first ICMP message to the second device 2 times, the first device receives the first response message from the second device, and determines that the first channel is not interrupted; and the first equipment sends the first ICMP message to the second equipment for 3 times, and determines that the first channel is interrupted if the first response message from the second equipment is still not received.
Optionally, the method 200 further comprises: acquiring an IP address of each port in a plurality of ports from a server; sending a second ICMP message by taking the obtained IP address as a destination address; and under the condition of receiving a second response message, after the address rejection message is sent to the server, requesting the server to obtain a new IP address again, wherein the second response message is a response message aiming at the second ICMP.
The address rejection message is used for rejecting the IP address allocated by the server. After the first device acquires the IP address from the server, it needs to confirm the validity of the IP address, that is, the IP address is not occupied by other devices. If the IP address is not occupied by other equipment, the first equipment can normally use the IP address; if the IP address is occupied by other equipment, the first equipment needs to reject the IP address to the server and obtain a new IP address from the server again until obtaining the IP address which is not occupied by other equipment.
In an example, after a port acquires an IP address, the first device sends a second ICMP message to the acquired IP address. If the second response message of the second ICMP message is not received within a predefined time, for example, 30 seconds, it is determined that the IP address is not occupied, and the first device may normally use the IP address; and if the second response message of the second ICMP message is received within 30 seconds, confirming that the IP address is occupied, sending an address rejection message to the server, rejecting the IP address, acquiring a new IP address from the server again, and repeating the confirmation process until the IP address which is not occupied by other equipment is acquired.
By way of example and not limitation, the second ICMP message is an echo request message identified by an ICMP specified type field "8", and the second echo message is an echo reply message whose content is identified by an ICMP specified type field "0". It should be understood that the second ICMP message and the second response message are not limited thereto, for example, the second ICMP message may also be a timestamp request message, and the second response message may be a timestamp reply message; the second ICMP message is an information request message, and the second response message is an information reply message. This application includes but is not limited to.
In step 230, the first device communicates with the second device through the first channel without interrupting the first channel; or the first device communicates with the second device through the second channel in case the first channel is interrupted.
The IP address acquired by the first device through the first port can be normally used, and the first device normally communicates with the second device through the first channel under the condition that the first channel is not interrupted.
And under the condition that the first equipment confirms that the first channel is interrupted, switching to a second channel corresponding to the second port, wherein the second channel is a standby channel of the first channel, and the link experienced by the second channel is different from that experienced by the first channel.
Optionally, in case of interruption of the first channel, the method 200 further comprises:
releasing the routing network segment configuration of the first port;
and after the first channel is recovered to be normal, the IP address is acquired for the first port again, and the recovered first channel is a standby channel of the second channel.
For example, after the first device switches to the second channel corresponding to the second port, the method for releasing the routing segment configuration of the first port includes: routing information, ICMP data object information, IP address information of the first port, etc. from the first device to the second device via the first port. And after the first channel is recovered to be normal, the IP address is acquired for the first port again, and the connection with the second equipment is established. The first channel restored to normal can be used as a backup channel for the second channel. The first device may switch to the first port if the second channel is interrupted.
It should be noted that, when the IP address is acquired for the first port again, the second ICMP message still needs to be sent to the newly acquired IP address to confirm the validity of the newly acquired IP address.
Optionally, the first channel is connected to a first port of the first device, the second channel is connected to a second port of the first device, the first port and the second port are two of the plurality of ports of the first device, and the first port is a port that is first assigned to the IP address by the server among the plurality of ports.
It should be understood that there are multiple ports on the first device, and multiple ports may be connected to the server at the same time, but there is a sequence in which the server issues an IP address to each port. Wherein the port first assigned to the IP address is the first port and the port second assigned to the IP address is the second port.
Optionally, the first port is predefined.
For example, the first device has a plurality of ports, which are respectively port 1, port 2, port 3 and port …, and it is predefined that port 1 is the first port, so as long as port 1 is connected to the server, the IP address is obtained from the server, and no matter port 1 is the second port which obtains the IP address, port 1 is the first port; port 2 is the second port regardless of whether port 2 is the second to obtain an IP address.
By the method, the device can detect the connection condition of the whole channel comprising the link connected with the device and other links. When the current channel is found to be interrupted, the standby channel can be switched to quickly. The method and the system ensure normal communication between the equipment and the server, reduce communication delay between the equipment and the server, and improve the management quality of the server on the equipment.
Fig. 3 is a schematic block diagram of a communication device provided in an embodiment of the present application. As shown in fig. 3, the communication device 300 may include a communication module 310 and a processing module 320.
The communication module 310 may be configured to send a first ICMP message to a second device through a first channel, where the first channel includes one or more devices located between the first device and the second device, and a PPP link or an ethernet link connected between adjacent devices; the processing module 320 may be configured to determine, by the first device, whether the first channel is interrupted according to a reception condition of a first response packet from the second device, where the first response packet is a response packet for the first ICMP packet; the communication module 310 may be used for the first device to communicate with the second device through the first channel without interruption of the first channel; or the first device communicates with the second device through a second channel under the condition that the first channel is interrupted, wherein the second channel is a standby channel of the first channel, and the link experienced by the second channel is different from that experienced by the first channel.
Optionally, the processing module 320 may be configured to determine that the first channel is not interrupted if the first response packet from the second device is received within the preset time duration; or if the first response message from the second equipment is not received within the preset time length, determining that the first channel is interrupted; the preset duration is timed from the first transmission of the first ICMP message.
Optionally, the communication module 310 may be configured to repeatedly transmit the first ICMP packet to the second device through the first channel at a predefined transmission frequency.
Optionally, the processing module 320 may be configured to determine that the preset duration is reached when the number of times of sending the first ICMP message reaches the preset threshold.
The first channel is connected to a first port of the first device, the second channel is connected to a second port of the first device, the first port and the second port are two of a plurality of ports of the first device, and the first port is a port which is firstly allocated to an IP address by the server in the plurality of ports.
Optionally, the communication module 310 may be configured to obtain, from the server, an IP address of each of the plurality of ports; sending a second ICMP message by taking the obtained IP address as a destination address; and under the condition of receiving a second response message, after the address rejection message is sent to the server, requesting the server to obtain a new IP address again, wherein the second response message is a response message aiming at the second ICMP.
Optionally, the processing module 320 may be configured to release the routing network segment configuration of the first port; the communication module 310 may be configured to obtain the IP address for the first port again after the first channel is recovered to be normal, and recover that the normal first channel is a standby channel of the second channel.
It should be understood that the division of the modules in the present application is illustrative, and is only one logical function division, and there may be other division ways in actual implementation. In addition, the modules in the present application may be integrated into one device, or may exist alone physically.
Fig. 4 is another schematic block diagram of a communication device provided herein. As shown in fig. 4, the apparatus 400 may include at least one processor 410 operable to implement the functionality of communicating in the methods provided herein. For details, reference is made to the detailed description in the method example, which is not repeated herein.
The apparatus 400 may also include a memory 420 for storing program instructions and/or data. The memory 420 is coupled to the processor 410. The coupling in this application is an indirect coupling or communication connection between devices, units or modules, and may be in an electrical, mechanical or other form, and is used for information interaction between the devices, units or modules. The processor 410 may operate in conjunction with the memory 420. Processor 410 may execute program instructions stored in memory 420. At least one of the at least one memory may be included in the processor.
The apparatus 400 may also include a communication interface 430 for communicating with other devices over a transmission medium such that the apparatus used in the apparatus 400 may communicate with other devices. The communication interface 430 may be, for example, a transceiver, an interface, a bus, a circuit, or a device capable of performing a transceiving function. The processor 410 may utilize the communication interface 430 to send and receive data and/or information and to implement the communication methods described in the corresponding embodiments of fig. 2.
The specific connection medium between the processor 410, the memory 420 and the communication interface 430 is not limited in this application. In fig. 4, the processor 410, the memory 420, and the communication interface 430 are connected by a bus 440. The bus 440 is shown in fig. 4 by a thick line, and the connection manner between other components is only for illustrative purpose and is not limited thereto. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 4, but this does not indicate only one bus or one type of bus.
In the embodiments of the present application, the processor may be a general purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof, and may implement or perform the methods, steps, and logic blocks disclosed in the present application. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of a method disclosed in connection with the present application may be embodied directly in a hardware processor, or in a combination of the hardware and software modules in the processor.
According to the method provided by the present application, there is also provided a computer-readable storage medium storing program code which, when run on a computer, causes the computer to perform the communication method in the embodiment shown in fig. 2.
In accordance with the methods provided herein, the present application also provides a computer program product comprising: computer program code. The computer program code, when run on a computer, causes the computer to perform the communication method in the embodiment shown in fig. 2.
The solutions provided in the present application may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the procedures or functions described in accordance with the present application are generated, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, a network appliance, a terminal device or other programmable apparatus. The computer instructions may be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website, computer, server, or data center to another website, computer, server, or data center via wire, such as coaxial cable, fiber optic, Digital Subscriber Line (DSL), or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium such as a Digital Video Disc (DVD), or a semiconductor medium, among others.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method of communication, comprising:
a first device sends a first Internet Control Message Protocol (ICMP) message to a second device through a first channel, wherein the first channel comprises one or more devices positioned between the first device and the second device and a point-to-point PPP link or an Ethernet link connected between adjacent devices;
the first device determines whether the first channel is interrupted according to the receiving condition of a first response message from the second device, wherein the first response message is a response message aiming at the first ICMP message; and
the first device communicates with the second device through the first channel without interrupting the first channel; or
The first device communicates with the second device through a second channel in the case of interruption of the first channel, wherein the second channel is a standby channel of the first channel, and the second channel and the first channel experience different links.
2. The method of claim 1, wherein the determining, by the first device, whether the first channel is interrupted according to the reception of the first response packet from the second device comprises:
if a first response message from the second equipment is received within a preset time length, determining that the first channel is not interrupted; or
If the first response message from the second device is not received within the preset time length, determining that the first channel is interrupted;
and the preset duration is timed from the first transmission of the first ICMP message.
3. The method of claim 2, wherein the first device sending a first ICMP message to a second device over a first channel, comprising:
repeatedly transmitting the first ICMP message to the second device through the first channel at a predefined transmission frequency; and
the method further comprises the following steps:
and when the sending times of the first ICMP message reach a preset threshold, determining that the preset time length is reached.
4. The method of any of claims 1-3, wherein the first channel is connected to a first port of the first device, the second channel is connected to a second port of the first device, the first port and the second port are two of a plurality of ports of the first device, and the first port is a port of the plurality of ports that is first assigned to an Internet Protocol (IP) address by a server.
5. The method of claim 4, wherein the method further comprises:
obtaining an IP address of each of the plurality of ports from the server; sending a second ICMP message by taking the obtained IP address as a destination address;
and under the condition of receiving the second response message, after sending an address rejection message to the server, requesting the server to obtain a new IP address again, wherein the second response message is a response message for the second ICMP.
6. The method of claim 5, wherein the first device, after communicating with the second device over a second channel in the event of an interruption in the first channel, further comprises:
releasing the routing network segment configuration of the first port;
and after the first channel is recovered to be normal, the IP address is acquired for the first port again, and the recovered first channel is a standby channel of the second channel.
7. A communication apparatus, comprising means for implementing the method of any of claims 1 to 6.
8. A communications apparatus, comprising a processor configured to execute a computer program to implement the method of any of claims 1 to 6.
9. A computer-readable storage medium, comprising a computer program which, when run on a computer, causes the computer to perform the method of any one of claims 1 to 6.
10. A computer program product, comprising a computer program which, when executed, causes a computer to perform the method of any one of claims 1 to 6.
CN202210080750.9A 2022-01-24 2022-01-24 Communication method and communication device Pending CN114500632A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210080750.9A CN114500632A (en) 2022-01-24 2022-01-24 Communication method and communication device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210080750.9A CN114500632A (en) 2022-01-24 2022-01-24 Communication method and communication device

Publications (1)

Publication Number Publication Date
CN114500632A true CN114500632A (en) 2022-05-13

Family

ID=81475429

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210080750.9A Pending CN114500632A (en) 2022-01-24 2022-01-24 Communication method and communication device

Country Status (1)

Country Link
CN (1) CN114500632A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114844804A (en) * 2022-06-01 2022-08-02 重庆奥普泰通信技术有限公司 Network measurement method, system, electronic device and computer readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0986226A2 (en) * 1998-09-11 2000-03-15 Hitachi, Ltd. Ip packet communication apparatus
CN1681254A (en) * 2004-04-08 2005-10-12 华为技术有限公司 Maintaining method of Ethernet link state
CN101355594A (en) * 2008-09-09 2009-01-28 中兴通讯股份有限公司 Method for detecting address conflict when distributing IP address
CN101674338A (en) * 2009-10-16 2010-03-17 福建星网锐捷网络有限公司 Recovering method of IP address and DHCP server
CN101772194A (en) * 2008-12-26 2010-07-07 中兴通讯股份有限公司 General packet radio service tunnel user plane path keep-alive method and system
CN108965123A (en) * 2018-07-24 2018-12-07 京东方科技集团股份有限公司 A kind of link switch-over method and network communicating system
CN111245666A (en) * 2018-11-29 2020-06-05 华为技术有限公司 Data transmission method, device and system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0986226A2 (en) * 1998-09-11 2000-03-15 Hitachi, Ltd. Ip packet communication apparatus
CN1681254A (en) * 2004-04-08 2005-10-12 华为技术有限公司 Maintaining method of Ethernet link state
CN101355594A (en) * 2008-09-09 2009-01-28 中兴通讯股份有限公司 Method for detecting address conflict when distributing IP address
CN101772194A (en) * 2008-12-26 2010-07-07 中兴通讯股份有限公司 General packet radio service tunnel user plane path keep-alive method and system
CN101674338A (en) * 2009-10-16 2010-03-17 福建星网锐捷网络有限公司 Recovering method of IP address and DHCP server
CN108965123A (en) * 2018-07-24 2018-12-07 京东方科技集团股份有限公司 A kind of link switch-over method and network communicating system
CN111245666A (en) * 2018-11-29 2020-06-05 华为技术有限公司 Data transmission method, device and system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114844804A (en) * 2022-06-01 2022-08-02 重庆奥普泰通信技术有限公司 Network measurement method, system, electronic device and computer readable storage medium
CN114844804B (en) * 2022-06-01 2023-07-25 重庆奥普泰通信技术有限公司 Network measurement method, system, electronic device and computer readable storage medium

Similar Documents

Publication Publication Date Title
US10911368B2 (en) Gateway address spoofing for alternate network utilization
CN106605387B (en) Node, system and method for WAN control failover agents for vHGWs
EP2222027A1 (en) A method for transmitting bfd message, a method and device for detecting link failure
CN106817264B (en) Method, device and system for detecting link fault
JP2006013827A (en) Packet transfer apparatus
US11523324B2 (en) Method for configuring a wireless communication coverage extension system and a wireless communication coverage extension system implementing said method
US11711243B2 (en) Packet processing method and gateway device
CN113472646B (en) Data transmission method, node, network manager and system
CN106685817B (en) Method and device for switching flow of box end equipment
KR20150033681A (en) Method and system to enable re-routing for home networks upon connectivity failure
CN103490921A (en) Method and device for protecting network, copying node and system
CN113132227A (en) Method, device, computer equipment and storage medium for updating routing information
US8462952B2 (en) Synchronizing management signaling in a network
CN114500632A (en) Communication method and communication device
JP2018526941A (en) Communication method and device based on optical network system
CN107659436B (en) Method and device for preventing service interruption
US20230344747A1 (en) Method and apparatus for detecting state of bgp session, and network device
CN110890933B (en) Service protection method, device, system, equipment and medium
CN107786441B (en) Communication method, OpenFlow switch and communication system
EP1915847A2 (en) Apparatus and methods for managing nodes on a fault tolerant network
US20080080366A1 (en) IP telephone system and telephone exchange
JP2024524833A (en) Message processing method, apparatus, network device and medium
CN108965363B (en) Method and equipment for processing message
CN113037622A (en) System and method for preventing BFD oscillation
CN111405025A (en) Data transmission method and device, transmission equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Jin Qingyu

Inventor after: Wang Honglian

Inventor before: Wu Xiaolong

Inventor before: Jin Qingyu

Inventor before: Wang Honglian

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20220513