CN111654437B - Message forwarding method and device based on data center - Google Patents

Message forwarding method and device based on data center Download PDF

Info

Publication number
CN111654437B
CN111654437B CN202010523276.3A CN202010523276A CN111654437B CN 111654437 B CN111654437 B CN 111654437B CN 202010523276 A CN202010523276 A CN 202010523276A CN 111654437 B CN111654437 B CN 111654437B
Authority
CN
China
Prior art keywords
group
forwarding table
route forwarding
interface
cost multi
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
CN202010523276.3A
Other languages
Chinese (zh)
Other versions
CN111654437A (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.)
Ruijie Networks Co Ltd
Original Assignee
Ruijie Networks 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 Ruijie Networks Co Ltd filed Critical Ruijie Networks Co Ltd
Priority to CN202010523276.3A priority Critical patent/CN111654437B/en
Publication of CN111654437A publication Critical patent/CN111654437A/en
Application granted granted Critical
Publication of CN111654437B publication Critical patent/CN111654437B/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/24Multipath
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Abstract

The invention discloses a message forwarding method and a device based on a data center, wherein the method comprises the following steps: determining a first shared risk link group to which a receiving interface of a message belongs; searching a first route forwarding table item corresponding to the destination IP address of the message in a route forwarding table; if the first route forwarding table entry is found in the route forwarding table, finding a first set equal-cost multi-path group corresponding to the first shared risk link group in the first route forwarding table entry; if the first set equal cost multi-path group is found in the first route forwarding table entry, forwarding the message according to the first set equal cost multi-path group; and if the first set equal cost multi-path group is not found in the route forwarding table entry, forwarding the message according to a first original equal cost multi-path group in the first route forwarding table entry. The scheme can avoid the generation of a three-layer loop, also can avoid packet loss and ensure the normal forwarding of the service message.

Description

