Maximum transmission unit detection method and device, electronic equipment and storage medium
By sending video network management messages of standard length and different lengths in the video network environment, the largest transmission unit between video network devices is detected, which solves the problem of redundant data traffic during ping command detection and the inability to troubleshoot core servers and other devices, real-time and economical maximum transmission unit monitoring is achieved.
Patent Information
- Application Number
- CN202411683873.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-04-04
AI Technical Summary
In the video network environment, the maximum transmission unit (MTU) is detected by using ping commands to detect the bandwidth occupied by redundant data traffic and the inability to troubleshoot the impact of equipment such as core servers.
After establishing a connection with the second visual network device, the visual network management message of a standard length and a different length is sent according to the message transmission cycle, and the maximum transmission unit with the second visual network device is determined based on the response message received within the preset detection time.
It realizes real-time monitoring of the maximum transmission unit between visual networking devices without increasing network load, reducing additional bandwidth usage, and detecting the maximum transmission unit between the core server and the router.
Smart Images

Figure CN119766746A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of visual networking technology, and in particular to a maximum transmission unit detection method, device, electronic device and storage medium. Background Art
[0002] In the application process of visual networking, due to the needs of some usage scenarios or the need to troubleshoot visual networking problems, it is required to be able to predict in advance or detect in real time the maximum length of data packets that can be transmitted between the router paths of the visual networking. Currently, the maximum data packet length (i.e., the maximum transmission unit MTU) on the Internet is usually detected by using the ping command to send a data packet of a specified size to the destination address, and the maximum data packet length is determined based on the size of the successfully transmitted data packet.
[0003] In a visual networking environment, using the ping command to detect MTU has the following problems:
[0004] 1. For application scenarios that require continuous real-time monitoring of the maximum data packet length that can pass between two visual networking devices, continuously sending ping packets with different packet lengths will generate redundant data traffic, which will require additional bandwidth.
[0005] 2. There may be visual networking devices such as core servers between two visual networking routers on the visual network. Using ping packet monitoring, it is impossible to find out which two visual networking devices have the maximum data packet length, which limits the maximum transmission unit between the two visual networking router endpoints. Summary of the invention
[0006] In view of the above problems, embodiments of the present application are proposed to provide a maximum transmission unit detection method, device, electronic device and storage medium that overcome the above problems or at least partially solve the above problems.
[0007] In a first aspect, an embodiment of the present application provides a maximum transmission unit detection method, which is applied to a first visual networking device, and the method includes:
[0008] After establishing a connection with the second visual networking device, sending visual networking management messages of standard length and different lengths to the second visual networking device at intervals according to a message sending cycle;
[0009] According to the response message sent by the second visual networking device and received within a preset detection time, a maximum transmission unit for data packet transmission between the second visual networking device and the second visual networking device is obtained.
[0010] Optionally, the first visual networking device is a visual networking core server, and the second visual networking device is a visual networking router.
[0011] After establishing a connection with the second visual networking device, sending visual networking management messages of standard length and different lengths to the second visual networking device at intervals according to a message sending cycle, including:
[0012] After the visual network router is connected to the visual network, heartbeat messages of the first standard length and different lengths are sent to the visual network router at intervals according to the message sending cycle;
[0013] The first standard length is a preset message length corresponding to the heartbeat message.
[0014] Optionally, the first visual networking device is a first visual networking router, and the second visual networking device is a second visual networking router.
[0015] After establishing a connection with the second visual networking device, sending visual networking management messages of standard length and different lengths to the second visual networking device at intervals according to a message sending cycle, including:
[0016] After establishing a tunnel with the second visual network router, sending tunnel connectivity monitoring messages of a second standard length and different lengths to the second visual network router according to the message sending cycle;
[0017] The second standard length is a preset message length corresponding to the tunnel connectivity monitoring message.
[0018] Optionally, the step of sending the visual networking management messages of standard length and different lengths to the second visual networking device at intervals according to the message sending cycle includes:
[0019] Sending a visual networking management message of a standard length to the second visual networking device, and when the message sending cycle is reached, sending a visual networking management message of a preset message length to the second visual networking device;
[0020] Adjusting the preset message length according to a preset algorithm to obtain an adjusted message length;
[0021] Sending a visual networking management message of a standard length to the second visual networking device, and when the message sending cycle is reached, sending the visual networking management message of the adjusted message length to the second visual networking device;
[0022] Iteratively execute the step of adjusting the preset message length according to the preset algorithm to obtain the adjusted message length, until no response message is received from the second visual networking device in response to the visual networking management message of the standard length.
[0023] Optionally, adjusting the preset message length according to a preset algorithm to obtain an adjusted message length includes:
[0024] When receiving a response message to the visual networking management message of the preset message length sent by the second visual networking device, increasing the preset message length according to a preset algorithm to obtain the adjusted message length;
[0025] In the case where a response message to the visual networking management message of the preset message length sent by the second visual networking device is not received, the preset message length is reduced according to a preset algorithm to obtain the adjusted message length.
[0026] Optionally, obtaining a maximum transmission unit for data packet transmission between the second visual networking device and the second visual networking device according to the response message sent by the second visual networking device received within a preset detection time period includes:
[0027] Obtaining the response message sent by the second visual networking device within the detection time;
[0028] The maximum message length among the message lengths carried in the response message is obtained, and the maximum message length is used as the maximum transmission unit.
[0029] Optionally, the first visual networking device is a third visual networking router, the second visual networking device is a fourth visual networking router, and the third visual networking router and the fourth visual networking router are routers across core servers.
[0030] The method of obtaining a maximum transmission unit for data packet transmission between the second visual networking device and the second visual networking device according to the response message sent by the second visual networking device and received within a preset detection time period includes:
[0031] Obtain a first maximum transmission unit and a second maximum transmission unit, wherein the first maximum transmission unit is determined by the second visual network core server according to a response message received from the third visual network router, and the second maximum transmission unit is determined by the third visual network core server according to a response message received from the fourth visual network router, wherein the second visual network core server is the visual network core server to which the third visual network router belongs, and the third visual network core server is the visual network core server to which the fourth visual network router belongs;
[0032] The smallest maximum transmission unit between the first maximum transmission unit and the second maximum transmission unit is used as the maximum transmission unit between the fourth visual network router.
[0033] In a second aspect, an embodiment of the present application provides a maximum transmission unit detection device, which is applied to a first visual networking device, and the device includes:
[0034] A visual networking management message sending module, used for sending visual networking management messages of standard length and different lengths to the second visual networking device at intervals according to a message sending cycle after establishing a connection with the second visual networking device;
[0035] The maximum transmission unit acquisition module is used to obtain the maximum transmission unit for data packet transmission between the second visual networking device and the second visual networking device according to the response message sent by the second visual networking device received within a preset detection time.
[0036] Optionally, the first visual networking device is a visual networking core server, and the second visual networking device is a visual networking router.
[0037] The visual network management message sending module includes:
[0038] A first message sending unit is used to send heartbeat messages of a first standard length and different lengths to the visual network router at intervals according to the message sending cycle after the visual network router is connected to the visual network;
[0039] The first standard length is a preset message length corresponding to the heartbeat message.
[0040] Optionally, the first visual networking device is a first visual networking router, and the second visual networking device is a second visual networking router.
[0041] The visual network management message sending module includes:
[0042] A second message sending unit is used to send tunnel connectivity monitoring messages of a second standard length and different lengths to the second visual network router according to the message sending cycle after establishing a tunnel with the second visual network router;
[0043] The second standard length is a preset message length corresponding to the tunnel connectivity monitoring message.
[0044] Optionally, the visual network management message sending module includes:
[0045] A third message sending unit, configured to send a visual networking management message of a standard length to the second visual networking device, and to send a visual networking management message of a preset message length to the second visual networking device when the message sending period is reached;
[0046] A message length adjustment unit, used to adjust the preset message length according to a preset algorithm to obtain an adjusted message length;
[0047] A fourth message sending unit, configured to send a visual networking management message of a standard length to the second visual networking device, and to send the visual networking management message of the adjusted message length to the second visual networking device when the message sending cycle is reached;
[0048] An iterative execution unit is used to iteratively execute the message length adjustment unit and the fourth message sending unit until no response message is received from the second visual networking device for the visual networking management message of the standard length.
[0049] Optionally, the message length adjustment unit includes:
[0050] A first length adjustment subunit is used to increase the preset message length according to a preset algorithm to obtain the adjusted message length when receiving a response message to the visual networking management message for the preset message length sent by the second visual networking device;
[0051] The second length adjustment subunit is used to reduce the preset message length according to a preset algorithm to obtain the adjusted message length when no response message to the visual networking management message of the preset message length sent by the second visual networking device is received.
[0052] Optionally, the maximum transmission unit acquisition module includes:
[0053] A response message acquisition unit, used to acquire the response message sent by the second visual networking device within the detection time length;
[0054] The maximum transmission unit acquisition unit is used to acquire the maximum message length among the message lengths carried in the response message, and use the maximum message length as the maximum transmission unit.
[0055] Optionally, the first visual networking device is a third visual networking router, the second visual networking device is a fourth visual networking router, and the third visual networking router and the fourth visual networking router are routers across core servers.
[0056] The maximum transmission unit acquisition module includes:
[0057] A transmission unit acquisition unit, used to acquire a first maximum transmission unit and a second maximum transmission unit, wherein the first maximum transmission unit is determined by the second visual network core server according to a response message received from the third visual network router, and the second maximum transmission unit is determined by the third visual network core server according to a response message received from the fourth visual network router, wherein the second visual network core server is the visual network core server to which the third visual network router belongs, and the third visual network core server is the visual network core server to which the fourth visual network router belongs;
[0058] A maximum transmission unit acquisition unit is used to use the smallest maximum transmission unit between the first maximum transmission unit and the second maximum transmission unit as the maximum transmission unit between the fourth visual network router.
[0059] In a third aspect, an embodiment of the present application provides an electronic device, including:
[0060] one or more processors; and
[0061] One or more machine-readable media having instructions stored thereon, when executed by the one or more processors, enable the device to perform any of the above-mentioned maximum transmission unit detection methods.
[0062] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program that enables a processor to execute any of the maximum transmission unit detection methods described above.
[0063] The embodiments of the present application include the following advantages:
[0064] The solution provided by the embodiment of the present application is to send visual network management messages of standard length and different lengths to the second visual network device at intervals according to the message sending cycle after establishing a connection with the second visual network device. According to the response message sent by the second visual network device received within the preset detection time, the maximum transmission unit for data packet transmission between the second visual network device is obtained. By utilizing the existing visual network management messages generated periodically, the embodiment of the present application can not only detect the maximum transmission unit between the two visual network routers, but also detect the maximum transmission unit between the core server and the router between the two visual network routers, thereby knowing the maximum transmission unit between the two visual network routers. This process does not need to use the ping command, which can reduce the problem of additional bandwidth occupation. At the same time, by utilizing the existing visual network management message types, the maximum transmission unit between the main devices on the visual network tunnel data path can be monitored in real time without significantly affecting the traffic and message type, which is convenient for predicting whether the data can reach the destination, and is convenient for detecting data loss caused by the maximum transmission unit limit between the main devices on the transmission path. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 A flowchart of a maximum transmission unit detection method provided in an embodiment of the present application;
[0066] Figure 2 A flowchart of a method for sending visual network management messages provided in an embodiment of the present application;
[0067] Figure 3 A flowchart of another method for sending visual network management messages provided in an embodiment of the present application;
[0068] Figure 4 A flowchart of a method for adjusting the length of a message provided in an embodiment of the present application;
[0069] Figure 5 A flowchart of a method for obtaining a maximum transmission unit provided in an embodiment of the present application;
[0070] Figure 6 A schematic diagram of a visual networking architecture for maximum transmission unit detection provided in an embodiment of the present application;
[0071] Figure 7 A schematic diagram of a heartbeat message processing flow provided in an embodiment of the present application;
[0072] Figure 8 A schematic diagram of a tunnel connectivity monitoring message processing flow provided in an embodiment of the present application;
[0073] Fig. 9 A schematic diagram of the structure of a maximum transmission unit detection device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0074] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0075] Reference Figure 1 , shows a flowchart of a maximum transmission unit detection method provided by an embodiment of the present application, and the maximum transmission unit detection method can be applied to a first visual networking device. Figure 1 As shown, the maximum transmission unit detection method may include: step 101 and step 102.
[0076] Step 101: After establishing a connection with a second visual networking device, visual networking management messages of standard length and different lengths are sent to the second visual networking device at intervals according to a message sending cycle.
[0077] The embodiment of the present application can be applied to a first visual networking device, that is, the execution subject is the first visual networking device. In this example, the first visual networking device can be a visual networking router or a visual networking core server.
[0078] The Visual Internet is a real-time, national and global full HD video network built based on visual Internet technology.
[0079] Visual network management messages refer to visual network protocol messages that manage, monitor, and maintain the interconnection status of each device in the visual network. For example, the visual network tunnel connectivity monitoring message transmitted in the visual network tunnel is responsible for periodically detecting the tunnel data connectivity between the visual network routers at both ends of the visual network tunnel. The visual network heartbeat message is responsible for periodically monitoring the network access status of the visual network devices that have been connected to the network.
[0080] The message sending cycle refers to the sending cycle of the visual network management message pre-defined in the visual network, and the message sending cycle specifies the time interval for sending the visual network management message.
[0081] The standard length refers to the message length of the visual network management message pre-defined in the visual network.
[0082] After establishing a connection with the second visual networking device, visual networking management messages of standard length and different lengths can be sent to the second visual networking device at intervals according to the message sending cycle. Interval sending refers to sending a visual networking management message of standard length, followed by a visual networking management message of variable length, followed by a visual networking management message of standard length, followed by a visual networking management message of variable length, and so on.
[0083] In this embodiment, when the first visual networking device is a visual networking core server and the second visual networking device is a visual networking router, the visual networking core server sends a heartbeat message to the second visual networking device. When the first visual networking device and the second visual networking device are both visual networking routers, the tunnel connection monitoring message sent is a tunnel connection monitoring message. The process of sending visual networking management messages can be combined with Figure 2 This is described in detail as follows.
[0084] Reference Figure 2 , shows a flowchart of a method for sending visual network management messages provided by an embodiment of the present application. Figure 2 As shown, the visual network management message sending method may include: step 201 and step 202. Afterwards,
[0085] Step 201: After the visual network router is connected to the visual network, heartbeat messages of a first standard length and different lengths are sent to the visual network router at intervals according to the message sending cycle.
[0086] In this embodiment, the heartbeat message (i.e., the heartbeat query message) refers to the message that the visual network core server periodically sends to the visual network router in order to monitor the network access status of the connected visual network router. In the visual network environment, in order to monitor the network access status of the connected visual network terminal router, the visual network core server sends a heartbeat (query) message to each managed visual network terminal device, and the corresponding visual network terminal device sends a heartbeat (response) message.
[0087] The first standard length refers to the message length of the heartbeat message pre-defined in the visual network.
[0088] When the first visual networking device is a visual networking core server and the second visual networking device is a visual networking router, after the visual networking router is connected to the visual network, the visual networking core server can send visual networking management messages of standard length and different lengths to the visual networking router at intervals according to the message sending cycle. For example, the message sending cycle is 6s. When the visual networking core server sends a heartbeat message to the visual networking router, it can first send a heartbeat message of the first standard length to the visual networking router. After an interval of 6s, a heartbeat message of a variable length is sent to the visual networking router. After an interval of 6s, a heartbeat message of the first standard length is sent to the visual networking router again. After another interval of 6s, a heartbeat message of a variable length is sent to the visual networking router. And so on, until the visual networking router exits the visual network, etc.
[0089] It can be understood that the above examples are merely examples listed for a better understanding of the technical solutions of the embodiments of the present application, and are not intended to be the sole limitation to the embodiments.
[0090] Step 202: After establishing a tunnel with the second visual network router, tunnel connectivity monitoring messages of a second standard length and different lengths are sent to the second visual network router according to the message sending cycle.
[0091] Tunnel connectivity monitoring messages are in a visual networking environment. Data packets encapsulated in the visual networking protocol are transmitted between two visual networking routers through a visual networking tunnel. In order to monitor the connectivity status of the visual networking tunnel, the visual networking router periodically sends visual networking tunnel connectivity monitoring messages to the visual networking router at the other end of the tunnel. The visual networking router at the other end determines the connectivity status of the tunnel based on the received visual networking tunnel connectivity monitoring messages.
[0092] The second standard length refers to the message length of the tunnel connectivity monitoring message pre-defined in the visual network.
[0093] A tunnel (i.e., a visual networking tunnel) refers to a point-to-point visual networking protocol tunnel established between visual networking routers. The transmission data encapsulated by the visual networking protocol is transmitted in the visual networking tunnel. Users access the visual networking tunnel from one side of the tunnel and access other business-specific networks on the other side.
[0094] When the first visual networking device is a first visual networking router and the second visual networking device is a second visual networking router, after establishing a tunnel with the second visual networking router, tunnel connectivity monitoring messages of the second standard length and different lengths can be sent to the second visual networking router according to the message sending cycle. For example, the message sending cycle is 10s. When the first visual networking router sends a tunnel connectivity monitoring message to the second visual networking router, a tunnel connectivity monitoring message of the second standard length can be sent to the second visual networking router first. After an interval of 6s, a tunnel connectivity monitoring message of a variable length is sent to the second visual networking router. After an interval of 6s, a tunnel connectivity monitoring message of the second standard length is sent to the second visual networking router. After another interval of 6s, a tunnel connectivity monitoring message of a variable length is sent to the second visual networking router. And so on, until the second visual networking router disconnects the tunnel connection, etc.
[0095] It can be understood that the above examples are merely examples listed for a better understanding of the technical solutions of the embodiments of the present application, and are not intended to be the sole limitation to the embodiments.
[0096] The embodiment of the present application can detect the maximum transmission unit by sending standard length and different length visual network management messages to the second visual network device at intervals without changing the original monitoring of the access status of the second visual network device or the tunnel connection status. At the same time, there is no need to send additional ping packets with different packet lengths. Under the premise of not significantly increasing the network load, the maximum data packet length limit between the various visual network devices can be continuously detected in real time to predict in advance whether the length of the transmitted data packet can reach the other end.
[0097] In this embodiment, the standard length of the visual network management message is a predefined message length. The different lengths of the visual network management message can be a message length that is changed in real time according to the response message of the second visual network device. The sending of the visual network management message and the change of the message length can be combined with Figure 3 This is described in detail as follows.
[0098] Reference Figure 3 , shows a flowchart of another method for sending visual network management messages provided by an embodiment of the present application. Figure 3 As shown, the method for sending visual network management messages includes: step 301, step 302, step 303 and step 304.
[0099] Step 301: Send a visual networking management message of a standard length to the second visual networking device, and when the message sending cycle is reached, send a visual networking management message of a preset message length to the second visual networking device.
[0100] In this embodiment, when visual networking management messages of standard length and different lengths are sent at intervals, the visual networking management message of standard length can be sent to the second visual networking device first, and when the message sending cycle is reached, the visual networking management message of preset message length can be sent to the second visual networking device. The preset message length can be a preset message length of the visual networking management message used when detecting MTU. In a specific implementation, in order to shorten the detection process, the preset message length can be set to a message length greater than the standard length.
[0101] Step 302: adjusting the preset message length according to a preset algorithm to obtain an adjusted message length.
[0102] After the visual networking management message of the preset message length is sent to the second visual networking device, the preset message length can be adjusted according to the preset algorithm to obtain the adjusted message length. In this example, the preset message length can be adjusted according to the response result of the preset message length and the preset algorithm. The specific adjustment process can be combined with Figure 4 This is described in detail as follows.
[0103] Reference Figure 4 , shows a flow chart of the steps of a message length adjustment method provided by an embodiment of the present application. Figure 4 As shown, the message length adjustment method may include: step 401 and step 402.
[0104] Step 401: upon receiving a response message to a visual networking management message of the preset message length sent by the second visual networking device, the preset message length is increased according to a preset algorithm to obtain the adjusted message length.
[0105] Step 402: When no response message to the visual networking management message of the preset message length sent by the second visual networking device is received, the preset message length is reduced according to a preset algorithm to obtain the adjusted message length.
[0106] In this embodiment, after sending a visual networking management message of a preset message length to the second visual networking device, it can be determined whether a response message to the visual networking management message of the preset message length sent by the second visual networking device is received.
[0107] If a response message to a visual network management message of a preset message length is received from a second visual network device, the preset message length can be increased according to a preset algorithm to obtain an adjusted message length. That is, when a response message returned by the second visual network device can be received normally, the message length is increased to detect the maximum transmission unit MTU.
[0108] If the response message of the visual network management message for the preset message length sent by the second visual network device is not received, the preset message length can be reduced according to the preset algorithm to obtain the adjusted message length. That is, when the response message returned by the second visual network device cannot be received normally, the message length is reduced to detect the maximum transmission unit MTU.
[0109] In this embodiment, the preset algorithm may be a byte-by-byte adjustment algorithm, for example, if the preset message length is 1024 bytes, when the response message can be received normally, the preset message length is first adjusted to 1025 bytes, and then it is determined whether the response message can be received, that is, each adjustment increases the message length by one byte. Alternatively, if the preset message length is 1024 bytes, when the response message cannot be received normally, the preset message length is first adjusted to 1023 bytes, and then it is determined whether the response message can be received, that is, each adjustment reduces the message length by one byte, etc.
[0110] Of course, in a specific implementation, the preset algorithm may also be a binary search method, a median value algorithm, etc. This embodiment does not limit the preset algorithm for adjusting the message length.
[0111] The process of the second visual networking device processing the visual networking management message can be combined with Figure 7 and Figure 8 This is described in detail as follows.
[0112] When the first visual networking device is a visual networking core server and the second visual networking device is a visual networking router, the processing flow of the visual networking router for the heartbeat message can be as follows: Figure 7 As shown, the process may include:
[0113] 1. The visual network router receives the heartbeat query message.
[0114] 2. Calculate the length of the received heartbeat packet (i.e., heartbeat query message).
[0115] 3. Determine whether the packet length (ie, the heartbeat packet) is greater than the maximum length currently received (ie, the maximum message length of the received heartbeat message).
[0116] 4. If the packet length is greater than the current maximum length received, update the current maximum packet length and execute step 6.
[0117] 5. If the packet length is not greater than the maximum length currently received, retain the current maximum packet length value and execute step 6.
[0118] 6. Generate a heartbeat response message, which carries the current maximum packet length.
[0119] 7. Send a heartbeat response message to the visual network core server.
[0120] When the first visual networking device is a visual networking router and the second visual networking device is a visual networking router, the receiving end visual networking router can process the tunnel connection monitoring message as follows: Figure 8 As shown:
[0121] 1. Receive tunnel connectivity monitoring query message.
[0122] 2. Calculate the length of the received tunnel connectivity monitoring packet.
[0123] 3. Determine whether the packet length (i.e., the length of the tunnel connectivity monitoring packet) is greater than the currently received maximum length (i.e., the maximum message length of the received tunnel connectivity monitoring message).
[0124] 4. If the packet length is greater than the current maximum length received, update the current tunnel maximum packet length and execute step 6.
[0125] 5. If the packet length is not greater than the maximum length currently received, retain the current tunnel maximum packet length value and execute step 6.
[0126] 6. Generate a tunnel connectivity monitoring response message, which carries the current maximum packet length.
[0127] 7. Send a tunnel connectivity monitoring response message to the sending router.
[0128] The embodiment of the present application can achieve the purpose of detecting the maximum transmission unit MTU between the first visual networking device and the second visual networking device by continuously adjusting the preset message length according to the response messages of the visual networking management messages of different lengths.
[0129] After the preset message length is adjusted according to the preset algorithm to obtain the adjusted message length, step 303 is executed.
[0130] Step 303: Send the visual networking management message of standard length to the second visual networking device, and when the message sending cycle is reached, send the visual networking management message with adjusted message length to the second visual networking device.
[0131] After adjusting the preset message length according to the preset algorithm to obtain the adjusted message length, the timing starts from when the visual network management message of the preset message length is sent to the second visual network device, and when the message sending cycle is reached, the visual network management message of the standard length can be sent to the second visual network device. Then, when the message sending cycle is reached, the visual network management message of the adjusted message length is sent to the second visual network device.
[0132] Step 304: Iteratively execute the step of adjusting the preset message length according to the preset algorithm to obtain the adjusted message length, until no response message is received from the second visual networking device in response to the visual networking management message of the standard length.
[0133] During the process of connecting the first visual networking device to the second visual networking device, the above steps 302 to 303 may be iteratively executed until no response message from the second visual networking device is received.
[0134] It can be understood that during the connection between the first visual networking device and the visual networking device, if a visual networking message of standard length is sent to the second visual networking device multiple times (twice or three times) but no response message is received from the second visual networking device, an early warning message can be output to the maintenance personnel so that the maintenance personnel can determine whether there is a fault such as disconnection or network fluctuation, and interrupt the MTU detection process until the fault is resolved and then restart the detection.
[0135] The embodiment of the present application can detect the maximum transmission unit without changing the original monitoring of the network access status or tunnel connection status of the second visual network device by sending visual network management messages of standard length and different lengths to the second visual network device at intervals.
[0136] After the visual networking management messages of standard length and different lengths are sent to the second visual networking device at intervals according to the message sending cycle, step 102 is executed.
[0137] Step 102: Obtain a maximum transmission unit for data packet transmission between the second visual networking device and the second visual networking device based on the response message sent by the second visual networking device received within a preset detection time.
[0138] The detection duration refers to the preset duration for detecting the maximum transmission unit MTU between the first visual networking device and the second visual networking device. In this example, the detection duration can be set to 3 minutes, 5 minutes, etc. Specifically, the specific value of the detection duration can be determined according to business needs, and this embodiment does not limit this.
[0139] After the visual networking management message intervals of standard length and different lengths are sent to the second visual networking device according to the message sending cycle, the maximum transmission unit for data packet transmission between the second visual networking device and the second visual networking device can be obtained according to the response message sent by the second visual networking device received within the preset detection time. Figure 5 This is described in detail as follows.
[0140] Reference Figure 5, shows a flowchart of the steps of a maximum transmission unit acquisition method provided by an embodiment of the present application. Figure 5 As shown, the maximum transmission unit acquisition method may include: step 501 and step 502.
[0141] Step 501: Obtain the response message sent by the second visual networking device within the detection duration.
[0142] In this embodiment, a response message sent by the second visual networking device within the detection duration can be obtained.
[0143] Step 502: Obtain the maximum message length among the message lengths carried in the response message, and use the maximum message length as the maximum transmission unit.
[0144] The response message carries a message length, which is the message length of the visual network management message corresponding to the response message. After obtaining the response message within the detection time, the maximum message length among the message lengths carried in the response message can be obtained, and the maximum message length is used as the maximum transmission unit.
[0145] In a specific implementation of the present application, the maximum transmission unit between the visual network core server and the visual network terminal router is detected in real time using the visual network heartbeat message. The visual network core server selects some heartbeat messages at intervals from the visual network heartbeat (query) messages sent down, and uses a search algorithm (such as binary search, etc.) to adjust the length of the visual network heartbeat (query) message. The visual network terminal router that receives the visual network heartbeat (query) message carries the maximum data packet length received in the responded visual network heartbeat (response) message. The maximum data packet length is used as the maximum data packet length currently detected between the visual network core server and the visual network terminal router, and the maximum data packet length is the maximum transmission unit MTU.
[0146] The process of detecting the maximum transmission unit between the visual network core server and the local visual network router can be:
[0147] (1) The visual network core server generates and sends a variable-length heartbeat query message. After receiving the heartbeat query message, the visual network router records the length of the received heartbeat query message and compares it with the maximum heartbeat query message length received in the history (during the time window). If it is greater than the maximum heartbeat query message length received in the history, the maximum heartbeat query message length received in the history is updated; otherwise, the original maximum heartbeat query message length received in the history is retained.
[0148] (2) The visual network router generates a heartbeat response message and fills the maximum heartbeat query message length received in history into the generated heartbeat response message.
[0149] (3) The visual network router sends a heartbeat response message and records the maximum heartbeat query message length received in history as the maximum transmission unit between the detected visual network core server and the local visual network router.
[0150] (4) If the visual network core server does not receive the heartbeat response message for the variable-length heartbeat query message it sent, it is considered that the length of the variable-length heartbeat query message sent exceeds the maximum transmission unit between the visual network router, and based on the maximum message length recorded in the subsequently received heartbeat response message, the subsequent variable-length heartbeat query message length is regenerated to more accurately detect the maximum transmission unit between the visual network core server and the visual network router.
[0151] In another specific implementation of the present application, a visual network tunnel connectivity monitoring message is used to detect the maximum transmission unit that can be transmitted in the tunnel between the visual network terminal router and the visual network terminal router. When the visual network terminal router periodically sends a visual network tunnel connectivity monitoring message to the visual network router at the other end of the tunnel, it selects some tunnel connectivity monitoring messages at intervals and uses a search algorithm (such as binary search, etc.) to adjust the length of the visual network tunnel connectivity monitoring message. The visual network router at the other end determines the maximum transmission unit that can be transmitted in the tunnel based on the length of the received visual network tunnel connectivity monitoring message and the maximum transmission unit received by the other end carried in the message, and carries this value in the sent visual network tunnel connectivity monitoring message. The visual network routers at both ends determine the maximum transmission unit of the current tunnel based on the maximum transmission message length received by the local end and the maximum transmission unit value received by the other end carried in the received visual network tunnel connectivity monitoring message.
[0152] The process of detecting the maximum transmission unit of the tunnel between the remote video router and the local video router can be:
[0153] (1) After the remote visual network router establishes a tunnel with the local visual network router, it generates and sends a variable-length tunnel connectivity monitoring message. After receiving the message, the local visual network router records the length of the received tunnel connectivity monitoring message and compares it with the maximum tunnel connectivity monitoring message length received in the history (during the time window). If it is greater than the maximum tunnel connectivity monitoring message length received in the history, the maximum tunnel connectivity monitoring message length received in the history is updated; otherwise, the original maximum tunnel connectivity monitoring message length is retained.
[0154] (2) The local visual network router generates a tunnel connectivity monitoring message, fills the maximum tunnel connectivity monitoring message length received historically by the local end into the generated tunnel connectivity monitoring message, and sends it to the remote visual network router.
[0155] (3) The visual network router records the maximum tunnel connectivity monitoring message length received in the history as the maximum transmission unit of the tunnel between the detected remote visual network router and the local visual network router.
[0156] (4) The local visual network router determines the change in the length of the variable-length tunnel connectivity monitoring message subsequently sent based on the maximum tunnel connectivity monitoring message length value recorded in the tunnel connectivity monitoring message received from the opposite visual network router and compares it with the length of the variable-length tunnel connectivity monitoring message sent by the local end, so as to more accurately detect the maximum transmission unit between visual network routers. If the received maximum tunnel connectivity monitoring message length is less than the length of the variable-length tunnel connectivity monitoring message most recently sent by the local end, it is considered that the maximum transmission unit of the tunnel between the visual network routers is less than the length value of the most recently sent variable-length tunnel connectivity monitoring message, and the length of the variable-length tunnel connectivity monitoring message sent subsequently is shortened; otherwise, the length of the variable-length tunnel connectivity monitoring message sent subsequently is increased.
[0157] The embodiment of the present application can detect not only the maximum transmission unit between two visual network routers, but also the maximum transmission unit between the core server and the router between the two visual network routers by using the existing visual network management message generated periodically, so as to know the maximum transmission unit between the two visual network routers. This process does not need to use the ping command, which can reduce the problem of extra bandwidth occupation.
[0158] When obtaining the maximum transmission unit MTU between two visual network routers across the core servers, the maximum transmission unit between the visual network routers connected to the two visual network core servers can be detected, and the maximum transmission unit between the two visual network routers can be determined based on the two maximum transmission units. Figure 6 This is described in detail as follows.
[0159] like Figure 6 As shown, when visual network router A and visual network router B belong to the same visual network core server, visual network router A and visual network router B can send visual network tunnel connectivity monitoring messages (i.e., messages of standard length and messages of different lengths) to detect the maximum transmission unit MTU between visual network router A and visual network router B.
[0160] When the visual network router A and the visual network router B belong to different visual network core servers, that is, the visual network router A and the visual network router B belong to visual network routers across core servers. Figure 6As shown, visual network router A belongs to visual network core server A, and visual network router B belongs to visual network core server B. At this time, visual network core server A can send visual network heartbeat messages of standard length and different lengths to visual network router A to detect the maximum transmission unit MTU between visual network core server A and visual network router A, which is recorded as MTUA. At the same time, visual network core server B can send visual network heartbeat messages of standard length and different lengths to visual network router B to detect the maximum transmission unit MTU between visual network core server B and visual network router B, which is recorded as MTUB. Finally, the smallest MTU between MTUA and MTUB can be obtained as the maximum transmission unit between visual network router A and visual network router B across core servers.
[0161] The maximum transmission unit detection method provided by the embodiment of the present application is to send the standard length and different length visual network management message intervals to the second visual network device according to the message sending cycle after establishing a connection with the second visual network device. According to the response message sent by the second visual network device received within the preset detection time, the maximum transmission unit for data packet transmission between the second visual network device is obtained. By using the existing visual network management message generated periodically, the embodiment of the present application can not only detect the maximum transmission unit between two visual network routers, but also detect the maximum transmission unit between the core server and the router between the two visual network routers, so as to know the maximum transmission unit between the two visual network routers. This process does not need to use the ping command, which can reduce the problem of additional bandwidth occupation. At the same time, by using the existing visual network management message type, the maximum transmission unit between the main devices on the visual network tunnel data path can be monitored in real time without significantly affecting the traffic and message type, which is convenient for predicting whether the data can reach the destination, and is convenient for detecting data loss caused by the maximum transmission unit limit between the main devices in the transmission path.
[0162] It should be noted that, for the method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present application are not limited by the described action sequence, because according to the embodiments of the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present application.
[0163] Reference Fig. 9 , shows a schematic diagram of the structure of a maximum transmission unit detection device provided in an embodiment of the present application, and the maximum transmission unit detection device can be applied to a first visual networking device. Fig. 9As shown, the maximum transmission unit detection device 900 may include the following modules:
[0164] The visual networking management message sending module 910 is used to send visual networking management messages of standard length and different lengths to the second visual networking device at intervals according to the message sending cycle after establishing a connection with the second visual networking device;
[0165] The maximum transmission unit acquisition module 920 is used to obtain the maximum transmission unit for data packet transmission between the second visual networking device and the second visual networking device according to the response message sent by the second visual networking device received within a preset detection time.
[0166] Optionally, the first visual networking device is a visual networking core server, and the second visual networking device is a visual networking router.
[0167] The visual network management message sending module includes:
[0168] A first message sending unit is used to send heartbeat messages of a first standard length and different lengths to the visual network router at intervals according to the message sending cycle after the visual network router is connected to the visual network;
[0169] The first standard length is a preset message length corresponding to the heartbeat message.
[0170] Optionally, the first visual networking device is a first visual networking router, and the second visual networking device is a second visual networking router.
[0171] The visual network management message sending module includes:
[0172] A second message sending unit is used to send tunnel connectivity monitoring messages of a second standard length and different lengths to the second visual network router according to the message sending cycle after establishing a tunnel with the second visual network router;
[0173] The second standard length is a preset message length corresponding to the tunnel connectivity monitoring message.
[0174] Optionally, the visual network management message sending module includes:
[0175] A third message sending unit, configured to send a visual networking management message of a standard length to the second visual networking device, and to send a visual networking management message of a preset message length to the second visual networking device when the message sending period is reached;
[0176] A message length adjustment unit, used to adjust the preset message length according to a preset algorithm to obtain an adjusted message length;
[0177] A fourth message sending unit, configured to send a visual networking management message of a standard length to the second visual networking device, and to send the visual networking management message of the adjusted message length to the second visual networking device when the message sending cycle is reached;
[0178] An iterative execution unit is used to iteratively execute the message length adjustment unit and the fourth message sending unit until no response message is received from the second visual networking device for the visual networking management message of the standard length.
[0179] Optionally, the message length adjustment unit includes:
[0180] A first length adjustment subunit is used to increase the preset message length according to a preset algorithm to obtain the adjusted message length when receiving a response message to the visual networking management message for the preset message length sent by the second visual networking device;
[0181] The second length adjustment subunit is used to reduce the preset message length according to a preset algorithm to obtain the adjusted message length when no response message to the visual networking management message of the preset message length sent by the second visual networking device is received.
[0182] Optionally, the maximum transmission unit acquisition module includes:
[0183] A response message acquisition unit, used to acquire the response message sent by the second visual networking device within the detection time length;
[0184] The maximum transmission unit acquisition unit is used to acquire the maximum message length among the message lengths carried in the response message, and use the maximum message length as the maximum transmission unit.
[0185] The maximum transmission unit detection device provided in the embodiment of the present application, after establishing a connection with the second visual networking device, sends the visual networking management message intervals of standard length and different lengths to the second visual networking device according to the message sending cycle. According to the response message sent by the second visual networking device received within the preset detection time, the maximum transmission unit for data packet transmission between the second visual networking device is obtained. By utilizing the existing visual networking management message generated periodically, the embodiment of the present application can not only detect the maximum transmission unit between two visual networking routers, but also detect the maximum transmission unit between the core server and the router between the two visual networking routers, so as to know the maximum transmission unit between the two visual networking routers. This process does not need to use the ping command, which can reduce the problem of additional bandwidth occupation. At the same time, by utilizing the existing visual networking management message type, the maximum transmission unit between the main devices on the visual networking tunnel data path can be monitored in real time without significantly affecting the traffic and message type, which is convenient for predicting whether the data can reach the destination, and is convenient for detecting data loss caused by the maximum transmission unit limit between the main devices in the transmission path.
[0186] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0187] In an embodiment of the present application, an electronic device is also provided. The electronic device may include one or more processors, and one or more machine-readable media storing instructions thereon, the instructions being, for example, application programs. When the instructions are executed by the one or more processors, the processors are caused to perform any of the above-mentioned maximum transmission unit detection methods.
[0188] In an embodiment of the present application, a non-temporary computer-readable storage medium is also provided, on which a computer program is stored, and the program can be executed by a processor of an electronic device to implement any of the above-mentioned maximum transmission unit detection methods. For example, the non-temporary computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device.
[0189] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0190] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, devices, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0191] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0192] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0193] These computer program instructions can also be loaded into a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable terminal device provide for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0194] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.
[0195] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0196] The above is a detailed introduction to a maximum transmission unit detection method, device, electronic device and storage medium provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A maximum transmission unit detection method, applied to a first visual networking device, characterized in that: The method comprises: After establishing a connection with the second visual networking device, sending visual networking management messages of standard length and different lengths to the second visual networking device at intervals according to a message sending cycle; According to the response message sent by the second visual networking device and received within a preset detection time, a maximum transmission unit for data packet transmission between the second visual networking device and the second visual networking device is obtained.
2. The method according to claim 1, characterized in that The first visual networking device is a visual networking core server, and the second visual networking device is a visual networking router. After establishing a connection with the second visual networking device, sending visual networking management messages of standard length and different lengths to the second visual networking device at intervals according to a message sending cycle, including: After the visual network router is connected to the visual network, heartbeat messages of the first standard length and different lengths are sent to the visual network router at intervals according to the message sending cycle; The first standard length is a preset message length corresponding to the heartbeat message.
3. The method according to claim 1, characterized in that The first visual networking device is a first visual networking router, and the second visual networking device is a second visual networking router. After establishing a connection with the second visual networking device, sending visual networking management messages of standard length and different lengths to the second visual networking device at intervals according to a message sending cycle, including: After establishing a tunnel with the second visual network router, sending tunnel connectivity monitoring messages of a second standard length and different lengths to the second visual network router according to the message sending cycle; The second standard length is a preset message length corresponding to the tunnel connectivity monitoring message.
4. The method according to claim 1, characterized in that The method of sending the visual networking management messages of standard length and different lengths to the second visual networking device at intervals according to the message sending cycle includes: Sending a visual networking management message of a standard length to the second visual networking device, and when the message sending cycle is reached, sending a visual networking management message of a preset message length to the second visual networking device; Adjusting the preset message length according to a preset algorithm to obtain an adjusted message length; Sending a visual networking management message of a standard length to the second visual networking device, and when the message sending cycle is reached, sending the visual networking management message of the adjusted message length to the second visual networking device; Iteratively execute the step of adjusting the preset message length according to the preset algorithm to obtain the adjusted message length, until no response message is received from the second visual networking device in response to the visual networking management message of the standard length.
5. The method according to claim 4, characterized in that The step of adjusting the preset message length according to a preset algorithm to obtain an adjusted message length includes: When receiving a response message to the visual networking management message of the preset message length sent by the second visual networking device, increasing the preset message length according to a preset algorithm to obtain the adjusted message length; In the case where a response message to the visual networking management message of the preset message length sent by the second visual networking device is not received, the preset message length is reduced according to a preset algorithm to obtain the adjusted message length.
6. The method according to claim 1, characterized in that The method of obtaining a maximum transmission unit for data packet transmission between the second visual networking device and the second visual networking device according to the response message sent by the second visual networking device and received within a preset detection time period includes: Obtaining the response message sent by the second visual networking device within the detection time; The maximum message length among the message lengths carried in the response message is obtained, and the maximum message length is used as the maximum transmission unit.
7. A maximum transmission unit detection device, applied to a first visual networking device, characterized in that: The device comprises: A visual networking management message sending module, used for sending visual networking management messages of standard length and different lengths to the second visual networking device at intervals according to a message sending cycle after establishing a connection with the second visual networking device; The maximum transmission unit acquisition module is used to obtain the maximum transmission unit for data packet transmission between the second visual networking device and the second visual networking device according to the response message sent by the second visual networking device received within a preset detection time.
8. The device according to claim 7, characterized in that The first visual networking device is a visual networking core server, and the second visual networking device is a visual networking router. The visual network management message sending module includes: A first message sending unit is used to send heartbeat messages of a first standard length and different lengths to the visual network router at intervals according to the message sending cycle after the visual network router is connected to the visual network; The first standard length is a preset message length corresponding to the heartbeat message.
9. An electronic device, characterized in that: include: one or more processors; and One or more machine-readable media having instructions stored thereon, when executed by the one or more processors, cause the apparatus to perform the maximum transmission unit detection method according to any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that: The computer program stored therein enables the processor to execute the maximum transmission unit detection method according to any one of claims 1 to 6.