Communication method and apparatus

By setting up fast bypass markers and fast recovery leaf groups in the spine device, and utilizing the data plane to achieve fast bypass protection switching, the problems of slow route convergence and flow interruption in spine-leaf networking are solved, and sub-millisecond fast recovery is achieved.

CN118449900BActive Publication Date: 2025-12-05NEW H3C TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410459475.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-16
Publication Date
2025-12-05
Estimated Expiration
2044-04-16

AI Technical Summary

Technical Problem

In a spine-leaf network, leaf devices suffer from flow interruptions and slow convergence speeds when relying on the control plane for route convergence.

Method used

By setting a fast bypass marker field and a fast recovery leaf group in the spine device, fast bypass protection switching is achieved using the data plane, and fast recovery at the sub-millisecond or microsecond level is achieved using a hardware forwarding chip, avoiding reliance on control plane convergence.

Benefits of technology

It achieves rapid bypass protection switching in the event of link failure, enables sub-millisecond fast recovery of CPU forwarding within network devices, and achieves recovery speed of hundreds of microseconds or faster with hardware forwarding chips, thus solving the problems of flow interruption and slow convergence speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118449900B_ABST
    Figure CN118449900B_ABST
Patent Text Reader

Abstract

The application provides a communication method and device, the method comprises the following steps: receiving a first IP packet sent by a first leaf through a first interface; obtaining a forwarding table item used for forwarding the first IP packet, wherein the forwarding table item comprises an out interface field and a fast bypass flag field, the out interface field is used for indicating a second interface used for forwarding the first IP packet; if the second interface is faulty and the value of the fast bypass flag field is a first value, determining a third interface from a fast recovery leaf group; sending a second IP packet to a second leaf through the third interface, wherein the second IP packet comprises a destination MAC address and the first IP packet, so that the second leaf determines to perform horizontal segmented three-layer forwarding on the second IP packet according to the destination MAC.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of communication, and in particular to a communication method and device. BACKGROUND

[0002] In the existing spine-leaf networking, there are multiple equal-cost multi-path routing (ECMP) paths between a pair of leaves for forwarding service traffic. As shown in Figure 1 Figure 1 is an existing spine-leaf topology networking diagram. In Figure 1 , there are multiple ECMPs between leaf1 and leaf3, for example, leaf1-spine1-leaf3; leaf1-spine2-leaf3.

[0003] If the downlink between spine1 and leaf3 fails, leaf1 still forwards traffic to leaf3 through ECMP without sensing the link failure, and the service traffic forwarded through the downlink between spine1 and leaf3 will be packet loss. After spine1 sends a route withdrawal to leaf1, the control plane of leaf1 performs route convergence.

[0004] After leaf1 performs route convergence, it switches service traffic to another uplink path. However, relying on the control plane to perform route convergence is slow. During route convergence, there will be flow interruption, usually for tens to hundreds of milliseconds. SUMMARY

[0005] Therefore, the present application provides a communication method and device to solve the problem of slow convergence speed and flow interruption when the existing leaf relies on the control plane to perform route convergence.

[0006] In a first aspect, the present application provides a communication method, which is applied to a spine, the spine being in a spine-leaf networking, and the networking further comprising a first leaf, the method comprising:

[0007] receiving, through a first interface, a first IP packet sent by the first leaf;

[0008] obtaining a forwarding table entry for forwarding the first IP packet, the forwarding table entry comprising an out-interface field and a fast bypass flag field, the out-interface field being used to indicate a second interface for forwarding the first IP packet;

[0009] ​if the second interface fails and the value of the fast bypass flag field is the first value, determining a third interface from the fast recovery leaf group, the third interface being different from the second interface and the third interface being connected with a second leaf;

[0010] sending, through the third interface, a second IP packet to the second leaf, the second IP packet comprising a destination MAC address and the first IP packet, so that the second leaf determines to perform horizontal split three-layer forwarding on the second IP packet according to the destination MAC.

[0011] In a second aspect, the present application provides a communication device, the device being applied to a spine, the spine being in a spine-leaf networking, the networking further comprising a first leaf, the device comprising:

[0012] a receiving unit, configured to receive, through a first interface, a first IP packet sent by the first leaf;

[0013] a first obtaining unit, configured to obtain a forwarding table item for forwarding the first IP packet, the forwarding table item comprising an out interface field and a fast bypass flag field, the out interface field being used to indicate a second interface for forwarding the first IP packet;

[0014] a determining unit, configured to, if the second interface fails and the value of the fast bypass flag field is the first value, determine a third interface from a fast recovery leaf group, the third interface being different from the second interface and the third interface being connected with a second leaf;

[0015] a sending unit, configured to send, through the third interface, a second IP packet to the second leaf, the second IP packet comprising a destination MAC address and the first IP packet, so that the second leaf determines to perform horizontal split three-layer forwarding on the second IP packet according to the destination MAC.

