[go: up one dir, main page]

CN120263709A - Communication method and device - Google Patents

Communication method and device Download PDF

Info

Publication number
CN120263709A
CN120263709A CN202510293051.6A CN202510293051A CN120263709A CN 120263709 A CN120263709 A CN 120263709A CN 202510293051 A CN202510293051 A CN 202510293051A CN 120263709 A CN120263709 A CN 120263709A
Authority
CN
China
Prior art keywords
interface
identifier
leaf
spine
next hop
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202510293051.6A
Other languages
Chinese (zh)
Inventor
叶金荣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Technologies Co Ltd
Original Assignee
New H3C Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Technologies Co Ltd filed Critical New H3C Technologies Co Ltd
Priority to CN202510293051.6A priority Critical patent/CN120263709A/en
Publication of CN120263709A publication Critical patent/CN120263709A/en
Pending legal-status Critical Current

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本申请提供一种通信方法及装置,该方法包括:通过第一接口,接收第一spine设备发送的自适应路由通知消息,该自适应路由通知消息包括链路标识,该链路标识为第二leaf设备的第一设备标识;从重路由下一跳表中,获取与第一设备标识匹配的第一重路由下一跳表项,该第一重路由下一跳表项包括多条转发信息;根据第一接口,从多条转发信息中,确定包括第一接口的接口标识的转发信息之外的其他至少一条第一转发信息指示的每条第一转发路径承载到达第二leaf设备的业务流量,每条第一转发信息包括第一出接口标识以及第一下一跳地址,第一出接口标识指示所第二接口,第一下一跳地址指示第二spine设备的接口IP地址。

The present application provides a communication method and apparatus, the method comprising: receiving an adaptive routing notification message sent by a first spine device through a first interface, the adaptive routing notification message comprising a link identifier, the link identifier being a first device identifier of a second leaf device; obtaining a first rerouting next hop table entry matching the first device identifier from a rerouting next hop table, the first rerouting next hop table entry comprising a plurality of forwarding information; determining, according to the first interface, from the plurality of forwarding information, that each first forwarding path indicated by at least one other first forwarding information other than the forwarding information including the interface identifier of the first interface carries service traffic arriving at the second leaf device, each first forwarding information comprising a first output interface identifier and a first next hop address, the first output interface identifier indicating the second interface, and the first next hop address indicating the interface IP address of the second spine device.

Description