Message forwarding method and device based on data center
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for forwarding a packet based on a data center.
Background
In the data center shown in fig. 1, the metro network switch may issue a default route to the core switch, the aggregation switch, and the access switch for accessing the external network and accessing across the data center, and the access switch issues a host route of the drop host to the aggregation switch and the core switch for accessing the drop host of the access switch. Supposing that a link between the aggregation switch 1 and the access switch 1 is in fault, the aggregation switch 1 preferentially deletes a host route from the access switch 1, at this time, a message of a downlink host of the external access switch 1 is forwarded to the aggregation switch 1 and the aggregation switch 2 from the core switch 1 and the core switch 2, the aggregation switch 1 matches to a default route according to a longest matching principle, and forwards the message to the core switch 1 and the core switch 2; the core switch 1 and the core switch 2 retransmit the packet to the aggregation switch 1 and the aggregation switch 2, which causes a transient three-layer loop to appear between the core switch 1, the core switch 2 and the aggregation switch 1 until the aggregation switch 1 notifies the core switch 1 and the core switch 2 to delete the host route from the access switch 1; when the core switch 1 and the core switch 2 delete the next hop of the host route using the aggregation switch 1 as the access switch 1 and only reserve the aggregation switch 2 as the next hop of the host route using the access switch 1, the packet is forwarded to the aggregation switch 2, and the three-layer loop can be released.
In the message forwarding method, a three-layer loop is generated, and the short three-layer loop causes packet loss of a message part of a downlink host of the access switch 1; and link congestion between the core switch 1, the core switch 2 and the aggregation switch 1 can be caused, thereby affecting normal forwarding of other service messages.
Disclosure of Invention
The embodiment of the invention provides a message forwarding method and device based on a data center, which are used for solving the problem of three-layer loops in the prior art.
According to an embodiment of the present invention, a method for forwarding a packet based on a data center is provided, which is applied to a core switch included in the data center, and includes:
determining a first shared risk link group to which a receiving interface of a message belongs, wherein the first shared risk link group comprises each interface connected between a switch connected with the receiving interface and the core switch;
searching a first route forwarding table item corresponding to a destination Internet Protocol (IP) address of the message in a route forwarding table;
if the first route forwarding table entry is found in the route forwarding table, finding a first set equal-cost multi-path group corresponding to the first shared risk link group in the first route forwarding table entry;
if the first set equal cost multi-path group is found in the first route forwarding table entry, forwarding the message according to the first set equal cost multi-path group; if the first set equal cost multi-path group is not found in the route forwarding table entry, forwarding the message according to a first original equal cost multi-path group in the first route forwarding table entry; the interfaces included in the first set equal cost multi-path group are interfaces except the interfaces belonging to the first shared risk link group in the interfaces included in the first original equal cost multi-path group.
Optionally, the method further includes:
setting interfaces connected with the switches with the same networking role in all the interfaces of the core switch as a load sharing interface group;
and setting the interfaces connected with the same switch in all the interfaces of the core switch as a shared risk link group.
Optionally, the method further includes:
after learning a second route forwarding table entry, determining whether each interface included in a second original equivalent multipath group in the second route forwarding table entry belongs to the same load sharing interface group;
if it is determined that each interface included in the second original equal-cost multi-path group belongs to the same load sharing interface group, determining a shared risk link risk group to which each interface included in the second original equal-cost multi-path group belongs;
and adding a set equal cost multi-path group corresponding to each determined shared risk link group in the second route forwarding table entry, wherein an interface included in each added set equal cost multi-path group is an interface except for an interface included in the corresponding shared risk link group in the interfaces included in the second original equal cost multi-path group.
Optionally, the method further includes:
and if the first route forwarding table entry is not found in the route forwarding table, discarding the message.
According to an embodiment of the present invention, there is also provided a data center-based packet forwarding apparatus, applied to a core switch included in the data center, including:
a first determining module, configured to determine a first shared risk link group to which a receiving interface of a packet belongs, where the first shared risk link group includes each interface connected between a switch connected to the receiving interface and the core switch;
the first searching module is used for searching a first route forwarding table item corresponding to the destination IP address of the message in a route forwarding table;
a second searching module, configured to search a first set equal-cost multipath group corresponding to the first shared risk link group in the first route forwarding table entry if the first route forwarding table entry is found in the route forwarding table;
a forwarding module, configured to forward the packet according to the first set equal cost multipath group if the first set equal cost multipath group is found in the first route forwarding entry; if the first set equal cost multi-path group is not found in the route forwarding table entry, forwarding the message according to a first original equal cost multi-path group in the first route forwarding table entry; the interfaces included in the first set equal cost multi-path group are interfaces except the interfaces belonging to the first shared risk link group in the interfaces included in the first original equal cost multi-path group.
Optionally, the system further comprises a setting module, configured to:
setting interfaces connected with the switches with the same networking role in all the interfaces of the core switch as a load sharing interface group;
and setting the interfaces connected with the same switch in all the interfaces of the core switch as a shared risk link group.
Optionally, the apparatus further includes a second determining module, configured to:
after learning a second route forwarding table entry, determining whether each interface included in a second original equivalent multipath group in the second route forwarding table entry belongs to the same load sharing interface group;
if it is determined that each interface included in the second original equal-cost multi-path group belongs to the same load sharing interface group, determining a shared risk link risk group to which each interface included in the second original equal-cost multi-path group belongs;
and adding a set equal cost multi-path group corresponding to each determined shared risk link group in the second route forwarding table entry, wherein an interface included in each added set equal cost multi-path group is an interface except for an interface included in the corresponding shared risk link group in the interfaces included in the second original equal cost multi-path group.
Optionally, the system further comprises a discarding module, configured to:
and if the first route forwarding table entry is not found in the route forwarding table, discarding the message.
According to the embodiment of the invention, the electronic equipment comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
a memory for storing a computer program;
a processor for implementing the above method steps when executing the program stored in the memory.
According to an embodiment of the present invention, there is also provided a computer-readable storage medium having stored therein a computer program, which when executed by a processor, performs the above-mentioned method steps.
The invention has the following beneficial effects:
the embodiment of the invention provides a message forwarding method and a device based on a data center, wherein a first shared risk link group to which a receiving interface of a message belongs is determined, and the first shared risk link group comprises each interface connected between a switch connected with the receiving interface and a core switch; searching a first route forwarding table item corresponding to a destination Internet Protocol (IP) address of the message in a route forwarding table; if the first route forwarding table entry is found in the route forwarding table, finding a first set equal-cost multi-path group corresponding to the first shared risk link group in the first route forwarding table entry; if the first set equal cost multi-path group is found in the first route forwarding table entry, forwarding the message according to the first set equal cost multi-path group; if the first set equal cost multi-path group is not found in the route forwarding table entry, forwarding the message according to a first original equal cost multi-path group in the first route forwarding table entry; the interfaces included in the first set equal cost multi-path group are interfaces except the interfaces belonging to the first shared risk link group in the interfaces included in the first original equal cost multi-path group. In the scheme, after receiving a message, a core switch searches for a first set equal cost multi-path group corresponding to a first shared risk link group to which a receiving interface of the message belongs in a first route forwarding table entry, if the first set equal cost multi-path group is found, the message is forwarded through the first set equal cost multi-path group, and because an interface included in the first set equal cost multi-path group is an interface except an interface included in a first original equal cost multi-path group, and the interface of the first shared risk link group is connected with the same device, the message is not forwarded through an interface included in the first shared risk link group to which the receiving interface of the message belongs, and the message is also ensured not to be forwarded to a switch which sends the message; if the first set equal cost multi-path group is not found, it is indicated that the interface included in the first original equal cost multi-path group does not include the interface included in the first shared risk link group, the message can be forwarded according to the first original equal cost multi-path group in the first route forwarding table entry, and thus it can be ensured that the message is not forwarded to the switch sending the message.
Drawings
FIG. 1 is an architecture diagram of a prior art data center;
fig. 2 is a flowchart of a data center-based message forwarding method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a data center-based message forwarding apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device shown in the present application.
Detailed Description
To solve the problem of three-layer loops in the prior art, an embodiment of the present invention provides a packet forwarding method based on a data center, which is applied to a core switch included in the data center, and a flow of the method is shown in fig. 2, and the method includes the following steps:
s21: and determining a first shared risk link group to which a receiving interface of the message belongs.
The first shared risk link group includes interfaces connected between the switch receiving the interface connection and the core switch, that is, the interfaces connected to the same switch may be set as a shared risk link group.
S22: searching a first route forwarding table entry corresponding to a destination Internet Protocol (IP) address of the message in the route forwarding table, and if the first route forwarding table entry is found in the route forwarding table, executing S23; if the first route forwarding table entry is not found in the route forwarding table, S26 is executed.
S23: searching a first set equal cost multipath group corresponding to the first shared risk link group in the first route forwarding table entry, and if the first set equal cost multipath group is searched in the first route forwarding table entry, executing S24; if the first set equal cost multi-path group is not found in the route forwarding entry, S25 is executed.
If the first route forwarding entry is found in the route forwarding table, the packet may be processed according to the first route forwarding entry, specifically, a set equal cost multi-path group corresponding to the first shared risk link group may be found in the first route forwarding entry, and the set equal cost multi-path group may be defined as a first set equal cost multi-path group.
S24: and forwarding the message according to the first set equal cost multipath group.
S25: and forwarding the message according to the first original equivalent multipath group in the first route forwarding table entry.
The interfaces included in the first set equal-cost multipath group are interfaces except the interfaces belonging to the first shared risk link group in the interfaces included in the first original equal-cost multipath group.
S26: and discarding the message.
If the destination IP address of the message is not found in the route forwarding table, the message cannot be forwarded, and the message can be directly discarded.
In the scheme, after receiving a message, a core switch searches for a first set equal cost multi-path group corresponding to a first shared risk link group to which a receiving interface of the message belongs in a first route forwarding table entry, if the first set equal cost multi-path group is found, the message is forwarded through the first set equal cost multi-path group, and because an interface included in the first set equal cost multi-path group is an interface except an interface included in a first original equal cost multi-path group, and the interface of the first shared risk link group is connected with the same device, the message is not forwarded through an interface included in the first shared risk link group to which the receiving interface of the message belongs, and the message is also ensured not to be forwarded to a switch which sends the message; if the first set equal cost multi-path group is not found, it is indicated that the interface included in the first original equal cost multi-path group does not include the interface included in the first shared risk link group, the message can be forwarded according to the first original equal cost multi-path group in the first route forwarding table entry, and thus it can be ensured that the message is not forwarded to the switch sending the message.
Optionally, the method further includes:
setting interfaces connected with the switches with the same networking role in all interfaces of the core switch as a load sharing interface group;
and setting the interface connected with the same switch in all the interfaces of the core switch as a shared risk link group.
As shown in fig. 1, for the core switch 1 and the core switch 2, the interface connected to the metro network switch may be set as one load sharing group, and the aggregation switch 1 and the aggregation switch 2 are both aggregation switches in the networking role of the data center, so that the interface connected to the aggregation switch 1 and the aggregation switch 2 may be set as another load sharing group, and then the interface connected to the aggregation switch 1 may be set as one shared risk link group, and the interface connected to the aggregation switch 2 may be set as another shared risk link group.
Correspondingly, the method further comprises the following steps:
after learning the second route forwarding table entry, determining whether each interface included in the second original equivalent multi-path group in the second route forwarding table entry belongs to the same load sharing interface group;
if it is determined that each interface included in the second original equal cost multi-path group belongs to the same load sharing interface group, determining a shared risk link risk group to which each interface included in the second original equal cost multi-path group belongs;
and adding a set equal-cost multi-path group corresponding to each determined shared risk link group in a second route forwarding table entry, wherein an interface included in each added set equal-cost multi-path group is an interface except for an interface included in the corresponding shared risk link group in the interfaces included in the second original equal-cost multi-path group.
The core switch may continuously learn a routing forwarding entry, where the routing forwarding entry may be defined as a second routing forwarding entry, an equal cost multi-path group included in the second routing forwarding entry may be defined as a second original equal cost multi-path group, and it may be determined whether each interface included in the second original equal cost multi-path group belongs to the same load sharing interface group, and if it is determined that each interface included in the second original equal cost multi-path group belongs to the same load sharing interface group, a three-layer loop may be generated, it is necessary to further determine a shared risk link risk group to which each interface included in the second original equal cost multi-path group belongs, and then add a set equal cost group corresponding to each determined shared risk link group in the second routing forwarding entry, where an interface included in each set equal cost multi-path group is an interface included in the second original equal cost multi-path group, excluding an interface included in the corresponding shared risk link group Thus, it can be ensured that the received message is not forwarded to the switch that sent the message.
It should be noted that the second route forwarding table entry may be the same as or different from the first route forwarding table entry.
The following description will be given by taking the core switch 1 shown in fig. 1 as an example, assuming that interfaces of the core switch 1 and the aggregation switch 1 are Gi0/0 and Gi0/1, next hop addresses are 10.1.0.1 and 10.1.1.1, interfaces of the core switch 1 and the aggregation switch 2 are Gi0/2 and Gi0/3, next hop addresses are 10.1.2.1 and 10.1.3.1, interfaces of the core switch 1 and the metro network switch are Gi0/4 and Gi0/5, and next hop addresses are 10.1.4.1 and 10.1.5.1, Gi0/0, Gi0/1, Gi0/2 and Gi0/3 can be configured as a load sharing interface group 1, Gi 38/4 and Gi0/5 can be configured as a load sharing interface group 2, Gi0/0 and Gi0/1 can be configured as a load sharing interface group 2, Gi0/1 and Gi0/2 can be configured as a load sharing link group 2/2, Gi0/3 is configured as shared risk link group 2, and Gi0/4, Gi0/5 are configured as shared risk link group 3.
If the routing table entry 100.1.1.1/32 from the access switch 1 is learned, its next hop and egress interface are <10.1.0.1, Gi0/0>, <10.1.1.1, Gi0/1>, <10.1.2.1, Gi0/2>, <10.1.3.1, Gi0/3>, respectively. All the outgoing interfaces of the route 100.1.1.1/32 are in the load sharing interface group 1, where the outgoing interfaces Gi0/0, Gi0/1, Gi0/2, and Gi0/3 belong to different shared risk link groups, and therefore it is necessary to set corresponding set equal-cost multipath groups for each shared risk link group, which are:
A) using { <10.1.0.1, Gi0/0>, <10.1.1.1, Gi0/1>, <10.1.2.1, Gi0/2>, <10.1.3.1, Gi0/3> } as the default original equal cost multipath set, and marking with EP-0.
B) The set of forwarding paths excluding the shared risk link group 1 { <10.1.2.1, Gi0/2>, <10.1.3.1, Gi0/3> } is taken as a set equal cost multipath group, denoted by EP-1.
C) The set of forwarding paths excluding the shared risk link group 2 { <10.1.0.1, Gi0/0>, <10.1.1, Gi0/1> } is used as a set equal cost multi-path group, and is marked with EP-2.
Routing table entries 100.1.1.1/32 may be associated with EP-0, EP-1, and EP-2.
The message of the external access switch 1 downlink server 100.1.1.1 reaches the core switch 1 through the metropolitan area network switch; the core switch 1 receives the message from Gi0/4 or Gi0/5 between the core switch and the metropolitan area network switch, determines the shared risk link group 3 to which the receiving interface of the message belongs, then searches a routing forwarding table according to the destination IP address 100.1.1.1 of the message, finds a routing table item with a prefix of 100.1.1.1/32, and then searches a set equivalent multi-path group corresponding to the shared risk link group 3 in the routing table item 100.1.1.1/32, and does not find the set equivalent multi-path group, and at this time, the message can be forwarded to the aggregation switch 1 or the aggregation switch 2 based on the original equivalent multi-path group EP-0; if the link between the aggregation switch 1 and the access switch 1 and the link between the aggregation switch 1 and the access switch 2 are in failure, the message accessing 100.1.1.1 server is retransmitted to the core switch 1 and the core switch 2 at the aggregation switch 1 according to the default route; the core switch 1 receives the message from the interface Gi0/0 or Gi0/1 between the core switch 1 and the aggregation switch 1, determines the shared risk link group 1 to which the receiving interface of the message belongs, searches a routing forwarding table according to the destination IP address 100.1.1.1 of the message, finds a routing table item with a prefix of 100.1.1.1/32, searches a set equivalent multi-path group corresponding to the shared risk link group 1 in the routing table item 100.1.1.1/32, finds EP-1, and forwards the message to the aggregation switch 2 according to EP-1 (the forwarding path of EP-1 does not reach the aggregation switch 1); the convergence switch 2 receives the message forwarded by the core switch 1 and forwards the message to the access switch 1. Thereby avoiding the creation of a three-layer loop.
Based on the same inventive concept, an embodiment of the present invention provides a data center-based message forwarding apparatus, which is applied to a core switch included in a data center, and a structure of the apparatus is shown in fig. 3, where the apparatus includes:
a first determining module 31, configured to determine a first shared risk link group to which a receiving interface of a packet belongs, where the first shared risk link group includes interfaces connected between a switch and a core switch that are connected to the receiving interface;
a first searching module 32, configured to search, in a route forwarding table, a first route forwarding table entry corresponding to a destination IP address of a packet;
a second searching module 33, configured to search a first set equal-cost multipath group corresponding to the first shared risk link group in the first route forwarding table entry if the first route forwarding table entry is found in the route forwarding table;
a forwarding module 34, configured to forward the packet according to the first set equal cost multipath group if the first set equal cost multipath group is found in the first route forwarding entry; if the first set equal cost multi-path group is not found in the route forwarding table entry, forwarding the message according to a first original equal cost multi-path group in the first route forwarding table entry; the interfaces included in the first set equal-cost multipath group are interfaces except the interfaces belonging to the first shared risk link group in the interfaces included in the first original equal-cost multipath group.
In the scheme, after receiving a message, a core switch searches for a first set equal cost multi-path group corresponding to a first shared risk link group to which a receiving interface of the message belongs in a first route forwarding table entry, if the first set equal cost multi-path group is found, the message is forwarded through the first set equal cost multi-path group, and because an interface included in the first set equal cost multi-path group is an interface except an interface included in a first original equal cost multi-path group, and the interface of the first shared risk link group is connected with the same device, the message is not forwarded through an interface included in the first shared risk link group to which the receiving interface of the message belongs, and the message is also ensured not to be forwarded to a switch which sends the message; if the first set equal cost multi-path group is not found, it is indicated that the interface included in the first original equal cost multi-path group does not include the interface included in the first shared risk link group, the message can be forwarded according to the first original equal cost multi-path group in the first route forwarding table entry, and thus it can be ensured that the message is not forwarded to the switch sending the message.
Optionally, the apparatus further includes a setting module, configured to:
setting interfaces connected with the switches with the same networking role in all interfaces of the core switch as a load sharing interface group;
and setting the interface connected with the same switch in all the interfaces of the core switch as a shared risk link group.
Optionally, the apparatus further includes a second determining module, configured to:
after learning a second route forwarding table entry, determining whether each interface included in a second original equivalent multi-path group in the second route forwarding table entry belongs to the same load sharing interface group;
if it is determined that each interface included in the second original equal-cost multi-path group belongs to the same load sharing interface group, determining a shared risk link risk group to which each interface included in the second original equal-cost multi-path group belongs;
and adding the set equal cost multipath group corresponding to each determined shared risk link group in a second route forwarding table entry, wherein the added interfaces included in each set equal cost multipath group are the interfaces except the interfaces included in the corresponding shared risk link group in the interfaces included in the second original equal cost multipath group.
Optionally, the apparatus further includes a discarding module, configured to:
and if the first route forwarding table entry is not found in the route forwarding table, discarding the message.
The embodiment of the present application further provides an electronic device, please refer to fig. 4, which includes a processor 410, a communication interface 420, a memory 430, and a communication bus 440, where the processor 410, the communication interface 420, and the memory 430 complete communication with each other through the communication bus 440.
A memory 430 for storing computer programs;
the processor 410 is configured to implement the message forwarding method based on the data center according to any of the embodiments described above when executing the program stored in the memory 430.
The communication interface 420 is used for communication between the above-described electronic device and other devices.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In the scheme, after receiving a message, a core switch searches for a first set equal cost multi-path group corresponding to a first shared risk link group to which a receiving interface of the message belongs in a first route forwarding table entry, if the first set equal cost multi-path group is found, the message is forwarded through the first set equal cost multi-path group, and because an interface included in the first set equal cost multi-path group is an interface except an interface included in a first original equal cost multi-path group, and the interface of the first shared risk link group is connected with the same device, the message is not forwarded through an interface included in the first shared risk link group to which the receiving interface of the message belongs, and the message is also ensured not to be forwarded to a switch which sends the message; if the first set equal cost multi-path group is not found, it is indicated that the interface included in the first original equal cost multi-path group does not include the interface included in the first shared risk link group, the message can be forwarded according to the first original equal cost multi-path group in the first route forwarding table entry, and thus it can be ensured that the message is not forwarded to the switch sending the message.
Accordingly, an embodiment of the present application further provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are executed on a computer, the computer is caused to execute any of the data center-based message forwarding methods described in the foregoing embodiments.
In the scheme, after receiving a message, a core switch searches for a first set equal cost multi-path group corresponding to a first shared risk link group to which a receiving interface of the message belongs in a first route forwarding table entry, if the first set equal cost multi-path group is found, the message is forwarded through the first set equal cost multi-path group, and because an interface included in the first set equal cost multi-path group is an interface except an interface included in a first original equal cost multi-path group, and the interface of the first shared risk link group is connected with the same device, the message is not forwarded through an interface included in the first shared risk link group to which the receiving interface of the message belongs, and the message is also ensured not to be forwarded to a switch which sends the message; if the first set equal cost multi-path group is not found, it is indicated that the interface included in the first original equal cost multi-path group does not include the interface included in the first shared risk link group, the message can be forwarded according to the first original equal cost multi-path group in the first route forwarding table entry, and thus it can be ensured that the message is not forwarded to the switch sending the message.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While alternative embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following appended claims be interpreted as including alternative embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made in the embodiments of the present invention without departing from the spirit or scope of the embodiments of the invention. Thus, if such modifications and variations of the embodiments of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to encompass these modifications and variations.