[0016] In a third aspect, the present application provides another network device, comprising a processor and a machine readable storage medium, the machine readable storage medium storing machine executable instructions capable of being executed by the processor, and the processor is prompted by the machine executable instructions to execute the method provided in the first aspect of the present application.

[0017] Therefore, by applying the communication method and device provided in the application, the spine receives the first IP packet sent by the first leaf through the first interface; the spine obtains a forwarding table item for forwarding the first IP packet, the forwarding table item including an out interface field and a fast bypass flag field, the out interface field being used to indicate a second interface for forwarding the first IP packet; if the second interface is faulty and the value of the fast bypass flag field is a first value, the spine determines a third interface from the fast recovery leaf group, the third interface being different from the second interface and being connected with the second leaf; and the spine sends a second IP packet to the second leaf through the third interface, the second IP packet including a destination MAC address and the first IP packet, so that the second leaf determines to perform horizontal segmented three-layer forwarding on the second IP packet according to the destination MAC.

[0018] In this way, when the link is faulty, fast bypass protection switching is implemented in the data plane, sub-millisecond fast recovery is implemented in the CPU forwarding of the network device, and the hardware forwarding chip implements recovery at a speed of hundreds of microseconds or faster. The problem of flow interruption and slow convergence speed of the existing leaf when relying on the control plane for route convergence is solved. BRIEF DESCRIPTION OF DRAWINGS

[0019] Figure 1 is a spine-leaf topology networking diagram provided by the prior art;

[0020] Figure 2 is a flowchart of the communication method provided by the embodiment of the application;

[0021] Figure 3 is a spine-leaf topology networking diagram provided by the embodiment of the application;

[0022] Figure 4 is a structure diagram of the communication device provided by the embodiment of the application;

[0023] Figure 5 is a hardware structure of the network device provided by the embodiment of the application. DETAILED DESCRIPTION

[0024] The exemplary embodiments will be described in detail herein with reference to the drawings. Unless otherwise indicated, the same numbers on the different drawings represent and / or indicate the same or similar elements. The following exemplary embodiments are described in enough detail to provide a complete understanding of at least one exemplary embodiment. One skilled in the art will understand, however, that the exemplary embodiments described herein are not intended to limit the application as described in the appended claims to the exemplary embodiments described herein. Rather, it is intended to cover all adaptations, modifications and alternatives falling within the scope of the claims.

[0025] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting. As used in this application and the appended claims, the singular forms "a," "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "and / or," as used herein, refers to and encompasses any and all possible combinations of one or more of the associated listed items.

[0026] It is to be understood that, although the terms first, second, third, etc. can be used herein to describe various information, these terms are not intended to denote a particular order or hierarchy. These terms are used merely for the purpose of distinguishing between two or more information. For example, without departing from the scope of the present application, a first information can be termed a second information, and similarly, a second information can be termed a first information. The word "if" as used herein means "when" or "upon" or "in response to the determination" depending on the context.

[0027] The communication method provided by the embodiments of the present application is described in detail below. Referring to Figure 2 , Figure 2 The flow chart of the communication method provided by the embodiments of the present application is shown. The method is applied to a spine. The communication method provided by the embodiments of the present application can include the steps shown below.

[0028] Step 210, receiving, through a first interface, a first IP packet sent by a first leaf;

[0029] Specifically, the spine is in a spine-leaf networking, which further includes a plurality of other spines and a plurality of leaves, each spine is fully connected with each leaf, and each leaf is connected to a plurality of hosts.

[0030] The first spine and the first leaf in the spine-leaf networking are taken as examples for description below.

[0031] After receiving the first IP packet sent by the user side, the first leaf performs table lookup forwarding according to the destination IP address included in the first IP packet. The first leaf sends the first IP packet to the first spine.

[0032] The first spine receives the first IP packet through the first interface and obtains the destination IP address therefrom.

[0033] Step 220, obtaining a forwarding table entry for forwarding the first IP packet, the forwarding table entry including an out-interface field and a fast bypass flag field, the out-interface field being used to indicate a second interface for forwarding the first IP packet;

[0034] Specifically, according to the description of step 210, after the first spine obtains the destination IP address, the first spine looks up a local forwarding table according to the destination IP address, and obtains a forwarding table entry matching the destination IP address in the local forwarding table. The forwarding table entry includes an out-interface field and a fast bypass flag field, wherein the out-interface field is used to indicate a second interface for forwarding the first IP packet.

[0035] It can be understood that the forwarding table entry further includes other fields, for example, a next hop field.

[0036] Step 230: If the second interface fails and the value of the fast bypass flag field is the first value, determining an interface identifier of a third interface from a fast recovery leaf group, the third interface being different from the second interface and the third interface being connected to a second leaf.

