Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with aspects of the application as detailed in the accompanying claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this specification 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 also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the corresponding listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the application. The term "if" as used herein may be interpreted as "at..once" or "when..once" or "in response to a determination", depending on the context.
The communication method provided by the embodiment of the application is described in detail below. Referring to fig. 1, fig. 1 is a flowchart of a communication method according to an embodiment of the present application. The method is applied to a first leaf device. The communication method provided by the embodiment of the application can comprise the following steps.
Step 110, receiving, through the first interface, an adaptive routing notification message sent by the first spine device, where the adaptive routing notification message includes a link identifier, and the link identifier is a first device identifier of the second leaf device;
Specifically, the spine-leaf networking comprises a plurality of spines and a plurality of leaf devices, and the spines and the leaf devices are all fully connected. For example, the first leaf device and the second leaf device each have access to the first spine device and the second spine device, and multiple hosts may be accessed under each leaf device.
For each leaf device accessed, the first spine device detects a communication state therebetween, e.g., the first spine device detects a communication state between itself and the second leaf device. When the first spine device determines that the communication state between itself and the second leaf device is abnormal, an adaptive routing notification message is generated, wherein the adaptive routing notification message comprises a link identifier. The link identification is a first device identification of a second leaf device.
It should be noted that, in the embodiment of the present application, the link identifier is used to indicate a link between the spine device and the leaf device. And when the spine equipment determines that the link between the spine equipment and the leaf equipment is abnormal, the equipment identifier of the opposite-end leaf equipment of the link is used as a link identifier.
In the embodiment of the application, each device in the networking configures and runs an OSPF protocol, and an OSPF neighbor relation is established between each device.
Optionally, before step 110 is performed, each device in the network receives a configuration instruction input by a manager (or called a user), where the configuration instruction includes a second device identifier ("second" is used to distinguish between other device identifiers, and may also be "first" and "third"), and the second device identifier is a Router (Router) identifier of the network device.
It will be appreciated that in the OSPF protocol, router identification of network devices is used to uniquely identify a Router in an autonomous system.
The first spine device sends adaptive routing notification messages to other leaf devices that are other than the second leaf device and that access the first spine device, e.g., the first spine device sends adaptive routing notification messages to the first leaf device.
And after receiving the adaptive route notification message, the first leaf equipment acquires the link identification from the adaptive route notification message through the first interface. Based on the link identification, the first leaf device determines a link anomaly between the first spine device and the second leaf device.
The first interface is an interface of the first leaf device to be accessed to the first spine device.
Alternatively, in embodiments of the present application, a spine device (e.g., a first spine device) typically relies on the physical layer detection mechanism of the interface to sense link failures at high speed. For example, a first spine device periodically detects electrical signals and connection status of an interface locally connected to a second leaf device. In practical applications, the method is implemented by a physical layer chip (PHY) of the spin device. After the physical layer information detects the electrical signal or connection state conversion of the interface, the interface state of the interface is set from the up state to the down state.
Optionally, in the embodiment of the present application, the spine device further includes a forwarding chip, and before the spine device detects the communication state between itself and the first leaf device, the following process is further executed:
when any interface included in the spine device is used for being connected with the leaf device, the spine device establishes a mapping relation between an interface identifier of the interface and a device identifier of the leaf device, and the spine device configures the mapping relation in a forwarding chip. Thus, when the forwarding chip senses the down interface, the adaptive routing notification message can be quickly generated and sent without sending the adaptive routing notification message through the CPU included in the spine device.
The interface identifier of the interface included in the spine device and the device identifier of the leaf device can be obtained through a Link State Database (LSDB).
It will be appreciated that in the existing OSPF protocol, the Link State Database (LSDB) is a key component in storing network topology information. Each route entry in the LSDB is associated with a Router ID of one or more devices, which relationships play an important role in route calculation and network topology maintenance of OSPF. For route computation, for example, 1) in Shortest Path First (SPF) computation of OSPF, router ID is used to construct a network topology, 2) each Router computes a Shortest Path Tree (SPT) from LSAs in LSDB, and Router ID is a node identification in the SPT.
Optionally, in the embodiment of the application, when the first spine device determines that the communication state is abnormal, the first spine device determines an interface for connecting itself with the second leaf device, acquires a first device identifier corresponding to the interface identifier from the identifier mapping relation according to the interface identifier of the interface, and uses the first device identifier as a link identifier.
Step 120, obtaining a first rerouting next hop table item matched with the first equipment identifier from a rerouting next hop table, wherein the first rerouting next hop table item comprises a plurality of pieces of forwarding information;
Specifically, according to the description of step 110, after the first leaf device acquires the link identifier, that is, the first device identifier of the second leaf device, the first rerouting next hop table entry matching the first device identifier is acquired from the rerouting next hop table. The first rerouting next hop entry includes a plurality of pieces of forwarding information.
Each piece of forwarding information comprises an outgoing interface identifier and a next hop address, wherein the outgoing interface identifier is the interface identifier of the accessed spike equipment, and the next hop address is the interface IP address of the accessed spike equipment.
In the following embodiments, the generation process and content of the rerouting next hop table will be described in detail, and will not be described again.
Step 130, determining, from the plurality of forwarding information according to the first interface, that each first forwarding path indicated by at least one piece of first forwarding information other than forwarding information including an interface identifier of the first interface carries traffic arriving at the second leaf device, where each piece of first forwarding information includes a first outgoing interface identifier and a first next hop address, where the first outgoing interface identifier indicates the second interface, and the first next hop address indicates an interface IP address of the second spine device.
Specifically, after the first leaf device obtains the pieces of forwarding information according to the description of step 120, each first forwarding path indicated by at least one piece of first forwarding information except for the forwarding information including the interface identifier of the first interface is determined to carry traffic reaching the second leaf device according to the first interface from the pieces of forwarding information.
A piece of first forwarding information is taken as an example. The first forwarding information includes a first outgoing interface identification indicating the second interface and a first next hop address indicating an interface IP address of the second spine device.
Wherein the first leaf device includes a plurality of other interfaces, such as a second interface, a third interface, a fourth interface, and so on, in addition to the first interface. Collectively referred to herein as a second interface for convenience of description. Meanwhile, the first leaf device may access a plurality of spine devices, such as a second spine device, a third spine device, a fourth spine device, and so on, in addition to the first spine device. Collectively referred to herein as a second spine device for convenience of description.
The second interface included in the first forwarding information is an interface for the first leaf device to access a second spline device.
Optionally, in an embodiment of the present application, a specific process of determining, by the first leaf device, from the plurality of forwarding information according to the first interface, that each first forwarding path indicated by at least one first forwarding information including forwarding information identified by an interface of the first interface carries traffic arriving at the second leaf device is:
the first leaf device obtains an interface identifier of the first interface, marks second forwarding information comprising the interface identifier of the first interface as unavailable from a plurality of pieces of forwarding information, and takes other forwarding information except the second forwarding information in the plurality of pieces of forwarding information as first forwarding information.
In the embodiment of the application, when the first leaf device receives the service flow sent to the second leaf device at the beginning, the service flow is forwarded to the second leaf device in an ECMP path load sharing mode through the first spine device, the second spine device and other spine devices. And after receiving the self-adaptive route notification message sent by the first spine equipment, re-determining the forwarding path. And then, forwarding the service traffic to the second leaf device through the second spine device and other spine devices in an ECMP path load sharing mode.
Therefore, by applying the communication method provided by the application, the first leaf device receives the self-adaptive route notification message sent by the first spine device through the first interface, the self-adaptive route notification message comprises a link identifier, the link identifier is a first device identifier of the second leaf device, the first leaf device acquires a first rerouting next-hop table item matched with the first device identifier from a rerouting next-hop table, the first rerouting next-hop table item comprises a plurality of pieces of forwarding information, according to the first interface, the first leaf device determines that each first forwarding path indicated by at least one piece of forwarding information except the forwarding information comprising the interface identifier of the first interface carries traffic reaching the second leaf device, and each first forwarding information comprises a first outgoing interface identifier and a first next-hop address, the first outgoing interface identifier indicates the second interface, and the first next-hop address indicates the interface IP address of the second spine device.
Thus, after the spine device senses that the communication state between the spine device and a certain leaf device is abnormal, other leaf devices accessed are informed through the adaptive routing notification message. Other leaf devices automatically adjust the path of the traffic flow bearing the second leaf device according to the rerouting next hop table, and the problem of how to realize high real-time self-adaptive routing under the direct connection topology in the prior art is solved. The method realizes an efficient and real-time self-adaptive routing implementation scheme.
Optionally, in the embodiment of the present application, before receiving the adaptive routing notification message, the first leaf device will also receive or send an OSPF Link-State Update (LSU) message, where the LSU message is used for each device in the network to mutually notify the host of the host route.
Specifically, after the host accesses the third leaf device, the third leaf device generates a fourth LSU message ("fourth" is used to distinguish other device identifiers, which may also be "first", "second", "third"). The fourth LSU packet is configured to advertise routing information to the host to devices in the network, where the fourth LSU packet includes the routing information to the host and a third device identifier of a third leaf device.
And the third leaf device sends a fourth LSU message to any of the accessed spine devices.
After any spine device in the networking receives a fourth LSU message sent by the third leaf device, the first LSU message is sent to other leaf devices which are connected and are not connected with the third leaf device. The first LSU message comprises routing information reaching the host and a third equipment identifier of a third leaf equipment generating the routing information, wherein the routing information comprises IP prefix information of the host.
It is understood that the first LSU message further includes a device identifier of the first spine device.
After receiving the first LSU message, the first leaf device obtains the information from the first LSU message and generates a rerouting next hop entry locally to the host. The first leaf device also stores a rerouting next hop table entry into the rerouting next hop table, wherein the rerouting next hop table entry comprises a third device identifier and a plurality of pieces of forwarding information reaching the host, each piece of forwarding information comprises an outgoing interface identifier and a next hop address, the outgoing interface identifier is an interface identifier of the accessed spike device, and the next hop address is an interface IP address of the accessed spike device.
Wherein the plurality of forwarding information forms a plurality of ECMP paths to the host.
The first leaf device also generates an IP prefix routing table entry locally and stores the IP prefix routing table entry into the IP prefix routing table. The IP prefix routing table entry comprises IP prefix information and an entry pointer, wherein the entry pointer is used for pointing to a rerouting next hop table entry with a route mapping relation with the IP prefix routing table entry.
It should be noted that, the interface identifier of the accessed spike device and the interface address information of the accessed spike device may be obtained by the first leaf device in the LSDB. In the embodiment of the application, the first leaf device accesses each spline device through different interfaces of the first leaf device.
In the embodiment of the application, a first leaf device generates a prefix-Virtual Next-hop (VN) VN two-segment table item according to a received first LSU message. The prefix list item is an IP prefix route list item, which comprises an IP prefix/mask field and a pointer pointing to the VN list item, and the VN list item is a route next-hop list item which is composed of a route initiator identifier and a plurality of pieces of forwarding information.
The IP prefix/mask field stores prefix information of a host, the pointer is used for pointing to a VN table item matched with the prefix information of the host, the route originator is identified to generate a device identifier of a leaf device of a certain host route, each piece of forwarding information indicates a forwarding path reaching the host, and a plurality of pieces of forwarding information form an ECMP path.
Optionally, from the foregoing, the first leaf device will also generate and send LSU messages to the accessed spine device.
Specifically, the first leaf device generates a second LSU message that includes routing information to the host and a device identification of the first leaf device. The first leaf device sends a second LSU message to any of the connected spine devices (e.g., the first spine device).
And after the first spine device receives the second LSU message, the first spine device acquires the routing information and the device identification of the first leaf device. The first spine device generates a fourth LSU message that includes routing information to the host, a device identification of the first spine device, and a device identification of the first leaf device.
The first spine device sends a third LSU message to other connected leaf devices except the first leaf device. Other leaf devices may locally generate a reroute next hop entry and an IP prefix routing entry in accordance with the execution of the first leaf device in the previous embodiments.
Wherein the routing information includes IP prefix information of the host.
Optionally, in the embodiment of the present application, the LSU packet includes a Number of LSAs field (occupying 4 bytes, indicating the number of LSAs included in the packet) and a LSAs field, where the length of the LSAs field is a variable length, and the variable length may be used to carry one or more link state advertisements (english: LINK STATE ADVERTISEMENT, abbreviated: LSA).
The LSA is a core data structure of the OSPF protocol, and is used for describing network topology and link states. LSAs include multiple types and have different field formats, but different types of LSAs each include a common header.
The header includes an LS Age subfield (occupying 2 bytes indicating Age (seconds) of the LSA), an Options subfield (occupying 1 byte indicating optional function), an LS Type subfield (occupying 1 byte indicating Type of the LSA), LINK STATE ID subfields (occupying 4 bytes indicating link state ID), ADVERTISING ROUTER subfields (occupying 4 bytes indicating Router ID of the LSA), LS Sequence Number subfields (occupying 4 bytes indicating sequence number of the LSA), LS Checksum subfields (occupying 2 bytes indicating Checksum of the LSA), and Length subfields (occupying 2 bytes indicating total Length of the LSA).
In the embodiment of the present application, the ADVERTISING ROUTER subfield is used to carry the device identifier of the leaf device that generates the routing information.
It should be noted that, in the embodiment of the present application, the LSA is specifically an LSA adapted to participate in conventional OSPF routing computation (e.g., computation of shortest path tree SPT). The LSA types participating in the conventional OSPF route calculation include Router LSA (Type 1) constructing an intra-area topology, network LSA (Type 2) representing a topology of a broadcast Network, summary LSA (Type 3) propagating inter-area route information, summary LSA (Type 4) helping to find the location of an ASBR, AS External LSA (Type 5) propagating External route information, and NSSA External LSA (Type 7) propagating External route information within an NSSA area.
The LSAs described above together form the aforementioned LSDB, and the leaf device calculates a Shortest Path Tree (SPT) using Dijkstra's algorithm based on the LSDB and generates a reroute next hop entry as well as an IP prefix routing entry. It will be appreciated that the aforementioned LSDB is also commonly formed within the spine device by the aforementioned LSDs, and that the Dijkstra algorithm is used to calculate the Shortest Path Tree (SPT) based on the LSDB, and to generate the routing table.
The communication method provided by the embodiment of the application is described in detail below. Referring to fig. 2, fig. 2 is a flowchart of another communication method according to an embodiment of the present application. The method is applied to the spine equipment. The communication method provided by the embodiment of the application can comprise the following steps.
Step 210, detecting a communication state between the spine device and the first leaf device;
Step 220, when it is determined that the communication status is abnormal, sending an adaptive routing notification message to other leaf devices except the first leaf device, where the adaptive routing notification message includes a link identifier, where the link identifier is a first device identifier of the first leaf device, so that the other leaf devices acquire a first rerouting next hop table entry matched with the first device identifier from a rerouting next hop table according to the first device identifier, where the first rerouting next hop table entry includes a plurality of forwarding information, and determining, from the plurality of forwarding information, that each first forwarding path indicated by at least one piece of first forwarding information other than the forwarding information including an interface identifier of the interface carries traffic flow reaching the first leaf device.
It will be appreciated that in the foregoing embodiments, the process of detecting the communication state between the self and the connected leaf device by the spine device, the process of generating and sending the adaptive routing notification message by the spine device, the content included in the adaptive routing notification message, and the execution process of the leaf device after receiving the adaptive notification message have been described in detail, which will not be repeated here.
Optionally, before the spin device detects the communication state between itself and the first leaf device, the method further comprises the step that the spin device receives a configuration instruction input by a user, wherein the configuration instruction comprises a second device identifier, and the second device identifier is a Router identifier of the spin device.
Optionally, before the spin device detects the communication state between itself and the first leaf device, the method further includes the steps that the spin device receives a first link state update LSU message sent by any leaf device in the network, the first LSU message includes routing information reaching the host and a third device identifier of a third leaf device generating the routing information, the routing information includes IP prefix information of the host, and the spin device sends a second LSU message to other leaf devices except the third leaf device generating the routing information, the second LSU message includes the routing information, the second device identifier and the third device identifier, so that the other leaf devices locally generate a rerouted next hop table and an IP prefix routing table.
Optionally, the LSU packet includes a LSAs field, the LSAs field includes a ADVERTISING ROUTER subfield, and the ADVERTISING ROUTER subfield is used to carry a device identifier of a leaf device that generates the routing information.
Optionally, in an embodiment of the present application, the spin device further includes a forwarding chip;
Before the above-mentioned spin equipment detects the communication state between itself and first leaf equipment, when any interface is used for connecting with leaf equipment, the above-mentioned spin equipment can be used for establishing mapping relationship between interface identification of interface and equipment identification of leaf equipment, and the above-mentioned spin equipment can be used for configuring the mapping relationship in the forwarding chip.
Optionally, before the spin device sends the adaptive routing notification message to other than the first leaf device, the method further includes the steps that when it is determined that the communication state is abnormal, the spin device determines a first interface for connecting with the first leaf device, according to a first interface identifier of the first interface, the spin device obtains a first device identifier corresponding to the first interface identifier from an identifier mapping relationship, and the spin device uses the first device identifier as a link identifier.
It will be appreciated that a number of the alternative processes described above are described in detail in the foregoing embodiments and will not be repeated here.
When the communication state is abnormal, the spine equipment sends an adaptive route notification message to other leaf equipment except the first leaf equipment, the adaptive route notification message comprises a link identifier, the link identifier is a first equipment identifier of the first leaf equipment, so that the other leaf equipment obtains a first rerouting next hop table item matched with the first equipment identifier from a rerouting next hop table according to the first equipment identifier, the first rerouting next hop table item comprises a plurality of pieces of forwarding information, and each first forwarding path indicated by at least one piece of first forwarding information except the forwarding information of the interface identifier of the interface is determined to bear traffic flow reaching the first leaf equipment from the plurality of pieces of forwarding information through the interface receiving the adaptive route notification message.
Thus, after the spine device senses that the communication state between the spine device and a certain leaf device is abnormal, other leaf devices accessed are informed through the adaptive routing notification message. Other leaf devices automatically adjust the path of the traffic flow bearing the second leaf device according to the rerouting next hop table, and the problem of how to realize high real-time self-adaptive routing under the direct connection topology in the prior art is solved. The method realizes an efficient and real-time self-adaptive routing implementation scheme.
In the embodiment of the present application, the process of performing host route advertisement by each device in the network and generating the rerouting next hop table and the IP prefix route table by the leaf device is described in detail below. Referring to fig. 3, fig. 3 is a schematic diagram of a spine-leaf networking according to an embodiment of the present application.
In FIG. 3, the networking includes spin 1, spin 2, leaf1, leaf2, leaf3. A plurality of hosts are connected under each leaf, and full connection is achieved between the spines and the leaf. Each device supports the OSPF protocol, and OSPF neighbor relation is established between each device. After successful networking, each device receives a configuration instruction input by a manager, wherein the configuration instruction comprises a device identifier, and the device identifier is a Router identifier of the network device.
In the following, a host route is described by taking leaf3 as an example, which propagates hosts 5 through the network via respective spines.
After the host 5 has accessed the leaf3, the leaf3 generates an LSU message 1, which LSU message 1 includes routing information to the host 5 and a device identification 13 of the leaf3 (for simplicity of description, denoted by a number here, in practice, the device identification is an IP address of a certain interface of the device). Wherein the routing information to the host 5 includes IP prefix information 10.120.1.2/32 of the host 5.
The LSU message 1 includes a Router identification field, number of LSAs field, and LSAs field, and the LSAs field includes a common header. The generic header includes ADVERTISING ROUTER subfields. Wherein the Router identification field is used to carry the device identification 13 of the leaf3, indicating that the LSU message 1 is sent by the leaf3, and the ADVERTISING ROUTER subfield is used to carry the device identification 13 of the leaf3, indicating that the routing information reaching the host 5 is generated by the leaf3, that is, the source device of the leaf3 generating the routing information reaching the host 5.
It will be appreciated that the other fields included in LSU message 1 are set as specified by the existing OSPF protocol and will not be repeated here.
As specified by the existing OSPF protocol, leaf3 propagates routing information to host 5 within the network through each spin. Let 1 learn the routing information of the host 5 as an example. The leaf1 learns the routing information arriving at the host 5 and generates a rerouting next hop entry comprising the device identification 13 of the leaf3 and two pieces of forwarding information, namely the interface identification of the interface 1 connected to the spin 2 and the interface address information of the spin 2, and the interface identification of the interface 2 connected to the spin 1 and the interface address information of the spin 1.
The interface identifier and the interface address information form a piece of forwarding information. The plurality of forwarding information pieces constitute an ECMP path.
Meanwhile, according to the IP prefix information 10.120.1.2/32 of the host computer, an IP prefix routing table entry is generated, where the IP prefix routing table entry includes IP prefix information and an entry pointer, and the entry pointer is used to point to a rerouting next hop table entry having a route mapping relationship with the IP prefix routing table entry.
The interface identifier of the interface 2 connected with the spin 2 and the interface address information of the spin 2 can be acquired in a local LSDB.
As shown in fig. 4, fig. 4 is an IP prefix routing table entry-rerouting next hop table entry according to an embodiment of the present application. In fig. 4, the IP prefix routing entry corresponding to the host 5 points to the rerouted next hop entry through the entry pointer. Similarly, the IP prefix routing entries corresponding to the hosts 6 and 7 also point to the same rerouting next hop entry through the entry pointers. That is, in embodiments of the present application, the same reroute next hop entry may be shared with multiple IP prefix routing entries.
Similarly, leaf1 also learns the routing information reaching host 3 and host 4, and generates IP prefix routing entries corresponding to host 3 and host 4 and a rerouting next hop entry having a routing mapping relationship. As shown in fig. 5, fig. 5 is another IP prefix routing entry-reroute next hop entry. Fig. 5 includes similar contents to fig. 5 and will not be repeated here.
In the embodiment of the present application, two spines are included in the networking, so that two pieces of forwarding information are included in the rerouting next hop table entry generated by leaf 1. The two forwarding paths indicated by the two forwarding information constitute an ECMP path.
It will be appreciated that when there are three hops in the network, the re-route next-hop entry generated by leaf1 includes three pieces of forwarding information. The three forwarding paths indicated by the three forwarding information constitute an ECMP path.
The leaf1 also generates routing information reaching the host 1 and the host 2, and announces the spike 2 through the LSU message 1, and similarly, the spike 2 also generates the LSU message 2 and announces the leaf2 and the leaf3, so that the leaf2 and the leaf3 also execute the step of the leaf1, and generate the rerouting next hop table entry and the IP prefix routing table entry corresponding to the host 1 and the host 2 locally.
After this is done, for each leaf device accessed, any spike will detect the status of communication with it. In the embodiment of the present application, a communication state between the spine2 and the leaf3 is taken as an example for explanation.
The spin 2 detects the communication status between itself and the leaf 3. When the spin 2 determines that the communication status between itself and the leaf3 is abnormal, the spin 2 generates an adaptive routing notification message including a link identification, which is the device identification 13 of the leaf3 (the link identification is used to indicate that the link status between the spin 2 and the leaf3 is faulty).
The spin 2 sends adaptive routing notification messages to other leafs than leaf3 and accessing the spin 2, e.g., the spin 2 sends adaptive routing notification messages to leaf1, leaf 2.
The following description will take as an example that the spin 2 sends an adaptive route notification message to the leaf 1.
After receiving the adaptive routing notification message, leaf1 via interface 2, obtains from it the device identification 13 of leaf 3.
Leaf1 first determines that the link state between spine2 and leaf3 is faulty based on leaf3 device identification 13. Then, leaf1 looks up the rerouting next hop table according to the device identifier 13 of leaf3, and acquires the rerouting next hop table entry 1 matching the device identifier 13 of leaf3 from the rerouting next hop table. The rerouting next hop entry 1 includes a plurality of pieces of forwarding information.
From the plurality of forwarding information according to interface 2, leaf1 marks the forwarding information including interface 2 as unavailable and takes the forwarding path indicated by the forwarding information including interface 1 as a path carrying traffic arriving at leaf 2. That is, when the traffic forwarded to the leaf2 is received subsequently, the traffic is forwarded to the spline 1 through the interface 1, so that the spline 1 forwards the traffic to the leaf3, and the switching of the adaptive route is realized.
It may be understood that, in the embodiment of the present application, if the networking further includes a spin 3, and when the spin 3 is fully connected to each leaf, the rerouting next hop entry generated by the leaf1 includes, in addition to the two forwarding information shown in fig. 4, the forwarding information of the interface 3 connected to the spin 3, and the next hop 3 (the spin 3 interface address). The three forwarding paths indicated by the three forwarding information constitute an ECMP path.
At this time, from the plurality of pieces of forwarding information, according to the interface 2, the leaf1 marks the forwarding information including the interface 2 as unavailable, and takes two forwarding paths respectively indicated by the forwarding information including the interface 1 and the forwarding information including the interface 3 as paths carrying traffic arriving at the leaf 2. That is, when the traffic forwarded to the leaf2 is subsequently received, the traffic is forwarded to the spin 1 through the interface 1, or the traffic is forwarded to the spin 3 through the interface 3, so that the traffic is forwarded to the leaf3 by the leaf1, and the switching of the adaptive route is realized.
Based on the same inventive concept, the embodiment of the application also provides a communication device corresponding to the communication method. Referring to fig. 6, fig. 6 is a communication apparatus provided in an embodiment of the present application, where the apparatus is applied to a first leaf device, where the first leaf device establishes a communication connection with a second leaf device through at least one spine device, and the first leaf device includes a first interface and at least one second interface, where the first interface is connected to the first spine device, and each second interface is connected to one second spine device, where the apparatus includes:
A receiving unit 610, configured to receive, through the first interface, an adaptive routing notification message sent by the first spine device, where the adaptive routing notification message includes a link identifier, and the link identifier is a first device identifier of the second leaf device;
An obtaining unit 620, configured to obtain a first rerouting next hop table entry matched with the first device identifier from a rerouting next hop table, where the first rerouting next hop table entry includes a plurality of forwarding information pieces;
A determining unit 630, configured to determine, according to the first interface, from the plurality of forwarding information, that each first forwarding path indicated by at least one piece of first forwarding information including an interface identifier of the first interface carries traffic arriving at the second leaf device, where each piece of first forwarding information includes a first outgoing interface identifier and a first next hop address, where the first outgoing interface identifier indicates the second interface, and the first next hop address indicates an interface IP address of the second spine device.
Optionally, the receiving unit 610 is further configured to receive a configuration instruction input by a user, where the configuration instruction includes a second device identifier, and the second device identifier is a router identifier of the first leaf device.
Optionally, the receiving unit 610 is further configured to receive a first link state update LSU packet sent by any spine device in the networking, where the first LSU packet includes routing information that arrives at the host, and a third device identifier of a third leaf device that generates the routing information;
The device further comprises a generating unit (not shown in the figure) for locally generating a rerouting next hop table entry, and storing the rerouting next hop table entry into the rerouting next hop table, wherein the rerouting next hop table entry comprises the third equipment identifier and a plurality of pieces of forwarding information reaching the host, each piece of forwarding information comprises an outgoing interface identifier and a next hop address, the outgoing interface identifier is an interface identifier for accessing any spine equipment, and the next hop address is an interface IP address of the any spine equipment;
The generating unit (not shown in the figure) is further configured to locally generate an IP prefix routing table entry, and store the IP prefix routing table entry into a prefix routing table, where the IP prefix routing table entry includes the IP prefix information and an entry pointer, and the entry pointer is configured to point to the rerouting next hop table entry having a routing mapping relationship with the IP prefix routing table entry;
wherein the plurality of forwarding information forms a plurality of ECMP paths to the host.
Optionally, the apparatus further comprises:
a sending unit (not shown in the figure) configured to send a second LSU packet to any spine device that is accessed, where the second LSU packet includes routing information that arrives at a host and a device identifier of the first leaf device, so that after the any spine device receives the second LSU packet, a third LSU packet is sent to other leaf devices that are accessed and except for the first leaf device, where the third LSU packet includes the routing information and the device identifier of the first leaf device;
wherein the routing information includes IP prefix information of the host.
Optionally, the determining unit 630 is specifically configured to obtain an interface identifier of the first interface;
Marking second forwarding information including an interface identifier of the first interface as unavailable from the plurality of forwarding information;
And taking other forwarding information except the second forwarding information in the pieces of forwarding information as the first forwarding information.
Optionally, the LSU message includes LSAs fields, the LSAs fields include ADVERTISING ROUTER subfields, and the ADVERTISING ROUTER subfields are used to carry a device identification of the leaf device that generates the routing information.
Therefore, by applying the communication device provided by the application, the first leaf equipment receives the self-adaptive route notification message sent by the first spine equipment through the first interface, the self-adaptive route notification message comprises a link identifier, the link identifier is a first equipment identifier of the second leaf equipment, the first leaf equipment acquires a first rerouting next-hop table item matched with the first equipment identifier from a rerouting next-hop table, the first rerouting next-hop table item comprises a plurality of pieces of forwarding information, according to the first interface, the first leaf equipment determines that each first forwarding path indicated by at least one piece of forwarding information except the forwarding information comprising the interface identifier of the first interface carries traffic reaching the second leaf equipment, and each first forwarding information comprises a first outgoing interface identifier and a first next-hop address, the first outgoing interface identifier indicates the second interface, and the first next-hop address indicates the interface IP address of the second spine equipment.
Thus, after the spine device senses that the communication state between the spine device and a certain leaf device is abnormal, other leaf devices accessed are informed through the adaptive routing notification message. Other leaf devices automatically adjust the path of the traffic flow bearing the second leaf device according to the rerouting next hop table, and the problem of how to realize high real-time self-adaptive routing under the direct connection topology in the prior art is solved. The method realizes an efficient and real-time self-adaptive routing implementation scheme.
Based on the same inventive concept, the embodiment of the application also provides a communication device corresponding to the communication method. Referring to fig. 7, fig. 7 is another communication apparatus provided in an embodiment of the present application, where the apparatus is applied to a spine device, and the spine device establishes a communication connection with each leaf device in a network respectively, and the apparatus includes:
A detecting unit 710, configured to detect a communication state between the spine device and the first leaf device;
A sending unit 720, configured to send, when it is determined that the communication status is abnormal, an adaptive routing notification message to other leaf devices except for the first leaf device, where the adaptive routing notification message includes a link identifier, where the link identifier is a first device identifier of the first leaf device, so that the other leaf devices acquire, from a rerouting next hop table according to the first device identifier, a first rerouting next hop table entry matched with the first device identifier, where the first rerouting next hop table entry includes a plurality of forwarding information pieces, and determine, from the plurality of forwarding information pieces, each first forwarding path indicated by at least one first forwarding information piece other than the forwarding information including the interface identifier of the interface, to carry traffic flow reaching the first leaf device.
Optionally, the apparatus further comprises:
A receiving unit (not shown in the figure) is configured to receive a configuration instruction input by a user, where the configuration instruction includes a second device identifier, and the second device identifier is a router identifier of the spine device.
Optionally, the receiving unit (not shown in the figure) is further configured to receive a first link state update LSU packet sent by any leaf device in the network, where the first LSU packet includes routing information that arrives at the host and a third device identifier of a third leaf device that generates the routing information;
the sending unit 720 is further configured to send a second LSU packet to a leaf device other than the third leaf device that generates the routing information, where the second LSU packet includes the routing information, the second device identifier, and the third device identifier, so that the other leaf device generates a rerouting next hop table and an IP prefix routing table locally.
Optionally, the LSU message includes LSAs fields, the LSAs fields include ADVERTISING ROUTER subfields, and the ADVERTISING ROUTER subfields are used to carry a device identification of the leaf device that generates the routing information.
Optionally, the spin device further comprises a forwarding chip;
the device also comprises an establishing unit (not shown in the figure) for establishing a mapping relationship between an interface identifier of any interface and a device identifier of the leaf device when the interface is used for connecting with the leaf device;
A configuration unit (not shown in the figure) configured to configure the mapping relationship in the forwarding chip.
Optionally, the apparatus further comprises a determining unit (not shown in the figure) configured to determine a first interface for connecting with the first leaf device when it is determined that the communication state is abnormal;
An obtaining unit (not shown in the figure) configured to obtain, according to a first interface identifier of the first interface, a first device identifier corresponding to the first interface identifier from an identifier mapping relationship;
a processing unit (not shown in the figure) is configured to use the first device identifier as the link identifier.
When the communication state is abnormal, the spine equipment sends an adaptive route notification message to other leaf equipment except the first leaf equipment, the adaptive route notification message comprises a link identification, the link identification is used as a first equipment identification of the first leaf equipment, so that the other leaf equipment obtains a first rerouting next hop table item matched with the first equipment identification from a rerouting next hop table according to the first equipment identification, the first rerouting next hop table item comprises a plurality of pieces of forwarding information, and each first forwarding path indicated by at least one piece of first forwarding information except the forwarding information of the interface identification of the interface is determined to bear traffic flow reaching the second leaf equipment through the interface receiving the adaptive route notification message.
Thus, after the spine device senses that the communication state between the spine device and a certain leaf device is abnormal, other leaf devices accessed are informed through the adaptive routing notification message. Other leaf devices automatically adjust the path of the traffic flow bearing the second leaf device according to the rerouting next hop table, and the problem of how to realize high real-time self-adaptive routing under the direct connection topology in the prior art is solved. The method realizes an efficient and real-time self-adaptive routing implementation scheme.
Based on the same inventive concept, the embodiment of the present application also provides a network device, as shown in fig. 8, including a processor 810, a transceiver 820, and a machine-readable storage medium 830, where the machine-readable storage medium 830 stores machine executable instructions capable of being executed by the processor 810, the processor 810 being caused by the machine executable instructions to perform the communication method provided by the embodiment of the present application. The communication devices shown in fig. 6 and 7 may be implemented by using a hardware configuration of a network device as shown in fig. 8.
The computer readable storage medium 830 may include a random access Memory (english: random Access Memory, abbreviated as RAM) or a nonvolatile Memory (english: non-volatile Memory, abbreviated as NVM), such as at least one magnetic disk Memory. Optionally, the computer readable storage medium 830 may also be at least one storage device located remotely from the aforementioned processor 810.
The Processor 810 may be a general purpose Processor including a central processing unit (Central Processing Unit, CPU), a network Processor (Network Processor, NP), a digital signal Processor (DIGITAL SIGNAL), an Application SPECIFIC INTEGRATED Circuit (ASIC), a Field Programmable gate array (Field Programmable GATE ARRAY, FPGA), a discrete gate or transistor logic device, or a discrete hardware component.
In an embodiment of the present application, processor 810, by reading machine-executable instructions stored in machine-readable storage medium 830, is caused by the machine-executable instructions to implement processor 810 itself and invoke transceiver 820 to perform the communication methods described in the embodiments of the present application previously.
Additionally, embodiments of the present application provide a machine-readable storage medium 830, the machine-readable storage medium 830 storing machine-executable instructions that, when invoked and executed by the processor 810, cause the processor 810 itself, as well as the invoking transceiver 820, to perform the communication methods described in the foregoing embodiments of the present application.
The implementation process of the functions and roles of each unit in the above device is specifically shown in the implementation process of the corresponding steps in the above method, and will not be described herein again.
For the device embodiments, reference is made to the description of the method embodiments for the relevant points, since they essentially correspond to the method embodiments. The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purposes of the present application. Those of ordinary skill in the art will understand and implement the present application without undue burden.
For the communication device and the machine-readable storage medium embodiments, since the method content involved is substantially similar to the method embodiments described above, the description is relatively simple, and reference will only be made to part of the description of the method embodiments.
The foregoing description of the preferred embodiments of the application is not intended to be limiting, but rather to enable any modification, equivalent replacement, improvement or the like to be made within the spirit and principles of the application.