Claims (10)

1. A message forwarding method based on a data center is applied to a core switch included in the data center, and is characterized by comprising the following steps:
determining a first shared risk link group to which a receiving interface of a message belongs, wherein the first shared risk link group comprises each interface connected between a switch connected with the receiving interface and the core switch, and each interface included in the first shared risk link group is arranged on the core switch;
searching a first route forwarding table item corresponding to a destination Internet Protocol (IP) address of the message in a route forwarding table;
if the first route forwarding table entry is found in the route forwarding table, finding a first set equal-cost multi-path group corresponding to the first shared risk link group in the first route forwarding table entry;
if the first set equal cost multi-path group is found in the first route forwarding table entry, forwarding the message according to the first set equal cost multi-path group; if the first set equal cost multi-path group is not found in the route forwarding table entry, forwarding the message according to a first original equal cost multi-path group in the first route forwarding table entry; the interfaces included in the first set equal cost multi-path group are interfaces excluding the interfaces belonging to the first shared risk link group from the interfaces included in the first original equal cost multi-path group, and the first original equal cost path group includes forwarding paths of the first route forwarding table entry.
2. The method of claim 1, further comprising:
setting interfaces connected with the switches with the same networking role in all the interfaces of the core switch as a load sharing interface group;
and setting the interfaces connected with the same switch in all the interfaces of the core switch as a shared risk link group.
3. The method of claim 2, further comprising:
after learning a second route forwarding table entry, determining whether each interface included in a second original equivalent multipath group in the second route forwarding table entry belongs to the same load sharing interface group;
if it is determined that each interface included in the second original equal-cost multi-path group belongs to the same load sharing interface group, determining a shared risk link risk group to which each interface included in the second original equal-cost multi-path group belongs;
and adding a set equal cost multi-path group corresponding to each determined shared risk link group in the second route forwarding table entry, wherein an interface included in each added set equal cost multi-path group is an interface except for an interface included in the corresponding shared risk link group in the interfaces included in the second original equal cost multi-path group.
4. The method of any of claims 1-3, further comprising:
and if the first route forwarding table entry is not found in the route forwarding table, discarding the message.
5. A message forwarding device based on a data center is applied to a core switch included in the data center, and is characterized by comprising:
a first determining module, configured to determine a first shared risk link group to which a receiving interface of a packet belongs, where the first shared risk link group includes interfaces connected between a switch connected to the receiving interface and the core switch, and the interfaces included in the first shared risk link group are disposed on the core switch;
the first searching module is used for searching a first route forwarding table item corresponding to the destination IP address of the message in a route forwarding table;
a second searching module, configured to search a first set equal-cost multipath group corresponding to the first shared risk link group in the first route forwarding table entry if the first route forwarding table entry is found in the route forwarding table;
a forwarding module, configured to forward the packet according to the first set equal cost multipath group if the first set equal cost multipath group is found in the first route forwarding entry; if the first set equal cost multi-path group is not found in the route forwarding table entry, forwarding the message according to a first original equal cost multi-path group in the first route forwarding table entry; the interfaces included in the first set equal cost multi-path group are interfaces excluding the interfaces belonging to the first shared risk link group from the interfaces included in the first original equal cost multi-path group, and the first original equal cost path group includes forwarding paths of the first route forwarding table entry.
6. The apparatus of claim 5, further comprising a setup module to:
setting interfaces connected with the switches with the same networking role in all the interfaces of the core switch as a load sharing interface group;
and setting the interfaces connected with the same switch in all the interfaces of the core switch as a shared risk link group.
7. The apparatus of claim 6, further comprising a second determination module to:
after learning a second route forwarding table entry, determining whether each interface included in a second original equivalent multipath group in the second route forwarding table entry belongs to the same load sharing interface group;
if it is determined that each interface included in the second original equal-cost multi-path group belongs to the same load sharing interface group, determining a shared risk link risk group to which each interface included in the second original equal-cost multi-path group belongs;
and adding a set equal cost multi-path group corresponding to each determined shared risk link group in the second route forwarding table entry, wherein an interface included in each added set equal cost multi-path group is an interface except for an interface included in the corresponding shared risk link group in the interfaces included in the second original equal cost multi-path group.
8. The apparatus of any of claims 5-7, further comprising a discard module to:
and if the first route forwarding table entry is not found in the route forwarding table, discarding the message.
9. An electronic device, characterized in that the electronic device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1-4 when executing a program stored on a memory.
10. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 4.
CN202010523276.3A 2020-06-10 2020-06-10 Message forwarding method and device based on data center Active CN111654437B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010523276.3A CN111654437B (en) 2020-06-10 2020-06-10 Message forwarding method and device based on data center

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010523276.3A CN111654437B (en) 2020-06-10 2020-06-10 Message forwarding method and device based on data center