[0037] Specifically, according to the description of step 220, after the first spine obtains the out-interface field and the fast bypass flag field, if the second interface fails and the value of the fast bypass flag field is the first value (for example, the first value is 1), the first spine determines a third interface from a fast recovery leaf group and obtains an interface identifier of the third interface. The third interface is different from the second interface and the third interface is connected to a second leaf.

[0038] Wherein, a third leaf in the spine-leaf network accesses the second interface, and after a link between the first spine and the third leaf fails, the state of the second interface changes to down. The fast bypass flag field is used to indicate that when the interface fails, the first spine can forward the IP packet through other interfaces on the forwarding plane without forwarding the IP packet through the failed interface.

[0039] The value of the fast bypass flag field is specifically 1 or 0. Setting 1 indicates that fast bypass is started after the out-interface fails; setting 0 indicates that fast bypass is not started after the out-interface fails.

[0040] It can be understood that when the first spine determines the third interface from the fast recovery leaf group, all the remaining interfaces are obtained after excluding the failed interface. In the remaining interfaces, one interface can be selected as the third interface according to the existing flow-based hashing manner.

[0041] In the embodiment of the present application, the third interface can be the same as the first interface, and the second leaf can be the same as the first leaf.

[0042] If the IP packet received by the first spine is not from a leaf (for example, a network device at a higher level of the first spine), the first spine does not need to perform interface exclusion when determining the third interface.

[0043] Step 240, sending a second IP packet to the second leaf through the third interface, the second IP packet including a destination MAC address and the first IP packet, so that the second leaf determines to perform horizontal split three-layer forwarding on the second IP packet according to the destination MAC.

[0044] Specifically, according to the description of step 230, after the first spine determines that the second interface fails and the value of the fast recovery leaf group marking field is the first value, the first spine encapsulates an outer Ethernet header for the first IP packet. The Ethernet header includes a source MAC address field, a destination MAC address field, and a type field.

[0045] The destination MAC address field is filled with the MAC address stored in the fast recovery destination MAC address field included in the fast recovery leaf group. The source MAC address field is filled with the MAC address of the third interface. The type field is filled with the network protocol used by the upper layer.

[0046] The first spine generates a second IP packet. The second IP packet includes a destination MAC address and the first IP packet.

[0047] After the first spine obtains the interface identifier of the third interface, the first spine sends the second IP packet to the second leaf through the third interface indicated by the interface identifier. After the second leaf receives the second IP packet, the second leaf obtains the destination MAC address from the second IP packet. The second leaf determines whether the destination MAC address is the MAC address of its own interface or a preconfigured MAC address.

[0048] If the destination MAC address is the preconfigured MAC address, the second leaf determines to perform horizontal split three-layer forwarding on the second IP packet. The second leaf device strips the Ethernet packet header from the second IP packet to obtain the first IP packet. According to the destination IP address included in the first IP packet, the second leaf device performs horizontal split three-layer forwarding by searching a local forwarding table. After obtaining a plurality of outgoing interfaces by searching the local forwarding table, the second leaf device excludes the interface receiving the second IP packet to obtain all remaining interfaces. In the all remaining interfaces, the second leaf device selects one interface as an interface for forwarding the first IP packet according to an existing per-flow hash manner.

[0049] Optionally, in the embodiment of the present application, before performing step 210, the first spine also performs the following process.

[0050] Specifically, each spine in the spine-leaf network collects device role information of each network device directly connected to it, and locally generates a topology table to establish a fast recovery leaf group on the data plane.

[0051] The following takes the first spine as an example for description, and the execution process of other spines in the spine-leaf networking is the same, which is not repeated here.

[0052] Each network device in the spine-leaf networking generates a Link Layer Discovery Protocol (LLDP) message, and sends the LLDP message to a directly connected opposite network device, wherein the LLDP message includes device role information, and the device role information indicates a role of the network device sending the LLDP message in the spine-leaf networking.

[0053] It can be understood that if the network device is not configured with a role in the spine-leaf networking, the LLDP message does not carry a field carrying the device role information.

[0054] The first spine receives the LLDP message sent by each directly connected network device, and obtains the device role information from each LLDP message. The first spine locally generates a topology table entry, and stores the topology table entry into a topology table, wherein the topology table entry includes an interface identifier field and an opposite device role field.

[0055] In the embodiment of the present application, the topology table entry further includes an opposite device identifier, and the opposite device identifier includes a frame identifier and an interface identifier. The frame identifier is represented by a bridge MAC. As shown in Table 1.

[0056] Table 1 Topology table

[0057] Local interface Peer device role Peer device identity (frame identity + interface identity) Port1 leaf MAC1 + GigabitEthernet5 / 0 / 47 Port2 leaf MAC2 + GigabitEthernet3 / 1 / 25 Port3 leaf MAC3 + GigabitEthernet1 / 0 / 19 Port4 other MAC4 + GigabitEthernet2 / 0 / 30

[0058] The user inputs a first configuration instruction to the first spine, and the first configuration instruction includes a fast recovery destination MAC address field. The first spine receives the first configuration instruction, and obtains the fast recovery destination MAC address field therefrom.

