CN113992570B - Message forwarding method and device - Google Patents

Message forwarding method and device Download PDF

Info

Publication number
CN113992570B
CN113992570B CN202111114967.9A CN202111114967A CN113992570B CN 113992570 B CN113992570 B CN 113992570B CN 202111114967 A CN202111114967 A CN 202111114967A CN 113992570 B CN113992570 B CN 113992570B
Authority
CN
China
Prior art keywords
route
next hop
port
message
layer data
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.)
Active
Application number
CN202111114967.9A
Other languages
Chinese (zh)
Other versions
CN113992570A (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

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 primary route and a standby route reaching the sub-ring based on the converged route of the primary network; setting the next hop of each IP address in the sub-ring recorded by the forwarding information table as the next hop of the main route; setting the output port of the hardware loop switching table item as the port of the next hop connected with the standby route; determining that the three-layer data message to be forwarded is a loop message of the main route; and sending the loop message through the output port in the hardware loop switching table item.

Description

Message forwarding method and device
Technical Field
The present application relates to communications technologies, and in particular, to a method and apparatus for forwarding a message.
Background
RRPP (Rapid Ring Protection Protocol, fast ring protection protocol) is a link layer protocol that is specifically applied to the ethernet ring. When the Ethernet ring is complete, the method can prevent broadcast storm caused by the data loop, and when one link on the Ethernet ring is disconnected, the communication path between all nodes on the ring can be quickly recovered, so that the method has higher convergence rate. In an RRPP networking, each RRPP domain may include multiple RRPP loops, which may include one main loop and more than one sub-loop.
In a typical RRPP network shown in FIG. 1, the RRPP domain includes a main ring where node A-node F is located and a sub-ring where node A, F, H is located. After the main loop is converged, each node of the main loop calculates routes in two directions reaching the sub-loop, selects a route with small cost as a main route, selects a route with large cost as a standby route, and forwards three layers of messages sent to the sub-loop through the main route. However, in the RRPP networking, when a link connected to an output port of a primary route of a node on a primary ring fails, a message forwarding loop on the primary ring is forwarded through a standby route, and the message forwarding loop on the primary ring cannot be eliminated until the route of the primary ring is re-converged, and the route reaching a sub-loop is recalculated. For example, in fig. 1, when node E receives a data packet sent from node D to node G in the event of a path failure between node E and node F, the data packet is sent back to node D via the backup route. And the main ring route re-convergence requires a certain time, during which the message forwarding loop can continuously cause forwarding failure.
Disclosure of Invention
The application aims to provide a message forwarding method and equipment, which avoid a message forwarding loop caused by the uplink fault of a main ring of a fast ring network protection protocol.
In order to achieve the above object, the present application provides a method for forwarding a message, which includes: calculating a primary route and a standby route reaching the sub-ring based on the converged route of the primary network; setting the next hop of each IP address in the sub-ring recorded by the forwarding information table as the next hop of the main route; setting the output port of the hardware loop switching table item as the port of the next hop connected with the standby route; determining that the three-layer data message to be forwarded is a loop message of the main route; and sending the loop message through the output port in the hardware loop switching table item.
In order to achieve the above object, the present application further provides a message forwarding device, which includes: the routing module is used for calculating a main route and a standby route reaching the subring 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 sub-ring recorded by the forwarding information table in the storage module as the next hop of the main route; setting an outlet port of a hardware loop switching table item in an access control table in a storage module as a port of the next hop connected with the standby route; the receiving module is used for receiving the three-layer data message; the searching module is used for determining that the three-layer data message to be forwarded is a loop message of the main route; and the sending module is used for sending the loop message through the outlet port in the hardware loop switching table item.
The application has the advantages that the loop message appearing in the main route on the main loop is rapidly switched to the standby route through the hardware loop switching table entry in the RRPP networking, the main loop route of the RRPP networking is not required to be converged again, and the message forwarding loop is avoided.
Drawings
Fig. 1 is a schematic diagram of a typical rapid 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 rapid ring protection protocol RRPP provided by the present application;
fig. 4 is a flowchart of an embodiment of a packet forwarding device provided by the present application.
Detailed Description
A plurality of examples shown in the drawings will be described in detail. In the following detailed description, numerous specific details are set forth in order to provide a thorough understanding of the application. Well-known methods, procedures, components and circuits have not been described in detail so as not to obscure the examples.
The term "comprising" as used in the terminology includes, but is not limited to; the term "comprising" means including but not limited to; the terms "above," "within," and "below" encompass the present number; the terms "greater than", "less than" mean that the number is not inclusive. The term "based on" means based at least in part on a portion thereof.
Fig. 2 is a flowchart of an embodiment of a message forwarding method provided by the present application, where the method includes the following steps:
step 201, calculating a primary route and a standby route reaching a sub-ring based on a converged route of a primary network;
step 202, setting the next hop of each IP address in the sub-ring 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 item to be the port of the next hop connected with the standby route;
step 204, determining that the three-layer data message to be forwarded is a loop message of the main route;
and step 205, sending a loop message through an outlet port in the hardware loop switching table item.
The embodiment shown in fig. 2 has the beneficial effects that the loop message appearing in the main route on the main loop is quickly switched to the standby route through the hardware loop switching table entry in the RRPP networking, so that the main loop route of the RRPP networking does not need to wait for reconvergence, and the message forwarding loop is avoided.
Figure 3 is a schematic diagram showing the flow switching of the rapid ring protection protocol RRPP provided by the present application,
the RRPP domain includes the main ring where node a-node F is located and the sub-ring where node A, F, H is located. After the main loop is converged, each node of the main loop calculates routes in two directions reaching the sub-loop, selects a route with small cost as a main route, selects a route with large cost as a standby route, and forwards three layers of messages sent to the sub-loop through the main route.
In this embodiment, the path of the primary route calculated by the node E is: node E- > node F; the path of the standby 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 standby 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 standby 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 that the next hop reaching each IP address in the sub-ring comprises a main route and a standby route in a route table, and records that the next hop reaching each IP address in the sub-ring is the next hop on the main route in a forwarding information table (Forwarding Info Base, FIB) of the exchange chip.
Each node configures a loop switching table item in an ACL (access control list) of each switching chip, and in the loop switching table item of each node, the matching item is an input port of the three-layer data message and an output port of a destination IP (Internet protocol) address of the three-layer data message in the next hop of the forwarding information table; the action item is by setting the port of the next hop connecting the standby route as the egress port.
Loop switching table item in ACL table set by node B: the matching item is the ingress port B1 and the egress port B1, and the action item is sent through the B2 port.
Loop switching table items in the ACL table set by the node C: the matching item is the ingress port C1 and the egress port C1, and the action item is sent through the C2 port.
Loop switching table item in ACL table set by node D: the matching item is the ingress port D2 and the egress port D2, and the action item is sent through the D1 port.
Loop switching table item in ACL table set by node E: the matching item is the ingress port E2 and the egress port E2, and the action item is sent through the E1 port.
The present application takes node D as an example.
Node E, according to the standby route, in the loop switching table item set in the ACL table: the matching item is the ingress port E2 and the egress port E2, and the action item is sent through the E1 port.
When node D receives the three-layer data packet 301 from the terminal T1, forwarding is performed according to the primary route of the forwarding information table. The node D finds that the exit port of the next hop is D2 according to the destination IP address of the three-layer data packet 301, and sends the found exit port to the next hop node E of the primary route through the port D2.
And when the path between the node E and the node F fails, the node E receives the three-layer data message 301 to be forwarded through the port E1, and sends the received three-layer data message 301 to the node D according to the standby route in the routing table, so that a loop message appears.
At this point, the primary ring route has not yet re-converged, and node D has not yet been able to perceive a link failure between node E and node F. Node D still performs forwarding according to the primary 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 of which the next hop is the next hop of the primary route.
And the node D searches the matched loop switching table item in the ACL table according to the input port D2 and the output port D2 of the message, and then the node D sends the loop switching table item to the next hop node C of the main 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 of which the next hop is the next hop of the primary route, and sends the found egress port C1 to the node B. The input port and the output port of the message received by the node C are different, and loop message processing is not required to be executed.
The node B 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 B finds the egress port B1 of which the next hop is the next hop of the primary route, and sends the egress port B1 to the node a. The node B receives the different in port and out port of the message, also do not need to carry out the loop message processing. Finally, the node a sends the three-layer data message 301 to the node accessed by the destination IP terminal in the sub-ring, which is the same as the existing mode, and the present application incorporates the same and will not be repeated.
When the route of the main ring is re-converged, if the link fault between the node E and the node F is not recovered, only one route of the node D reaches the sub-ring, the sub-ring is configured in the forwarding information table, and the loop switching table item in the ACL table is deleted.
The application switches the loop message to the path of the standby route rapidly before the RRPP ring network has link failure and route reconvergence by exchanging the hardware loop switching table items of the chip, thereby avoiding the message forwarding loop.
Fig. 4 is a flowchart of an embodiment of a packet forwarding device provided by the present application, and fig. 4 is a schematic diagram of an embodiment of a device for modifying routing information of a policy route provided by the present application, where the device 40 at least includes: network interface, exchange chip, CPU and memory. The exchange chip at least comprises a drive forwarding module and a route information modifying module. The processor is configured to execute the setting module and the control module by executing processor-executable instructions in the memory.
The routing module is used for calculating a main route and a standby route reaching the subring 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 sub-ring recorded by the forwarding information table in the storage module as the next hop of the main route; setting an outlet port of a hardware loop switching table item in an access control table in a storage module as a port of the next hop connected with the standby route; the receiving module is used for receiving the three-layer data message; the searching module is used for determining that the three-layer data message to be forwarded is a loop message of the main route; and the sending module is used for sending the loop message through the outlet port in the hardware loop switching table item.
In a hardware loop switching table item of an access control table in the storage module, the matching item is that a three-layer data message input port is an output port of a destination IP address of a three-layer data message in the next hop of a forwarding information table; the action item is by setting the port of the next hop connecting 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 according to the found out outlet port of the next hop and the hardware loop switching list item such as port matching of the three-layer data message to be forwarded, determining matching with the matching item.
The routing module is also used for recalculating a new main route reaching the sub-ring after the main network is reconverged; and the table entry module is also used for setting the next hop of each IP address in the sub-ring recorded by the forwarding information table as the next hop of the new main route.
The foregoing description of the preferred embodiments of the application is not intended to be limiting, but rather to enable any modification, equivalent replacement, improvement or the like to be made within the spirit and principles of the application.

Claims (6)

1. A method for forwarding a message, the method comprising:
calculating a primary route and a standby route reaching the sub-ring based on the converged route of the primary network;
setting the next hop of each IP address in the sub-ring recorded by a forwarding information table as the next hop of the main route;
setting an outlet port of a hardware loop switching table item in an access control table as a port of the next hop connected with the standby route; in the hardware loop switching table item, the matching item is that a three-layer data message input port is an output port of a destination IP address of the three-layer data message in the next hop of the forwarding information table; the action item is that the port of the next hop connected with the standby route is set as an output port;
determining that the three-layer data message to be forwarded is the loop message of the main route;
and sending the loop message through an outlet port in the hardware loop switching table item.
2. The method of claim 1, wherein determining that the three layer data message to be forwarded is a loop message of the primary 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 according to the found out outlet port of the next hop and the hardware loop switching table item matched with the port of the three-layer data message to be forwarded, determining to be matched with the matching item.
3. The method according to claim 1, wherein the method further comprises:
re-calculating a new main route reaching the sub-ring after re-convergence according to the main network;
setting the next hop of each IP address in the sub-ring recorded by the forwarding information table as the next hop of the new main route.
4. A message forwarding device, the device comprising:
the routing module is used for calculating a main route and a standby route reaching the subring 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 sub-ring recorded by the forwarding information table in the storage module as the next hop of the main route; setting an outlet port of a hardware loop switching table item in an access control table in the storage module as a port of the next hop connected with the standby route; in the hardware loop switching table item, the matching item is that a three-layer data message input port is an output port of a destination IP address of the three-layer data message in the next hop of the forwarding information table; the action item is that the port of the next hop connected with the standby route is set as an output port;
the receiving module is used for receiving the three-layer data message;
the searching module determines that the three-layer data message to be forwarded is the loop message of the main route;
and the sending module is used for sending the loop message through the outlet port in the hardware loop switching table item.
5. The apparatus of claim 4, wherein the device comprises a plurality of sensors,
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 according to the found out outlet port of the next hop and the hardware loop switching table item matched with the port of the three-layer data message to be forwarded, determining to be matched with the matching item.
6. The apparatus of claim 4, wherein the routing module is further configured to recalculate a new active route to the sub-ring after reconvergence according to 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 CN113992570A (en) 2022-01-28
CN113992570B true 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 (3)

* 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
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101207521A (en) * 2007-12-12 2008-06-25 华为技术有限公司 Method for fault detection and convergence of Ethernet and node apparatus

Patent Citations (3)

* 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
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
CN113992570A (en) 2022-01-28

Similar Documents

Publication Publication Date Title
US7606177B1 (en) Value-added features for the spanning tree protocol
CN110166356B (en) Method and network equipment for sending message
CN107257320B (en) Method and system for Shortest Path Bridging (SPB) enhanced resiliency with loop suppression
US7428237B1 (en) Fast convergence with topology switching
US6898189B1 (en) Restartable spanning tree for high availability network systems
US8325629B2 (en) System and method for assuring the operation of network devices in bridged networks
US6801506B1 (en) Method and apparatus for providing fast spanning tree re-starts
US7675859B2 (en) Transmission apparatus and transmission system
EP2643940B1 (en) Method of shrinking a data loss window in a packet network device
US8345699B2 (en) System and method for enabling a remote instance of a loop avoidance protocol
US8446819B2 (en) System and method for detecting and isolating a remote loop
US20110267983A1 (en) System And Method For Multiple Spanning Tree Protocol Domains In A Virtual Local Area Network
EP2689561B1 (en) Directing traffic in an edge network element operable to perform layer 2 data forwarding and supporting any of various spanning tree protocols
KR20060048725A (en) Method and apparatus providing rapid end-to end failover in a packet switched communications network
CN101610221B (en) IP unicast smoothly switching method during STP switch and device thereof
EP2899919A1 (en) Distributed link aggregation group service handover method and device
US9716639B2 (en) Protection switching method and system
US7170892B2 (en) Network element, and associated method, for facilitating communication of data between elemental devices
US8218433B2 (en) Monitoring connectivity in ring networks
JP2001007846A (en) Frame repeater
CN113992570B (en) Message forwarding method and device
Huynh et al. RRR: Rapid ring recovery submillisecond decentralized recovery for ethernet ring
JP2010141845A (en) Communication apparatus including multiple servers and communication method
CN113973072B (en) Message sending method, device and system
CN115297051A (en) Fast reroute using egress port loopback

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