Publications (2)

Publication Number Publication Date
CN111654437A CN111654437A (en) 2020-09-11
CN111654437B true CN111654437B (en) 2022-09-20

Family

ID=72352851

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010523276.3A Active CN111654437B (en) 2020-06-10 2020-06-10 Message forwarding method and device based on data center

Country Status (1)

Country Link
CN (1) CN111654437B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112637053B (en) * 2020-12-30 2022-05-20 锐捷网络股份有限公司 Method and device for determining backup forwarding path of route
CN113452614B (en) * 2021-06-25 2022-06-21 新华三信息安全技术有限公司 Message processing method and device
CN113595893A (en) * 2021-07-20 2021-11-02 锐捷网络股份有限公司 Route receiving system, route receiving method, device, equipment and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101022413A (en) * 2007-03-26 2007-08-22 杭州华为三康技术有限公司 Load equalizing method and route server
CN108173765A (en) * 2017-12-28 2018-06-15 新华三技术有限公司 A kind of message forwarding method and device
CN108881035A (en) * 2018-09-13 2018-11-23 杭州迪普科技股份有限公司 A kind of message forwarding method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7428213B2 (en) * 2003-11-21 2008-09-23 Cisco Technology, Inc. Method and apparatus for determining network routing information based on shared risk link group information
US9197355B2 (en) * 2012-11-27 2015-11-24 Ciena Corporation Drop port based shared risk link group systems and methods

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101022413A (en) * 2007-03-26 2007-08-22 杭州华为三康技术有限公司 Load equalizing method and route server
CN108173765A (en) * 2017-12-28 2018-06-15 新华三技术有限公司 A kind of message forwarding method and device
CN108881035A (en) * 2018-09-13 2018-11-23 杭州迪普科技股份有限公司 A kind of message forwarding method and device