[0059] The first spine distributes the topology table entry with the opposite device role field being leaf in the topology table to a data plane, and establishes a fast recovery leaf group on the data plane. The fast recovery leaf group includes an interface identifier field, an opposite device role field and a fast recovery destination MAC address field. The MAC address stored in the fast recovery destination MAC address field is used to fill the destination MAC address included in the second IP message. As shown in Table 2.

[0060] Table 2 Fast recovery leaf group

[0061]

[0062] Optionally, in the embodiment of the present application, the fast recovery leaf group can also be generated by a second configuration instruction input by a user.

[0063] Specifically, the user inputs a second configuration instruction to the first spine, and the second configuration instruction includes an interface identification field, a peer device role field and a fast recovery destination MAC address field. The first spine receives the second configuration instruction and obtains the interface identification field, the peer device role field and the fast recovery destination MAC address field therefrom.

[0064] The first spine establishes a fast recovery leaf group on the data plane, and the fast recovery leaf group includes the interface identification field, the peer device role field and the fast recovery destination MAC address field. The peer device role field indicates that the role of the peer device is leaf, and the MAC address stored in the fast recovery destination MAC address field is used to fill the destination MAC address included in the second IP packet. As shown in Table 2 above.

[0065] Optionally, in the embodiment of the present application, the process in which the first spine adds a fast bypass flag field to the forwarding table entry is further included.

[0066] Specifically, when the first spine generates a forwarding table entry to the destination host in the existing manner, the fourth interface used to forward the IP packet to the destination host is determined; according to the interface identification of the fourth interface, the first spine obtains a fast recovery leaf group table entry matching the fourth interface from the fast recovery leaf group; if the fast recovery leaf group table entry indicates that the role of the peer device connected to the fourth interface is leaf, the first spine adds a fast bypass flag field to the forwarding table entry, and sets the value of the fast bypass flag field to a first value.

[0067] Optionally, in the embodiment of the present application, when the first spine determines that the second interface fails, the forwarding table entry is further maintained for a preset time. That is, the first spine does not delete the forwarding table entry. The preset time can be specifically 6s.

[0068] Optionally, in the embodiment of the present application, the first IP packet includes a destination IP address. After the first spine determines that the link between the third leaf fails, it is determined that the third leaf is unreachable. The first spine generates and sends a route withdrawal packet to leaf1. Leaf1 deletes the host route to each host accessed by leaf3 locally according to the route withdrawal packet.

[0069] The first spine performs convergence processing on the host route to the destination IP address according to the existing process; and updates the forwarding table entry according to the converged host route.

[0070] If the forwarding table entry is not updated within the preset time, the first spine deletes the forwarding table entry.

[0071] Therefore, by applying the communication method and device provided in the present application, the spine receives the first IP packet sent by the first leaf through the first interface; the spine obtains a forwarding table entry used for forwarding the first IP packet, the forwarding table entry including an out-interface field and a fast bypass flag field, the out-interface field being used for indicating a second interface used for forwarding the first IP packet; if the second interface is faulty and the value of the fast bypass flag field is a first value, the spine determines a third interface from the fast recovery leaf group, the third interface being different from the second interface and being connected with the second leaf; the spine sends a second IP packet to the second leaf through the third interface, the second IP packet including a destination MAC address and the first IP packet, so that the second leaf determines to perform horizontal segmented three-layer forwarding on the second IP packet according to the destination MAC.

[0072] In this way, when the link is faulty, fast bypass protection switching is realized on the data plane, sub-millisecond-level fast recovery is realized by the CPU forwarding in the network device, and the hardware forwarding chip realizes recovery at a speed of hundreds of microseconds or faster. The problem of flow interruption and slow convergence speed of the existing leaf when relying on the control plane for route convergence is solved.

[0073] The communication method provided in the embodiments of the present application will be described in detail below. Referring to Figure 3 , Figure 3 The spine-leaf topology networking diagram provided in the embodiments of the present application. The spine-leaf networking includes spine1, spine2, spine3, leaf1, leaf2, leaf3. Each spine is fully connected with each leaf, and each leaf is connected with multiple hosts. Host1 and host2 are connected with leaf1, host3 and host4 are connected with leaf2, and host5, host6 and host7 are connected with leaf3.

[0074] Each spine in the spine-leaf networking collects the device role information of each network device directly connected therewith, and generates a topology structure table locally to establish a fast recovery leaf group on the data plane.

[0075] The following takes spine1 as an example for description, and the execution process of other spines in the spine-leaf networking is the same, which will not be repeated here.

[0076] Each network device in the spine-leaf network generates an LLDP packet and sends the LLDP packet to a directly connected opposite network device, and the LLDP packet includes device role information, and the device role information indicates a role of the network device in the spine-leaf network.

