Tunnel side interface processing method and device, communication equipment and storage medium
By determining the target tunnel side interface and performing decapsulation attribute marking processing in the 6to4 automatic tunnel scenario, the problem of waste of ACL resources and low forwarding efficiency caused by pre-labeling of decapsulation attributes for all interfaces is solved, and more efficient data is achieved Packet forwarding.
Patent Information
- Application Number
- CN202310542502.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-12
- Publication Date
- 2024-11-12
AI Technical Summary
In the 6to4 automatic tunneling scenario, the routing device needs to mark all interfaces to decapsulate attributes to forward packets, resulting in excessive consumption of ACL resources and affecting forwarding efficiency.
By determining the target tunnel side interface and performing marking processing of decapsulation attributes based on its port information, the configuration information of the tunnel side interface is dynamically obtained to accurately mark the tunnel exit, avoiding pre-marking of decapsulation attributes for all interfaces.
Save ACL resources, improve packet forwarding efficiency, reduce processing of packets that do not require decapsulation, and improve forwarding efficiency in tunnel scenarios.
Smart Images

Figure CN118945139A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet communication technology, and in particular to a method, device, communication equipment and storage medium for processing a tunnel side interface. Background Art
[0002] The 6to4 automatic tunnel in Internet communication is an IPv6 conversion transmission mechanism. In the related art, the routing device in the 6to4 automatic tunnel scenario needs to decapsulate the IPv4 message obtained by converting the IPv6 message in order to know the tunnel destination IP address and forward the data packet. However, the actual exit of the tunnel for transmitting data packets often cannot be accurately marked, which leads to the need to mark the decapsulation attribute for all interfaces of the routing device so that the routing device can check the decapsulation processing of all data packets received by any interface. Marking the decapsulation attribute for all interfaces of the routing device means that a large amount of ACL (a mechanism for controlling access rights to resources in a computer system or network) resources are consumed. Summary of the invention
[0003] The main purpose of the present application is to provide a method, device, communication equipment and storage medium for processing a tunnel side interface, aiming to accurately mark the actual exit of the tunnel for transmitting data packets in a 6to4 automatic tunnel scenario, thereby eliminating the need to perform decapsulation attribute marking on all interfaces of the routing device to save ACL resources.
[0004] To achieve the above object, an embodiment of the present application provides a method for processing a tunnel side interface, the method for processing a tunnel side interface being applied to a routing device, the method comprising:
[0005] Determine at least one target tunnel side interface, the target tunnel side interface is used to forward the IPv6 message, the IPv6 message is encapsulated as an IPv4 message and transmitted in the IPv4 tunnel corresponding to the target tunnel side interface;
[0006] The target tunnel side interface is subjected to a marking process of decapsulation attributes according to the port information of the target tunnel side interface.
[0007] In addition, to achieve the above-mentioned purpose, an embodiment of the present application further provides a processing device for a tunnel side interface, wherein the processing device for the tunnel side interface is applied to a routing device, and the device includes:
[0008] a tunnel module, configured to receive first port configuration information, and determine the at least one target tunnel side interface according to the first port configuration information;
[0009] A driver layer, configured to convert the first port configuration information into configuration data of a chip interface;
[0010] The chip sending interface is configured to send the configuration data to perform marking processing of the decapsulation attributes.
[0011] In addition, to achieve the above-mentioned purpose, the embodiment of the present application also provides another tunnel side interface processing device, the tunnel side interface processing device is applied to a routing device, and the device includes:
[0012] an adaptation layer, configured to receive second port configuration information, and determine the at least one target tunnel side interface according to the second port configuration information;
[0013] A driver layer, configured to convert the first port configuration information into configuration data of a chip interface;
[0014] The chip sending interface is configured to send the configuration data to perform marking processing of the decapsulation attributes.
[0015] Each functional module of the tunnel side interface processing device implements the steps of the tunnel side interface processing method described above during operation.
[0016] In addition, an embodiment of the present application also provides a communication device, which includes: a processing device for the tunnel side interface as described above, a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the computer program is configured to implement the steps of the processing method for the tunnel side interface as described above.
[0017] In addition, an embodiment of the present application further provides a storage medium, which is a computer-readable storage medium, and stores a computer program on the storage medium. When the computer program is executed by a processor, the steps of the processing method of the tunnel side interface as described above are implemented.
[0018] An embodiment of the present application discloses a method, apparatus, communication equipment and storage medium for processing a tunnel side interface. At least one target tunnel side interface is determined based on a routing device. The target tunnel side interface is used to forward an IPv6 message. The IPv6 message is encapsulated as an IPv4 message and transmitted in the IPv4 tunnel corresponding to the target tunnel side interface. The target tunnel side interface is marked with decapsulation attributes according to the port information of the target tunnel side interface.
[0019] Therefore, the embodiment of the present application first determines at least one target tunnel side interface for forwarding IPV6 messages through a routing device, wherein the IPV6 message is encapsulated as an IPV4 message and transmitted in the IPV4 tunnel corresponding to the target tunnel side interface; thereafter, the decapsulation attribute of the tunnel side interface is marked according to the port information of the target tunnel side interface.
[0020] In this way, compared with the related technology of marking the decapsulation attributes of all interfaces of the routing device in advance, the embodiment of the present application can dynamically obtain the port configuration information of the tunnel side interface during the process of the routing device receiving and forwarding IPV6 messages, so that only a small amount of ACL resources are needed to accurately mark the decapsulation attributes of the tunnel side interface, effectively saving the device ACL resources.
[0021] In addition, since the related art pre-marks the decapsulation attribute for all interfaces of the routing device, the peer device of the routing device needs to check whether to decapsulate the message after receiving any message forwarded by the routing device, which will seriously affect the forwarding efficiency of the message in the tunnel scenario when some messages do not need to be decapsulated. However, since the embodiment of the present application does not need to pre-mark the decapsulation attribute for all interfaces of the routing device, the peer device of the routing device can directly forward some messages that do not need to be decapsulated, so the embodiment of the present application can also improve the forwarding efficiency of the message. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a structural diagram of an operating device of a hardware operating environment involved in an embodiment of the present application;
[0023] Figure 2 A schematic diagram of the steps of an embodiment of a method for processing a tunnel side interface provided in an embodiment of the present application;
[0024] Figure 3 A schematic diagram of a 6to4 automatic tunnel scenario involved in an embodiment of a method for processing a tunnel side interface provided in an embodiment of the present application;
[0025] Figure 4 A schematic diagram of an application flow involved in an embodiment of a method for processing a tunnel side interface provided in an embodiment of the present application;
[0026] Figure 5 A schematic diagram of another application flow involved in an embodiment of a method for processing a tunnel side interface provided in an embodiment of the present application;
[0027] Figure 6 A schematic diagram of the functional module architecture involved in an embodiment of a tunnel side interface processing device provided in an embodiment of the present application;
[0028] Figure 7 A schematic diagram of the functional module architecture involved in another embodiment of a processing device for a tunnel side interface provided in an embodiment of the present application.
[0029] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0030] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0031] Reference Figure 1 , Figure 1 This is a schematic diagram of the operating equipment structure of the hardware operating environment involved in the embodiment of the present application.
[0032] In this embodiment, the operating device of the hardware operating environment involved in the embodiment of the present application may be a communication device including a processing device of a tunnel side interface. Specifically, the communication device may be a routing device in a 6to4 automatic tunnel scenario.
[0033] like Figure 1 As shown, the operating device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (WIreless-FIdelity, WI-FI) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM) memory, or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0034] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation on the operating device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0035] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating system, a data storage module, a network communication module, a user interface module and a computer program.
[0036] exist Figure 1In the running device shown, the network interface 1004 is mainly used for data communication with other devices; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the running device of the present application can be set in the running device, and the running device calls the computer program stored in the memory 1005 through the processor 1001, and performs the following operations:
[0037] Determine at least one target tunnel side interface, the target tunnel side interface is used to forward the IPv6 message, the IPv6 message is encapsulated as an IPv4 message and transmitted in the IPv4 tunnel corresponding to the target tunnel side interface;
[0038] The target tunnel side interface is subjected to a marking process of decapsulation attributes according to the port information of the target tunnel side interface.
[0039] Exemplarily, the processor 1001 may call a computer program stored in the memory 1005, and further perform the following operations:
[0040] Find the route based on the IPv4 address in the received IPv6 message;
[0041] In the case where route lookup fails, ARP learning is triggered to determine the at least one target tunnel-side interface.
[0042] Exemplarily, the processor 1001 may call a computer program stored in the memory 1005, and further perform the following operations:
[0043] In the event of a failure in finding a route, the IPV6 message is reported to the software platform of the routing device to trigger ARP learning, wherein the software platform performs ARP learning by sending an APR request and receiving a response from the peer device to the APR request, and the target tunnel side interface is the routing interface that receives the response from the peer device.
[0044] Exemplarily, the processor 1001 may call a computer program stored in the memory 1005, and further perform the following operations:
[0045] Adding identification information to the IPV6 message, wherein the identification information includes a message sending reason and a message type;
[0046] The IPV6 message with the identification information added is sent to the software platform to trigger ARP learning, so that the software platform can parse the IPV4 address from the IPV6 message according to the message type, and find the route according to the reason for sending the message and the IPV4 address, so as to perform ARP learning when the route search fails.
[0047] Exemplarily, the processor 1001 may call a computer program stored in the memory 1005, and before executing the operation of determining at least one target tunnel side interface, further perform the following operations:
[0048] The port configuration information of the at least one target tunnel side interface is preconfigured through a user-defined interface.
[0049] Exemplarily, the processor 1001 may call a computer program stored in the memory 1005, and further perform the following operations:
[0050] The port configuration information is received, and the at least one target tunnel-side interface is determined according to the port configuration information.
[0051] Exemplarily, the processor 1001 may call a computer program stored in the memory 1005, and further perform the following operations:
[0052] Convert the port information of the target tunnel side interface into configuration data of the chip interface;
[0053] The chip sending interface is called to send the configuration data to perform a marking process of decapsulation attributes on the target tunnel side port.
[0054] Exemplarily, the processor 1001 may call a computer program stored in the memory 1005, and after executing the operation of marking the decapsulation attribute of the target tunnel side interface, further perform the following operations:
[0055] The received IPV6 message is encapsulated into an IPV4 message, and the IPV4 message is forwarded through the target tunnel side interface, so that the opposite device receiving the IPV4 message can confirm whether to decapsulate the IPV4 message according to the decapsulation attribute marked by the target tunnel side interface.
[0056] Based on the operating device structure of the hardware operating environment involved in the above-mentioned embodiment of the present application, the overall concept of the processing method of the tunnel side interface provided by the embodiment of the present application is first proposed.
[0057] In Internet communications, 6to4 automatic tunneling is an IPv6 conversion transmission mechanism that encapsulates IPv6 packets directly in IPv4 packets and uses the IPv4 address information embedded in the IPv6 address to achieve direct transmission on the IPv4 network without explicitly configuring a tunnel.
[0058] In the related art, since the routing device needs to decapsulate the data packet to obtain the tunnel destination IP address to forward the data packet, but the actual exit of the tunnel that transmits the data packet cannot be accurately marked, it is necessary to mark the decapsulation attribute for all interfaces of the routing device so that the routing device can check the decapsulation processing of all data packets received by any interface. Marking the decapsulation attribute for all interfaces of the routing device requires consuming a large amount of ACL resources.
[0059] In response to the above phenomenon, the embodiment of the present application proposes a method for processing a tunnel side interface, which first determines at least one target tunnel side interface for forwarding IPV6 messages through a routing device, wherein the IPV6 message is encapsulated as an IPV4 message and transmitted in the IPV4 tunnel corresponding to the target tunnel side interface; then, the decapsulation attribute of the tunnel side interface is marked according to the port information of the target tunnel side interface.
[0060] In this way, compared with the related technology of marking the decapsulation attributes of all interfaces of the routing device in advance, the embodiment of the present application can dynamically obtain the port configuration information of the tunnel side interface during the process of the routing device receiving and forwarding IPV6 messages, so that only a small amount of ACL resources need to be consumed to mark the decapsulation attributes of the tunnel side interface, effectively saving the device ACL resources.
[0061] In addition, since the related art pre-marks the decapsulation attribute for all interfaces of the routing device, the peer device of the routing device needs to check whether to decapsulate the message after receiving any message forwarded by the routing device, which will seriously affect the forwarding efficiency of the message in the tunnel scenario when some messages do not need to be decapsulated. However, since the embodiment of the present application does not need to pre-mark the decapsulation attribute for all interfaces of the routing device, the peer device of the routing device can directly forward some messages that do not need to be decapsulated, so the embodiment of the present application can also improve the forwarding efficiency of the message.
[0062] Based on the overall concept of the method for processing the tunnel side interface provided by the above-mentioned embodiment of the present application, various embodiments of the method for processing the tunnel side interface of the present application are proposed.
[0063] It should be noted that the processing method of the tunnel side interface of the present application is applied to the above-mentioned operating device, and the operating device can be a communication device including a processing device of the tunnel side interface, specifically,. It should be understood that based on different design requirements of actual applications, in different feasible embodiments, the processing method of the tunnel side interface of the present application can of course also be applied to other terminal devices, and in order to facilitate understanding and explanation of the technical solution, the following text uses the routing device in the 6to4 automatic tunnel scenario as the execution subject of the solution implementation to explain the processing method of the tunnel side interface of the present application.
[0064] Please refer to Figure 2 , Figure 2 This is a schematic flow chart of the steps of the first embodiment of the method for processing the tunnel side interface of the present application. It should be noted that although the logical order is shown in the flow chart, in some cases, the method for processing the tunnel side interface of the present application can of course perform the steps shown or described in a different order than that here.
[0065] like Figure 2 As shown, in the first embodiment of the method for processing the tunnel side interface of the present application, the method for processing the tunnel side interface provided by the present application may include the following steps:
[0066] Step S10, determining at least one target tunnel side interface, the target tunnel side interface is used to forward the IPv6 message, the IPv6 message is encapsulated as an IPv4 message and transmitted in the IPv4 tunnel corresponding to the target tunnel side interface;
[0067] In this embodiment, when performing interface attribute marking processing on a tunnel side interface in a 6to4 automatic tunnel scenario, the routing device first determines at least one target tunnel side interface that needs to be marked with interface attributes at the current moment from among multiple tunnel side interfaces.
[0068] It should be noted that in this embodiment and other feasible embodiments, any target tunnel side interface determined by the routing device in the 6to4 automatic tunnel scenario is a tunnel side interface for forwarding IPV6 messages, that is, the routing device encapsulates the IPV6 message received by the user access side chip into an IPV4 message and then transmits it in the IPV4 tunnel corresponding to the target tunnel side interface, thereby transmitting the IPV6 message in the form of an IPV4 message to the opposite device (specifically, it can also be a routing device) connected to the IPV4 tunnel.
[0069] Step S20: performing a marking process of decapsulation attributes on the target tunnel side interface according to the port information of the target tunnel side interface.
[0070] In this embodiment, after determining at least one target tunnel side interface that needs to be marked with interface attributes at the current moment, the routing device can further call its own driver layer and chip downlink interface to mark the decapsulation attributes of the target tunnel side interface based on the port information of the target tunnel side interface. In this way, after the decapsulation attribute marking process for the target tunnel side interface takes effect, when the routing device forwards the message data through the target tunnel side interface again, the opposite end device further searches the tunnel table based on the decapsulation attributes of the target tunnel side interface when receiving the message data to confirm whether the message data needs to be decapsulated.
[0071] In this way, compared with the traditional related technology that all interfaces of the routing device are marked with decapsulation attributes in advance, so that the opposite device needs to check whether to decapsulate the message after receiving any message forwarded by the routing device, the processing method of the tunnel side interface of the present application does not need to mark the decapsulation attributes for all interfaces of the routing device in advance. Therefore, for some messages that do not need to be decapsulated, the opposite device of the routing device can directly forward them, which can effectively improve the forwarding efficiency of the message.
[0072] Optionally, in some feasible embodiments of the method for processing a tunnel side interface of the present application, the above-mentioned operation of "determining at least one target tunnel side interface" may include:
[0073] Find the route based on the IPv4 address in the received IPv6 message;
[0074] In the case where route lookup fails, ARP learning is triggered to determine the at least one target tunnel-side interface.
[0075] In this embodiment, the routing device can dynamically determine the target tunnel side interface that currently needs to be processed for interface attribute marking during the process of the user exchanging IPV6 messages in the current 6to4 automatic tunnel scenario. That is:
[0076] The routing device receives the IPV6 message that the user needs to communicate with through the user-side chip interface configured by itself, and after receiving the IPV6 message, the routing device parses the address of the user who sent the IPV6 message to determine the IPV4 address in the IPV6 message. Then, the routing device can use the IPV4 address to find the routing exit for forwarding the IPV6 message.
[0077] When the routing device successfully finds a route using the IPv4 address in the IPv6 message, the routing device directly forwards the IPv6 message using the found route exit. When the routing device fails to find a route using the IPv4 address, it immediately triggers ARP learning to determine at least one route exit for forwarding the IPv6 message, and determines the route exit as the target tunnel side interface that currently needs to be processed for interface attribute marking.
[0078] For example, Figure 3 As shown, in the 6to4 automatic tunnel scenario where the routing device is located, user 1: 2002:a01:101:1::2 communicates with user 2: 2002:b01:101:1::2, the tunnel address of the routing device DUT1 is 2002:a01:101::1, and the tunnel address of the routing device DUT2 is 2002:b01:101::1.
[0079] In this way, when user 1 sends an IPV6 message with a destination address of 2002:b01:101:1::2 and it reaches the routing device DUT1, the routing device DUT1 will parse 2002:b01:101:1::2 and get the destination IPV4 address 11.1.1.1. Then, the routing device DUT1 can use the IPV4 address 11.1.1.1 to find a route. If it can be found, it will be forwarded. If it cannot be found, the message will be sent to the software platform to trigger arp learning. After learning through arp that the tunnel side interface of the IPV4 address 11.1.1.1 is gei-0 / 1 / 1 / 1, the routing device DUT1 will encapsulate the IPV6 message in ipv4 and forward it correctly.
[0080] After the encapsulated message reaches the routing device DUT2, if the tunnel side interface gei-0 / 1 / 1 / 4 is set to decapsulate the attribute, the routing device DUT2 needs to decapsulate the message received through the tunnel side interface to restore the inner layer of the IPv6 message. Then the routing device DUT2 forwards the restored IPv6 to send it to user 2.
[0081] Optionally, in some feasible embodiments of the method for processing the tunnel side interface of the present application, when the routing device fails to find a route, triggering ARP learning to determine the operation of at least one target tunnel side interface may include:
[0082] In the event of a failure in finding a route, the IPV6 message is reported to the software platform of the routing device to trigger ARP learning, wherein the software platform performs ARP learning by sending an APR request and receiving a response from the peer device to the APR request, and the target tunnel side interface is the routing interface that receives the response from the peer device.
[0083] In this embodiment, when the routing device fails to find the routing exit using the IPV4 address in the IPV6 message and thus determines that the route search fails, the ARP learning can be automatically triggered by reporting the IPV6 message to a software platform that is specifically responsible for managing the routing device, that is, the ARP learning is performed by sending an ARP request through the software platform and receiving the response made by the peer device of the routing device to the ARP request - the response of the peer device. In this way, the software platform can use the routing interface (also called the routing exit) on the routing device that receives the response of the peer device as the target tunnel side interface that currently needs to be marked with interface attributes, and inform the routing device of the target tunnel side interface.
[0084] Optionally, in some feasible embodiments of the processing method of the tunnel side interface of the present application, the step of reporting the IPv6 message to the software platform to trigger ARP learning may include:
[0085] Adding identification information to the IPV6 message, wherein the identification information includes a message sending reason and a message type;
[0086] The IPV6 message with the identification information added is sent to the software platform to trigger ARP learning, so that the software platform can parse the IPV4 address from the IPV6 message according to the message type, and find the route according to the reason for sending the message and the IPV4 address, so as to perform ARP learning when the route search fails.
[0087] In this embodiment, when the routing device fails to find a route using the IPV4 address in the IPV6 message, and thus reports the IPV6 message to the software platform to automatically trigger ARP learning, it can add identification information including the message sending reason and the message type in the IPV6 message while reporting the IPV6 message, and then send the IPV6 message with the target identification information to the software platform to automatically trigger ARP learning. Based on this, the software platform of the routing device can parse the IPV4 address from the IPV6 message according to the message type in the target identification information, and then find the route according to the message sending reason and the IPV4 address obtained by the analysis in the target identification information to determine whether the routing device has a routing interface for transmitting the IPV6 message in the 6to4 automatic tunnel scenario in which it is located, and send an APR request to perform ARP learning when the routing exit is not found using the IPV4 address and it is determined that the route search fails.
[0088] For example, Figure 4As shown, after receiving the IPV6 message through the device user access side chip, the routing device parses the IPV4 address in the IPV6 address that sends the IPV6 message, and uses the IPV4 address to find out whether there is a routing exit. Then, in the case of finding no routing exit, the IPV6 message is sent to the software platform of the routing device for processing, and the reason for sending the message (6to4 tunnel failed to find a route) and the message type are marked when sending the IPV6 message.
[0089] In this way, after receiving the IPV6 message, the software platform of the routing device records the source IPv4 address information, destination IPv4 address information and message source of the IPV6 message, and uses the destination IPv4 address information to find whether the routing device itself has a routing exit. Therefore, the software platform triggers ARP learning when it finds no routing exit to determine that the route search fails. That is, the software platform sends an ARP request message to the outside. After the ARP request message is sent from gei-0 / 1 / 1 / 1, if the opposite device finds that the ARP request message is the IP address of the requested device, it immediately responds to the opposite device response - ARPreply message. The ARP reply message is sent from gei-0 / 1 / 1 / 4 to gei-0 / 1 / 1 / 1. After gei-0 / 1 / 1 / 1 receives the ARPreply message, it can find that it needs to learn the IP and complete the ARP learning process. In this way, the software device interface records gei-0 / 1 / 1 / 1 as the target tunnel side interface that currently needs to perform attribute tag processing.
[0090] Finally, after the software platform of the routing device learns the destination IPv4 address information and the target tunnel side interface through ARP learning, it matches the corresponding 6to4 tunnel information by associating the source IPv4 address information, and notifies the tunnel module of the routing device of the tunnel port information it has learned.
[0091] It should be noted that, in this embodiment, after the software platform of the routing device determines the target tunnel side interface through arp learning, it can also display information such as the target tunnel side interface and the IPV4 tunnel corresponding to the target tunnel side interface by adding a show command.
[0092] In the embodiment of the present application, the embodiment of the present application first determines at least one target tunnel side interface for forwarding IPV6 messages through a routing device, wherein the IPV6 message is encapsulated as an IPV4 message and transmitted in the IPV4 tunnel corresponding to the target tunnel side interface; then, the tunnel side interface is marked with decapsulation attributes according to the port information of the target tunnel side interface. In this way, compared with the related technology of marking the decapsulation attributes of all interfaces of the routing device in advance, the embodiment of the present application can realize the process of receiving and forwarding IPV6 messages by the routing device, dynamically obtaining the port configuration information of the tunnel side interface, so that only a small amount of ACL resources are consumed to accurately mark the decapsulation attributes of the tunnel side interface, effectively saving the device ACL resources.
[0093] Optionally, in some feasible embodiments of the method for processing the tunnel side interface of the present application, in addition to dynamically determining the target tunnel side interface that currently needs to be processed for interface attribute marking during the process of the user interacting with the IPV6 message in the current 6to4 automatic tunnel scenario, the routing device processing can also determine the target tunnel side interface based on the static configuration performed by the user. That is, before the above-mentioned operation of "determining at least one target tunnel side interface", the method for processing the tunnel side interface of the present application can also include:
[0094] Pre-configuring port configuration information of the at least one target tunnel side interface through a user-defined interface;
[0095] In this embodiment, the user of the routing device (such as a staff member) can manually specify one or more tunnel side ports of the routing device by performing a static configuration operation, which are the target tunnel side interfaces that currently need to be processed with interface attribute marking. That is, the user of the routing device determines one or more target tunnel side interfaces from the multiple tunnel side ports of the routing device in advance, and then statically configures the port configuration information of the one or more target tunnel side interfaces through the user-defined interface, so that the routing device receives the port configuration information through the user-defined interface.
[0096] Based on this, the above operation of “determining at least one target tunnel side interface” may also include:
[0097] The port configuration information is received, and the at least one target tunnel-side interface is determined according to the port configuration information.
[0098] In this embodiment, after receiving the port configuration information generated by the user performing static configuration through the user-defined interface configured by the routing device, the routing device can determine one or more target tunnel-side interfaces manually specified by the user according to the port configuration information.
[0099] For example, Figure 5 As shown, the staff performs static configuration through the user-defined interface configured by the routing device to specify one or more tunnel side interfaces as the target tunnel side interfaces that currently need to be marked with interface attributes. After that, the routing device receives the port configuration information of the target tunnel side interface and sends it to the adaptation layer of the routing device. After receiving the port configuration information, the adaptation layer can parse and identify the operations to be performed and store them as data. After the data is further sent to the driver layer of the routing device for conversion, the chip sending interface can be called to send it down to complete the marking process of the decapsulation attributes of the target tunnel side interface.
[0100] Furthermore, based on the first embodiment of the method for processing the tunnel side interface of the present application, a second embodiment of the method for processing the tunnel side interface of the present application is proposed.
[0101] In the second embodiment of the method for processing the tunnel side interface of the present application, the above-mentioned operation of "marking the decapsulation attribute of the target tunnel side interface according to the port information of the target tunnel side interface" may include:
[0102] Convert the port information of the target tunnel side interface into configuration data of the chip interface;
[0103] The chip sending interface is called to send the configuration data to perform a marking process of decapsulation attributes on the target tunnel side port.
[0104] In this embodiment, when the routing device calls its own driver layer and chip delivery interface to perform decapsulation attribute marking processing on the target tunnel side interface based on the port information of the target tunnel side interface, it can first convert the port information of the target tunnel side interface into chip interface configuration data by calling the driver layer, and the configuration data can be recognized by the chip. Afterwards, the routing device calls the chip delivery interface to deliver the configuration data to implement decapsulation attribute marking processing for the target tunnel side port.
[0105] Optionally, in some feasible embodiments of the method for processing the tunnel side interface of the present application, after performing marking processing of the decapsulation attribute on the target tunnel side interface, the method for processing the tunnel side interface of the present application may further include:
[0106] The received IPV6 message is encapsulated into an IPV4 message, and the IPV4 message is forwarded through the target tunnel side interface, so that the opposite device receiving the IPV4 message can confirm whether to decapsulate the IPV4 message according to the decapsulation attribute marked by the target tunnel side interface.
[0107] In this embodiment, after the routing device completes the marking process of the decapsulation attribute for the above-mentioned target tunnel side interface, the routing device can normally transmit the message data through the target tunnel side interface. That is, after receiving the IPV6 message that the user needs to interact with, the routing device encapsulates the IPV6 message into an IPV4 message in the 6to4 automatic tunnel scenario, and then transmits the IPV4 message to the IPV4 tunnel corresponding to the target tunnel side interface through the target tunnel side interface to forward the IPV4 message. In this way, after receiving the IPV4 message, the opposite device connected to the IPV4 tunnel can further search the tunnel table based on the decapsulation attribute marked by the target tunnel side interface to confirm whether the IPV4 message needs to be decapsulated.
[0108] For example, Figure 4 and Figure 5 As shown, after the routing device receives the port configuration information of the target tunnel side interface through the tunnel module or the user-defined interface, the port information is further sent to the driver layer of the routing device, so that the driver layer can convert the port information into port configuration information that can be recognized by the chip, and send the port configuration data by calling the chip sending interface to achieve the marking processing of the decapsulation attributes for the target tunnel side port.
[0109] After that, after marking the decapsulation attribute for the target tunnel side port so that the chip configuration takes effect, when the routing device forwards the IPV6 message that the user needs to interact with, it first encapsulates the IPV6 message into an IPV4 message, and transmits the IPV4 message to the IPV4 tunnel corresponding to the target tunnel side interface through the target tunnel side interface to forward the IPV4 message. Furthermore, after receiving the IPV4 message, the opposite-end device connected to the IPV4 tunnel needs to look up the tunnel table to confirm whether the IPV4 message needs to be decapsulated, and if it is determined that the decapsulation process needs to be performed, the received IPV4 message is decapsulated to restore the inner IPV6 message, and the restored IPV6 is forwarded to the user.
[0110] In the embodiment of the present application, at least one target tunnel side interface for forwarding IPv6 messages is first determined by a routing device, and then the decapsulation attribute of the tunnel side interface is marked according to the port information of the target tunnel side interface. In this way, the embodiment of the present application can dynamically obtain the port configuration information of the tunnel side interface, so that only a small amount of ACL resources are consumed to accurately mark the decapsulation attributes of the tunnel side interface, effectively saving the device ACL resources.
[0111] In addition, an embodiment of the present application further provides a processing device for a tunnel side interface. The processing device for a tunnel side interface of the present application is also applied to the routing device as described above.
[0112] Please refer to Figure 6 , the processing device of the tunnel side interface of the present application may include:
[0113] a tunnel module, configured to receive first port configuration information, and determine the at least one target tunnel side interface according to the first port configuration information;
[0114] A driver layer, configured to convert the first port configuration information into configuration data of a chip interface;
[0115] The chip sending interface is configured to send the configuration data to perform marking processing of the decapsulation attributes.
[0116] Optionally, in some feasible embodiments of the processing device of the tunnel side interface of the present application, the processing device of the tunnel side interface of the present application may further include:
[0117] The software platform is configured to send out an APR request and receive a peer device response to the APR request to perform ARP learning to generate the first port configuration information, and the target tunnel side interface is a routing interface that receives the peer device response.
[0118] In addition, an embodiment of the present application also provides another tunnel side interface processing device, and the other tunnel side interface processing device is also applied to the routing device as described above.
[0119] Please refer to Figure 7 , another processing device of the tunnel side interface in the present application may include:
[0120] an adaptation layer, configured to receive second port configuration information, and determine the at least one target tunnel side interface according to the second port configuration information;
[0121] A driver layer, configured to convert the first port configuration information into configuration data of a chip interface;
[0122] The chip sending interface is configured to send the configuration data to perform marking processing of the decapsulation attributes.
[0123] Optionally, in some feasible embodiments of another processing device for a tunnel side interface of the present application, the processing device for another tunnel side interface may further include:
[0124] The user-defined interface is configured to receive a user's static configuration to generate the second port configuration information.
[0125] The processing device of the tunnel side interface provided in the embodiment of the present application adopts the processing method of the tunnel side interface in the above embodiment to first determine at least one target tunnel side interface for forwarding IPV6 messages through a routing device, wherein the IPV6 message is encapsulated as an IPV4 message and transmitted in the IPV4 tunnel corresponding to the target tunnel side interface; thereafter, the tunnel side interface is marked with decapsulation attributes according to the port information of the target tunnel side interface. Compared with the related art, the beneficial effects of the processing device of the tunnel side interface provided in the embodiment of the present application are the same as the beneficial effects of the processing method of the tunnel side interface provided in the above embodiment, and other technical features in the processing device of the tunnel side interface are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0126] In addition, an embodiment of the present application also provides a communication device, which includes: a processing device for the tunnel side interface as described above, a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the computer program is configured to implement the steps of the processing method for the tunnel side interface as described above.
[0127] In addition, an embodiment of the present application further provides a storage medium, which is a computer-readable storage medium, and stores a computer program on the storage medium. When the computer program is executed by a processor, the steps of the processing method of the tunnel side interface as described above are implemented.
[0128] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system 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 system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0129] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0130] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for processing a tunnel side interface, characterized in that: Applied to a routing device, the method comprises: Determine at least one target tunnel side interface, the target tunnel side interface is used to forward the IPv6 message, the IPv6 message is encapsulated as an IPv4 message and transmitted in the IPv4 tunnel corresponding to the target tunnel side interface; The target tunnel side interface is subjected to a marking process of decapsulation attributes according to the port information of the target tunnel side interface.
2. The method for processing a tunnel side interface according to claim 1, characterized in that: Determining at least one target tunnel side interface includes: Find the route based on the IPv4 address in the received IPv6 message; In the case where route lookup fails, ARP learning is triggered to determine the at least one target tunnel-side interface.
3. The method for processing a tunnel side interface according to claim 2, characterized in that: In the case of a route search failure, triggering ARP learning to determine the at least one target tunnel side interface comprises: In the event of a failure in finding a route, the IPV6 message is reported to the software platform of the routing device to trigger ARP learning, wherein the software platform performs ARP learning by sending an APR request and receiving a response from the peer device to the APR request, and the target tunnel side interface is the routing interface that receives the response from the peer device.
4. The method for processing a tunnel side interface according to claim 3, characterized in that: Reporting the IPv6 message to the software platform to trigger ARP learning includes: Adding identification information to the IPV6 message, wherein the identification information includes a message sending reason and a message type; The IPV6 message with the identification information added is sent to the software platform to trigger ARP learning, so that the software platform can parse the IPV4 address from the IPV6 message according to the message type, and find the route according to the reason for sending the message and the IPV4 address, so as to perform ARP learning when the route search fails.
5. The method for processing a tunnel side interface according to claim 1, characterized in that: Before determining at least one target tunnel side interface, the method further includes: Pre-configuring port configuration information of the at least one target tunnel side interface through a user-defined interface; Determining at least one target tunnel side interface includes: The port configuration information is received, and the at least one target tunnel-side interface is determined according to the port configuration information.
6. The method for processing a tunnel side interface according to any one of claims 1 to 5, characterized in that: The method further comprises: performing a marking process of decapsulating the target tunnel side interface according to the port information of the target tunnel side interface, comprising: Convert the port information of the target tunnel side interface into configuration data of the chip interface; The chip sending interface is called to send the configuration data to perform a marking process of decapsulation attributes on the target tunnel side port.
7. The method for processing a tunnel side interface according to any one of claims 1 to 5, characterized in that: After performing a marking process of decapsulation attribute on the target tunnel side interface, the method further includes: The received IPV6 message is encapsulated into an IPV4 message, and the IPV4 message is forwarded through the target tunnel side interface, so that the opposite device receiving the IPV4 message can confirm whether to decapsulate the IPV4 message according to the decapsulation attribute marked by the target tunnel side interface.
8. A processing device for a tunnel side interface, characterized in that: Applied to a routing device, the device comprises: a tunnel module, configured to receive first port configuration information, and determine the at least one target tunnel side interface according to the first port configuration information; A driver layer, configured to convert the first port configuration information into configuration data of a chip interface; The chip sending interface is configured to send the configuration data to perform marking processing of the decapsulation attributes.
9. The processing device for the tunnel side interface according to claim 8, characterized in that: The device also includes: The software platform is configured to send out an APR request and receive a peer device response to the APR request to perform ARP learning to generate the first port configuration information, and the target tunnel side interface is a routing interface that receives the peer device response.
10. A processing device for a tunnel side interface, characterized in that: Applied to a routing device, the device comprises: an adaptation layer, configured to receive second port configuration information, and determine the at least one target tunnel side interface according to the second port configuration information; A driver layer, configured to convert the first port configuration information into configuration data of a chip interface; The chip sending interface is configured to send the configuration data to perform marking processing of the decapsulation attributes.
11. The processing device for a tunnel side interface according to claim 10, characterized in that: The device also includes: The user-defined interface is configured to receive a user's static configuration to generate the second port configuration information.
12. A communication device, characterized in that: The communication device includes: a processing device for the tunnel side interface as described in claim 8, a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the processing method for the tunnel side interface as described in any one of claims 1 to 7.
13. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the method for processing a tunnel side interface according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Method for forwarding IPv6 multicast report between 6to4 networks and 6to4 device
CN101383834A
Methods, devices, and packet forwarding methods for implementing 6to4 relay routing
CN102291305A
Message monitoring method and device
CN106385344A
Group strategy implementation method based on VXLAN, network equipment and group strategy implementation system
CN110650075A
Communication system, method and device, equipment and storage medium
CN113709016A