Also Published As

Publication number Publication date
CN111654437A (en) 2020-09-11

Similar Documents

Publication Publication Date Title
CN111654437B (en) Message forwarding method and device based on data center
CN108243111B (en) Method and device for determining transmission path
JP6314495B2 (en) Route search device, interface card, and route search method
CN107547243B (en) Message forwarding method and device
CN108768866B (en) Cross-card forwarding method and device for multicast message, network equipment and readable storage medium
US8792494B2 (en) Facilitating insertion of device MAC addresses into a forwarding database
US9455916B2 (en) Method and system for changing path and controller thereof
US10652145B2 (en) Managing data frames in switched networks
CN103338152B (en) A kind of method for forwarding multicast message and master control borad
CN100444586C (en) Message repeat method and device
CN105634952A (en) Fast notification method and apparatus for LSP message
CN113852547B (en) Message forwarding method and device, line card and storage medium
EP3291486B1 (en) Selective transmission of bidirectional forwarding detection (bfd) messages for verifying multicast connectivity
CN115277305A (en) Network management method, device, equipment and machine readable storage medium
CN112187636B (en) ECMP route storage method and device
CN106789671B (en) Service message forwarding method and device
CN104486226A (en) Message processing method and device
CN112637053B (en) Method and device for determining backup forwarding path of route
CN108337181B (en) Method and device for managing congestion of switching network
CN112737957B (en) Flow table aging method and device
CN102801562B (en) Transmission link switching method and device and network equipment
US10003469B2 (en) Multicast forwarding method and apparatus in transparent interconnection of lots of link network, and routing bridge
CN104735000A (en) OpenFlow signaling control method and device
CN113489613A (en) Message forwarding method and device
CN108881040B (en) Message processing 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