Communication method and device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a communications method and apparatus.
Background
Adaptive routing refers to a technique for performing dynamic routing decisions based on changes in network topology and traffic load. Under the direct connection topology, for example, the (spine) spine (leaf) topology, it is difficult to realize the self-adaptive routing of the traffic from end to end in the technology, and the real-time performance of the route synchronization and the traffic forwarding is guaranteed.
Currently, adaptive routing can be achieved by a method of centralized control of traffic collection analysis and control systems that are outside of the network. However, the above centralized control method can only reach the adjustment speed of sub-second level, and cannot realize high real-time self-adaptive routing. Therefore, how to implement high real-time adaptive routing in the direct connection topology is a problem to be solved currently.
Disclosure of Invention
In view of this, the present application provides a communication method and apparatus for solving the problem of how to implement high real-time adaptive routing in direct connection topology.
In a first aspect, the present application provides a communication method applied to a first leaf device, the first leaf device establishing a communication connection with a second leaf device through at least one spine device, the first leaf device including a first interface and at least one second interface, the first interface being connected to the first spine device, each second interface being connected to one second spine device, the method comprising:
Receiving, by 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;
acquiring 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;
According to the first interface, each first forwarding path including at least one first forwarding information indication other than forwarding information of an interface identifier of the first interface is determined to bear traffic reaching the second leaf device, each first forwarding information includes 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 an interface IP address of the second spine device.
In a second aspect, the present application provides a communication method, where the method is applied to a spine device, and the spine device establishes a communication connection with each leaf device in a network, and the method includes:
Detecting a communication state between the spine device and a first leaf device;
When the communication state is abnormal, sending an adaptive routing notification message to other leaf devices except the first leaf device, wherein the adaptive routing notification message comprises a link identifier, 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 item matched with the first device identifier from a rerouting next hop table according to the first device identifier, the first rerouting next hop 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 from the plurality of pieces of forwarding information through an interface for receiving the adaptive routing notification message.
In a third aspect, the present application provides a communications apparatus for use with a first leaf device, the first leaf device establishing a communications link with a second leaf device through at least one spine device, the first leaf device including a first interface and at least one second interface, the first interface being connected to the first spine device, each second interface being connected to one second spine device, the apparatus comprising:
The receiving unit is used for receiving an adaptive routing notification message sent by the first spine device through the first interface, wherein the adaptive routing notification message comprises a link identifier, and the link identifier is a first device identifier of the second leaf device;
An obtaining unit, 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;
And the determining unit is used for determining that each first forwarding path indicated by at least one piece of first forwarding information except for forwarding information including interface identifiers of the first interfaces carries traffic reaching the second leaf equipment according to the first interfaces, each piece of first forwarding information includes a first interface identifier and a first next-hop address, the first interface identifier indicates the second interface, and the first next-hop address indicates an interface IP address of the second spine equipment.
In a fourth aspect, the present application provides a communications apparatus for use with a spine device, the spine device respectively establishing a communications connection with each leaf device within a network, the apparatus comprising:
The detection unit is used for detecting the communication state between the spine equipment and the first leaf equipment;
And the sending unit is used for sending an adaptive route notification message to other leaf devices except the first leaf device when the communication state is abnormal, wherein the adaptive route notification message comprises a link identifier, 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 item matched with the first device identifier from a rerouting next hop table according to the first device 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 the traffic flow reaching the first leaf device through the interface receiving the adaptive route notification message.
In a fifth aspect, the present application provides another network device comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor to cause the processor to perform the method provided by the first aspect of the application.
In a sixth aspect, the application provides another network device comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor to cause the processor to perform the method provided by the second aspect of the application.
The communication method and the communication device provided by the application are applied, 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, from the plurality of pieces of forwarding information, 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 flow reaching the second leaf device, each piece of 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 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.
Drawings
Fig. 1 is a flowchart of a communication method according to an embodiment of the present application;
FIG. 2 is a flow chart of another communication method according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a spine-leaf networking according to an embodiment of the present application;
fig. 4 is a schematic diagram of an IP prefix routing entry-rerouting next hop entry according to an embodiment of the present application;
fig. 5 is a schematic diagram of another IP prefix routing entry-rerouting next hop entry according to an embodiment of the present application;
Fig. 6 is a block diagram of a communication device according to an embodiment of the present application;
fig. 7 is a block diagram of another communication device according to an embodiment of the present application;
fig. 8 is a hardware structure of a network device according to an embodiment of the present application.
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.

Claims (14)