[0077] It can be understood that if the network device is not configured with a role in the spine-leaf network, the field carrying the device role information is not carried in the LLDP packet.

[0078] The spine 1 receives the LLDP packets sent by the directly connected leaf 1, leaf 2 and leaf 3, and obtains the device role information from each LLDP packet. The spine 1 locally generates a topology table item, and stores the topology table item in a topology table, and the topology table item includes an interface identifier field and an opposite device role field.

[0079] In the embodiment of the present application, the topology table item further includes an opposite device identifier, and the opposite device identifier includes a frame identifier and an interface identifier. The frame identifier is represented by a bridge MAC. As shown in Table 3.

[0080] Table 3 Topology table

[0081] Local interface Peer device role Peer device identity (frame identity + interface identity) Port1 leaf MAC1 + GigabitEthernet5 / 0 / 47 Port2 leaf MAC2 + GigabitEthernet3 / 1 / 25 Port3 leaf MAC3 + GigabitEthernet1 / 0 / 19

[0082] The user inputs a configuration instruction 1 to the spine 1, and the configuration instruction 1 includes a fast recovery destination MAC address field. The spine 1 receives the configuration instruction 1 and obtains the fast recovery destination MAC address field from the configuration instruction 1.

[0083] The spine 1 distributes the topology table item with the opposite device role field as leaf in the topology table to the data plane, and establishes a fast recovery leaf group on the data plane. The fast recovery leaf group includes an interface identifier field, an opposite device role field and a fast recovery destination MAC address field. The MAC address stored in the fast recovery destination MAC address field is used to fill the destination MAC address included in the second IP packet. As shown in Table 4.

[0084] Table 4 Fast recovery leaf group

[0085]

[0086] Leaf 3 sends the host route of host 6 to spine 1. When spine 1 generates the forwarding entry to host 6 in the existing manner, it determines that the interface for forwarding the IP packet to host 6 is Port 3. According to Port 3, spine 1 acquires the fast recovery leaf group table item matching Port 3 from the fast recovery leaf group. The fast recovery leaf group table item indicates that the opposite end device connected to Port 3 is a leaf, and spine 1 adds a fast bypass flag field to the forwarding entry and sets the value of the fast bypass flag field to 1.

[0087] It can be understood that spine 1 also sends the host route of host 6 to leaf 1. Leaf 1 also generates the forwarding entry to host 6 in the existing manner.

[0088] Host 1 intends to communicate with host 6. Host 1 generates and sends IP packet 1 to leaf 1. The destination IP address of IP packet 1 is the IP address of host 6. According to the destination IP address included in IP packet 1, leaf 1 performs table lookup forwarding and sends IP packet 1 to spine 1.

[0089] Through Port 1, spine 1 receives IP packet 1 and acquires the destination IP address therefrom. According to the destination IP address, spine 1 looks up the local forwarding table and acquires the forwarding entry matching the destination IP address in the local forwarding table. The forwarding entry includes an out interface field (Port 3), a fast bypass flag field (1), and a next hop field (the IP address of the interface on leaf 3).

[0090] At this time, if the link between spine 1 and leaf 3 fails, the state of Port 3 changes to down, and according to Port 3, spine 1 determines that the value of the fast bypass flag field in the forwarding entry is 1. After spine 1 excludes Port 3 from the fast recovery leaf group, it selects one of the remaining Port 1 and Port 2 as the interface for forwarding IP packet 1 in the existing per-flow hash manner, for example, determines that Port 2 can be used as the interface for forwarding IP packet 1.

[0091] Spine 1 encapsulates an Ethernet header outside IP packet 1. The Ethernet header includes a source MAC address field, a destination MAC address field, and a type field.

[0092] The destination MAC address field is filled with the MAC address stored in the fast recovery destination MAC address field included in the fast recovery leaf group. The source MAC address field is filled with the MAC address of Port 2. The type is filled with the network protocol used by the upper layer.

[0093] The spine2 generates an IP packet 2 and sends the IP packet 2 to the leaf2 through the Port2. After receiving the IP packet 2, the leaf2 obtains a destination MAC address from the IP packet 2. The leaf2 judges whether the destination MAC address is a MAC address of an interface of the leaf2 or a preconfigured MAC address.

[0094] If the destination MAC address is the MAC address of the interface of the leaf2 or the preconfigured MAC address, the leaf2 determines to perform horizontal split three-layer forwarding on the IP packet 2. The leaf2 device strips an Ethernet packet header from the IP packet 2 to obtain an IP packet 1. According to a destination IP address included in the IP packet 1, the leaf2 searches a local forwarding table to perform horizontal split three-layer forwarding. After searching the local forwarding table, the leaf2 obtains a plurality of outgoing interfaces (the Port4 connected to the spine1, the Port5 connected to the spine2, and the Port6 connected to the spine3). The leaf2 excludes the Port4 receiving the IP packet 2, and in the remaining Port5 and Port6, an interface (for example, the Port6) can be selected as an interface for forwarding the IP packet 2 according to an existing flow hash manner.

