Communication method and device
By introducing PBB technology into the ERPS ring network, the MAC address is quickly learned, which solves the problem of slow convergence time during fault switching of the ERPS ring network, and realizes the telecommunications-level 50ms path switching capability.
Patent Information
- Application Number
- CN202310295344.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-22
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2043-03-22
AI Technical Summary
The existing ERPS ring network converges slowly during failure switching, and cannot meet the switching capability of large-scale telecommunications level 50ms. It is only suitable for small-scale networking scenarios in the industry.
PBB technology is introduced in the ERPS ring network. By receiving and encapsulating service messages into ERPS ring network messages, the user MAC table and node MAC table are used for forwarding processing, ensuring that each node quickly learns the MAC address in the event of a link failure and realizes path switching.
The time for each node on the ring to re-learn the user's MAC address is reduced, and the path switching is completed with the telecommunications level requirements of 50ms, which solves the problem that the existing ERPS ring network cannot achieve the large-scale telecommunications level switching capabilities.
Smart Images

Figure CN116319160B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a communication method and device. Background Art
[0002] At present, there is a wide demand for ring networks in operators and industries. The main reason is that ring networks have the advantages of saving optical fibers, high reliability and easy maintenance. In the park and industrial fields, there is a general demand for layer 2 ring networks. The current mainstream layer 2 ring network technology is Ethernet Ring Protection Switching (ERPS), which is implemented according to the protocol ITU-T G.8032. The specific operation process of the protocol is as follows:
[0003] like Figure 1 As shown, Figure 1 This is a schematic diagram of the existing ERPS ring network. Figure 1 In the ERPS network, the Ethernet network topology with a ring connection is called an ERPS ring. The ERPS ring network is divided into a major ring and a sub-ring, which can be composed of a single major ring or multiple ring networks. The closed loop formed by node A, node B, node C, and node D is the major ring. The sub-ring is composed of three links between node C and node E, node E and node F, and node F and node D. It is an open ring. Ring protection links (RPL for short) are used between certain nodes to protect the ring network. This link is used to block the forwarding of messages. Therefore, it is equivalent to disconnecting the link between nodes to prevent loops. In the Figure 1 In the example, the link between node A and node B, and between node E and node F is RPL. ERPS technology implements protection switching for link failures by introducing the Ring AutoProtection Switching (RAPS) protocol. The specific process is as follows:
[0004] like Figure 2 As shown, Figure 2 This is a schematic diagram of the existing ERPS ring network protection switching. Figure 2In the ERPS ring network, it consists of 4 nodes, forming a chain-like two-layer forwarding link. Among them, the link between node 1 and node 2 is RPL, blocking the forwarding of blocking messages. There is a link failure between node 3 and node 4 (for example, fiber breakage, or the link is not reachable due to forwarding failure). After node 3 and node 4 sense the link failure, node 3 and node 4 first clear their own MAC forwarding tables, and then block the ports connecting to the opposite ends. After node 3 and node 4 clear their MAC forwarding tables, they generate RAPS messages to notify other nodes of the situation of their own MAC forwarding tables. After node 1 and node 2 receive the RAPS messages, they release the RPL ports; at the same time, they clear their own MAC forwarding tables. In this way, a new chain-like topology is formed. The services carried on node 1, node 2, node 3, and node 4 re-trigger MAC learning because the MAC forwarding tables are cleared, generating MAC forwarding tables under the new chain-like topology, and completing the forwarding and bearing after the switchover.
[0005] The advantage of the ERPS ring network lies in its easy deployment. However, during fault switchover, it relies on the control plane to trigger the clearing of the MAC forwarding table, and then each node re-learns the MAC. Therefore, there is a drawback of slow convergence time, and it is only applicable to small-scale industry networking scenarios and cannot achieve the 50ms switchover ability of large-scale telecom levels. At the same time, there is still a need for high-performance two-layer packet ring networks in the industry, and there is an urgent need to improve the existing ERPS ring network to meet the current requirements. Summary of the Invention
[0006] In view of this, the present application provides a communication method and device to solve the problem that the existing ERPS ring network is only applicable to small-scale industry networking scenarios and cannot achieve the 50ms switchover ability of large-scale telecom levels.
[0007] In a first aspect, the present application provides a communication method. The method is applied to a first node, and the first node is on an ERPS ring network. The method includes:
[0008] When the first node supports PBB, it receives a first ERPS ring network message. The first ERPS ring network message includes a first PBB tunnel header and a first service message, and the first PBB tunnel header includes a first destination MAC address;
[0009] If there is a first node MAC table entry in the node MAC table that matches the first destination MAC address, the first service message is forwarded and processed using the user MAC table;
[0010] If there is no first node MAC table entry in the node MAC table that matches the first destination MAC address, a first user MAC table entry that matches the first destination MAC address is obtained from the user MAC table. The first user MAC table entry includes a first output interface;
[0011] Forward the first ERPS ring network message to a second node via the first outgoing interface, where the second node is on the ERPS ring network.
[0012] In a second aspect, the present application provides a communication device. The device is applied to a first node on an ERPS ring network. The device includes:
[0013] A receiving unit, configured to receive a first ERPS ring network message when the first node supports PBB. The first ERPS ring network message includes a first PBB tunnel header and a first service message. The first PBB tunnel header includes a first destination MAC address.
[0014] A sending unit, configured to, if a first node MAC table entry matching the first destination MAC address exists in the node MAC table, forward and process the first service message using the user MAC table.
[0015] An obtaining unit, configured to, if no first node MAC table entry matching the first destination MAC address exists in the node MAC table, obtain a first user MAC table entry matching the first destination MAC address from the user MAC table. The first user MAC table entry includes a first outgoing interface.
[0016] The sending unit is further configured to forward the first ERPS ring network message to a second node via the first outgoing interface, where the second node is on the ERPS ring network.
[0017] In a third aspect, the present application provides a network device, including a processor and a machine-readable storage medium. The machine-readable storage medium stores machine-executable instructions that can be executed by the processor. The processor is caused by the machine-executable instructions to execute the method provided in the first aspect of the present application.
[0018] Therefore, when applying the communication method and device provided by the present application, when the first node supports PBB, the first node receives a first ERPS ring network message, where the first ERPS ring network message includes a first PBB tunnel header and a first service message, and the first PBB tunnel header includes a first destination MAC address; if there is a first node MAC table entry in the node MAC table that matches the first destination MAC address, the first node uses the user MAC table to forward and process the first service message; if there is no first node MAC table entry in the node MAC table that matches the first destination MAC address, the first node obtains a first user MAC table entry that matches the first destination MAC address from the user MAC table, and the first user MAC table entry includes a first outgoing interface; using the first outgoing interface, the first node forwards the first ERPS ring network message to a second node, and the second node is on the ERPS ring network.
[0019] In this way, by encapsulating the user's service message in the ERPS ring network message, the present application enables each node on the ring to learn the user MAC address in the service message regardless of the current state of the ERPS ring network. When path switching occurs due to an internal link failure in the ERPS ring network, the time for each node on the ring to re-learn the user MAC address can be reduced, achieving the 50 ms path switching required for the telecommunications level. This solves the problem that the existing ERPS ring network is only applicable to small-scale industry networking scenarios and cannot achieve the 50 ms switching ability of the large-scale telecommunications level. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 is a schematic diagram of an existing ERPS ring network;
[0021] Figure 2 is a schematic diagram of protection switching of an existing ERPS ring network;
[0022] Figure 3 is a flowchart of the communication method provided by an embodiment of the present application;
[0023] Figure 4 is a schematic diagram of the ERPS ring network message format provided by an embodiment of the present application;
[0024] Figure 5 is a schematic diagram of an ERPS ring network provided by an embodiment of the present application;
[0025] Figure 6 is a schematic diagram of a node provided by an embodiment of the present application;
[0026] Figure 7 is another schematic diagram of a node provided by an embodiment of the present application;
[0027] Figure 8 is another schematic diagram of an ERPS ring network provided by an embodiment of the present application;
[0028] Figure 9 Structural diagram of the communication device provided by the embodiment of the present application;
[0029] Figure 10 Hardware structure of the network device provided by the embodiment of the present application. Specific implementation manners
[0030] Here, the exemplary embodiments will be described in detail, and the examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0031] The terms used in the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. The singular forms "a", "the", and "said" used in the present application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more of the corresponding listed items.
[0032] It should be understood that although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "when" or "while" or "in response to determining".
[0033] The communication method provided by the embodiment of the present application will be described in detail below. Refer to Figure 3 , Figure 3 which is the flowchart of the communication method provided by the embodiment of the present application. This method is applied to the first node, and the communication method provided by the embodiment of the present application may include the following steps.
[0034] Step 310: When the first node supports PBB, receive a first ERPS ring network message, where the first ERPS ring network message includes a first PBB tunnel header and a first service message, and the first PBB tunnel header includes a first destination MAC address;
[0035] Specifically, the first node is a node on the ERPS ring network. When the first node supports the operation of a Provider Backbone Bridge (PBB), it can receive a first ERPS ring network message sent by the previous-hop node. The ERPS ring network message includes a first PBB tunnel header and a first service message. The first PBB tunnel header includes a first destination Media Access Control Address (MAC) address.
[0036] Among them, the first service message can specifically be a user-side message sent by the client. The client can send the first service message to the ingress node on the ERPS ring network. The ingress node can perform encapsulation processing on the first service message to obtain a first ERPS ring network message and perform an on-ring processing, so that each node on the ERPS ring forwards the first ERPS message until the egress node receives the first ERPS ring network message, strips the encapsulated PBB tunnel header, restores the first service message, and performs a off-ring processing on the first service message.
[0037] As Figure 4 shown, Figure 4 is a schematic diagram of the ERPS ring network message format provided by the embodiment of the present application. In Figure 4 it, the complete service message is carried by the Payload field. All fields before the Payload field are the PBB tunnel header. The PBB tunnel header includes a first destination MAC address, a first source MAC address, and a ring network tag.
[0038] Among them, the first destination MAC address is the MAC address of the egress node; the first source MAC address is the node that sends / forwards the ERPS ring network message after going on the ring; the ring network label (tag) is independently allocated in units of the ring in the ERPS ring network, that is, nodes on the same ring are allocated the same ring network tag, or it can also be independently allocated in units of nodes, that is, different nodes are allocated different ring network tags.
[0039] In the embodiment of the present application, RPL is included in the ERPS ring network to avoid forming a loop. The ERPS ring network messages forwarded on the ERPS ring network can enable each node on the ring to learn the MAC addresses of other nodes and generate corresponding node MAC entries to be stored in the node MAC table; at the same time, it can also learn the MAC addresses of the clients and generate corresponding user MAC entries to be stored in the user MAC table.
[0040] Each node on the ring includes a node MAC table and a user MAC table. Among them, the user MAC table can include the entries of the node MAC table.
[0041] After each node on the ring learns the node MAC addresses of other nodes on the ring, business traffic can be forwarded on the ERPS ring network through the node MAC addresses. Each node can encapsulate the received business traffic with a PBB tunnel header on the outer layer. The source / destination MAC addresses included in the PBB tunnel header are both node MAC addresses. Therefore, the forwarding of ERPS ring network packets can be achieved by looking up the node MAC table entries. At the same time, the ERPS ring network packets also include complete business packets, and each node can learn the MAC addresses of the clients while forwarding.
[0042] In the embodiment of the present application, since the number of nodes on the ring is fixed, regardless of whether the EPRS ring network is in a normal state or a fault state for path switching, ERPS ring network packets can be forwarded on the ERPS ring network. Especially during the path switching process, each node can quickly re-learn the MAC addresses of other nodes and complete the path switching, achieving the ability of 50ms switching at the large-scale telecom level.
[0043] Step 320: If there is a first node MAC table entry in the node MAC table that matches the first destination MAC address, then use the user MAC table to perform forwarding processing on the first service packet;
[0044] Specifically, according to the description of step 310, after the first node receives the first ERPS ring network packet, it first obtains the outer layer destination MAC address from the first PBB tunnel header, that is, the first destination MAC address.
[0045] According to the first destination MAC address, check whether there is a first node MAC table entry in the node MAC table that matches the first destination MAC address.
[0046] If there is a first node MAC table entry, the first node determines that it is the egress node itself, that is, the first ERPS ring network packet is the down-ring traffic. The first node strips the first PBB tunnel header from the first ERPS ring network packet to obtain the first service packet.
[0047] It can be understood that relative to the first ERPS ring network packet, the first service packet can also be called the inner layer packet, and the source / destination MAC addresses it includes can also be called the inner layer source / destination MAC addresses.
[0048] The first node obtains the inner layer destination MAC address and checks whether there is a user MAC table entry in the user MAC table that matches the inner layer destination MAC address. If there is, obtain the egress interface included in the user MAC table entry and use the egress interface to forward the first service packet.
[0049] If there is no first node MAC table entry, the first node executes step 330.
[0050] Step 330: If there is no first node MAC table entry in the node MAC table that matches the first destination MAC address, obtain a first user MAC table entry that matches the first destination MAC address from the user MAC table. The first user MAC table entry includes a first outgoing interface.
[0051] Specifically, according to the description in step 320, if there is no first node MAC table entry in the node MAC table that matches the first destination MAC address, the first node continues to check whether there is a first user MAC table entry in the user MAC table that matches the first destination MAC.
[0052] It should be noted that there may be node MAC table entries in the user MAC table.
[0053] If there is a first user MAC table entry, the first node obtains the first outgoing interface from the first user MAC table entry.
[0054] Step 340: Forward the first ERPS ring network packet to a second node using the first outgoing interface. The second node is on the ERPS ring network.
[0055] Specifically, according to the description in step 330, after the first node obtains the first outgoing interface, it forwards the first ERPS ring network packet to the second node through the first outgoing interface. The second node is also on the ERPS ring network and is the next-hop node of the first node.
[0056] It should be noted that after the first node receives the first ERPS ring network packet, it can learn the source MAC address of the first service packet included therein. After learning, it can add a corresponding user MAC table entry to the user MAC table.
[0057] Optionally, if the first node receives a service packet that does not include a PBB tunnel header, the first node can use the user MAC table to forward and process the service packet that does not include a PBB tunnel header.
[0058] In the embodiments of the present application, the first node receives and forwards the first ERPS ring network packet when the ERPS ring network is in its original state or during a path switching process. Especially during the path switching process, each node in the ERPS ring network receives and forwards the ERPS ring network packet, realizing the re-learning of the MAC addresses of each node on the ring. Since the number of nodes on the ring is fixed, each node can quickly learn the node MAC addresses of other nodes on the ring without having to re-learn the user MAC addresses, saving the time for learning MAC addresses and achieving the requirement of completing the path switching within 50 ms at the carrier grade.
[0059] It should be noted that steps 310 - 340 can be executed by the switching chip included in the first node. The first node supports PBB, that is, the switching chip supports PBB.
[0060] As Figure 5 shown, Figure 5 FIG. is a schematic diagram of an ERPS ring network provided by an embodiment of the present application. In Figure 5 the middle, node A, node B, node C, node D, node E, and node F form an ERPS ring network. The link between node A and node B is an RPL, which blocks the forwarding of packets to prevent the generation of loops.
[0061] In the original state, the forwarding path from node F to node B is F -> E -> D -> C -> B. Among them, node F is the ingress node, and node B is the egress node. When the link between node E and node D fails, after nodes D and E sense it, they each send RAPS protocol packets within the ERPS ring network to notify each node to clear its node MAC table but not its user MAC table. At the same time, nodes A and B release the RPL ports. After the service traffic goes back onto the ring, the ERPS ring network packets are still forwarded on the ring, so that while each node receives and forwards the ERPS ring network packets, it re - learns the MAC addresses of each node and quickly completes path switching. The new path after the node MAC address is learned and switched is: F -> A -> B.
[0062] Therefore, when applying the communication method provided by the present application, when the first node supports PBB, the first node receives a first ERPS ring network packet, and the first ERPS ring network packet includes a first PBB tunnel header and a first service packet. The first PBB tunnel header includes a first destination MAC address; if there is a first node MAC table entry in the node MAC table that matches the first destination MAC address, the first node uses the user MAC table to forward - process the first service packet; if there is no first node MAC table entry in the node MAC table that matches the first destination MAC address, the first node obtains a first user MAC table entry that matches the first destination MAC address from the user MAC table, and the first user MAC table entry includes a first egress interface; using the first egress interface, the first node forwards the first ERPS ring network packet to a second node, and the second node is on the ERPS ring network.
[0063] Thus, in this application, by encapsulating the user's service message in the ERPS ring network message, regardless of the current state of the ERPS ring network, each node on the ring can learn the user MAC address in the service message. When path switching occurs due to a link failure within the ERPS ring network, the time for each node on the ring to re-learn the user MAC address can be reduced, achieving the 50 ms path switching required for the carrier grade. This solves the problem that the existing ERPS ring network is only applicable to small-scale industry networking scenarios and cannot achieve the 50 ms switching ability of the large-scale carrier grade.
[0064] Optionally, in the embodiment of this application, it further includes the process of the first node, as the ingress node, generating the ERPS ring network message.
[0065] Specifically, the first node receives the second service message sent by the client, and the second service message includes the second destination MAC address. According to the second destination MAC address, the first node checks whether there is a second user MAC table entry in the user MAC table that matches the second destination MAC address.
[0066] If there is a second user MAC table entry, the first node obtains the node MAC address and the egress interface from the second user MAC table entry. It can be understood that the node MAC address is the MAC address of the egress node; the egress interface is the PBB tunnel interface.
[0067] If there is no second user MAC table entry, the first node learns the MAC address included in the second service message and generates a corresponding user MAC table entry in the user MAC table.
[0068] After the first node obtains the node MAC address and the egress interface, it identifies the node MAC address. If the first node determines that the destination node indicated by the node MAC address supports PBB, it transmits the second user message to the PBB tunnel interface and performs an encapsulation operation on the second user message at this tunnel interface. The first node encapsulates a second PBB tunnel header outside the second service message to obtain a second ERPS ring network message. The second PBB tunnel header includes the second destination MAC address, and the node MAC address is stored in the second destination MAC address.
[0069] According to the node MAC address, the first node obtains the second node MAC table entry that matches the node MAC address from the node MAC table again. The second node MAC table entry includes the second egress interface. Using the second egress interface, the first node forwards the second ERPS ring network message to the third node, and the third node is on the ERPS ring network.
[0070] It should be noted that the above process can be executed by the switching chip included in the first node.
[0071] Optionally, in the embodiments of the present application, when the first node does not support PBB, in order to ensure that the first node receives and forwards ERPS ring network packets. At this time, a new FPGA is added in the first node. The FPGA can receive the packets transmitted by the switching chip, complete the encapsulation of the PBB tunnel header and then forward them on the ring; or receive the ERPS ring network packets sent by other nodes, complete the decapsulation of the PBB tunnel header and then transmit them to the switching chip.
[0072] Specifically, when the first node does not support PBB, the FPGA receives a third ERPS ring network packet. The third ERPS ring network packet includes a third PBB tunnel header and a third service packet. The third PBB tunnel header includes a third destination MAC address and a third source MAC address.
[0073] The FPGA searches the node MAC table to see if there is a third node MAC entry that matches the third destination MAC address. If there is a third node MAC entry, the FPGA determines that it is the egress node itself, that is, the third ERPS ring network packet is the downlink traffic.
[0074] After the FPGA determines that the third ERPS ring network packet is the downlink traffic, according to the third source MAC address, the FPGA continues to search the node mapping table.
[0075] If there is a first node mapping entry in the node mapping table that matches the third source MAC address, the FPGA obtains a double-layer Virtual Local Area Network (VLAN) tag from the node mapping entry. The format of the double-layer VLAN tag is the existing standard QinQ encapsulation. The outer VLAN tag corresponds to the node MAC address (the node corresponding to this node MAC address is the source node that sends the third ERPS ring network packet). The inner VLAN tag is not used temporarily and is empty, but still needs to be encapsulated.
[0076] The FPGA first strips the third PBB tunnel header, and then encapsulates the double-layer VLAN tag after the inner source MAC field included in the third service packet to obtain the encapsulated third service packet. The FPGA transmits the encapsulated third service packet into the switching chip.
[0077] After the switching chip receives the encapsulated third service packet, according to the destination MAC address included in the encapsulated third service packet, the switching chip searches the user MAC table to see if there is a user MAC entry that matches the destination MAC address. If there is a user MAC entry, the switching chip obtains the egress interface from the user MAC entry and forwards the encapsulated third service packet through the egress interface.
[0078] It should be noted that if the first node does not support PBB and no new FPGA is added in the first node, after the switching chip receives the third ERPS ring network message, the switching chip confirms that the third ERPS ring network message is an ordinary message, searches the user MAC table according to the third destination MAC address, and uses the matching user MAC table entry in the user MAC table for forwarding processing.
[0079] Optionally, in the embodiment of the present application, if there is no third node MAC table entry in the node MAC table that matches the third destination MAC address, the FPGA determines that itself is a passing node, that is, the third ERPS ring network message is passing-ring traffic. The FPGA processes the third ERPS ring network message in the forwarding manner of an ordinary message. The FPGA directly transmits the third ERPS ring network message to the switching chip. The switching chip searches the user MAC table according to the third destination MAC address and uses the matching user MAC table entry in the user MAC table for forwarding processing.
[0080] Optionally, in the embodiment of the present application, it also includes the process of generating an ERPS ring network message when the first node does not support PBB and can also be used as an ingress node.
[0081] Specifically, the switching chip receives a fourth service message sent by a client, and the fourth service message includes a fourth destination MAC address. The first node identifies whether the destination node reaching the fourth destination MAC address supports PBB. If the destination node supports PBB, the switching chip searches whether there is a third user MAC table entry in the user MAC table that matches the fourth destination MAC address.
[0082] If there is a third user MAC table entry, the switching chip obtains a double-layer VLAN tag and an egress port from the third user MAC table entry. The egress port is specifically the port on the FPGA that receives the fourth service message transmitted by the switching chip. The switching chip encapsulates the double-layer VLAN tag after the inner source MAC field included in the fourth service message.
[0083] The switching chip transmits the encapsulated fourth service message to the egress port. At the egress port, the FPGA searches the node MAC table according to the double-layer VLAN tag. If there is a third node MAC table entry in the node MAC table that matches the double-layer VLAN tag, the FPGA obtains the node MAC address and a third egress interface from the third node MAC table entry.
[0084] The FPGA strips the double-layer VLAN tag from the encapsulated fourth service packet, restores it to the fourth service packet, and encapsulates the outer layer of the fourth service packet with a fourth PBB tunnel header to obtain a fourth ERPS ring network packet. The fourth PBB tunnel header includes a fourth destination MAC address, and the node MAC address is stored in the fourth destination MAC address. Using the third outgoing interface, the FPGA forwards the fourth ERPS ring network packet to the fourth node, and the fourth node is on the ERPS ring network.
[0085] Optionally, the first node identifying whether the destination node reaching the fourth destination MAC address supports PBB further includes: if the destination node reaching the fourth destination MAC address does not support PBB, the switching chip directly transmits the fourth service packet to the FPGA. When the FPGA recognizes that the fourth service packet does not include a double-layer VLAN tag, the FPGA determines that the fourth service packet is an ordinary service packet, and the FPGA sends the fourth service packet from the outgoing interface to the destination node. The outgoing interface is the interface of the first node on the ring and connected to the next-hop node.
[0086] Optionally, in the embodiment of the present application, the ERPS ring network may not include RPL, that is, the entire ERPS ring network is a path. At this time, in order to avoid the generation of loops, access control list (ACL) rules for the source MAC address being its own address can be configured in each VLAN. In this way, the ERPS ring network packets with the source MAC address being its own (such as broadcast packets) are filtered.
[0087] Specifically, the first node receives a fifth ERPS ring network packet sent by the previous-hop node. The fifth ERPS ring network packet includes a fifth source MAC address. If the fifth source MAC address is its own MAC address, the first node discards the fifth ERPS ring network packet.
[0088] Among them, the fifth source MAC address is the source MAC address included in the outer PBB tunnel header.
[0089] As Figure 6 shown, Figure 6 is a schematic diagram of a node provided by an embodiment of the present application. In Figure 6 it, the node includes interface A and interface B. In the logical sending direction, each interface is divided into a receiving logical port and a sending logical port. For example, in interface A, the logical port in the counterclockwise direction is the receiving port, and the logical port in the clockwise direction is the sending port; in interface B, the logical port in the counterclockwise direction is the sending port, and the logical port in the clockwise direction is the receiving port.
[0090] In the embodiments of the present application, the administrator can first configure a protection VLAN for each direction. For example, the clockwise direction is bound to VLAN A; the counterclockwise direction is bound to VLAN B. The administrator configures ACL rules under each VLAN and sets the ACL rules in the logical ports corresponding to each interface.
[0091] For example, the MAC address of the node is: H-H-H; the source MAC filtering rule:
[0092] VLAN A: SMAC = H-H-H + PBB, discard; VLAN B: SMAC = H-H-H + PBB, discard.
[0093] Optionally, in the embodiments of the present application, it further includes the process of path switching after a link failure in an ERPS ring network that does not include RPL. At this time, in order to quickly perform path switching, multiple ACL rules for the destination MAC address can be configured within each VLAN. In this way, the traffic including the destination MAC address is forwarded through other paths.
[0094] Specifically, the first node receives a sixth ERPS ring network packet, and the sixth ERPS ring network includes a sixth PBB tunnel header, and the sixth PBB tunnel header includes a first ring network tag. When the first node senses a link failure between it and the next-hop node, the first node obtains a second ring network tag and a fourth outgoing interface.
[0095] Furthermore, the sixth PBB tunnel header further includes a sixth destination MAC address. When the first node senses a link failure between it and the next-hop node, according to the sixth destination MAC address, the first node obtains the protection rule configured in the first interface that receives the sixth ERPS ring network packet, and the protection rule includes a second ring network tag and a fourth outgoing interface.
[0096] As Figure 7 shown, Figure 7 is another schematic diagram of a node provided by the embodiments of the present application. In Figure 7 it, the node includes interface A and interface B. In the logical sending direction, each interface is divided into a receiving logical port and a sending logical port. For example, in interface A, the logical port in the counterclockwise direction is the receiving port, and the logical port in the clockwise direction is the sending port; in interface B, the logical port in the counterclockwise direction is the sending port, and the logical port in the clockwise direction is the receiving port.
[0097] In the embodiments of the present application, the administrator can first configure a protection VLAN for each direction. For example, the clockwise direction is bound to VLAN A; the counterclockwise direction is bound to VLAN B. The administrator configures two ACL rules respectively under each VLAN (one is a high-priority ACL rule (normal forwarding rule, specifying the outgoing interface for forwarding the packet); the other is a low-priority ACL rule (protection rule, which automatically matches the low-priority ACL rule after the outgoing interface of the high-priority ACL rule goes down and the ACL rule fails)), and sets the two ACL rules in the logical ports corresponding to each interface.
[0098] For example, the MAC address of the destination node is: X-X-X; the destination MAC forwarding rule:
[0099] ACL rules within VLAN A: High priority: VLAN A + node DMAC = X-X-X, outgoing interface A; Low priority: VLAN A + node DMAC = X-X-X, replace with VLAN B + outgoing interface B.
[0100] ACL rules within VLAN B: High priority: VLAN B + node DMAC = X-X-X, outgoing interface B; Low priority: VLAN B + node DMAC = X-X-X, replace with VLAN A + outgoing interface A.
[0101] When interface A fails, the high-priority rule within VLAN A fails, and the node automatically selects the low-priority rule to match the ERPS ring network packet, and updates the VLAN tag included in the ERPS ring network packet to VLAN B, and forwards it through interface B, forming a packet forwarding from the clockwise direction to the counterclockwise direction.
[0102] In summary, the first node updates the first ring network tag to the second ring network tag to obtain the seventh ERPS ring network packet. Through the fourth outgoing interface, the first node forwards the seventh ERPS ring network packet.
[0103] In an example, as Figure 8 shown, Figure 8 is another ERPS ring network schematic diagram provided by the embodiments of the present application. In Figure 8 nodes A, B, C, D, E, and F form an ERPS ring network. RPL is cancelled within the ERPS ring network, and the receiving and transmitting directions of each node's interface are logically divided into a clockwise direction and a counterclockwise direction, and different VLAN isolations are configured respectively. There are a clockwise direction and a counterclockwise direction for the path from node F to node B, belonging to two VLANs. There are already node MAC entries and user MAC entries for forwarding service traffic to node B within each VLAN, and corresponding outgoing interfaces for two different directions.
[0104] It should be noted that which direction the node F forwards the service traffic to the node B can be specified at the protocol level or through configuration.
[0105] In the original state, the node F selects the counterclockwise path to forward the service traffic to the node B, and the forwarding path is F->E->D->C->B. Among them, the node F is the ingress node, and the node B is the egress node. When the link between the node E and the node D fails, after the nodes D and E sense it, the node E triggers path switching. After the node E receives the ERPS ring network packet sent by the node F through the first interface, since the egress interface (the second interface, which is connected to the node D) of the high-priority ACL rule within the counterclockwise VLAN is down, the node E obtains the low-priority ACL rule within the first interface and updates the VLAN tag included in the ERPS ring network packet to the clockwise VLAN. The obtained egress interface is still the first interface, but it is the clockwise sending direction of the first interface.
[0106] At the same time, the nodes D and E respectively send RAPS protocol packets within the ERPS ring network to notify each node to clear its node MAC table instead of clearing its respective user MAC tables. The service traffic is forwarded to the node B through the clockwise path. Since the service traffic is still on the ring, so that while each node receives and forwards the ERPS ring network packets, it re-learns the MAC addresses of each node and triggers path switching. The new path after the node MAC address is learned and switched is: F->A->B.
[0107] It should be noted that when the RPL is not included in the ERPS ring network, the process of receiving and sending the ERPS ring network packets thereon is the same as the process of the foregoing embodiment, and will not be repeated here. For example, when the node supports PBB, the exchange chip can be used to receive and send the ERPS ring network packets; when the node does not support PBB, the exchange chip and the FPGA can be used together to receive and send the ERPS ring network packets. The ERPS ring network packet has the same Figure 4 message format as shown.
[0108] Based on the same inventive concept, the embodiment of the present application also provides a communication device corresponding to the communication method. Refer to Figure 9 , Figure 9 which is the communication device provided by the embodiment of the present application. The device is applied to the first node, and the first node is on the ERPS ring network. The device includes:
[0109] A receiving unit 910, configured to receive a first ERPS ring network packet when the first node supports PBB. The first ERPS ring network packet includes a first PBB tunnel header and a first service packet, and the first PBB tunnel header includes a first destination MAC address;
[0110] A sending unit 920, configured to, if there is a first node MAC table entry matching the first destination MAC address in the node MAC table, forward the first service message by using the user MAC table;
[0111] An obtaining unit 930, configured to, if there is no first node MAC table entry matching the first destination MAC address in the node MAC table, obtain a first user MAC table entry matching the first destination MAC address from the user MAC table, where the first user MAC table entry includes a first outgoing interface;
[0112] The sending unit 920 is further configured to forward the first ERPS ring network message to a second node by using the first outgoing interface, where the second node is on the ERPS ring network.
[0113] Optionally, the receiving unit 910 is further configured to receive a second service message, where the second service message includes a second destination MAC address;
[0114] The obtaining unit 930 is further configured to, if there is a second user MAC table entry matching the second destination MAC address in the user MAC table, obtain a node MAC address from the second user MAC table entry;
[0115] The apparatus further includes: an encapsulating unit (not shown in the figure), configured to, if a destination node indicated by the node MAC address supports PBB, encapsulate a second PBB tunnel header outside the second service message to obtain a second ERPS ring network message, where the second PBB tunnel header includes a second destination MAC address, and the node MAC address is stored in the second destination MAC address;
[0116] The obtaining unit 930 is further configured to obtain a second node MAC table entry matching the node MAC address from the node MAC table according to the node MAC address, where the second node MAC table entry includes a second outgoing interface;
[0117] The sending unit 920 is further configured to forward the second ERPS ring network message to a third node by using the second outgoing interface, where the third node is on the ERPS ring network.
[0118] Optionally, the receiving unit 910 is further configured to, when the first node does not support PBB, receive a third ERPS ring network message, where the third ERPS ring network message includes a third PBB tunnel header and a third service message, and the third PBB tunnel header includes a third destination MAC address and a third source MAC address;
[0119] The device further includes: a lookup unit (not shown in the figure), configured to, if there is a third node MAC entry in the node MAC table that matches the third destination MAC address, look up the node mapping table according to the third source MAC address;
[0120] The obtaining unit 930 is further configured to, if there is a first node mapping entry in the node mapping table that matches the third source MAC address, obtain a double-layer VLAN tag from the node mapping entry;
[0121] The encapsulation unit (not shown in the figure) is further configured to encapsulate the double-layer VLAN tag after the inner-layer source MAC field included in the third service message to obtain an encapsulated third service message;
[0122] The sending unit 920 is further configured to perform a forwarding process on the encapsulated third service message by using the user MAC table.
[0123] Optionally, the sending unit 920 is further configured to, if there is no third node MAC entry in the node MAC table that matches the third destination MAC address, perform a forwarding process on the third ERPS ring network message by using the user MAC table.
[0124] Optionally, the receiving unit 910 is further configured to receive a fourth service message, where the fourth service message includes a fourth destination MAC address;
[0125] The obtaining unit 930 is further configured to, if the destination node reaching the fourth destination MAC address supports PBB, obtain a third user MAC entry that matches the fourth destination MAC address from the user MAC table, where the third user MAC entry includes a double-layer VLAN tag;
[0126] The lookup unit (not shown in the figure) is further configured to look up the node MAC table according to the double-layer VLAN tag;
[0127] The obtaining unit 930 is further configured to, if there is a third node MAC entry in the node MAC table that matches the double-layer VLAN tag, obtain a node MAC address and a third outgoing interface from the third node MAC entry;
[0128] The encapsulation unit (not shown in the figure) is further configured to encapsulate a fourth PBB tunnel header on the outer layer of the fourth service message to obtain a fourth ERPS ring network message, where the fourth PBB tunnel header includes the fourth destination MAC address, and the node MAC address is stored in the fourth destination MAC address;
[0129] The sending unit 920 is further configured to forward the fourth ERPS ring network message to a fourth node via the third outgoing interface, where the fourth node is on the ERPS ring network.
[0130] Optionally, the sending unit 920 is further configured to forward the fourth service message to the destination node if the destination node that reaches the fourth destination MAC address does not support PBB.
[0131] Optionally, the ERPS ring network does not include RPL, and the receiving unit 910 is further configured to receive a fifth ERPS ring network message, where the fifth ERPS ring network message includes a fifth source MAC address;
[0132] The device further includes: a discarding unit (not shown in the figure), configured to discard the fifth ERPS ring network message if the fifth source MAC address is its own MAC address.
[0133] Optionally, the receiving unit 910 is further configured to receive a sixth ERPS ring network message, where the sixth ERPS ring network includes a sixth PBB tunnel header, and the sixth PBB tunnel header includes a first ring network tag;
[0134] The obtaining unit 930 is further configured to obtain a second ring network tag and a fourth outgoing interface when detecting a link failure between the device and the next-hop node;
[0135] The device further includes: an updating unit (not shown in the figure), configured to update the first ring network tag to the second ring network tag to obtain a seventh ERPS ring network message;
[0136] The sending unit 920 is further configured to forward the seventh ERPS ring network message via the fourth outgoing interface.
[0137] Optionally, the sixth PBB tunnel header further includes a sixth destination MAC address;
[0138] The obtaining unit 930 is specifically configured to, when detecting a link failure between the device and the next-hop node, obtain a protection rule configured in the first interface that receives the sixth ERPS ring network message according to the sixth destination MAC address, where the protection rule includes the second ring network tag and the fourth outgoing interface.
[0139] Therefore, when applying the communication device provided by the present application, when the first node supports PBB, the first node receives a first ERPS ring network message, where the first ERPS ring network message includes a first PBB tunnel header and a first service message, and the first PBB tunnel header includes a first destination MAC address. If there is a first node MAC table entry in the node MAC table that matches the first destination MAC address, the first node uses the user MAC table to forward the first service message. If there is no first node MAC table entry in the node MAC table that matches the first destination MAC address, the first node obtains a first user MAC table entry that matches the first destination MAC address from the user MAC table, and the first user MAC table entry includes a first outgoing interface. Using the first outgoing interface, the first node forwards the first ERPS ring network message to the second node, and the second node is on the ERPS ring network.
[0140] In this way, by encapsulating the user's service message in the ERPS ring network message, the present application enables each node on the ring to learn the user MAC address in the service message regardless of the current state of the ERPS ring network. When path switching occurs due to an internal link failure in the ERPS ring network, the time for each node on the ring to re-learn the user MAC address can be reduced, achieving the 50 ms path switching required for the telecom level. This solves the problem that the existing ERPS ring network is only applicable to small-scale industry networking scenarios and cannot achieve the 50 ms switching ability of the large-scale telecom level.
[0141] Based on the same inventive concept, an embodiment of the present application further provides a network device, as Figure 10 shown, including a processor 1010, a transceiver 1020, and a machine-readable storage medium 1030. The machine-readable storage medium 1030 stores machine-executable instructions that can be executed by the processor 1010, and the processor 1010 is prompted by the machine-executable instructions to execute the communication method provided by the embodiment of the present application. The foregoing Figure 9 shown communication device can be implemented by using the hardware structure of the network device as Figure 10 shown.
[0142] The above computer-readable storage medium 1030 may include a random access memory (English: Random Access Memory, abbreviated as: RAM), and may also include a non-volatile memory (English: Non-volatile Memory, abbreviated as: NVM), such as at least one disk memory. Optionally, the computer-readable storage medium 1030 may also be at least one storage device located far from the foregoing processor 1010.
[0143] The above-mentioned processor 1010 can be a general-purpose processor, including a central processing unit (abbreviation: CPU), a network processor (abbreviation: NP), etc.; it can also be a digital signal processor (abbreviation: DSP), an application-specific integrated circuit (abbreviation: ASIC), a field-programmable gate array (abbreviation: FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0144] In the embodiments of the present application, the processor 1010 reads machine-executable instructions stored in the machine-readable storage medium 1030, and is prompted by the machine-executable instructions to enable the processor 1010 itself and to call the transceiver 1020 to execute the communication method described in the foregoing embodiments of the present application.
[0145] In addition, the embodiments of the present application provide a machine-readable storage medium 1030, and the machine-readable storage medium 1030 stores machine-executable instructions. When the machine-executable instructions are called and executed by the processor 1010, the machine-executable instructions prompt the processor 1010 itself and to call the transceiver 1020 to execute the communication method described in the foregoing embodiments of the present application.
[0146] For the implementation processes of the functions and effects of each unit in the above-mentioned device, please refer to the implementation processes of the corresponding steps in the above-mentioned method for details, and will not be elaborated here.
[0147] For the device embodiments, since they basically correspond to the method embodiments, please refer to the partial descriptions of the method embodiments for the relevant parts. The device embodiments described above are only illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of the present application. Those of ordinary skill in the art can understand and implement it without creative efforts.
[0148] For the embodiments of the communication device and the machine-readable storage medium, since the method content involved is basically similar to the foregoing method embodiments, the description is relatively simple, and please refer to the partial descriptions of the method embodiments for the relevant parts.
[0149] The above are only the preferred embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included within the scope of protection of the present application.
Claims
1. A communication method, characterized in that, The method is applied to a first node which is on an ERPS ring network, and the method includes: When the first node supports PBB, receive a first ERPS ring network message, where the first ERPS ring network message includes a first PBB tunnel header and a first service message, and the first PBB tunnel header includes a first destination MAC address; If there is a first node MAC table entry in the node MAC table that matches the first destination MAC address, use the user MAC table to forward-process the first service message; If there is no first node MAC table entry in the node MAC table that matches the first destination MAC address, obtain a first user MAC table entry that matches the first destination MAC address from the user MAC table, where the first user MAC table entry includes a first outgoing interface; Use the first outgoing interface to forward the first ERPS ring network message to a second node, where the second node is on the ERPS ring network.
2. The method according to claim 1, wherein The method further includes: Receive a second service message, where the second service message includes a second destination MAC address; If there is a second user MAC table entry in the user MAC table that matches the second destination MAC address, obtain a node MAC address from the second user MAC table entry; If the destination node indicated by the node MAC address supports PBB, encapsulate a second PBB tunnel header outside the second service message to obtain a second ERPS ring network message, where the second PBB tunnel header includes a second destination MAC address, and the second destination MAC address stores the node MAC address; According to the node MAC address, obtain a second node MAC table entry that matches the node MAC address from the node MAC table, where the second node MAC table entry includes a second outgoing interface; Use the second outgoing interface to forward the second ERPS ring network message to a third node, where the third node is on the ERPS ring network.
3. The method according to claim 1, wherein The method further includes: When the first node does not support PBB, receive a third ERPS ring network message, where the third ERPS ring network message includes a third PBB tunnel header and a third service message, and the third PBB tunnel header includes a third destination MAC address and a third source MAC address; If there is a third node MAC table entry in the node MAC table that matches the third destination MAC address, search the node mapping table according to the third source MAC address; If there is a first node mapping table entry in the node mapping table that matches the third source MAC address, obtain a double-layer VLAN tag from the node mapping table entry; Encapsulate the double-layer VLAN tag after the inner source MAC field included in the third service message to obtain an encapsulated third service message; Use the user MAC table to forward-process the encapsulated third service message.
4. The method according to claim 3, wherein The method further includes: If there is no third node MAC table entry matching the third destination MAC address in the node MAC table, the third ERPS ring network packet is forwarded using the user MAC table.
5. The method according to claim 3, wherein The method further includes: Receiving a fourth service packet, the fourth service packet including a fourth destination MAC address; If the destination node reaching the fourth destination MAC address supports PBB, obtaining a third user MAC table entry matching the fourth destination MAC address from the user MAC table, the third user MAC table entry including a double-layer VLAN tag; Searching the node MAC table according to the double-layer VLAN tag; If there is a third node MAC table entry matching the double-layer VLAN tag in the node MAC table, obtaining the node MAC address and the third outgoing interface from the third node MAC table entry; Encapsulating a fourth PBB tunnel header on the outer layer of the fourth service packet to obtain a fourth ERPS ring network packet, the fourth PBB tunnel header including the fourth destination MAC address, and the node MAC address being stored in the fourth destination MAC address; Forwarding the fourth ERPS ring network packet to a fourth node using the third outgoing interface, the fourth node being on the ERPS ring network.
6. The method according to claim 5, wherein The method further includes: If the destination node reaching the fourth destination MAC address does not support PBB, forwarding the fourth service packet to the destination node.
7. The method according to claim 1, wherein The ERPS ring network does not include RPL, and the method further includes: Receiving a fifth ERPS ring network packet, the fifth ERPS ring network packet including a fifth source MAC address; If the fifth source MAC address is its own MAC address, discarding the fifth ERPS ring network packet.
8. The method according to claim 7, wherein The method further includes: Receiving a sixth ERPS ring network packet, the sixth ERPS ring network including a sixth PBB tunnel header, the sixth PBB tunnel header including a first ring network tag; When detecting a link failure between the node and the next-hop node, obtaining a second ring network tag and a fourth outgoing interface; Updating the first ring network tag to the second ring network tag to obtain a seventh ERPS ring network packet; Forwarding the seventh ERPS ring network packet through the fourth outgoing interface.
9. The method according to claim 8, wherein The sixth PBB tunnel header further includes a sixth destination MAC address; The obtaining of the second ring network tag and the fourth outgoing interface specifically includes: When detecting a link failure between the node and the next-hop node, obtaining the protection rule configured in the first interface for receiving the sixth ERPS ring network packet according to the sixth destination MAC address, the protection rule including the second ring network tag and the fourth outgoing interface.
10. A communication device, characterized in that, The apparatus is applied to a first node, the first node being on the ERPS ring network, and the apparatus includes: A receiving unit, configured to receive a first ERPS ring network packet when the first node supports PBB, the first ERPS ring network packet including a first PBB tunnel header and a first service packet, the first PBB tunnel header including a first destination MAC address; A sending unit, configured to, if there is a first node MAC table entry matching the first destination MAC address in the node MAC table, perform forwarding processing on the first service message by using the user MAC table; An obtaining unit, configured to, if there is no first node MAC table entry matching the first destination MAC address in the node MAC table, obtain a first user MAC table entry matching the first destination MAC address from the user MAC table, where the first user MAC table entry includes a first outgoing interface; The sending unit is further configured to forward the first ERPS ring network message to a second node by using the first outgoing interface, where the second node is on the ERPS ring network.
Citation Information
Patent Citations
Method and device for handling ERPS (Ethernet Ring Protection Switching) protocol message
CN104702444A
Message forwarding method and device and storage medium
CN114500160A