1.一种通信方法,其特征在于,所述方法应用于第一leaf设备,所述第一leaf设备通过至少一个spine设备与第二leaf设备建立通信连接,所述第一leaf设备包括第一接口以及至少一个第二接口,所述第一接口与第一spine设备连接,每个第二接口与一个第二spine设备连接,所述方法包括:1. A communication method, characterized in that the method is applied to a first leaf device, the first leaf device establishes a communication connection with a second leaf device through at least one spine device, the first leaf device includes a first interface and at least one second interface, the first interface is connected to the first spine device, and each second interface is connected to a second spine device, the method comprising: 通过所述第一接口,接收所述第一spine设备发送的自适应路由通知消息,所述自适应路由通知消息包括链路标识,所述链路标识为所述第二leaf设备的第一设备标识;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, where the link identifier is a first device identifier of the second leaf device; 从重路由下一跳表中,获取与所述第一设备标识匹配的第一重路由下一跳表项,所述第一重路由下一跳表项包括多条转发信息;Acquire a first rerouting next hop table entry matching the first device identifier from the rerouting next hop table, wherein the first rerouting next hop table entry includes a plurality of forwarding information; 根据所述第一接口,从所述多条转发信息中,确定包括所述第一接口的接口标识的转发信息之外的其他至少一条第一转发信息指示的每条第一转发路径承载到达所述第二leaf设备的业务流量,每条第一转发信息包括第一出接口标识以及第一下一跳地址,所述第一出接口标识指示所述第二接口,所述第一下一跳地址指示所述第二spine设备的接口IP地址。According to the first interface, from the multiple forwarding information, determine that each first forwarding path indicated by at least one other first forwarding information other than the forwarding information including the interface identifier of the first interface carries the service traffic reaching the second leaf device, each first forwarding information includes a first output interface identifier and a first next hop address, the first output interface identifier indicates the second interface, and the first next hop address indicates the interface IP address of the second spine device. 2.根据权利要求1所述的方法,其特征在于,所述通过所述第一接口,接收所述第一spine设备发送的自适应路由通知消息之前,所述方法还包括:2. The method according to claim 1, characterized in that before receiving the adaptive routing notification message sent by the first spine device through the first interface, the method further comprises: 接收用户输入的配置指令,所述配置指令包括第二设备标识,所述第二设备标识为所述第一leaf设备的路由器标识。A configuration instruction input by a user is received, where the configuration instruction includes a second device identifier, where the second device identifier is a router identifier of the first leaf device. 3.根据权利要求1所述的方法,其特征在于,所述通过所述第一接口,接收所述第一spine设备发送的自适应路由通知消息之前,所述方法还包括:3. The method according to claim 1, characterized in that before receiving the adaptive routing notification message sent by the first spine device through the first interface, the method further comprises: 接收组网内任一spine设备发送的第一链路状态更新LSU报文,所述第一LSU报文包括到达主机的路由信息、生成所述路由信息的第三leaf设备的第三设备标识;所述路由信息包括主机的IP前缀信息;Receive a first link state update LSU message sent by any spine device in the network, where the first LSU message includes routing information to reach the host and a third device identifier of a third leaf device that generates the routing information; the routing information includes IP prefix information of the host; 在本地生成重路由下一跳表项,并将所述重路由下一跳表项存储至所述重路由下一跳表中,所述重路由下一跳表项包括所述第三设备标识以及到达所述主机的多条转发信息,每条转发信息包括出接口标识以及下一跳地址,所述出接口标识为接入任一spine设备的接口标识,所述下一跳地址为所述任一spine设备的接口IP地址;Generate a rerouting next hop table entry locally, and store the rerouting next hop table entry in the rerouting next hop table, wherein the rerouting next hop table entry includes the third device identifier and multiple forwarding information reaching the host, each forwarding information includes an outgoing interface identifier and a next hop address, the outgoing interface identifier is an interface identifier for accessing any spine device, and the next hop address is an interface IP address of any spine device; 在本地生成IP前缀路由表项,并将所述IP前缀路由表项存储至前缀路由表中,所述IP前缀路由表项包括所述IP前缀信息以及表项指针,所述表项指针用于指向与所述IP前缀路由表项具有路由映射关系的所述重路由下一跳表项;Generate an IP prefix routing table entry locally, and store the IP prefix routing table entry in a prefix routing table, wherein the IP prefix routing table entry includes the IP prefix information and an entry pointer, and the entry pointer is used to point to the rerouting next hop table entry having a routing mapping relationship with the IP prefix routing table entry; 其中,所述多条转发信息构成到达所述主机的多条ECMP路径。The multiple forwarding information constitute multiple ECMP paths reaching the host. 4.根据权利要求1所述的方法,其特征在于,所述方法还包括:4. The method according to claim 1, characterized in that the method further comprises: 向接入的任一spine设备发送第二LSU报文,所述第二LSU报文包括到达主机的路由信息以及所述第一leaf设备的设备标识,以使得所述任一spine设备接收到所述第二LSU报文后,向接入的除所述第一leaf设备之外的其他leaf设备发送第三LSU报文,所述第三LSU报文包括所述路由信息以及所述第一leaf设备的设备标识;Send a second LSU message to any connected spine device, where the second LSU message includes routing information to the host and the device identifier of the first leaf device, so that after receiving the second LSU message, any spine device sends a third LSU message to other connected leaf devices except the first leaf device, where the third LSU message includes the routing information and the device identifier of the first leaf device; 其中,所述路由信息包括主机的IP前缀信息。The routing information includes the IP prefix information of the host. 5.根据权利要求1所述的方法,其特征在于,所述根据所述第一接口,从所述多条转发信息中,确定包括所述第一接口的接口标识的转发信息之外的其他至少一条第一转发信息指示的每条第一转发路径承载到达所述第二leaf设备的业务流量,具体包括:5. The method according to claim 1, characterized in that the step of determining, according to the first interface, from the plurality of forwarding information, that each first forwarding path indicated by at least one other first forwarding information other than the forwarding information including the interface identifier of the first interface carries the service traffic reaching the second leaf device, specifically comprising: 获取所述第一接口的接口标识;Obtaining an interface identifier of the first interface; 从所述多条转发信息中,将包括所述第一接口的接口标识的第二转发信息标记为不可用;From the plurality of forwarding information, mark second forwarding information including the interface identifier of the first interface as unavailable; 将所述多条转发信息中除所述第二转发信息之外的其他转发信息作为所述第一转发信息。The other forwarding information among the multiple pieces of forwarding information except the second forwarding information is used as the first forwarding information. 6.根据权利要求3或4任一项所述的方法,其特征在于,LSU报文包括LSAs字段,所述LSAs字段包括Advertising Router子字段,所述Advertising Router子字段用于承载生成路由信息的leaf设备的设备标识。6. The method according to any one of claims 3 or 4, characterized in that the LSU message includes an LSA field, the LSA field includes an Advertising Router subfield, and the Advertising Router subfield is used to carry a device identifier of a leaf device that generates routing information. 7.一种通信方法,其特征在于,所述方法应用于spine设备,所述spine设备分别与组网内的每个leaf设备建立通信连接,所述方法包括:7. A communication method, characterized in that the method is applied to a spine device, the spine device establishes a communication connection with each leaf device in the network, and the method comprises: 检测所述spine设备与第一leaf设备之间的通信状态;Detecting the communication status between the spine device and the first leaf device; 当确定所述通信状态异常时,向除所述第一leaf设备之外的其他leaf设备发送自适应路由通知消息,所述自适应路由通知消息包括链路标识,所述链路标识为所述第一leaf设备的第一设备标识,以使得所述其他leaf设备根据所述第一设备标识从重路由下一跳表中,获取与所述第一设备标识匹配的第一重路由下一跳表项,所述第一重路由下一跳表项包括多条转发表项,并通过接收所述自适应路由通知消息的接口,从所述多条转发信息中,确定包括所述接口的接口标识的转发信息之外的其他至少一条第一转发信息指示的每条第一转发路径承载到达所述第一leaf设备的业务流量。When it is determined that the communication state is abnormal, an adaptive routing notification message is sent to other leaf devices except the first leaf device, the adaptive routing notification message including a link identifier, and the link identifier is a first device identifier of the first leaf device, so that the other leaf devices obtain a first rerouting next hop table item matching the first device identifier from a rerouting next hop table according to the first device identifier, the first rerouting next hop table item including a plurality of forwarding table items, and determine, through an interface that receives the adaptive routing notification message, from the plurality of forwarding information, that each first forwarding path indicated by at least one other first forwarding information other than the forwarding information including the interface identifier of the interface carries the service traffic arriving at the first leaf device. 8.根据权利要求7所述的方法,其特征在于,所述检测所述spine设备与第一leaf设备之间的通信状态之前,所述方法还包括:8. The method according to claim 7, characterized in that before detecting the communication status between the spine device and the first leaf device, the method further comprises: 接收用户输入的配置指令,所述配置指令包括第二设备标识,所述第二设备标识为所述spine设备的路由器标识。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. 9.根据权利要求8所述的方法,其特征在于,所述检测所述spine设备与第一leaf设备之间的通信状态之前,所述方法还包括:9. The method according to claim 8, characterized in that before detecting the communication status between the spine device and the first leaf device, the method further comprises: 接收组网内任一leaf设备发送的第一链路状态更新LSU报文,所述第一LSU报文包括到达主机的路由信息以及生成所述路由信息的第三leaf设备的第三设备标识;所述路由信息包括主机的IP前缀信息;Receive a first link state update LSU message sent by any leaf device in the network, wherein the first LSU message includes routing information to reach the host and a third device identifier of a third leaf device that generates the routing information; the routing information includes IP prefix information of the host; 向除生成所述路由信息的第三leaf设备之外的其他leaf设备发送第二LSU报文,所述第二LSU报文包括所述路由信息、所述第二设备标识以及所述第三设备标识,以使得所述其他leaf设备在本地生成重路由下一跳表以及IP前缀路由表。A second LSU message is sent to other leaf devices except the third leaf device that generates the routing information, wherein 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 rerouting next hop table and an IP prefix routing table. 10.根据权利要求9所述的方法,其特征在于,LSU报文包括LSAs字段,所述LSAs字段包括Advertising Router子字段,所述Advertising Router子字段用于承载生成路由信息的leaf设备的设备标识。10. The method according to claim 9, characterized in that the LSU message includes an LSA field, the LSA field includes an Advertising Router subfield, and the Advertising Router subfield is used to carry a device identifier of a leaf device that generates routing information. 11.根据权利要求7所述的方法,其特征在于,所述spine设备还包括转发芯片;11. The method according to claim 7, characterized in that the spine device further comprises a forwarding chip; 所述检测所述spine设备与第一leaf设备之间的通信状态之前,所述方法还包括:Before detecting the communication status between the spine device and the first leaf device, the method further includes: 当任一接口用于与leaf设备连接时,建立所述接口的接口标识与所述leaf设备的设备标识之间的映射关系;When any interface is used to connect to a leaf device, a mapping relationship between the interface identifier of the interface and the device identifier of the leaf device is established; 将所述映射关系配置在所述转发芯片内。The mapping relationship is configured in the forwarding chip. 12.根据权利要求11所述的方法,其特征在于,所述向除所述第一leaf设备之外的其他leaf设备发送自适应路由通知消息之前,所述方法还包括:12. The method according to claim 11, characterized in that before sending the adaptive routing notification message to other leaf devices except the first leaf device, the method further comprises: 当确定所述通信状态异常时,确定出用于与所述第一leaf设备连接的第一接口;When it is determined that the communication state is abnormal, determining a first interface for connecting to the first leaf device; 根据所述第一接口的第一接口标识,从标识映射关系中,获取与所述第一接口标识对应的第一设备标识;According to the first interface identifier of the first interface, acquiring a first device identifier corresponding to the first interface identifier from an identifier mapping relationship; 将所述第一设备标识作为所述链路标识。The first device identifier is used as the link identifier. 13.一种通信装置,其特征在于,所述装置应用于第一leaf设备,所述第一leaf设备通过至少一个spine设备与第二leaf设备建立通信连接,所述第一leaf设备包括第一接口以及至少一个第二接口,所述第一接口与第一spine设备连接,每个第二接口与一个第二spine设备连接,所述装置包括:13. A communication device, characterized in that the device is applied to a first leaf device, the first leaf device establishes a communication connection with a second leaf device through at least one spine device, the first leaf device includes a first interface and at least one second interface, the first interface is connected to the first spine device, and each second interface is connected to a second spine device, the device includes: 接收单元,用于通过所述第一接口,接收所述第一spine设备发送的自适应路由通知消息,所述自适应路由通知消息包括链路标识,所述链路标识为所述第二leaf设备的第一设备标识;A receiving unit, configured to receive, through the first interface, an adaptive routing notification message sent by the first spine device, wherein the adaptive routing notification message includes a link identifier, and the link identifier is a first device identifier of the second leaf device; 获取单元,用于从重路由下一跳表中,获取与所述第一设备标识匹配的第一重路由下一跳表项,所述第一重路由下一跳表项包括多条转发信息;an acquiring unit, configured to acquire, from a rerouting next hop table, a first rerouting next hop table entry matching the first device identifier, wherein the first rerouting next hop table entry includes a plurality of forwarding information; 确定单元,用于根据所述第一接口,从所述多条转发信息中,确定包括所述第一接口的接口标识的转发信息之外的其他至少一条第一转发信息指示的每条第一转发路径承载到达所述第二leaf设备的业务流量,每条第一转发信息包括第一出接口标识以及第一下一跳地址,所述第一出接口标识指示所述第二接口,所述第一下一跳地址指示所述第二spine设备的接口IP地址。A determination unit is used to determine, based on the first interface, from the multiple forwarding information, that each first forwarding path indicated by at least one other first forwarding information other than the forwarding information including the interface identifier of the first interface carries the service traffic reaching the second leaf device, each first forwarding information includes a first output interface identifier and a first next hop address, the first output interface identifier indicates the second interface, and the first next hop address indicates the interface IP address of the second spine device. 14.一种通信装置,其特征在于,所述装置应用于spine设备,所述spine设备分别与组网内的每个leaf设备建立通信连接,所述装置包括:14. A communication device, characterized in that the device is applied to a spine device, the spine device establishes a communication connection with each leaf device in the network, and the device comprises: 检测单元,用于检测所述spine设备与第一leaf设备之间的通信状态;A detection unit, configured to detect a communication status between the spine device and the first leaf device; 发送单元,用于当确定所述通信状态异常时,向除所述第一leaf设备之外的其他leaf设备发送自适应路由通知消息,所述自适应路由通知消息包括链路标识,所述链路标识为所述第一leaf设备的第一设备标识,以使得所述其他leaf设备根据所述第一设备标识从重路由下一跳表中,获取与所述第一设备标识匹配的第一重路由下一跳表项,所述第一重路由下一跳表项包括多条转发表项,并通过接收所述自适应路由通知消息的接口,从所述多条转发信息中,确定包括所述接口的接口标识的转发信息之外的其他至少一条第一转发信息指示的每条第一转发路径承载到达所述第一leaf设备的业务流量。A sending unit, configured to send an adaptive routing notification message to other leaf devices except the first leaf device when it is determined that the communication state is abnormal, the adaptive routing notification message including a link identifier, the link identifier being a first device identifier of the first leaf device, so that the other leaf devices obtain a first rerouting next hop table entry matching the first device identifier from a rerouting next hop table according to the first device identifier, the first rerouting next hop table entry including a plurality of forwarding table entries, and determine, through an interface receiving the adaptive routing notification message, from the plurality of forwarding information, that each first forwarding path indicated by at least one other first forwarding information other than the forwarding information including the interface identifier of the interface carries the service traffic arriving at the first leaf device.
CN202510293051.6A 2025-03-12 2025-03-12 Communication method and device Pending CN120263709A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202510293051.6A CN120263709A (en) 2025-03-12 2025-03-12 Communication method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202510293051.6A CN120263709A (en) 2025-03-12 2025-03-12 Communication method and device