[0095] Through the Port6, the leaf2 forwards the IP packet 2 to the spine3, so that the spine3 forwards the IP packet 2 to the leaf3.

[0096] It can be understood that after the spine1 excludes the Port3 from the fast recovery leaf group, the Port1 can also be selected as an interface for forwarding the IP packet 1. After the IP packet 2 arrives at the leaf1, the leaf1 can also forward the IP packet 2 according to the execution process of the leaf2 described above, which is not repeated here.

[0097] Based on the same inventive concept, the embodiments of the present application also provide a communication method corresponding to a communication device. Referring to Figure 4 , Figure 4 The communication device provided by the embodiments of the present application is applied to a spine, the spine is in a spine-leaf networking, the networking also includes a first leaf, and the device includes:

[0098] The receiving unit 410 is configured to receive a first IP packet sent by the first leaf through a first interface.

[0099] The first obtaining unit 420 is configured to obtain a forwarding table item for forwarding the first IP packet, the forwarding table item including an outgoing interface field and a fast bypass flag field, and the outgoing interface field being used to indicate a second interface for forwarding the first IP packet.

[0100] The determining unit 430 is configured to determine a third interface from the fast recovery leaf group if the second interface is faulty and the value of the fast bypass flag field is the first value, the third interface being different from the second interface and the third interface being connected with a second leaf;

[0101] The sending unit 440 is configured to send a second IP packet to the second leaf through the third interface, the second IP packet including a destination MAC address and the first IP packet, so that the second leaf determines to perform horizontal segmented three-layer forwarding on the second IP packet according to the destination MAC.

[0102] Optionally, the receiving unit 410 is further configured to receive an LLDP packet sent by each network device directly connected in the spine-leaf network, the LLDP packet including device role information, the device role information indicating a role of the network device sending the LLDP packet in the spine-leaf network.

[0103] The apparatus further includes a generating unit (not shown in the figure) configured to locally generate a topology table item and store the topology table item in a topology table, the topology table item including an interface identifier field and a peer device role field.

[0104] The receiving unit 410 is further configured to receive a first configuration instruction input by a user, the first configuration instruction including a fast recovery destination MAC address field.

[0105] The apparatus further includes an establishing unit (not shown in the figure) configured to issue a topology table item in which the peer device role field in the topology table is leaf to a data plane and establish the fast recovery leaf group on the data plane, the fast recovery leaf group including the interface identifier field, the peer device role field and the fast recovery destination MAC address field.

[0106] The MAC address stored in the fast recovery destination MAC address field is used to fill the destination MAC address included in the second IP packet.

[0107] Optionally, the receiving unit 410 is further configured to receive a second configuration instruction input by a user, the second configuration instruction including an interface identifier field, a peer device role field and a fast recovery destination MAC address field.

[0108] The apparatus further includes an establishing unit (not shown in the figure) configured to establish the fast recovery leaf group on a data plane, the fast recovery leaf group including the interface identifier field, the peer device role field and the fast recovery destination MAC address field.

[0109] wherein the peer device role field indicates that the role of the peer device is leaf, and the MAC address stored in the fast recovery destination MAC address field is used to fill the destination MAC address included in the second IP packet.

[0110] Optionally, the apparatus further comprises:

[0111] a determining unit (not shown in the figure) configured to determine a fourth interface for forwarding an IP packet to a destination host when a forwarding table entry for the destination host is generated;

[0112] a second obtaining unit (not shown in the figure) configured to obtain, according to an interface identifier of the fourth interface, a fast recovery leaf group table entry matching the fourth interface from the fast recovery leaf group;

[0113] an adding unit (not shown in the figure) configured to add a fast bypass flag field in the forwarding table entry and set the value of the fast bypass flag field to the first value if the fast recovery leaf group table entry indicates that the role of a peer device connected to the fourth interface is leaf.

[0114] Optionally, the apparatus further comprises:

[0115] a maintaining unit (not shown in the figure) configured to maintain the forwarding table entry for a preset time if the second interface fails.

[0116] Optionally, the first IP packet includes a destination IP address, and the apparatus further comprises:

[0117] a converging unit (not shown in the figure) configured to perform a convergence process on a host route to the destination IP address;

[0118] an updating unit (not shown in the figure) configured to update the forwarding table entry according to the converged host route;

[0119] a deleting unit (not shown in the figure) configured to delete the forwarding table entry if the forwarding table entry is not updated within the preset time.

[0120] Therefore, by applying the communication apparatus provided in the application, the spine receives the first IP packet sent by the first leaf through the first interface; the spine obtains a forwarding table item for forwarding the first IP packet, the forwarding table item including an out interface field and a fast bypass flag field, the out interface field being used to indicate a second interface for forwarding the first IP packet; if the second interface is faulty and the value of the fast bypass flag field is a first value, the spine determines a third interface from the fast recovery leaf group, the third interface being different from the second interface and being connected with the second leaf; and the spine sends a second IP packet to the second leaf through the third interface, the second IP packet including a destination MAC address and the first IP packet, so that the second leaf determines to perform horizontal segmented three-layer forwarding on the second IP packet according to the destination MAC.

[0121] In this way, when the link is faulty, the fast bypass protection switching is implemented in the data plane, the sub-millisecond-level fast recovery is implemented in the CPU forwarding in the network device, and the recovery speed of 100 microseconds or faster is implemented in the hardware forwarding chip. The problem of flow interruption and slow convergence speed of the existing leaf when relying on the control plane for route convergence is solved.

[0122] Based on the same inventive concept, the embodiments of the application further provide a network device, as shown in Figure 5 The network device includes a processor 510, a transceiver 520 and a machine readable storage medium 530, the machine readable storage medium 530 stores machine executable instructions capable of being executed by the processor 510, and the processor 510 is prompted to execute the communication method provided in the embodiments of the application by the machine executable instructions. The foregoing Figure 4 The communication apparatus can be implemented by using the network device hardware structure as shown in Figure 5 The communication apparatus can be implemented by using the network device hardware structure as shown in

[0123] The computer readable storage medium 530 can include a random access memory (RAM) and can also include a non-volatile memory (NVM), for example, at least one disk memory. Optionally, the computer readable storage medium 530 can also be at least one storage device located away from the foregoing processor 510.

[0124] The processor 510 can be a general processor, including a central processing unit (CPU), a network processor (NP), etc.; can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.

[0125] In the embodiments of the present application, the processor 510 is prompted by the machine-executable instructions stored in the machine-readable storage medium 530 to enable the processor 510 itself and the transceiver 520 to perform the communication method described in the foregoing embodiments of the present application.

[0126] In addition, the embodiments of the present application provide a machine-readable storage medium 530, which stores machine-executable instructions, and when the machine-executable instructions are called and executed by the processor 510, the machine-executable instructions prompt the processor 510 itself and the transceiver 520 to perform the communication method described in the foregoing embodiments of the present application.

[0127] The implementation process of the functions and roles of the units in the above device is specifically described in the implementation process of the corresponding steps in the above method, and will not be repeated here.

[0128] For the device embodiment, since it basically corresponds to the method embodiment, the related parts are described in the part of the method embodiment. The device embodiments described above are only illustrative, and the units described as separate components can be or can not be physically separated, and the components displayed as units can be or can not be physical units, that is, they can be located in one place, or can be distributed on multiple network units. According to actual needs, part or all of the modules can be selected to achieve the purpose of the present application scheme. Those skilled in the art can understand and implement without creative labor.

[0129] For the communication device and the machine-readable storage medium embodiment, since the method content involved is basically similar to the foregoing method embodiment, the description is relatively simple, and the related parts are described in the part of the method embodiment.

[0130] The above only is the preferred embodiment of the present application, and is not used to limit the present application, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims

1. A communication method characterized by comprising: The method is applied to a spine in a spine-leaf network, the network further comprising a first leaf, and the method comprises: receiving, through a first interface, a first IP packet sent by the first leaf; obtaining a forwarding table item for forwarding the first IP packet, the forwarding table item comprising an out-interface field and a fast bypass flag field, the out-interface field being used to indicate a second interface for forwarding the first IP packet; if the second interface is faulty and the value of the fast bypass flag field is a first value, determining a third interface from a fast recovery leaf group, the third interface being different from the second interface and being connected to a second leaf; sending, through the third interface, a second IP packet to the second leaf, the second IP packet comprising a destination MAC address and the first IP packet, so that the second leaf determines to perform horizontal split three-layer forwarding on the second IP packet according to the destination MAC.

2. The method of claim 1, wherein, Before the receiving, through a first interface, a first IP packet sent by the first leaf, the method further comprises: receiving an LLDP packet sent by each network device directly connected in the spine-leaf network, the LLDP packet comprising device role information, the device role information indicating the role of the network device sending the LLDP packet in the spine-leaf network; locally generating a topology table item and storing the topology table item in a topology table, the topology table item comprising an interface identifier field and a peer device role field; receiving a first configuration instruction input by a user, the first configuration instruction comprising a fast recovery destination MAC address field; issuing the topology table item in which the peer device role field is leaf to a data plane and establishing the fast recovery leaf group on the data plane, the fast recovery leaf group comprising the interface identifier field, the peer device role field and the fast recovery destination MAC address field; wherein the MAC address stored in the fast recovery destination MAC address field is used to fill the destination MAC address included in the second IP packet.

3. The method of claim 1, wherein, Before the receiving, through a first interface, a first IP packet sent by the first leaf, the method further comprises: receiving a second configuration instruction input by a user, the second configuration instruction comprising an interface identifier field, a peer device role field and a fast recovery destination MAC address field; establishing the fast recovery leaf group on a data plane, the fast recovery leaf group comprising the interface identifier field, the peer device role field and the fast recovery destination MAC address field; wherein the peer device role field indicates that the role of a peer device is leaf, and the MAC address stored in the fast recovery destination MAC address field is used to fill the destination MAC address included in the second IP packet.

4. The method according to any of claims 2 or 3, characterized in that, Before the receiving, through a first interface, a first IP packet sent by the first leaf, the method further comprises: determining a fourth interface for forwarding an IP packet to a destination host when a forwarding table entry of the destination host is generated; obtaining a fast recovery leaf group table entry matching the fourth interface from the fast recovery leaf group according to an interface identifier of the fourth interface; if the fast recovery leaf group table entry indicates that a peer device connected with the fourth interface is a leaf, adding a fast bypass flag field in the forwarding table entry and setting a value of the fast bypass flag field as the first value.

5. The method of claim 1, wherein, The method further comprises: if the second interface fails, maintaining the forwarding table entry within a preset time.

6. The method of claim 5, wherein, The first IP packet comprises a destination IP address, and the method further comprises: performing a convergence process on a host route to the destination IP address; updating the forwarding table entry according to the converged host route; if the forwarding table entry is not updated within the preset time, deleting the forwarding table entry.

7. A communication device, characterized by The device is applied to a spine in a spine-leaf networking, and the networking further comprises a first leaf, and the device comprises: a receiving unit, configured to receive a first IP packet sent by the first leaf through a first interface; a first obtaining unit, configured to obtain a forwarding table entry for forwarding the first IP packet, the forwarding table entry comprising an out-interface field and a fast bypass flag field, the out-interface field being used to indicate a second interface for forwarding the first IP packet; a determining unit, configured to determine a third interface from a fast recovery leaf group if the second interface fails and a value of the fast bypass flag field is a first value, the third interface being different from the second interface and the third interface being connected with a second leaf; a sending unit, configured to send a second IP packet to the second leaf through the third interface, the second IP packet comprising a destination MAC address and the first IP packet, so that the second leaf determines to perform horizontal segmented three-layer forwarding on the second IP packet according to the destination MAC.

8. The apparatus of claim 7, wherein, The receiving unit is further configured to receive an LLDP packet sent by each network device directly connected in the spine-leaf networking, the LLDP packet comprising device role information indicating a role of the network device sending the LLDP packet in the spine-leaf networking; The device further comprises a generating unit, configured to generate a topology table entry locally and store the topology table entry in a topology table, the topology table entry comprising an interface identifier field and a peer device role field; The receiving unit is further configured to receive a first configuration instruction input by a user, the first configuration instruction comprising a fast recovery destination MAC address field. The device further comprises an establishing unit configured to distribute a topology table entry with a peer device role field as leaf in the topology table to a data plane, and establish the fast recovery leaf group on the data plane, wherein the fast recovery leaf group comprises the interface identifier field, the peer device role field and the fast recovery destination MAC address field. The MAC address stored in the fast recovery destination MAC address field is used to fill the destination MAC address included in the second IP packet.

9. The apparatus of claim 7, wherein, The receiving unit is further configured to receive a second configuration instruction input by a user, wherein the second configuration instruction comprises an interface identifier field, a peer device role field and a fast recovery destination MAC address field. The device further comprises an establishing unit configured to establish the fast recovery leaf group on the data plane, wherein the fast recovery leaf group comprises the interface identifier field, the peer device role field and the fast recovery destination MAC address field. The peer device role field indicates that the role of a peer device is leaf, and the MAC address stored in the fast recovery destination MAC address field is used to fill the destination MAC address included in the second IP packet.

10. The device of any one of claims 8 or 9, wherein, The device further comprises: A determining unit configured to determine a fourth interface used for forwarding an IP packet to a destination host when a forwarding table entry reaching the destination host is generated. A second obtaining unit configured to obtain a fast recovery leaf group table entry matching the fourth interface from the fast recovery leaf group according to an interface identifier of the fourth interface. An adding unit configured to add a fast bypass flag field in the forwarding table entry and set the value of the fast bypass flag field as the first value if the fast recovery leaf group table entry indicates that the role of a peer device connected with the fourth interface is leaf.

11. The apparatus of claim 7, wherein, The device further comprises: A maintaining unit configured to maintain the forwarding table entry for a preset time if the second interface fails.

12. The apparatus of claim 11, wherein, The first IP packet comprises a destination IP address, and the device further comprises: A converging unit configured to perform a convergence process on a host route reaching the destination IP address. An updating unit configured to update the forwarding table entry according to the converged host route. A deleting unit configured to delete the forwarding table entry if the forwarding table entry is not updated within the preset time.

Citation Information

Patent Citations

  • Forwarding table item generation method, device and equipment

    CN115460137A

  • Data transmission method, related equipment and computer storage medium

    CN115701054A