Network communication method, device, electronic device and computer readable storage medium
By configuring the mapping relationship between MPLS tags and pseudo SIDs and the mapping relationship between SIDs and pseudo MPLS tags, the communication problem between SRv6 network and MPLS network is solved, direct and simple network interoperability is achieved, and transmission efficiency is improved.
Patent Information
- Application Number
- CN202111145515.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-28
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2041-09-28
AI Technical Summary
It is difficult to communicate directly and simply between the SRv6 network and the MPLS network, and the prior art solutions have problems of wasted equipment resources and cumbersome steps.
By preconfiguring the mapping relationship between the MPLS tag and the pseudo SID, and the mapping relationship between the SID and the pseudo MPLS tag, the MPLS network edge device can receive SRv6 messages from the SRv6 network and convert them into MPLS messages, or enable the SRv6 network edge device to receive MPLS messages from the MPLS network and convert them into SRv6 messages.
It realizes direct and simple communication between the SRv6 network and the MPLS network, and can identify heterogeneous network devices without additional routing computing engines, reducing the length of transmission messages and improving transmission efficiency.
Smart Images

Figure CN115914068B_ABST
Abstract
Description
Background Art
[0002] Segment Routing (SR) is a tunneling technology based on source routing. It selects a forwarding path based on the source information and encapsulates the path information to the destination address and the network information of the destination address in the header of the message. Segment routing can be applied to two types of networks: one is segment routing based on MPLS (Multi-Protocol Label Switching), referred to as SR-MPLS; the other is segment routing based on IPv6, referred to as SRv6. SR-MPLS networks have been deployed in large quantities. If SRv6 networks need to be incrementally deployed on this basis, SRv6 networks need to coexist and communicate with MPLS networks. However, due to the differences in data planes, the two networks have their own transmission message formats, and SRv6 networks cannot directly or simply communicate with MPLS networks.
[0003] At present, in the related technology, the communication between SRv6 network and MPLS network is established by establishing VPN (Virtual Private Network) or message mutual encapsulation. Among them, the solution of establishing VPN needs to plan and configure IP address and VRF (Virtual Routing Forwarding) on the newly established virtual link, which has the problem of waste of equipment resources; and the solution of message mutual encapsulation needs to encapsulate the header that can be recognized by the other end during communication, which has the problem of cumbersome steps.
[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0005] The present disclosure provides a network communication method, device, electronic device and computer-readable storage medium, which at least to a certain extent overcome the technical problem in the related art that it is difficult to directly and simply communicate between an SRv6 network and an MPLS network.
[0006] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.
[0007] According to one aspect of the present disclosure, a network communication method is provided, comprising: receiving an SRv6 message from an SRv6 network, wherein the SRv6 message carries a SID of an SRv6 device or a pseudo SID of an MPLS device; when the SRv6 message carries the pseudo SID, based on a pre-configured mapping relationship between an MPLS label and the pseudo SID, converting the SRv6 message into an MPLS message; and sending the converted MPLS message to the MPLS network.
[0008] In one embodiment of the present disclosure, the method further includes: flooding pseudo SIDs corresponding to one or more MPLS devices in the SRv6 network, wherein each MPLS device corresponds to an MPLS label in the MPLS network.
[0009] In one embodiment of the present disclosure, the method also includes: allocating a pseudo SID to an MPLS device that only supports the MPLS communication protocol in the MPLS network; constructing a first mapping table based on the MPLS labels of each MPLS device and the corresponding pseudo SID, wherein the first mapping table includes: a mapping relationship between the MPLS label and the pseudo SID.
[0010] In one embodiment of the present disclosure, after receiving the SRv6 message from the SRv6 network, the method further includes: judging whether the SRv6 message carries a pseudo SID based on the first mapping table.
[0011] In one embodiment of the present disclosure, based on a pre-configured mapping relationship between an MPLS label and a pseudo SID, the SRv6 message is converted into an MPLS message, including: querying the MPLS label corresponding to the pseudo SID from the first mapping table; deleting the SRv6 header in the SRv6 message, adding an MPLS header, and obtaining a corresponding MPLS message, wherein the MPLS header contains the MPLS label corresponding to the pseudo SID.
[0012] According to another aspect of the present disclosure, a network communication method is also provided, including: receiving an MPLS message from an MPLS network, wherein the MPLS message carries an MPLS label of an MPLS device or a pseudo MPLS label of an SRv6 device; when the MPLS message carries the pseudo MPLS label, based on a pre-configured mapping relationship between a SID and the pseudo MPLS label, converting the MPLS message into an SRv6 message; and sending the converted SRv6 message to the SRv6 network.
[0013] In one embodiment of the present disclosure, the method further includes: flooding pseudo MPLS labels corresponding to one or more SRv6 devices in the MPLS network, wherein each SRv6 device corresponds to a SID in the SRv6 network.
[0014] In one embodiment of the present disclosure, the method also includes: allocating pseudo-MPLS labels to SRv6 devices that only support the SRv6 communication protocol in the SRv6 network; constructing a second mapping table based on the SID of each SRv6 device and the corresponding pseudo-MPLS label, wherein the second mapping table contains: a mapping relationship between the SID and the pseudo-MPLS label.
[0015] In one embodiment of the present disclosure, after receiving an MPLS message from an MPLS network, the method further includes: judging whether the MPLS message carries a pseudo MPLS label based on the second mapping table.
[0016] In one embodiment of the present disclosure, based on a pre-configured mapping relationship between a SID and a pseudo MPLS label, the MPLS message is converted into an SRv6 message, including: querying the SID corresponding to the pseudo MPLS label from the second mapping table; deleting the MPLS header of the MPLS message, adding a SID header, and obtaining a corresponding SID message, wherein the SID header contains the SID corresponding to the pseudo MPLS label.
[0017] According to another aspect of the present disclosure, a network communication device is also provided, including: a first message receiving module, used to receive an SRv6 message from an SRv6 network, wherein the SRv6 message carries the SID of the SRv6 device or the pseudo-SID of the MPLS device; a first message conversion module, used to convert the SRv6 message into an MPLS message based on a pre-configured mapping relationship between the MPLS label and the pseudo-SID when the SRv6 message carries the pseudo-SID; and a first message forwarding module, used to send the converted MPLS message to the MPLS network.
[0018] According to another aspect of the present disclosure, a network communication device is also provided, including: a second message receiving module, used to receive an MPLS message from an MPLS network, wherein the MPLS message carries an MPLS label of an MPLS device or a pseudo MPLS label of an SRv6 device; a second message conversion module, used to convert the MPLS message into an SRv6 message based on a pre-configured mapping relationship between a SID and the pseudo MPLS label when the MPLS message carries the pseudo MPLS label; and a second message forwarding module, used to send the converted SRv6 message to the SRv6 network.
[0019] According to another aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any one of the above-mentioned network communication methods by executing the executable instructions.
[0020] According to another aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the network communication method described in any one of the above is implemented.
[0021] The network communication method, device, electronic device and computer-readable storage medium provided by the embodiments of the present disclosure pre-configure the mapping relationship between MPLS labels and pseudo-SIDs, and the mapping relationship between SIDs and pseudo-MPLS labels, so that after receiving an SRv6 message from an SRv6 network, the edge device of the MPLS network converts the SRv6 message into an MPLS message based on the pre-configured mapping relationship between MPLS labels and pseudo-SIDs, and sends the message to the MPLS network; or after receiving an MPLS message from an MPLS network, the edge device of the SRv6 network converts the MPLS message into an SRv6 message based on the pre-configured mapping relationship between SIDs and pseudo-MPLS labels, and sends the message to the SRv6 network. The embodiments of the present disclosure can directly and simply realize the communication between the SRv6 network and the MPLS network, and can realize the identification of heterogeneous network devices by configuring pseudo-labels and pseudo-SIDs without using an additional routing calculation engine.
[0022] Furthermore, the conversion of different network messages is achieved by decapsulating and then re-capsulating the message, which reduces the message length of the transmitted message and improves the transmission efficiency.
[0023] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0025] Figure 1 A schematic diagram of a network communication system architecture in an embodiment of the present disclosure is shown;
[0026] Figure 2 A flow chart of a network communication method from an SRv6 network to an MPLS network in an embodiment of the present disclosure is shown;
[0027] Figure 3 An optional flow chart of a network communication method from an SRv6 network to an MPLS network in an embodiment of the present disclosure is shown;
[0028] Figure 4 A flow chart of a network communication method from an MPLS network to an SRv6 network in an embodiment of the present disclosure is shown;
[0029] Figure 5 An optional flow chart of a network communication method from an MPLS network to an SRv6 network in an embodiment of the present disclosure is shown;
[0030] Figure 6 A network schematic diagram according to an embodiment of the present disclosure is shown;
[0031] Figure 7 A label mapping flow chart according to an embodiment of the present disclosure is shown;
[0032] Figure 8 A message forwarding flow chart according to an embodiment of the present disclosure is shown;
[0033] Fig. 9 A schematic diagram of a network communication device in an embodiment of the present disclosure is shown;
[0034] Fig.10 A schematic diagram of another network communication device in an embodiment of the present disclosure is shown;
[0035] Fig.11 A structural block diagram of an electronic device in an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0036] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0037] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0038] For ease of understanding, several terms involved in the present disclosure are explained below:
[0039] MPLS: The full name is Multi-Protocol Label Switching, which is a new technology that uses labels to guide high-speed and efficient data transmission on an open communication network. Multi-protocol means that MPLS can not only support multiple network layer protocols, but also be compatible with multiple data link layer technologies.
[0040] SR: The full name is Segment Routing, which is a new MPLS technology. The control plane is implemented based on the IGP (Interior Gateway Protocols) extension, and the forwarding layer is implemented based on the MPLS forwarding network. A segment is presented as an MPLS label at the forwarding layer.
[0041] IPv6: The full name is Internet Protocol Version 6, which is the next-generation IP protocol designed by the Internet Engineering Task Force to replace IPv4.
[0042] SRv6: The full name is Segment Routing IPv6, which is a combination of SR and IPv6 network technologies.
[0043] SID: The full name is Segment ID. It is a special IPv6 address used to uniquely identify each segment in SRv6. It has both the routing capabilities of a common IPv6 address and the behavior capabilities unique to SRv6.
[0044] Figure 1 A schematic diagram of a network communication system architecture in an embodiment of the present disclosure is shown. The network communication method and device provided in the embodiment of the present disclosure can be applied but not limited to Figure 1 A network communication system is shown.
[0045] like Figure 1 As shown, the network communication system includes: a first network 101 and a second network 102; wherein the first network 101 includes: a first edge device 1011 and a first core device 1012; the second network 102 includes: a second edge device 1021 and a second core device 1022.
[0046] In the embodiment of the present disclosure, the first network 101 and the second network 102 refer to networks using different communication protocols. The first edge device 1011 and the second edge device 1021 refer to network devices that support both the first network 101 communication protocol and the second network 102 communication protocol; the first core device 1012 refers to a network device that only supports the first network 101 communication protocol; and the second core device 1022 refers to a network device that only supports the second network 102 communication protocol.
[0047] In one embodiment of the present disclosure, the first network 101 may be an SRv6 network, and the second network 102 may be an MPLS network; in another embodiment of the present disclosure, the first network 101 may be an MPLS network, and the second network 102 may be an SRv6 network.
[0048] Taking the first network 101 as an SRv6 network and the second network as an MPLS network as an example, a pseudo MPLS label can be assigned to the SRv6 device (i.e., the first core device 1012) in the SRv6 network that only supports the SRv6 communication protocol; at the same time, a pseudo SID can be assigned to the MPLS device (i.e., the second core device 1022) in the MPLS network that only supports the MPLS communication protocol.
[0049] Furthermore, one or more pseudo SIDs corresponding to the second core devices 1022 are flooded in the SRv6 network so that the first edge device 1011 receives the MPLS message from the MPLS network, and when the MPLS message carries a pseudo MPLS label, the MPLS message is converted into an SRv6 message based on the pre-configured mapping relationship between the SID and the pseudo MPLS label; and the converted SRv6 message is sent to the first core device 1012 in the SRv6 network, so as to realize data transmission from the MPLS network to the SRv6 network.
[0050] Furthermore, the pseudo MPLS labels corresponding to one or more first core devices 1012 are flooded in the MPLS network so that the second edge device 1021 receives the SRv6 message from the SRv6 network, and when the SRv6 message carries a pseudo SID, the SRv6 message is converted into an MPLS message based on a pre-configured mapping relationship between the MPLS label and the pseudo SID; and the converted MPLS message is sent to the second core device 1022 in the MPLS network, so as to realize data transmission from the SRv6 network to the MPLS network.
[0051] Those skilled in the art will know that Figure 1 The number of networks, edge devices, and core devices shown in the figure is only for illustration, and any number of networks, edge devices, and core devices may be provided according to actual needs, and the embodiments of the present disclosure are not limited thereto.
[0052] The present exemplary implementation is described in detail below with reference to the accompanying drawings and embodiments.
[0053] First, an embodiment of the present disclosure provides a network communication method from an SRv6 network to an MPLS network, which can be executed by any electronic device with computing and processing capabilities.
[0054] Figure 2 A flow chart of a network communication method from an SRv6 network to an MPLS network in an embodiment of the present disclosure is shown. Figure 2 As shown, the network communication method includes the following steps:
[0055] Step S202: receiving an SRv6 message from the SRv6 network, wherein the SRv6 message carries a SID of the SRv6 device or a pseudo SID of the MPLS device;
[0056] Step S204: when the SRv6 message carries the pseudo SID, the SRv6 message is converted into an MPLS message based on a pre-configured mapping relationship between the MPLS label and the pseudo SID;
[0057] Step S206: Send the converted MPLS message to the MPLS network.
[0058] It should be noted that the solution provided in the above steps S202 to S206 can be executed in the edge device of the MPLS network. When the edge device of the MPLS network receives the SRv6 message from the SRv6 network, it determines whether the SRv6 message carries a pseudo SID. When the SRv6 message carries a pseudo SID, based on the pre-configured mapping relationship between the MPLS label and the pseudo SID, the SRv6 message is converted into an MPLS message, and the converted MPLS message is sent to other network devices in the MPLS network.
[0059] Since devices in the MPLS network that do not support the SRv6 communication protocol cannot be treated as nodes by the SRv6 network, in order to achieve communication between the SRv6 network and the MPLS network, it is necessary to pre-allocate pseudo SIDs for one or more MPLS devices in the MPLS network that only support the MPLS communication protocol, and flood the pseudo SIDs corresponding to each MPLS device in the SRv6 network so that the SRv6 message can be decapsulated, re-encapsulated as an MPLS message, and sent to the MPLS network.
[0060] Furthermore, in order to identify whether an SRv6 message carries a pseudo SID, in one embodiment of the present disclosure, after allocating a pseudo SID to one or more MPLS devices that only support the MPLS communication protocol in the MPLS network, a first mapping table can be constructed based on the MPLS label of the MPLS device and the corresponding pseudo SID, so as to determine whether the SRv6 message carries a pseudo SID after receiving an SRv6 message from the SRv6 network; if the SID carried by the current SRv6 message is in the first mapping table, it indicates that the SID carried by the current SRv6 message is a pseudo SID; if the SID carried by the current SRv6 message is not in the first mapping table, it indicates that the SID carried by the current SRv6 message is not a pseudo SID, but a real SID of the SRv6 device.
[0061] In one embodiment of the present disclosure, the above step S204 can be implemented by the following steps: querying the MPLS label corresponding to the pseudo SID from the first mapping table; deleting the SRv6 header in the SRv6 message, adding an MPLS header containing the MPLS label corresponding to the pseudo SID, and obtaining the corresponding MPLS message. It can be seen that the embodiment of the present disclosure can realize the format conversion of messages transmitted by different networks by simply decapsulating and recapsulating the message, thereby quickly realizing the communication between the SRv6 network and the MPLS network.
[0062] Figure 3 A flowchart of an optional network communication method from an SRv6 network to an MPLS network in an embodiment of the present disclosure is shown. Figure 3 As shown, the network communication method from the SRv6 network to the MPLS network provided in the embodiment of the present disclosure may include the following steps:
[0063] Step S302, allocating a pseudo SID to an MPLS device that only supports the MPLS communication protocol in the MPLS network;
[0064] Step S304: construct a first mapping table according to the MPLS labels of each MPLS device and the corresponding pseudo SID, wherein the first mapping table includes: a mapping relationship between the MPLS label and the pseudo SID;
[0065] Step S306, flooding the pseudo SIDs corresponding to one or more MPLS devices in the SRv6 network, wherein each MPLS device corresponds to an MPLS label in the MPLS network;
[0066] Step S308: receiving an SRv6 message from the SRv6 network, wherein the SRv6 message carries the SID of the SRv6 device or the pseudo SID of the MPLS device;
[0067] Step S310: Based on the first mapping table, determine whether the SRv6 message carries a pseudo SID.
[0068] Step S312: when the SRv6 message carries a pseudo SID, query the MPLS label corresponding to the pseudo SID from the first mapping table;
[0069] Step S314, deleting the SRv6 header in the SRv6 message, adding an MPLS header, and obtaining a corresponding MPLS message, wherein the MPLS header includes an MPLS label corresponding to the pseudo SID; and
[0070] Step S316: Send the converted MPLS message to the MPLS network.
[0071] Secondly, the embodiment of the present disclosure also provides a network communication method from an MPLS network to an SRv6 network, which can also be executed by any electronic device with computing and processing capabilities.
[0072] Figure 4 A flow chart of a network communication method from an MPLS network to an SRv6 network in an embodiment of the present disclosure is shown. Figure 4 As shown, the network communication method includes the following steps:
[0073] Step S402: receiving an MPLS message from an MPLS network, wherein the MPLS message carries an MPLS label of an MPLS device or a pseudo MPLS label of an SRv6 device;
[0074] Step S404: when the MPLS message carries a pseudo MPLS label, convert the MPLS message into an SRv6 message based on a pre-configured mapping relationship between the SID and the pseudo MPLS label; and
[0075] Step S406: Send the converted SRv6 message to the SRv6 network.
[0076] It should be noted that the solution provided in the above steps S402 to S406 can be executed in the edge device of the SRv6 network. When the edge device of the SRv6 network receives an MPLS message from the MPLS network, it determines whether the MPLS message carries a pseudo MPLS label. When the MPLS message carries a pseudo MPLS label, based on the pre-configured mapping relationship between the SID and the pseudo MPLS label, the MPLS message is converted into an SRv6 message, and the converted SRv6 message is sent to the SRv6 network.
[0077] In order to realize the communication between the MPLS network and the SRv6 network, it is necessary to pre-allocate pseudo MPLS labels for the SRv6 devices that only support the SRv6 communication protocol in the SRv6 network, and flood the pseudo MPLS labels corresponding to one or more SRv6 devices in the MPLS network so as to decapsulate the MPLS packets, re-encapsulate them into SID packets, and send them to the SID network.
[0078] Furthermore, in order to identify whether an MPLS packet carries a pseudo MPLS label, in one embodiment of the present disclosure, after allocating a pseudo MPLS label to one or more SRv6 devices that only support the SRv6 communication protocol in the SRv6 network, a second mapping table can be constructed based on the SID of each SRv6 device and the corresponding pseudo MPLS label, so that after receiving an MPLS packet from the MPLS network, it is possible to determine whether the MPLS packet carries a pseudo MPLS label based on the second mapping table; if the MPLS label carried by the current MPLS packet is in the second mapping table, it indicates that the MPLS label carried by the current MPLS packet is a pseudo MPLS label; if the MPLS label carried by the current MPLS packet is not in the second mapping table, it indicates that the MPLS label carried by the current MPLS packet is not a pseudo MPLS label, but a real MPLS label of the MPLS device.
[0079] In one embodiment of the present disclosure, the above step S404 can be implemented by the following steps: querying the SID corresponding to the pseudo MPLS label from the second mapping table; deleting the MPLS header of the MPLS message, and adding a SID header containing the SID corresponding to the pseudo MPLS label.
[0080] Figure 5 A flowchart of an optional network communication method from an MPLS network to an SRv6 network in an embodiment of the present disclosure is shown. Figure 5 As shown, the network communication method may include the following steps:
[0081] Step S502, allocating a pseudo MPLS label to an SRv6 device that only supports the SRv6 communication protocol in the SRv6 network;
[0082] Step S504: construct a second mapping table according to the SID of each SRv6 device and the corresponding pseudo MPLS label, wherein the second mapping table includes: a mapping relationship between the SID and the pseudo MPLS label;
[0083] Step S506, flooding the pseudo MPLS labels corresponding to one or more SRv6 devices in the MPLS network, wherein each SRv6 device corresponds to a SID in the SRv6 network;
[0084] Step S508: receiving an MPLS message from the MPLS network, wherein the MPLS message carries an MPLS label of an MPLS device or a pseudo MPLS label of an SRv6 device;
[0085] Step S510: judging whether the MPLS message carries a pseudo MPLS label based on the second mapping table;
[0086] Step S512: when the MPLS message carries a pseudo MPLS label, query the SID corresponding to the pseudo MPLS label from the second mapping table;
[0087] Step S514, deleting the MPLS header of the MPLS message, adding the SID header, and obtaining a corresponding SID message, wherein the SID header includes the SID corresponding to the pseudo MPLS label;
[0088] Step S516: Send the converted SRv6 message to the SRv6 network.
[0089] As can be seen from the above, the network communication method provided in the embodiment of the present disclosure realizes the intercommunication between the SRV6 network and the MPLS network based on message conversion, and can realize the communication from the SRV6 network to the MPLS network, and can also realize the communication from the MPLS network to the SRV6 network. In the specific implementation, it mainly includes the following three aspects:
[0090] ① Label mapping: Configure the mapping relationship between MPLS labels and SRv6 SIDs. In an SRv6 network, flood the pseudo SIDs corresponding to the MPLS device labels; in an MPLS network, flood the pseudo MPLS labels corresponding to the SRv6 devices. Pseudo SIDs and pseudo MPLS labels can be specified manually or automatically assigned by the system, and ensure that there are no conflicts or overlaps, otherwise the configuration will be rejected.
[0091] ② Message reception and judgment: Receive the message and determine whether to convert the message based on the label mapping relationship.
[0092] ③ Message conversion and transmission: Flood the pseudo SID corresponding to the MPLS device label in the SRv6 network. When the message of the SRv6 network reaches the border router of the MPLS network, the border router converts the SRv6 message into an MPLS message according to the pre-configured mapping relationship between the pseudo SID and the MPLS label; Flood the MPLS pseudo label corresponding to the SRv6 device in the MPLS network. When the message of the MPLS network reaches the border router of the SRv6 network, the border router converts the MPLS message into an SRv6 message according to the pre-configured mapping relationship between the pseudo MPLS label and the SID.
[0093] The network communication method provided in the embodiment of the present disclosure can realize the identification of heterogeneous network devices by configuring pseudo labels and pseudo SIDs without using an additional routing calculation engine, thereby planning the optimal path; the conversion of different network messages is realized by decapsulating and re-encapsulating the messages, thereby reducing the message length of the transmitted messages and improving the transmission efficiency.
[0094] Below Figure 6 Taking the network shown in FIG. 1 as an example, the network communication method provided in the embodiment of the present disclosure is described in detail. Figure 6 As shown, nodes 1, 2, 6, and 7 in the network only support the SRv6 communication protocol, node 4 only supports the MPLS communication protocol, and nodes 3 and 5 serve as border routers and support both MPLS and SRv6 communication protocols.
[0095] In one embodiment of the present disclosure, Figure 7 The label mapping process shown in the figure implements the configuration of label mapping relationship, such as Figure 7 As shown, first, the mapping server function is configured on node 3, pseudo SIDs are allocated to nodes 4 and 5, and flooded to nodes 1 and 2; then the mapping server function is configured on node 5, pseudo labels are allocated to nodes 6 and 7, and flooded to nodes 4 and 3. Tables 1 and 2 show a possible configuration result.
[0096] Table 1 Label mapping relationship configured in node 3
[0097] MPLS Labels Pseudo SID 16004 B:4:End:: 16005 B:5:End::
[0098] Table 2 Label mapping relationship configured in node 5
[0099] SID Pseudo Labels B:6:End:: 16006 B:7:DT4:: 16007
[0100] Figure 8 A message forwarding flow chart of an embodiment of the present disclosure is shown as follows: Figure 8 As shown, nodes 1, 2, and 3 exchange messages through the SRv6 network. After receiving the message, node 3 searches the label mapping table and finds that B:4:End:: is a pseudo SID, corresponding to the MPLS label 16004 in the mapping table. Therefore, the SRv6 header in the message is deleted, the MPLS header is added, and the MPLS header is pushed in according to the mapping relationship. After the message reaches node 5, the label mapping table is searched and it is found that 16006 is a pseudo label, corresponding to B:6:End:: in the mapping table. Therefore, the MPLS header in the message is deleted, and the SRv6 header is added, and the corresponding SID is installed. After the message reaches node 7, all headers are popped out.
[0101] Based on the same inventive concept, the present disclosure also provides a network communication device in the following embodiments. Figure 2 The network communication method shown is similar, so the implementation of the device embodiment can refer to the implementation of the above method embodiment, and the repeated parts will not be repeated.
[0102] Fig. 9 A schematic diagram of a network communication device in an embodiment of the present disclosure is shown. Fig. 9 As shown, the device includes: a first message receiving module 901, a first message converting module 902 and a first message forwarding module 903.
[0103] Among them, the first message receiving module 901 is used to receive the SRv6 message from the SRv6 network, wherein the SRv6 message carries the SID of the SRv6 device or the pseudo SID of the MPLS device; the first message conversion module 902 is used to convert the SRv6 message into an MPLS message based on the pre-configured mapping relationship between the MPLS label and the pseudo SID when the SRv6 message carries the pseudo SID; the first message forwarding module 903 is used to send the converted MPLS message to the MPLS network.
[0104] In one embodiment of the present disclosure, the network communication device provided in the embodiment of the present disclosure further includes: a pseudo SID broadcast module 904. The pseudo SID broadcast module 904 can be used to flood pseudo SIDs corresponding to one or more MPLS devices in the SRv6 network, wherein each MPLS device corresponds to an MPLS label in the MPLS network.
[0105] In one embodiment of the present disclosure, the network communication device provided in the embodiment of the present disclosure further includes: a pseudo SID allocation module 905 and a first mapping table construction module 906. The pseudo SID allocation module 905 is used to allocate a pseudo SID to an MPLS device that only supports the MPLS communication protocol in the MPLS network; the first mapping table construction module 906 is used to construct a first mapping table according to the MPLS labels of each MPLS device and the corresponding pseudo SID, wherein the first mapping table contains: a mapping relationship between the MPLS label and the pseudo SID.
[0106] In one embodiment of the present disclosure, the network communication device provided in the embodiment of the present disclosure further includes: a pseudo SID identification module 907. The pseudo SID identification module 907 is used to determine whether the SRv6 message carries a pseudo SID based on the first mapping table.
[0107] In one embodiment of the present disclosure, in the above-mentioned network communication device provided in the embodiment of the present disclosure, the first message conversion module 902 is also used to: query the MPLS label corresponding to the pseudo SID from the first mapping table; and delete the SRv6 header in the SRv6 message, add the MPLS header, and obtain the corresponding MPLS message, wherein the MPLS header contains the MPLS label corresponding to the pseudo SID.
[0108] Based on the same inventive concept, the present disclosure also provides a network communication device in the following embodiments. Figure 4 The network communication method shown is similar, so the implementation of the device embodiment can refer to the implementation of the above method embodiment, and the repeated parts will not be repeated.
[0109] Fig.10 A schematic diagram of a network communication device in an embodiment of the present disclosure is shown. Fig.10 As shown, the device includes: a second message receiving module 1001, a second message conversion module 1002 and a second message forwarding module 1003.
[0110] Among them, the second message receiving module 1001 is used to receive an MPLS message from an MPLS network, wherein the MPLS message carries an MPLS label of an MPLS device or a pseudo MPLS label of an SRv6 device; the second message conversion module 1002 is used to convert the MPLS message into an SRv6 message based on a pre-configured mapping relationship between a SID and a pseudo MPLS label when the MPLS message carries a pseudo MPLS label; the second message forwarding module 1003 is used to send the converted SRv6 message to the SRv6 network.
[0111] In one embodiment of the present disclosure, the network communication device provided in the embodiment of the present disclosure further includes: a pseudo MPLS label broadcast module 1004. The pseudo MPLS label broadcast module 1004 is used to flood the pseudo MPLS labels corresponding to one or more SRv6 devices in the MPLS network, wherein each SRv6 device corresponds to a SID in the SRv6 network.
[0112] In one embodiment of the present disclosure, the network communication device provided in the embodiment of the present disclosure further includes: a pseudo MPLS label allocation module 1005 and a second mapping table construction module 1006. The pseudo MPLS label allocation module 1005 is used to allocate pseudo MPLS labels to SRv6 devices that only support the SRv6 communication protocol in the SRv6 network; the second mapping table construction module 1006 is used to construct a second mapping table according to the SID of each SRv6 device and the corresponding pseudo MPLS label, wherein the second mapping table contains: a mapping relationship between the SID and the pseudo MPLS label.
[0113] In one embodiment of the present disclosure, the network communication device provided in the embodiment of the present disclosure further includes: a pseudo MPLS label identification module 1007. The pseudo MPLS label identification module 1007 is used to determine whether the MPLS message carries a pseudo MPLS label based on the second mapping table.
[0114] In one embodiment of the present disclosure, in the above-mentioned network communication device provided in the embodiment of the present disclosure, the second message conversion module 1002 is also used to query the SID corresponding to the pseudo MPLS label from the second mapping table; and delete the MPLS: header of the MPLS message, add the SID header, and obtain the corresponding SID message, wherein the SID header contains the SID corresponding to the pseudo MPLS label.
[0115] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".
[0116] Refer to the following Fig.11 1100 according to this embodiment of the present disclosure is described. Fig.11 The electronic device 1100 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0117] like Fig.11 As shown, the electronic device 1100 is in the form of a general computing device. The components of the electronic device 1100 may include but are not limited to: at least one processing unit 1110, at least one storage unit 1120, and a bus 1130 connecting different system components (including the storage unit 1120 and the processing unit 1110).
[0118] The storage unit stores program codes, which can be executed by the processing unit 1110, so that the processing unit 1110 executes the steps described in the above “exemplary method” section of this specification according to various exemplary embodiments of the present disclosure. For example, the processing unit 1110 can execute the following steps of the above method embodiment: receiving an SRv6 message from an SRv6 network, wherein the SRv6 message carries the SID of the SRv6 device or the pseudo-SID of the MPLS device; when the SRv6 message carries the pseudo-SID, based on a pre-configured mapping relationship between the MPLS label and the pseudo-SID, converting the SRv6 message into an MPLS message; and sending the converted MPLS message to the MPLS network; or, receiving an MPLS message from an MPLS network, wherein the MPLS message carries the MPLS label of the MPLS device or the pseudo-MPLS label of the SRv6 device; when the MPLS message carries the pseudo-MPLS label, based on a pre-configured mapping relationship between the SID and the pseudo-MPLS label, converting the MPLS message into an SRv6 message; and sending the converted SRv6 message to the SRv6 network.
[0119] The storage unit 1120 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 11201 and / or a cache storage unit 11202 , and may further include a read-only storage unit (ROM) 11203 .
[0120] The storage unit 1120 may also include a program / utility 11204 having a set (at least one) of program modules 11205, such program modules 11205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0121] Bus 1130 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0122] The electronic device 1100 may also communicate with one or more external devices 1140 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 1100, and / or communicate with any device that enables the electronic device 1100 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 1150. Furthermore, the electronic device 1100 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 1160. As shown, the network adapter 1160 communicates with other modules of the electronic device 1100 via a bus 1130. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 1100, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0123] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0124] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, which may be a readable signal medium or a readable storage medium. A program product capable of implementing the above method of the present disclosure is stored thereon. In some possible implementations, various aspects of the present disclosure may also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to cause the terminal device to execute the steps according to various exemplary implementations of the present disclosure described in the above “Exemplary Method” section of this specification.
[0125] More specific examples of computer-readable storage media in the present disclosure may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0126] In the present disclosure, a computer readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, wherein a readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A readable signal medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0127] Alternatively, the program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0128] In a specific implementation, the program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).
[0129] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0130] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0131] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0132] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the appended claims.
Claims
1. A network communication method, characterized in that: The method is applied to an edge device of an MPLS network, comprising: An SRv6 message is received from the SRv6 network, wherein the SRv6 message carries a SID of the SRv6 device or a pseudo SID of the MPLS device; When the SRv6 message carries the pseudo SID, based on a pre-configured mapping relationship between the MPLS label and the pseudo SID, converting the SRv6 message into an MPLS message; and Send the converted MPLS message to the MPLS network; Wherein, the method further comprises: A pseudo SID is allocated to an MPLS device that only supports the MPLS communication protocol in an MPLS network; Flooding pseudo SIDs corresponding to one or more MPLS devices in the SRv6 network, where each MPLS device corresponds to an MPLS label in the MPLS network; After receiving the SRv6 message from the SRv6 network, the method further includes: judging whether the SRv6 message carries a pseudo SID based on a first mapping table, wherein the first mapping table includes: a mapping relationship between an MPLS label and a pseudo SID; Among them, based on the pre-configured mapping relationship between the MPLS label and the pseudo SID, converting the SRv6 message into an MPLS message includes: querying the MPLS label corresponding to the pseudo SID from the first mapping table; deleting the SRv6 header in the SRv6 message, adding an MPLS header, and obtaining the corresponding MPLS message, wherein the MPLS header contains the MPLS label corresponding to the pseudo SID.
2. The network communication method according to claim 1, characterized in that: The method further comprises: A first mapping table is constructed according to the MPLS labels of each MPLS device and the corresponding pseudo SID.
3. A network communication method, characterized in that: The method is applied to an edge device of an MPLS network, comprising: An MPLS message is received from an MPLS network, wherein the MPLS message carries an MPLS label of an MPLS device or a pseudo MPLS label of an SRv6 device; When the MPLS message carries a pseudo MPLS label, based on a pre-configured mapping relationship between the SID and the pseudo MPLS label, converting the MPLS message into an SRv6 message; and Send the converted SRv6 message to the SRv6 network; Wherein, the method further comprises: Allocate pseudo MPLS labels to SRv6 devices that only support SRv6 communication protocol in SRv6 networks; Flooding pseudo MPLS labels corresponding to one or more SRv6 devices in the MPLS network, wherein each SRv6 device corresponds to a SID in the SRv6 network; After receiving the MPLS message from the MPLS network, the method further includes: judging whether the MPLS message carries a pseudo MPLS label based on a second mapping table, wherein the second mapping table includes: a mapping relationship between the SID and the pseudo MPLS label; Among them, based on the pre-configured mapping relationship between the SID and the pseudo MPLS label, the MPLS message is converted into an SRv6 message, including: querying the SID corresponding to the pseudo MPLS label from the second mapping table; deleting the MPLS header of the MPLS message, adding the SID header, and obtaining the corresponding SID message, wherein the SID header contains the SID corresponding to the pseudo MPLS label.
4. The network communication method according to claim 3, characterized in that: The method further comprises: A second mapping table is constructed according to the SID of each SRv6 device and the corresponding pseudo MPLS label.
5. A network communication device, characterized in that: include: A first message receiving module, configured to receive an SRv6 message from an SRv6 network, wherein the SRv6 message carries a SID of an SRv6 device or a pseudo SID of an MPLS device; a first message conversion module, configured to convert the SRv6 message into an MPLS message based on a pre-configured mapping relationship between the MPLS label and the pseudo SID when the SRv6 message carries the pseudo SID; and A first message forwarding module, used for sending the converted MPLS message to the MPLS network; Wherein, the device further comprises: A pseudo SID allocation module, used for allocating a pseudo SID to an MPLS device that only supports the MPLS communication protocol in the MPLS network; A pseudo SID broadcast module, used for flooding pseudo SIDs corresponding to one or more MPLS devices in the SRv6 network, wherein each MPLS device corresponds to an MPLS label in the MPLS network; Wherein, the device comprises: A pseudo SID identification module, configured to determine whether the SRv6 message carries a pseudo SID based on a first mapping table, wherein the first mapping table includes: a mapping relationship between an MPLS label and a pseudo SID; Among them, the first message conversion module is also used to: query the MPLS label corresponding to the pseudo SID from the first mapping table; delete the SRv6 header in the SRv6 message, add an MPLS header, and obtain the corresponding MPLS message, wherein the MPLS header contains the MPLS label corresponding to the pseudo SID.
6. A network communication device, characterized in that: include: A second message receiving module, configured to receive an MPLS message from an MPLS network, wherein the MPLS message carries an MPLS label of an MPLS device or a pseudo MPLS label of an SRv6 device; a second message conversion module, configured to convert the MPLS message into an SRv6 message based on a pre-configured mapping relationship between the SID and the pseudo MPLS label when the MPLS message carries the pseudo MPLS label; and The second message forwarding module is used to send the converted SRv6 message to the SRv6 network; Wherein, the device further comprises: A pseudo MPLS label allocation module is used to allocate pseudo MPLS labels to SRv6 devices that only support SRv6 communication protocol in the SRv6 network; A pseudo MPLS label broadcast module, used for flooding pseudo MPLS labels corresponding to one or more SRv6 devices in the MPLS network, wherein each SRv6 device corresponds to a SID in the SRv6 network; Wherein, the device comprises: A pseudo MPLS label identification module, configured to determine whether the MPLS message carries a pseudo MPLS label based on a second mapping table, wherein the second mapping table includes: a mapping relationship between a SID and a pseudo MPLS label; Among them, the second message conversion module is also used to: query the SID corresponding to the pseudo MPLS label from the second mapping table; delete the MPLS header of the MPLS message, add the SID header, and obtain the corresponding SID message, wherein the SID header contains the SID corresponding to the pseudo MPLS label.
7. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to execute the network communication method according to any one of claims 1 to 4 by executing the executable instructions.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the network communication method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Communication method and device for SRV6 network and IP MPLS network
CN110266592A