Publications (1)

Publication Number Publication Date
CN120263709A true CN120263709A (en) 2025-07-04

Family

ID=96188269

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202510293051.6A Pending CN120263709A (en) 2025-03-12 2025-03-12 Communication method and device

Country Status (1)

Country Link
CN (1) CN120263709A (en)

Similar Documents

Publication Publication Date Title
EP3767881B1 (en) Maximally redundant trees to redundant multicast source nodes for multicast protection
CN111587580B (en) Interior gateway protocol flooding minimization
US8842522B2 (en) Incremental deployment of MRT based IPFRR
CN106063195B (en) Control device discovery in a network with separate control devices and forwarding devices
US9692687B2 (en) Method and apparatus for rapid rerouting of LDP packets
US7334047B1 (en) Method and system for selective link state advertisement blocking over a data network area
US7515551B2 (en) Techniques for reducing adjacencies in a link-state network routing protocol
RU2521092C2 (en) Ldp and igp synchronisation for broadcast networks
US10931530B1 (en) Managing routing resources of a network
CN107347032B (en) Message forwarding method and device
CN103098426A (en) Method and apparatus for improving LDP convergence using a layered label stack
US10320653B2 (en) Route topology discovery in data networks
WO2021254173A1 (en) Routing processing method and related device
CN106572012A (en) VPN FRR implementation method and PE equipment
US8750166B2 (en) Route topology discovery in data networks
CN113872843B (en) Route generation method, route processing method and device
US10735252B2 (en) Outside router fault detection
US20080212585A1 (en) Preventing Loops during Recovery in Network Rings Using Cost Metric Routing Protocol
CN102694729B (en) Routing resource in a kind of multilink transparent internet
CN120263709A (en) Communication method and device
US11671322B2 (en) Configuration of a network using a flex-algorithm routing mechanism
US12438807B2 (en) Route processing method and related device
CN119402416B (en) Communication method and device
WO2008003253A1 (en) The method and system of routing calculation for the directly connected broadcast link
CN119922132A (en) Network service transmission based on next-next-hop indication

Legal Events

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