CN113992570A - Message forwarding method and device - Google Patents

Message forwarding method and device Download PDF

Info

Publication number
CN113992570A
CN113992570A CN202111114967.9A CN202111114967A CN113992570A CN 113992570 A CN113992570 A CN 113992570A CN 202111114967 A CN202111114967 A CN 202111114967A CN 113992570 A CN113992570 A CN 113992570A
Authority
CN
China
Prior art keywords
route
next hop
port
message
node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111114967.9A
Other languages
Chinese (zh)
Other versions
CN113992570B (en
Inventor
赵海峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Security Technologies Co Ltd
Original Assignee
New H3C Security Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Security Technologies Co Ltd filed Critical New H3C Security Technologies Co Ltd
Priority to CN202111114967.9A priority Critical patent/CN113992570B/en
Publication of CN113992570A publication Critical patent/CN113992570A/en
Application granted granted Critical
Publication of CN113992570B publication Critical patent/CN113992570B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/28Routing or path finding of packets in data switching networks using route fault recovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/22Alternate routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides a message forwarding method and device. The method comprises the following steps: calculating a main route and a standby route reaching the sub-ring based on the converged route of the main network; setting the next hop of each IP address in the subring recorded by the forwarding information table as the next hop of the main route; setting an output port of a hardware loop switching table entry as a port connected with the next hop of the standby route; determining that a three-layer data message to be forwarded is a loop message of a main route; and sending the loop message through an output port in the hardware loop switching table entry.

Description

Message forwarding method and device
Technical Field
The present application relates to communications technologies, and in particular, to a method and a device for forwarding a packet.
Background
RRPP (fast Ring Protection Protocol) is a link layer Protocol specifically applied to ethernet rings. The method can prevent the broadcast storm caused by the data loop when the Ethernet ring is complete, and can quickly recover the communication path between each node on the ring network when one link on the Ethernet ring is disconnected, thereby having higher convergence speed. In RRPP networking, each RRPP domain may include multiple RRPP rings, which may include one main ring and more than one sub-ring.
In a typical RRPP networking shown in fig. 1, the RRPP domain includes a main ring in which nodes a to F are located and a sub-ring in which node A, F, H is located. After the routing of the main ring is converged, each node of the main ring calculates the routing of two directions reaching the sub-ring, selects the routing with low cost as the main routing, selects the routing with high cost as the standby routing, and forwards the three layers of messages sent to the sub-ring through the main routing. However, in the RRPP networking, when a link connected to an egress port of a primary route of a node on a main ring fails, a packet forwarding loop on the main ring is forwarded through a standby route, and the packet forwarding loop on the main ring cannot be eliminated until the route of the main ring is re-converged and the route reaching a sub-loop is re-calculated. For example, in fig. 1, when a path between node E and node F fails, node E receives a data packet sent by node D to node G, and sends the data packet back to node D through the backup route. The re-convergence of the routing of the main loop requires a certain time, during which the message forwarding loop will continuously cause forwarding failure.
Disclosure of Invention
The present application aims to provide a message forwarding method and device, which avoid a message forwarding loop caused by a link failure on a primary loop of a fast ring protection protocol.
In order to achieve the above object, the present application provides a packet forwarding method, including: calculating a main route and a standby route reaching the sub-ring based on the converged route of the main network; setting the next hop of each IP address in the subring recorded by the forwarding information table as the next hop of the main route; setting an output port of a hardware loop switching table entry as a port connected with the next hop of the standby route; determining that a three-layer data message to be forwarded is a loop message of a main route; and sending the loop message through an output port in the hardware loop switching table entry.
In order to achieve the above object, the present application further provides a message forwarding device, including: the routing module is used for calculating a main route and a standby route reaching the sub-ring based on the converged route of the main network; the table entry module is used for setting the next hop of each IP address in the subring recorded by the forwarding information table in the storage module as the next hop of the main route; setting an output port of a hardware loop switching table entry in an access control table in a storage module as a port connected with the next hop of the standby route; the receiving module is used for receiving the three-layer data message; the searching module is used for determining that the data message of the three layers to be forwarded is the loop message of the main route; and the sending module sends the loop message through an output port in the hardware loop switching table entry.
The method and the device have the advantages that in the RRPP networking, the loop messages appearing in the main route on the main loop are quickly switched to the standby route through the hardware loop switching table entry, the main loop routing of the RRPP networking does not need to wait for reconvergence, and the message forwarding loop is avoided.
Drawings
Fig. 1 illustrates a typical fast ring protection protocol RRPP networking;
fig. 2 is a flowchart of an embodiment of a message forwarding method provided in the present application;
fig. 3 is a schematic flow switching diagram of a fast ring protection protocol RRPP provided in the present application;
fig. 4 is a flowchart illustrating an embodiment of a message forwarding device provided in the present application.
Detailed Description
A detailed description will be given of a number of examples shown in a number of figures. In the following detailed description, numerous specific details are set forth in order to provide a thorough understanding of the present application. Well-known methods, procedures, components and circuits have not been described in detail so as not to obscure the examples.
The term "including" as that term is used is meant to include, but is not limited to; the term "comprising" means including but not limited to; the terms "above," "within," and "below" include the instant numbers; the terms "greater than" and "less than" mean that the number is not included. The term "based on" means based on at least a portion thereof.
Fig. 2 is a flowchart of an embodiment of a message forwarding method provided in the present application, where the method includes the following steps:
step 201, calculating a main route and a standby route reaching a sub-ring based on the converged route of the main network;
step 202, setting the next hop of each IP address in the subring recorded by the forwarding information table as the next hop of the main route;
step 203, setting the output port of the hardware loop switching table entry as the port of the next hop of the connection standby route;
step 204, determining that the data message of the three layers to be forwarded is a loop message of the main route;
step 205, sending the loop message through the output port in the hardware loop switching table entry.
The embodiment shown in fig. 2 has the beneficial effects that in the RRPP networking, the loop packet appearing in the primary route on the primary loop is quickly switched to the standby route through the hardware loop switching table entry, and the primary loop routing of the RRPP networking does not need to wait for reconvergence, thereby avoiding the packet forwarding loop.
Fig. 3 is a schematic diagram illustrating a traffic switching of a fast ring protection protocol RRPP provided in the present application,
the RRPP domain includes the main ring where nodes a-F are located and the sub-ring where node A, F, H is located. After the routing of the main ring is converged, each node of the main ring calculates the routing of two directions reaching the sub-ring, selects the routing with low cost as the main routing, selects the routing with high cost as the standby routing, and forwards the three layers of messages sent to the sub-ring through the main routing.
In this embodiment, the path of the primary route calculated by the node E is: node E- > node F; the path of the backup route calculated by the node E is: node E- > node D- > node C- > node B- > node A;
the path of the primary route calculated by the node D is: node D- > node E- > node F; the path of the backup route calculated by the node D is: node D- > node C- > node B- > node A;
the path of the primary route calculated by the node C is: node C- > node B- > node a; the path of the backup route calculated by the node C is: node C- > node D- > node E- > node F;
the path of the primary route calculated by the node B is: node B- > node A; the path of the backup route calculated by the node B is: node B- > node C- > node D- > node E- > node F.
Each node records the next hop reaching each IP address in the sub-ring in the routing table, including the main route and the standby route, and records the next hop reaching each IP address in the sub-ring in a Forwarding information table (FIB) of the switching chip, which is the next hop on the main route.
Each node configures a loop switching table entry in an ACL table of each exchange chip, and the matching entries in the loop switching table entry of each node are an input port of a three-layer data message and an output port of a next hop of a destination IP address of the three-layer data message in a forwarding information table; the action item is set by setting the port connecting the next hop of the standby route as the egress port.
Loop switching table entries in the ACL table set by the node B: the match terms are ingress port B1 and egress port B1, and the action terms are sent through the B2 port.
And loop switching table entries in the ACL table set by the node C: the match terms are ingress port C1 and egress port C1, and the action terms are sent through the C2 port.
And a loop switching table entry in an ACL table set by the node D: the match terms are ingress port D2 and egress port D2, and the action terms are sent through the D1 port.
And a loop switching table entry in an ACL table set by the node E: the match terms are ingress port E2 and egress port E2, and the action terms are sent through the E1 port.
Node D is taken as an example in the present application.
And the node E switches the list items in the loop set in the ACL list according to the standby route: the match terms are ingress port E2 and egress port E2, and the action terms are sent through the E1 port.
When receiving the three-layer data packet 301 from the terminal T1, the node D performs forwarding based on the primary route of the forwarding information table. And the node D finds that the output port of the next hop is D2 according to the destination IP address of the three-layer data message 301, and sends the data to the next hop node E of the main route through the port D2.
When the path between the node E and the node F fails, the node E receives the three-layer data packet 301 to be forwarded through the port E1, and sends the received three-layer data packet 301 to the node D according to the standby route in the routing table, so that a loop message appears.
At this time, the route on the main ring has not been re-converged, and node D cannot sense the link failure between node E and node F. The node D still performs forwarding according to the active route in the forwarding information table. The destination IP address of the three-layer data packet 301 received by the node D finds the egress port D2 whose next hop is the next hop of the primary route.
And the node D finds the matched loop switching table entry in the ACL table according to the ingress port D2 and the egress port D2 of the message, and then the node D sends the loop switching table entry to the next hop node C of the primary route through the port D1.
And the node C executes forwarding according to the main route in the forwarding information table. The destination IP address of the three-layer data packet 301 received by the node C finds the egress port C1 whose next hop is the next hop of the active route, and sends the egress port C1 to the node B. The node C has different ingress ports and egress ports for receiving the message, and does not need to execute loop message processing.
And the node B executes forwarding according to the main route in the forwarding information table. The destination IP address of the three-layer data packet 301 received by the node B finds the egress port B1 whose next hop is the next hop of the primary route, and sends the next hop to the node a through the egress port B1. The node B has different ingress ports and egress ports for receiving the message, and does not need to execute loop message processing. Finally, the node a sends the three-layer data packet 301 to the node to which the destination IP terminal is accessed in the sub-ring, which is the same as the existing method, and is incorporated herein without further description.
When the route of the main ring is converged again, if the link failure between the node E and the node F is not recovered, only one route of the node D reaches the sub-ring, the node D is configured in the forwarding information table, and the loop switching table entry in the ACL table is deleted.
According to the method and the device, the hardware loop switching table entry of the switching chip is used for quickly switching the loop message to the path of the standby route before the RRPP ring network has a link fault and the route is converged again, so that the message forwarding loop is avoided.
Fig. 4 is a flowchart illustrating an embodiment of a message forwarding apparatus provided in the present application, and fig. 4 is a schematic diagram illustrating an embodiment of an apparatus for modifying routing information of a policy route provided in the present application, where the apparatus 40 at least includes: network interface, exchange chip, CPU and memory. The exchange chip at least comprises a driving forwarding module and a routing information modification module. The processor executes the processor-executable instructions in the memory to execute the setting module and the control module.
The routing module is used for calculating a main route and a standby route reaching the sub-ring based on the converged route of the main network; the table entry module is used for setting the next hop of each IP address in the subring recorded by the forwarding information table in the storage module as the next hop of the main route; setting an output port of a hardware loop switching table entry in an access control table in a storage module as a port connected with the next hop of the standby route; the receiving module is used for receiving the three-layer data message; the searching module is used for determining that the data message of the three layers to be forwarded is the loop message of the main route; and the sending module sends the loop message through an output port in the hardware loop switching table entry.
In the hardware loop switching table entry of the access control table in the storage module, the matching entry is that a three-layer data message input port is an output port of the next hop of the destination IP address of the three-layer data message in the forwarding information table; the action item is set by setting the port connecting the next hop of the standby route as the egress port.
The searching module searches the next hop of the destination IP address of the three-layer data message to be forwarded in the forwarding information table; and determining to be matched with the matching item according to the found output port of the next hop and the hardware loop switching item such as port matching of the three-layer data message to be forwarded.
The routing module is also used for recalculating a new main route reaching the sub-ring after the main network reconverges; and the table entry module is also used for setting the next hop of each IP address in the subring recorded by the forwarding information table as the next hop of the new main route.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (8)

1. A message forwarding method is characterized in that the method comprises the following steps:
calculating a main route and a standby route reaching the sub-ring based on the converged route of the main network;
setting the next hop of each IP address in the subring recorded by a forwarding information table as the next hop of the main route;
setting an output port of a hardware loop switching table entry in an access control table as a port connected with the next hop of the standby route;
determining that the data message of the three layers to be forwarded is the loop message of the main route;
and sending the loop message through an output port in the hardware loop switching table entry.
2. The method according to claim 1, wherein in the hardware loop switching table entry, a matching entry is a three-layer data packet ingress port, which is an egress port of a next hop of a destination IP address of the three-layer data packet in the forwarding information table; the action item is that the port of the next hop connecting the standby route is set as an exit port.
3. The method according to claim 2, wherein it is determined that the three-layer data packet to be forwarded is the loop packet of the active route;
searching the next hop of the destination IP address of the three-layer data message to be forwarded in the forwarding information table;
and determining to be matched with the matching item according to the found port of the next hop and the port, such as the port, of the three-layer data message to be forwarded, matching the hardware loop switching item.
4. The method of claim 1, further comprising:
recalculating a new main route reaching the subring after reconvergence according to the main network;
and setting the next hop of each IP address in the subring recorded by the forwarding information table as the next hop of the new main route.
5. A message forwarding device, the device comprising:
the routing module is used for calculating a main route and a standby route reaching the sub-ring based on the converged route of the main network;
the table entry module is used for setting the next hop of each IP address in the subring recorded by the forwarding information table in the storage module as the next hop of the main route; setting an output port of a hardware loop switching table entry in an access control table in the storage module as a port connected with the next hop of the standby route;
the receiving module is used for receiving the three-layer data message;
the searching module is used for determining that the data message of the three layers to be forwarded is the loop message of the main route;
and the sending module sends the loop message through an output port in the hardware loop switching table entry.
6. The apparatus according to claim 5, wherein, in the hardware loop switching table entry of the access control table in the storage module, a matching entry is a three-layer data ingress port, which is an egress port of a next hop of a destination IP address of the three-layer data packet in the forwarding information table; the action item is that the port of the next hop connecting the standby route is set as an exit port.
7. The apparatus of claim 6,
the searching module searches the next hop of the destination IP address of the three-layer data message to be forwarded in the forwarding information table; and determining to be matched with the matching item according to the found port of the next hop and the port, such as the port, of the three-layer data message to be forwarded, matching the hardware loop switching item.
8. The device according to claim 5, wherein the routing module is further configured to recalculate the new primary route to the sub-ring after reconvergence of the primary network;
the table entry module is further configured to set a next hop of each IP address in the sub-ring recorded in the forwarding information table as a next hop of the new primary route.
CN202111114967.9A 2021-09-23 2021-09-23 Message forwarding method and device Active CN113992570B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111114967.9A CN113992570B (en) 2021-09-23 2021-09-23 Message forwarding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111114967.9A CN113992570B (en) 2021-09-23 2021-09-23 Message forwarding method and device

Publications (2)

Publication Number Publication Date
CN113992570A true CN113992570A (en) 2022-01-28
CN113992570B CN113992570B (en) 2023-11-03

Family

ID=79736364

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111114967.9A Active CN113992570B (en) 2021-09-23 2021-09-23 Message forwarding method and device

Country Status (1)

Country Link
CN (1) CN113992570B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101272352A (en) * 2008-05-20 2008-09-24 杭州华三通信技术有限公司 Looped network routing method and looped network node
US20100238800A1 (en) * 2007-12-12 2010-09-23 Huawei Technologies Co., Ltd. Method and Node Device for Fault Detection and Convergence in Ethernet
CN104125148A (en) * 2014-08-12 2014-10-29 烽火通信科技股份有限公司 Defect sensing and route entry refreshing method for three-layer Ethernet ring
CN111431798A (en) * 2020-03-31 2020-07-17 新华三信息安全技术有限公司 Route switching method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100238800A1 (en) * 2007-12-12 2010-09-23 Huawei Technologies Co., Ltd. Method and Node Device for Fault Detection and Convergence in Ethernet
CN101272352A (en) * 2008-05-20 2008-09-24 杭州华三通信技术有限公司 Looped network routing method and looped network node
CN104125148A (en) * 2014-08-12 2014-10-29 烽火通信科技股份有限公司 Defect sensing and route entry refreshing method for three-layer Ethernet ring
CN111431798A (en) * 2020-03-31 2020-07-17 新华三信息安全技术有限公司 Route switching method and device

Also Published As

Publication number Publication date
CN113992570B (en) 2023-11-03

Similar Documents

Publication Publication Date Title
CN110166356B (en) Method and network equipment for sending message
US7675859B2 (en) Transmission apparatus and transmission system
US7606177B1 (en) Value-added features for the spanning tree protocol
CN101047601B (en) Implementing method and system of double-attach network based on VPLS
CN107257320B (en) Method and system for Shortest Path Bridging (SPB) enhanced resiliency with loop suppression
US8345699B2 (en) System and method for enabling a remote instance of a loop avoidance protocol
US8565069B2 (en) Method of shrinking a data loss window in a packet network device
US10110482B2 (en) Technique for network service availability
US7778266B2 (en) Switch and network fault recovery method
CN110798403B (en) Communication method, communication device and communication system
US20090252030A1 (en) Reducing traffic loss in an eaps system
US20130272114A1 (en) Pseudo wire switching method and device
US20100303081A1 (en) Communication system and method for forwarding a packet among a plurality of edge routers
CN101610221B (en) IP unicast smoothly switching method during STP switch and device thereof
US11552882B2 (en) Efficient propagation of fault routing notifications
WO2012077126A1 (en) A method and system for loop avoidance in a communication network
EP2899919A1 (en) Distributed link aggregation group service handover method and device
CN107682261B (en) Flow forwarding method and device
US9716639B2 (en) Protection switching method and system
US20240214243A1 (en) Designated forwarder df election method and device
CN115277305A (en) Network management method, device, equipment and machine readable storage medium
JP2001007846A (en) Frame repeater
CN113973020B (en) Method, device and system for sending multicast message
Huynh et al. RRR: Rapid ring recovery submillisecond decentralized recovery for ethernet ring
CN113992570B (en) Message forwarding method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant