[go: up one dir, main page]

WO2022121707A1 - 报文传输方法、设备及系统 - Google Patents

报文传输方法、设备及系统 Download PDF

Info

Publication number
WO2022121707A1
WO2022121707A1 PCT/CN2021/133526 CN2021133526W WO2022121707A1 WO 2022121707 A1 WO2022121707 A1 WO 2022121707A1 CN 2021133526 W CN2021133526 W CN 2021133526W WO 2022121707 A1 WO2022121707 A1 WO 2022121707A1
Authority
WO
WIPO (PCT)
Prior art keywords
packet
source
forwarding
network device
source route
Prior art date
Application number
PCT/CN2021/133526
Other languages
English (en)
French (fr)
Inventor
李彬轩
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP21902414.8A priority Critical patent/EP4246919A4/en
Publication of WO2022121707A1 publication Critical patent/WO2022121707A1/zh
Priority to US18/329,878 priority patent/US12273265B2/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/56Routing software
    • H04L45/566Routing instructions carried by the data packet, e.g. active networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/34Source routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/22Alternate routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/28Routing or path finding of packets in data switching networks using route fault recovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/302Route determination based on requested QoS
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/42Centralised routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/50Routing or path finding of packets in data switching networks using label swapping, e.g. multi-protocol label switch [MPLS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing

Definitions

  • the present application relates to the field of network technologies, and in particular, to a message transmission method, device, and system.
  • a message transmission system usually includes a communication network and an access device accessing the communication network.
  • the communication network includes multiple network devices, and the network device implements communication between the different access devices by forwarding messages from different access devices.
  • the access device accessing the communication network may include a source end device and a destination end device, and the network device in the communication network may forward the message of the source end device to the destination end device, so as to realize the source end device. Communication with the destination device.
  • the message transmission system includes two forwarding modes, namely, a source route forwarding mode and a forwarding table forwarding mode.
  • the source route forwarding mode the packets sent by the source end device carry source route information, and the source route information includes the port identifiers of each network device on the forwarding path from the source end device to the destination end device.
  • each network device determines the outgoing port of the packet according to the port identifier of the network device carried in the packet, and forwards the packet through the outgoing port of the packet.
  • the forwarding table forwarding mode the message sent by the source device carries the destination identifier (such as the address of the destination device). After each network device receives the message, it searches for the local forwarding table according to the destination identifier carried in the message. The outgoing port of the packet is determined from the ports of the network device, and the packet is forwarded through the outgoing port of the packet.
  • the network device on the forwarding path when the forwarding path fails, the network device on the forwarding path usually discards the packet or returns it to the source device so that the source device can reroute the packet and discard the packet. It is easy to cause poor reliability of packet transmission. Returning the packet to the source device for re-routing can easily lead to a long packet transmission delay.
  • the network device searches the local forwarding table to determine the outgoing point of the packet. The port takes a long time, resulting in a long packet transmission delay; therefore, the flexibility and reliability of the current packet transmission scheme are poor.
  • the present application provides a message transmission method, device and system, which help to improve the flexibility and reliability of message transmission.
  • the technical solution of this application is as follows:
  • a message transmission system including: a source end device, a destination end device, and multiple network devices; the source end device is configured to send a first message, and the first message carries a first source route information and a destination identifier, the first source routing information includes the port identifiers of each network device on the first forwarding path, the destination identifier indicates the destination end device; the first network device on the first forwarding path is used for receiving When the first packet is used, the first packet is forwarded according to the first source routing information or the destination identifier, and the first packet is preferentially forwarded according to the first source routing information.
  • the first packet sent by the source device since the first packet sent by the source device carries the first source routing information and the destination identifier, after the first network device on the first forwarding path receives the first packet, according to the first The source routing information or the destination identifier forwards the first packet, and preferentially forwards the first packet according to the first source routing information.
  • the first network device can forward the first packet according to the first source routing information, which helps to shorten the journey of the first packet from the source device to the destination.
  • the transmission delay of the device if the outgoing port indicated by the port identifier in the first source routing information is in an inactive state and the first forwarding path is faulty, the first network device can forward the first packet according to the destination identifier, This helps to avoid the loss of the second packet due to the failure of the first forwarding path.
  • the technical solution provided by the present application can reduce the packet loss rate and shorten the delay of packet transmission, which helps to improve the flexibility and reliability of packet transmission.
  • the first network device is configured to forward the first packet according to the first source routing information if the first packet satisfies the source route forwarding condition, and if the first packet does not meet the source route forwarding condition but satisfies the forwarding condition.
  • the forwarding condition is published, and the first packet is forwarded according to the destination identifier.
  • the first network device forwards the first packet in different forwarding modes, which helps to improve the flexibility of the transmission of the first packet.
  • the encapsulation type of the first packet is source route encapsulation
  • the first packet further carries a source route validity identifier
  • the source route validity identifier indicates that the source route encapsulated in the first packet is valid or invalid.
  • the first packet further carries a source routing type (type), and the source routing type indicates that the encapsulation type of the first packet is source routing encapsulation.
  • the source route forwarding condition includes: the source route validity identifier indicates that the source route encapsulated in the first packet is valid, and the outgoing port indicated by the port identifier of the first network device in the first source route information is in a Working status, such as UP status.
  • the source route validity identifier carried in the first packet sent by the source device generally indicates that the source route encapsulated in the first packet is valid.
  • the forwarding table forwarding condition includes: the source route validity identifier indicates that the source route encapsulated in the first packet is invalid.
  • the first packet received by the first network device satisfies the forwarding condition of the forwarding table, the first packet may be forwarded to the first network device through other network devices on the first forwarding path, and the first packet may be forwarded to the first network device through other network devices on the first forwarding path.
  • a network device is generally not the ingress device of the first forwarding path.
  • the other network device When determining that the port indicated by the port identifier of the other network device in the first source routing information carried in the first packet is in an inactive state, the other network device modifies the source routing validity identifier carried in the first packet , so that the modified source route validity identifier indicates that the source route encapsulated in the first packet is invalid.
  • the forwarding table forwarding condition includes: the source route validity identifier indicates that the source route encapsulated in the first packet is valid, but the outgoing port indicated by the port identifier of the first network device in the first source route information is in Non-working state, such as DOWN state.
  • the first network device may be an ingress device or other device of the first forwarding path.
  • the forwarding table forwarding conditions include: the source route validity identifier indicates that the source route encapsulated in the first packet is valid, but the outgoing port indicated by the port identifier of the first network device in the first source route information is in a non-existent state. working state, the first network device is specifically configured to: if the first packet does not meet the source route forwarding condition but meets the forwarding table forwarding condition, set the source route validity flag to indicate that the source route encapsulated in the first packet is invalid , and forward the first packet according to the destination identifier.
  • the first network device sets the source routing validity identification indication carried in the first packet when the outgoing port indicated by the port identification of the first network device in the first source routing information is in a non-working state
  • the source route encapsulated in the first packet is invalid, which can facilitate subsequent other network devices to determine that the first packet does not meet the source route forwarding condition after receiving the first packet, and determine the first packet according to the destination identifier carried in the first packet. Forward the first packet.
  • the forwarding table forwarding conditions include: the source route validity identifier indicates that the source route encapsulated in the first packet is valid, but the outgoing port indicated by the port identifier of the first network device in the first source route information is in a non-existent state. working state, the first network device is further configured to send a fault notification message to the source device if the first packet does not meet the source route forwarding condition but meets the forwarding table forwarding condition, the fault notification message indicates that the first forwarding path is faulty .
  • the source route validity identifier carried by the first network device in the first packet indicates that the source route encapsulated in the first packet is valid, but the source route encapsulated in the first packet is valid.
  • a failure notification message is sent to the source device to notify the first forwarding path failure, which can facilitate the source device to learn the first forwarding path failure.
  • the source device is further configured to set the first forwarding path as an invalid forwarding path after receiving the failure notification message.
  • the source device after receiving the failure notification message indicating the failure of the first forwarding path, sets the first forwarding path as an invalid forwarding path according to the failure notification message, which can avoid the source device Subsequently, the faulty first forwarding path is selected when source routing is performed on the packet.
  • the source device is further configured to send a second packet after receiving the fault notification message, where the second packet carries second source routing information and the destination identifier, and the second source routing information includes the first packet.
  • Port identifiers of each network device on the second forwarding path; the second network device on the second forwarding path is configured to forward the second packet according to the second source routing information or the destination identifier when receiving the second packet message, and preferentially forwards the second message according to the second source routing information.
  • the source device after receiving the failure notification message indicating the failure of the first forwarding path, the source device selects a source routing path for the second packet that is a second forwarding path different from the first forwarding path , the source end device selects the second forwarding path to send the second message carrying the second source routing information and the destination identifier to the destination end device, which can improve the flexibility and reliability of transmission of the second message. For example, if the second forwarding path is not faulty, the second network device on the second forwarding path can forward the second packet according to the second source routing information, which helps to shorten the transmission of the second packet from the source end. The transmission delay from the device to the destination device.
  • the second network device can forward the second forwarding path according to the destination identifier.
  • the second packet helps to avoid the loss of the second packet due to the failure of the second forwarding path.
  • the source end device is specifically configured to send the first packet when a source route encapsulation condition is met; wherein the source route encapsulation condition includes: both the source end device and the destination end device support a source route encapsulation function,
  • the network devices on the first forwarding path all support the source route forwarding function.
  • the network device usually supports the forwarding table forwarding function, and the access device usually supports the Ethernet encapsulation function. If the network device supports the source route forwarding function, the network device supports both the source route forwarding function and the forwarding table forwarding function. If the device supports the source route encapsulation function, the access device supports both the source route encapsulation function and the Ethernet encapsulation function.
  • a network device that supports both the source route forwarding function and the forwarding table forwarding function can be referred to as a dual-mode forwarding device.
  • a network device that only supports the forwarding function of the forwarding table but not the source route forwarding function is called a single-mode forwarding device, and an access device that supports both the source route encapsulation function and the Ethernet encapsulation function is called a dual-mode access device.
  • An access device with the Ethernet encapsulation function is called a single-mode access device.
  • the source end device supports the source route encapsulation function in both the source end device and the destination end device (that is, the source end device and the destination end device are both dual-mode access devices), and the first
  • sending the first packet can facilitate the first packet to be sent to the source.
  • the route forwarding method is forwarded to the destination device so that the destination device can parse the first packet.
  • the source end device is further configured to send a third packet when the source route encapsulation condition is not satisfied, where the third packet carries the destination identifier, and the encapsulation type of the third packet is Ethernet encapsulation.
  • the destination device is a single-mode access device, and/or the first forwarding path includes a single-mode forwarding device, and the source device is usually a dual-mode access device , so that the source device has the function of judging whether the source route encapsulation condition is satisfied, so as to determine whether to send a source route packet or an Ethernet packet.
  • the source device sends a third packet when the source route encapsulation condition is not met, and the third packet is an Ethernet packet, so it can ensure that the packet transmission method provided by this application is comparable to the traditional Ethernet packet. compatible with the transmission method.
  • the source end device is further configured to determine the first forwarding path according to the path table of the source end device before sending the first packet; wherein, the path table includes at least one path table entry related to the destination end device , and each path entry in the at least one path entry indicates a forwarding path between the source device and the destination device.
  • the source device determines the first forwarding path before sending the first packet, which can facilitate the first packet generated by the source device to carry the first source routing information to indicate the first forwarding path.
  • the source device is further configured to construct a path table according to the network topology of the message transmission system before determining the first forwarding path according to the path table of the source device, or receive the path table from the control device.
  • the source device by constructing a path table by the source device or receiving the path table from the control device, the source device can easily determine the first forwarding path according to the path table.
  • the first network device is further configured to construct a forwarding table according to the network topology of the message transmission system before forwarding the first message according to the destination identifier, or receive the forwarding table from the control device; wherein the forwarding table includes: At least one forwarding entry, each of the at least one forwarding entry indicates a mapping relationship between a destination identifier and a port of the first network device.
  • the first network device can facilitate the first network device to determine the destination identifier of the first packet according to the destination identifier carried in the first packet and the path table. outgoing port.
  • the first network device is configured to, when receiving the first packet, if the first packet satisfies the source route forwarding condition but the first hop device of the first network device does not support the source route forwarding function, according to the The destination identifier carried in the first packet forwards the first packet, and the first hop device is the next hop device of the first network device;
  • the first hop device is configured to forward the first packet according to the destination identifier carried in the first packet when receiving the first packet;
  • the second hop device of the first network device is configured to, when receiving the first packet, if the first packet satisfies the source route forwarding condition and the third hop device of the first network device supports the source route forwarding function, The first packet is forwarded according to the first source routing information carried in the first packet, the second hop device is the next hop device of the first hop device, and the third hop device is the next hop device of the second hop device One hop device.
  • the first network device when the first packet satisfies the source route forwarding condition but the first hop device of the first network device does not support the source route forwarding function, the first network device performs the first packet according to the information carried by the first packet.
  • the destination identifier forwards the first packet, and after the first hop device forwards the first packet to the second hop device of the first network device according to the destination identifier carried in the first packet, the second hop device is in the When the first packet satisfies the source route forwarding condition and the next hop device of the second hop device supports the source route forwarding function, forward the first packet according to the first source routing information carried in the first packet,
  • This packet forwarding method can be applied to a scenario where a forwarding path includes a device that does not support the source route forwarding function, and has better universality in a communication network.
  • a packet transmission method applied to a source device, the method includes: sending a first packet, where the first packet carries first source routing information and a destination identifier, the first source routing information It includes the port identifiers of each network device on the first forwarding path, and the destination identifier indicates the destination end device, so that the first network device on the first forwarding path forwards the first network device according to the first source routing information or the destination identifier. packet, the first network device preferentially forwards the first packet according to the first source routing information.
  • the encapsulation type of the first packet is source route encapsulation
  • the first packet also carries a source route validity identifier
  • the source route validity identifier indicates that the source route encapsulated in the first packet is valid or invalid.
  • the method further includes: after sending the first packet, if a failure notification message indicating a failure of the first forwarding path is received, setting the first forwarding path as an invalid forwarding path.
  • the method further includes: after sending the first packet, if a failure notification message indicating that the first forwarding path is faulty is received, sending a second packet, where the second packet carries the second source routing information and the destination identifier, the second source routing information includes the port identifiers of each network device on the second forwarding path, so that the second network device on the second forwarding path forwards according to the second source routing information or the destination identifier
  • the second network device preferentially forwards the second packet according to the second source routing information.
  • sending the first packet includes: sending the first packet when a source route encapsulation condition is met; wherein the source route encapsulation condition includes: both the source end device and the destination end device support a source route encapsulation function , and the network devices on the first forwarding path all support the source route forwarding function.
  • the method further includes: sending a third packet when the source route encapsulation condition is not satisfied, where the third packet carries the destination identifier, and the encapsulation type of the third packet is Ethernet encapsulation.
  • the method further includes: before sending the first packet, determining the first forwarding path according to a path table of the source device; wherein the path table includes at least one path related to the destination device entry, each path entry in the at least one path entry indicates a forwarding path between the source end device and the destination end device.
  • the method further includes: before determining the first forwarding path according to the path table of the source device, constructing the path table according to the network topology of the message transmission system, or receiving the path table from the control device.
  • a third aspect provides a packet transmission method, applied to a target network device, the method includes: when receiving a first packet carrying first source routing information and a destination identifier, according to the first source routing information or The destination identifier forwards the first packet, and preferentially forwards the first packet according to the first source routing information; wherein the first source routing information includes the port identifiers of each network device on the first forwarding path, the destination The identifier indicates the destination device.
  • forwarding the first packet according to the first source routing information or the destination identifier and preferentially forwarding the first packet according to the first source routing information, including: if the first packet satisfies source routing forwarding condition, forward the first packet according to the first source routing information; if the first packet does not meet the source routing forwarding condition but meets the forwarding table forwarding condition, forward the first packet according to the destination identifier.
  • the encapsulation type of the first packet is source route encapsulation
  • the first packet also carries a source route validity identifier
  • the source route validity identifier indicates that the source route encapsulated in the first packet is valid or invalid.
  • the source route forwarding condition includes: the source route validity identifier indicates that the source route encapsulated in the first packet is valid, and the outgoing port indicated by the port identifier of the target network device in the first source route information is in a working status.
  • the forwarding condition of the forwarding table includes: the source route validity identifier indicates that the source route encapsulated in the first packet is invalid.
  • the forwarding table forwarding condition includes: the source route validity identifier indicates that the source route encapsulated in the first packet is valid, but the outgoing port indicated by the port identifier of the target network device in the first source route information is in non-working state.
  • the forwarding table forwarding condition includes: the source route validity identifier indicates that the source route encapsulated in the first packet is valid, but the outgoing port indicated by the port identifier of the target network device in the first source route information is in In the non-working state, if the first packet does not meet the source route forwarding condition but meets the forwarding table forwarding condition, forward the first packet according to the destination identifier, including: if the first packet does not meet the source route forwarding condition but meets the forwarding condition In the forwarding table forwarding condition, the source route validity identifier is set to indicate that the source route encapsulated in the first packet is invalid; the first packet is forwarded according to the destination identifier.
  • the forwarding table forwarding condition includes: the source route validity identifier indicates that the source route encapsulated in the first packet is valid, but the outgoing port indicated by the port identifier of the target network device in the first source route information is in In a non-working state, the method further includes: if the first packet does not meet the source route forwarding condition but meets the forwarding table forwarding condition, sending a fault notification message to the source device, the fault notification message indicating that the first forwarding path is faulty .
  • the method further includes: when receiving a second packet carrying the second source routing information and the destination identifier, forwarding the second packet according to the second source routing information or the destination identifier, and preferentially according to the second packet.
  • the second source routing information forwards the second packet; wherein the second source routing information includes port identifiers of each network device on the second forwarding path.
  • the method further includes: before forwarding the first message according to the destination identifier, constructing a forwarding table according to the network topology of the message transmission system, or receiving a forwarding table from a control device; wherein the forwarding table includes At least one forwarding entry, each of the at least one forwarding entry indicates a mapping relationship between a destination identifier and a port of the target network device.
  • the method further includes: when receiving a third packet carrying the destination identifier, forwarding the third packet according to the destination identifier, where the encapsulation type of the third packet is Ethernet encapsulation.
  • forwarding the first packet according to the first source routing information or the destination identifier and preferentially forwarding the first packet according to the first source routing information, including: if the first packet satisfies source routing forwarding condition but the next hop device of the first network device does not support the source route forwarding function, the first packet is forwarded according to the destination identifier carried in the first packet, if the first packet satisfies the source route forwarding condition and the first packet A next-hop device of a network device supports a source route forwarding function, and forwards the first packet according to the first source routing information carried in the first packet.
  • the target network device is the first network device or the second network device.
  • a source device in a fourth aspect, includes:
  • a sending module configured to send a first packet, where the first packet carries first source routing information and a destination identifier, the first source routing information includes port identifiers of each network device on the first forwarding path, and the destination identifier indicates destination device, so that the first network device on the first forwarding path forwards the first packet according to the first source routing information or the destination identifier, and the first network device preferentially forwards the first packet according to the first source routing information first message.
  • the encapsulation type of the first packet is source route encapsulation
  • the first packet also carries a source route validity identifier
  • the source route validity identifier indicates that the source route encapsulated in the first packet is valid or invalid.
  • the source device further includes: a setting module, configured to set the first forwarding path as invalid forwarding if a failure notification message indicating a failure of the first forwarding path is received after the first packet is sent path.
  • a setting module configured to set the first forwarding path as invalid forwarding if a failure notification message indicating a failure of the first forwarding path is received after the first packet is sent path.
  • the sending module is further configured to, after sending the first message, send a second message if a failure notification message indicating a failure of the first forwarding path is received, where the second message carries the second source routing information and the destination identifier, the second source routing information includes the port identifiers of each network device on the second forwarding path, so that the second network device on the second forwarding path is based on the second source routing information or the destination
  • the identifier forwards the second packet, and the second network device preferentially forwards the second packet according to the second source routing information.
  • the sending module is specifically configured to send the first packet when a source route encapsulation condition is met; wherein the source route encapsulation condition includes: both the source end device and the destination end device support a source route encapsulation function,
  • the network devices on the first forwarding path all support the source route forwarding function.
  • the sending module is further configured to send a third packet when the source route encapsulation condition is not met, where the third packet carries the destination identifier, and the encapsulation type of the third packet is Ethernet encapsulation.
  • the source-end device further includes: a determining module, configured to determine the first forwarding path according to a path table of the source-end device before sending the first packet; wherein the path table includes information related to the destination At least one path entry related to the end device, each path entry in the at least one path entry indicates a forwarding path between the source end device and the destination end device.
  • a determining module configured to determine the first forwarding path according to a path table of the source-end device before sending the first packet; wherein the path table includes information related to the destination At least one path entry related to the end device, each path entry in the at least one path entry indicates a forwarding path between the source end device and the destination end device.
  • the source device further includes: a building module, configured to build the path table according to the network topology of the message transmission system before determining the first forwarding path according to the path table of the source device; or, a receiving module , for receiving the path table from the control device before determining the first forwarding path according to the path table of the source device.
  • a building module configured to build the path table according to the network topology of the message transmission system before determining the first forwarding path according to the path table of the source device
  • a receiving module for receiving the path table from the control device before determining the first forwarding path according to the path table of the source device.
  • a target network device in a fifth aspect, includes:
  • a forwarding module configured to forward the first packet according to the first source routing information or the destination identification when receiving the first packet carrying the first source routing information and the destination identification, and preferentially according to the first source routing The information forwards the first message; wherein, the first source routing information includes the port identifiers of each network device on the first forwarding path, and the destination identifier indicates the destination end device.
  • the forwarding module is specifically configured to: if the first packet satisfies the source routing forwarding condition, forward the first packet according to the first source routing information; if the first packet does not meet the source routing forwarding condition The condition is met but the forwarding condition of the forwarding table is satisfied, and the first packet is forwarded according to the destination identifier.
  • the encapsulation type of the first packet is source route encapsulation
  • the first packet also carries a source route validity identifier
  • the source route validity identifier indicates that the source route encapsulated in the first packet is valid or invalid.
  • the source route forwarding condition includes: the source route validity identifier indicates that the source route encapsulated in the first packet is valid, and the outgoing port indicated by the port identifier of the target network device in the first source route information is in a working status.
  • the forwarding condition of the forwarding table includes: the source route validity identifier indicates that the source route encapsulated in the first packet is invalid.
  • the forwarding table forwarding condition includes: the source route validity identifier indicates that the source route encapsulated in the first packet is valid, but the outgoing port indicated by the port identifier of the target network device in the first source route information is in non-working state.
  • the forwarding table forwarding condition includes: the source route validity identifier indicates that the source route encapsulated in the first packet is valid, but the outgoing port indicated by the port identifier of the target network device in the first source route information is in In a non-working state, the forwarding module is specifically configured to: if the first packet does not meet the source route forwarding condition but meets the forwarding table forwarding condition, set the source route validity flag to indicate that the source route encapsulated by the first packet is invalid ; Forward the first packet according to the destination identifier.
  • the forwarding table forwarding condition includes: the source route validity identifier indicates that the source route encapsulated in the first packet is valid, but the outgoing port indicated by the port identifier of the target network device in the first source route information is in In a non-working state, the target network device further includes: a sending module, configured to send a fault notification message to the source device if the first packet does not meet the source route forwarding condition but meets the forwarding table forwarding condition, the fault notification message indicating The first forwarding path is faulty.
  • the forwarding module is further configured to forward the second packet according to the second source routing information or the destination identifier when receiving the second packet carrying the second source routing information and the destination identifier, and The second packet is preferentially forwarded according to the second source routing information; wherein the second source routing information includes the port identifiers of each network device on the second forwarding path.
  • the target network device further includes: a building module for building a forwarding table according to the network topology of the message transmission system before the forwarding module forwards the first message according to the destination identifier; or a receiving module for forwarding the first message;
  • the module receives a forwarding table from the control device before forwarding the first message according to the destination identifier; wherein, the forwarding table includes at least one forwarding entry, and each forwarding entry in the at least one forwarding entry indicates a destination identifier and the forwarding entry.
  • the mapping relationship of a port of the target network device is not limited to building a forwarding table according to the network topology of the message transmission system before the forwarding module forwards the first message according to the destination identifier; or a receiving module for forwarding the first message;
  • the module receives a forwarding table from the control device before forwarding the first message according to the destination identifier; wherein, the forwarding table includes at least one forwarding entry, and each forwarding entry in the at least one forwarding entry indicates a
  • the forwarding module is further configured to forward the third packet according to the destination identifier when receiving the third packet carrying the destination identifier, where the encapsulation type of the third packet is Ethernet encapsulation.
  • the target network device is the first network device or the second network device.
  • a communication device including a memory and a processor
  • the memory is used to store computer programs
  • the processor is configured to execute the computer program stored in the memory to execute the message transmission method provided in the second aspect or any optional manner of the second aspect, or to execute the third aspect or the third aspect.
  • the packet transmission method provided by any optional method.
  • the communication device is a server or a target network device
  • the target network device is the above-mentioned first network device or second network device.
  • a computer-readable storage medium is provided, and a computer program is stored in the computer-readable storage medium.
  • the computer program is executed by a processor, any optional manner of the second aspect or the second aspect is implemented as described above.
  • the provided message transmission method or, implements the message transmission method provided by the third aspect or any optional manner of the third aspect.
  • a computer program product comprising instructions, when the computer program product is run on a computer, the computer is made to perform the message transmission provided by the above-mentioned second aspect or any optional manner of the second aspect method, or, executing the message transmission method provided by the third aspect or any optional manner of the third aspect.
  • a chip in a ninth aspect, includes a programmable logic circuit and/or program instructions, and when the chip is running, it is used to implement the message provided by the second aspect or any optional manner of the second aspect
  • a tenth aspect provides a message transmission system, including: a source device and a target network device;
  • the source device is the source device provided in the fourth aspect above, and the target network device is the target network device provided in the fifth aspect; or, at least one of the source device and the target network device is The device provided in the sixth aspect above.
  • the source device is a server
  • the target network device is the first network device or the second network device.
  • the message transmission system includes a source end device, a destination end device and a plurality of network devices, the message sent by the source end device carries source routing information and a destination identifier, the The source routing information includes the port identifiers of each network device on the forwarding path, and the destination identifier indicates the destination device.
  • the network device on the forwarding path forwards the packet according to the source routing information or the destination identifier. message, and the message is forwarded preferentially according to the source routing information. Therefore, if the forwarding path is not faulty, the network device on the forwarding path can forward the packet according to the source routing information, which helps to shorten the transmission delay of the packet from the source device to the destination device.
  • the network device on the forwarding path can forward the packet according to the destination identifier, which helps to avoid the failure of the forwarding path.
  • the message is lost.
  • the technical solution provided by the present application can reduce the packet loss rate and shorten the delay of packet transmission, which helps to improve the flexibility and reliability of packet transmission.
  • FIG. 1 is a schematic diagram of an implementation environment involved in an embodiment of the present application
  • FIG. 3 is a flowchart of another message transmission method provided by an embodiment of the present application.
  • FIG. 4 is a flowchart of still another message transmission method provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of a message transmission method provided by an embodiment of the present application.
  • FIG. 8 is a schematic diagram of another message transmission method provided by an embodiment of the present application.
  • FIG. 9 is a schematic diagram of still another message transmission method provided by an embodiment of the present application.
  • FIG. 10 is a schematic diagram of another message transmission method provided by an embodiment of the present application.
  • FIG. 11 is a schematic diagram of another message transmission method provided by an embodiment of the present application.
  • FIG. 12 is a schematic diagram of a logical structure of a source device provided by an embodiment of the present application.
  • FIG. 13 is a schematic diagram of a logical structure of a target network device provided by an embodiment of the present application.
  • FIG. 14 is a schematic diagram of a hardware structure of a communication device provided by an embodiment of the present application.
  • 15 is a schematic diagram of a hardware structure of a network device provided by an embodiment of the present application.
  • FIG. 16 is a schematic structural diagram of a message transmission system provided by an embodiment of the present application.
  • the network device can usually perform some processing on the packet, such as processing some control information in the packet header, but the network device usually does not change the key content of the packet. , these key contents such as but not limited to the payload of the message.
  • the message received by the network device and the message forwarded by the network device are described by the same name.
  • the description similar to "When the first network device receives the first packet, forwards the first packet according to the first source routing information or destination identifier carried in the first packet" the message received by the first network device and the message forwarded are both referred to as the first message.
  • the first message received by the first network device and the first message forwarded The key content of the message is the same, the control information in the message header may be different, and the description about the second message and the third message is the same.
  • the implementation environment involved in the technical solution provided by the present application is a communication system, and the communication system may be a message transmission system.
  • the message transmission system may include a communication network and an access device accessing the communication network.
  • the communication network includes a plurality of network devices. The network device forwards the messages of different access devices to realize the communication between the different access devices. communication.
  • the communication network may be a data center network (DCN), a metropolitan area network, a wide area network, or a campus network, etc.
  • DCN data center network
  • the embodiment of this application does not limit the type of the communication network.
  • the communication network may also be referred to as a computing network, for example, a high performance computing (HPC) network.
  • the communication network may be a Level 2 Clos network or a Level 3 Clos network, and the Level 2 Clos network may also be called a Level 2 fat tree network, which is not limited in this embodiment of the present application.
  • FIG. 1 shows a schematic diagram of an implementation environment involved in an embodiment of the present application.
  • the implementation environment provides a message transmission system, and the message transmission system includes a communication network 00 and access to the The access devices 011 to 013 of the communication network 00, the communication network includes a plurality of network devices 001 to 005, and the network devices 001 to 005 realize the communication between the access devices 011 to 013 by forwarding the packets of the access devices 011 to 013. communication.
  • each of the network devices 001 to 005 may be a device such as a switch, a router (router), a virtual switch, or a virtual router for forwarding packets in a communication network.
  • the network devices 001 to 005 may be the same network devices, for example, all of the network devices 001 to 005 may be switches; or, the network devices 001 to 005 may be different network devices, for example, some of the network devices 001 to 005 are switches , and the other part is the router.
  • each of the access devices 011 to 013 may be various types of devices such as a host, a terminal, a server, or a virtual machine.
  • the access devices 011 to 013 may be the same type of devices, for example, the access devices 011 to 013 may all be servers; or, the access devices 011 to 013 may be different types of devices, for example, the access device 011 is a server,
  • the access device 012 is a terminal, and the access device 013 is a virtual machine.
  • the terminal may include a smart phone, a tablet computer, a desktop computer, an internet of things (IoT) device, etc.
  • IoT internet of things
  • the IoT device may be a household appliance, a smart home, a vehicle, a tool device, a service device, a service facility or a Wearable devices, etc.
  • IoT devices such as but not limited to: smart refrigerators, smart washing machines, smart water meters, smart electricity meters, smart cars, in-vehicle devices or wearable devices, etc.
  • the communication network 00 further includes a control device 000 , the control device 000 is connected in communication with the network devices 001 to 005 respectively, and the control device 000 can also be connected in communication with the access devices 011 to 013 (not shown in Figure 1).
  • FIG. 1 shows the communication connection between the control device 000 and the network devices 001 to 005 in the form of dotted lines .
  • the control device 000 is used to manage network devices 001 to 005 and access devices 011 to 013.
  • the network devices 001 to 005 can forward packets under the control of the control device 000, and the access devices 011 to 013 can Messages are sent and received under the control of the control device 000 .
  • the control device 000 can perform network topology collection, resource allocation, path calculation, forwarding table calculation and push path information to the access devices 011-013 and forwarding tables to the network devices 001-005.
  • the access devices 011-013 according to The path information pushed by the control device 000 sends and receives packets, and the network devices 001 to 005 can forward the packets according to the forwarding table pushed by the control device 000 .
  • the control device 000 may be a controller, specifically a server, a terminal, or a forwarding device (a switch, a router, a virtual switch, or a virtual router, etc.). If the control device 000 is a forwarding device, the control device 000 may be a designated network device (eg, manually designated) in the communication network, or a device elected from a plurality of network devices in the communication network through election.
  • a forwarding device a switch, a router, a virtual switch, or a virtual router, etc.
  • the communication network 00 includes a convergence layer and an access layer, network devices 001-002 are located at the convergence layer, network devices 003-005 are located at the access layer, and the access device 011 is connected through the network device 003.
  • the access device 012 accesses the communication network 00 through the network device 004
  • the access device 013 accesses the communication network 00 through the network device 005 .
  • Network 1 may be a 2-level Clos network, which may also be called a leaf-spine topology network, and the network devices 001 to 002 at the convergence layer may be Spine devices, network devices 003 to 005 at the access layer can be leaf devices, each spine device is connected to all leaf devices, and each leaf device is connected to all spine devices (that is, spines). The device is fully interconnected with the leaf device).
  • 2-level Clos network which may also be called a leaf-spine topology network
  • the network devices 001 to 002 at the convergence layer may be Spine devices
  • network devices 003 to 005 at the access layer can be leaf devices
  • each spine device is connected to all leaf devices
  • each leaf device is connected to all spine devices (that is, spines). The device is fully interconnected with the leaf device).
  • the message transmission system shown in FIG. 1 is only used for example, and is not used to limit the technical solutions of the embodiments of the present application.
  • the message transmission system may also include other devices.
  • the number of network devices, the number of access devices, the connection relationship between network devices, and the connection relationship between network devices and access devices can be configured as required, and the communication network topology can be other topologies.
  • the spine device and the leaf device may not be fully interconnected.
  • the network devices in the aggregation layer may be interconnected.
  • the communication network may also include a core layer located above the aggregation layer. Repeat.
  • a network device in a communication network implements communication between different access devices by forwarding packets of different access devices.
  • the access device may include the source device (that is, the sender of the message, which is usually the constructor of the message) and the destination device (that is, the destination of the message, The destination device is usually the final receiver of the packet), and the network device can forward the packet of the source device to the destination device.
  • the source device that is, the sender of the message, which is usually the constructor of the message
  • the destination device is usually the final receiver of the packet
  • the packet sent by the source end device carries source route information, and the source route information includes the port identifiers of each network device on the forwarding path from the source end device to the destination end device. After the packet, the outgoing port of the packet is determined according to the port identifier of the network device carried in the packet, and the packet is forwarded through the outgoing port of the packet.
  • the message sent by the source device carries the destination identifier (such as the address of the destination device). After each network device receives the message, it searches for local forwarding according to the destination identifier carried in the message to determine the destination. The outgoing port of the packet. The packet is forwarded through the outgoing port of the packet.
  • the decision of the forwarding path depends on the source device. After the source device sends a packet, if the forwarding path fails, the network device on the forwarding path usually discards the packet or returns the packet to the source. The end device causes the source end device to re-route the packet. Discarding the packet will easily lead to poor packet transmission reliability. Returning the packet to the source end device to re-route the packet will result in a longer packet transmission delay. and may cause network congestion.
  • the network device In the forwarding table forwarding mode, since the network device needs to look up the local forwarding table to determine the outgoing port of the packet, it takes a long time for the network device to look up the local forwarding table to determine the outgoing port of the packet, resulting in a long packet transmission delay. .
  • the clock frequency of the chip of the network device As 1GHz (gigahertz) as an example, it takes 3 to 40ns (nanoseconds) for each network device to complete one table lookup and forwarding, and the three-hop packet forwarding takes as long as 100ns.
  • the transmission time of a packet from the source device to the destination device is extended by up to 100ns.
  • the packets from the source device to the destination device have as many as 5 to 7 hops. It will take longer to look up the table and forward, resulting in a longer packet transmission delay. longer.
  • the embodiments of the present application provide a message transmission method, device, and system.
  • the message transmission system includes a source device, a destination device, and multiple network devices.
  • the message sent by the source device can be Carry source routing information and destination identification, the source routing information includes the port identification of each network device on the forwarding path, the destination identification indicates the destination end device, after the network device on the forwarding path receives the packet, according to the source
  • the packet is forwarded according to the routing information or the destination identifier, and the packet is preferentially forwarded according to the source routing information. Therefore, if the forwarding path is not faulty, the network device on the forwarding path can forward the packet according to the source routing information, which helps to shorten the transmission delay of the packet from the source device to the destination device.
  • the network device on the forwarding path can forward the packet according to the destination identifier, which helps to avoid the failure of the forwarding path.
  • the message is lost.
  • the technical solution provided by the present application can avoid reducing the packet loss rate and shorten the packet transmission delay, which helps to improve the flexibility and reliability of the packet transmission.
  • the technical solutions provided by the embodiments of this application are especially suitable for services that require high transmission performance (such as transmission delay and packet loss rate), such as artificial intelligence, real-time big data analysis, deep learning, distributed computing, distributed storage, and Businesses such as computing and storage separation.
  • FIG. 2 shows a flowchart of a packet transmission method provided by an embodiment of the present application.
  • the message transmission method can be applied to a message transmission system, and the message transmission system may include a source end device, a destination end device and a plurality of network devices.
  • the message transmission system may be the message transmission system shown in FIG. 1 .
  • the method may include the following steps:
  • Step 201 The source device sends a first packet, where the first packet carries first source routing information and a destination identifier, the first source routing information includes the port identifiers of each network device on the first forwarding path, and the destination identifier Indicates the destination device.
  • the source end device first determines a first forwarding path between the source end device and the destination end device, and then generates the first packet according to the first forwarding path and the destination end device, so that the first packet Carry the first source routing information and the destination identifier.
  • the first source routing information includes port identifiers of each network device on the first forwarding path, and the destination identifier indicates the destination device.
  • the destination identifier may be the device identifier of the destination device.
  • IP Internet Protocol
  • LID location identity
  • the encapsulation type of the first packet is source routing encapsulation, so the first packet may be called a source routing packet.
  • the first packet may also carry a source route validity identifier, which indicates that the source route encapsulated in the first packet is valid or invalid, for example, indicating that the first source routing information in the first packet is valid or invalid. invalid.
  • the value of the source route validity identifier may be "1" or “0”, “1” is used to indicate that the source route encapsulated in the first packet is valid, and "0” is used to indicate that the first packet encapsulated
  • the source route of the first packet is invalid, or "0” is used to indicate that the source route encapsulated in the first packet is valid, and "1” is used to indicate that the source route encapsulated in the first packet is invalid, which is not limited in this embodiment of the present application .
  • the source route validity identifier in the first packet generated by the source device indicates that the source route encapsulated in the first packet is valid.
  • the first packet may also carry a source routing type, which indicates that the encapsulation type of the first packet is source routing encapsulation, so that the network device that receives the first packet can use the source routing type according to the source routing type. It is determined that the encapsulation type of the first packet is source route encapsulation, which is not limited in this embodiment of the present application. It is easy to understand that the first packet can also carry a packet payload. In this embodiment of the present application, the first source routing information, the destination identifier, the source routing validity identifier, and the source routing type can all be carried in the first source routing information. The header of a message.
  • the source device may send the first packet.
  • sending the first packet by the source device may be that the source device sends the first packet to the destination device through a first forwarding path, and the first packet may pass through a network on the first forwarding path. The device forwards to the destination device.
  • the first network on the first forwarding path first receives the first packet. device (that is, the ingress device of the first forwarding path).
  • the source device maintains a path table
  • the path table of the source device includes at least one path entry related to the destination device, and each path entry indicates the source device and the destination A forwarding path between devices.
  • the source device needs to send a packet to the destination device, it can determine the first forwarding path from the path table or determine the first forwarding path through path calculation.
  • This embodiment of the present application This is not limited. The embodiments of the present application are described by taking the source-end device determining the first forwarding path from the path table as an example, and the source-end device may obtain the path table before determining the first forwarding path from the path table.
  • the path table may be constructed by the source device, or constructed by the control device and sent to the source device.
  • acquiring the path table by the source device may include: the source device according to the message
  • the network topology of the transmission system (for example, the message transmission system shown in FIG. 1 ) constructs the path table, or the source device receives the path table from a control device (for example, the control device 000 in FIG. 1 ).
  • a control device for example, the control device 000 in FIG. 1 .
  • the embodiments of the present application are described by taking the source device constructing the path table according to the network topology of the message transmission system as an example.
  • the source-end device can calculate at least one forwarding path between the source-end device and the destination-end device through a path algorithm according to the network topology of the message transmission system, and construct a path table entry according to the path information of each forwarding path.
  • the path table is generated by at least one path table entry constructed by the at least one forwarding path.
  • the process of constructing the path table by the control device is similar to this, and details are not described herein again in this embodiment of the present application.
  • Ethernet encapsulation function does not support the source route encapsulation function, and some access devices support the Ethernet encapsulation function and the source route encapsulation function at the same time. It is a dual-mode forwarding device, a network device that only supports the forwarding table forwarding function but not the source route forwarding function is called a single-mode forwarding device, and an access device that supports both the Ethernet encapsulation function and the source route encapsulation function is called a dual-mode connection.
  • Access devices that only support the Ethernet encapsulation function but not the source route encapsulation function are called single-mode access devices.
  • the control device and/or the access device calculates the forwarding path according to the network topology of the message transmission system
  • the single-mode forwarding device and the single-mode access device in the message transmission system can be excluded.
  • the network topology formed by the dual-mode forwarding device and the dual-mode access device in the message transmission system calculates the forwarding path.
  • the control device and/or the access device can collect the network topology of the message transmission system, and in the process of collecting the network topology, the control device and/or the access device can check whether the network device is a dual-mode forwarding device and the access device. Whether the incoming device is a dual-mode access device is identified, so that when calculating the forwarding path, the single-mode forwarding device and the single-mode access device in the message transmission system are excluded.
  • Step 202 When receiving the first packet, the first network device on the first forwarding path forwards the first packet according to the first source routing information or destination identifier carried in the first packet, and preferentially according to the first source routing information or destination identifier carried in the first packet. A source routing information forwards the first packet.
  • the first network device may be any network device on the first forwarding path.
  • the first network device may be an ingress device, an egress device, or the ingress device and the egress of the first forwarding path. Any transit device between devices, which is not limited in this embodiment of the present application.
  • the first network device may determine whether the first packet satisfies the source route forwarding condition.
  • the first source routing information carried in the first packet forwards the first packet. If the first packet does not meet the source routing forwarding conditions but meets the forwarding table forwarding conditions, the first network device forwards the first packet according to the destination identifier carried in the first packet. first message.
  • the encapsulation type of the first packet is source route encapsulation, and the first packet also carries a source route validity identifier.
  • the source route forwarding condition may include: the source route validity identifier carried in the first packet indicates that the source route encapsulated in the first packet is valid, and the first source routing information in the first source routing information carried in the first packet is valid.
  • the outgoing port indicated by the port ID of the network device is in working state.
  • the forwarding table forwarding condition may include: the source route validity identifier carried in the first packet indicates that the source route encapsulated in the first packet is invalid; or, the source route validity identifier carried in the first packet indicates that the first packet is invalid.
  • the source route encapsulated in the packet is valid, but the outgoing port indicated by the port identifier of the first network device in the first source routing information carried in the first packet is in a non-working state.
  • the first network device forwards the first packet through the outgoing port indicated by the port identifier of the first network device in the first source routing information carried in the first packet. message. If the first packet does not meet the source route forwarding condition but meets the forwarding table forwarding condition, the first network device searches for the forwarding table of the first network device according to the destination identifier carried in the first packet, so as to obtain data from the first network
  • the outgoing port of the first packet is determined from the ports of the device, and the first packet is forwarded through the outgoing port of the first packet.
  • the forwarding table includes at least one forwarding table entry, and each forwarding table entry indicates a mapping relationship between a destination identifier and a port of the first network device, and the first network device associates the forwarding table with the first report.
  • the port corresponding to the destination identifier carried in the message is determined as the outgoing port of the first message.
  • the source route validity identifier carried in the first packet indicates that the source route encapsulated in the first packet is valid, but the port identifier of the first network device in the first source routing information carried in the first packet indicates The egress port is in a non-working state, and the first network device may determine that the first forwarding path is faulty. In this case, when forwarding the first packet, the first network device may set the source route validity identifier in the first packet to indicate that the source route encapsulated in the first packet is invalid, and then forward the set source route.
  • the source route validity identifier determines that the first packet it receives satisfies the forwarding condition of the forwarding table. For example, the value of the source route validity identifier carried in the first packet received by the first network device is "1", which indicates that the source route encapsulated in the first packet is valid, if the first network device determines that the source route is valid.
  • the outgoing port indicated by the port identifier of the first network device in the first source routing information carried in the first packet is in an inactive state, and the first network device carries the value of the source routing validity identifier carried in the first packet Modified from "1" to "0", the value "0" of the source route validity flag indicates that the source route encapsulated in the first packet is invalid, so that subsequent network devices receive the first packet according to the first packet.
  • the value "0" of the source route validity identifier carried in a packet determines that the first packet satisfies the forwarding condition of the forwarding table.
  • the first packet received by the first network device is usually the first packet. Forwarded by other network devices on a forwarding path, the first network device is not the ingress device of the first forwarding path.
  • the first network device may obtain the forwarding table of the first network device.
  • the forwarding table may be constructed by the first network device, or constructed by the control device and sent to the first network device. Therefore, acquiring the path table by the first network device may include: the The first network device constructs the forwarding table according to the network topology of the message transmission system (for example, the message transmission system shown in FIG. 1 ), or the first network device receives the forwarding table from the control device (for example, the control device 000 in FIG. 1 ).
  • the forwarding table is not limited in this embodiment of the present application.
  • the first network device first parses the first packet to extract the first source routing information, destination identifier, and source routing validity from the first packet Identification and source routing type and other content, and then perform judgment and forwarding actions. For example, the first network device judges whether the first packet satisfies the source route forwarding condition according to the extracted information, and if the first packet does not meet the source route forwarding condition, judges the forwarding table forwarding condition that the first packet satisfies .
  • the working state refers to the UP state
  • the non-working state refers to the DOWN state, but the working state and the non-working state described in the embodiment of the present application It is only an example.
  • the UP state can also be called an active state
  • the DOWN state can also be called an inactive state
  • the UP state can also be called a normal state
  • the DOWN state can also be called an abnormal state. or a fault state, which is not limited in this embodiment of the present application.
  • the packet sent by the source device may carry the source routing information and the destination identifier, and the source routing information includes the port identifier of each network device on the forwarding path.
  • the destination identifier indicates the destination end device.
  • the network device on the forwarding path forwards the packet according to the source routing information or the destination identifier, and preferentially forwards the packet according to the source routing information. Therefore, if the forwarding path is not faulty, the network device on the forwarding path can forward the packet according to the source routing information, which helps to shorten the transmission delay of the packet from the source device to the destination device.
  • the network device on the forwarding path can forward the packet according to the destination identifier, which helps to avoid the failure of the forwarding path.
  • the message is lost.
  • the technical solution provided by this application can reduce the packet loss rate and shorten the delay of message transmission, which is helpful to improve the flexibility and reliability of message transmission.
  • the technical solution provided by this application can be applied to services that require high transmission performance. , such as artificial intelligence, real-time big data analysis, deep learning, distributed computing, distributed storage, and separation of computing and storage.
  • the first network device processes the first packet in different ways.
  • the following describes the packet transmission method of the present application in three embodiments according to different forwarding conditions satisfied by the first packet.
  • the source route validity identifier carried in the first packet indicates that the source route encapsulated in the first packet is valid, but the source routing information in the first source routing information carried in the first packet is valid.
  • the forwarding condition of the outgoing port indicated by the port identifier of the first network device is in a non-working state is called the forwarding condition of the first forwarding table.
  • the forwarding condition of "invalid source route” is called the forwarding condition of the second forwarding table.
  • FIG. 3 shows a flowchart of another packet transmission method provided by an embodiment of the present application. This embodiment is described by taking the first packet satisfying the source route forwarding condition as an example. Referring to Figure 3, the method may include the following steps:
  • Step 301 The source device sends a first packet, where the first packet carries first source routing information and a destination identifier, the first source routing information includes the port identifiers of each network device on the first forwarding path, and the destination identifier Indicates the destination device.
  • step 301 For the implementation process of this step 301, reference may be made to the foregoing step 201, and details are not described herein again in this embodiment of the present application.
  • Step 302 When receiving the first packet, the first network device on the first forwarding path determines that the first packet satisfies the source route forwarding condition, and forwards the first packet according to the first source routing information carried in the first packet. a message.
  • the first network device may determine whether the source route encapsulated in the first packet is valid according to the source route validity identifier carried in the first packet, and if the source route encapsulated in the first packet is valid , the first network device determines the outgoing port of the first packet in the ports of the first network device according to the port identifier of the first network device in the first source routing information carried in the first packet, and detects Whether the outgoing port of the first packet is in the working state, if the outgoing port of the first packet is in the working state, the first network device determines that the first packet satisfies the source route forwarding condition, and the first network device passes the The outgoing port of the first packet forwards the first packet.
  • FIG. 4 shows a flowchart of still another packet transmission method provided by an embodiment of the present application. This embodiment is described by taking the first packet not meeting the source route forwarding condition but meeting the forwarding condition of the first forwarding table as an example. Referring to Figure 4, the method may include the following steps:
  • Step 401 The source device sends a first packet, where the first packet carries first source routing information and a destination identifier, the first source routing information includes the port identifiers of each network device on the first forwarding path, and the destination identifier Indicates the destination device.
  • step 401 For the implementation process of this step 401, reference may be made to the foregoing step 201, and details are not described herein again in this embodiment of the present application.
  • Step 402 When receiving the first packet, the first network device on the first forwarding path determines that the first packet does not meet the source route forwarding condition but meets the first forwarding table forwarding condition, and sets the first packet in the first packet.
  • the source route validity identifier of the first packet indicates that the source route encapsulated in the first packet is invalid, and the first packet is forwarded according to the destination identifier carried in the first packet.
  • the first network device may determine whether the source route encapsulated in the first packet is valid according to the source route validity identifier carried in the first packet; if the source route encapsulated in the first packet is valid , the first network device determines the outgoing port of the first packet in the ports of the first network device according to the port identifier of the first network device in the first source routing information carried in the first packet, and detects Whether the outgoing port of the first packet is in a working state; if the outgoing port of the first packet is in a non-working state, the first network device determines that the first packet does not satisfy the source route forwarding condition but satisfies the first forwarding table Forwarding conditions, the first network device sets the source route validity identifier in the first packet to indicate that the source route encapsulated in the first packet is invalid, and searches the first network device according to the destination identifier carried in the first packet.
  • a forwarding table to determine the outgoing port of the first packet from the ports of the first network device, and forward the first packet through the outgoing port of the first packet, that is, the first network device passes the outgoing port of the first packet.
  • the outgoing port of the first packet forwards the first packet after the source route validity identifier is set.
  • the source route validity identifier in the first packet sent by the first network device indicates the first packet.
  • the source route encapsulated in the packet is invalid.
  • Step 403 When receiving the first packet, the first network device on the first forwarding path determines that the first packet does not meet the source route forwarding condition but meets the first forwarding table forwarding condition, and sends a fault notification to the source device. message, the failure notification message indicates a failure of the first forwarding path.
  • the first network device After the first network device receives the first packet, if the first packet does not meet the source route forwarding condition but meets the first forwarding table forwarding condition, the first network device determines that the first forwarding path is faulty, and the first network device A fault notification message may be generated and sent to the source device, where the fault notification message indicates that the first forwarding path is faulty.
  • the fault notification message carries status indication information of the first forwarding path
  • the status indication information indicates that the first forwarding path is faulty
  • the fault notification message carries the source routing port status of the first network device
  • the source The routing port status indicates that the source routing port of the first network device (the source routing port refers to the port indicated by the port identifier of the first network device in the first source routing information) is faulty, thereby indicating that the source routing port is located.
  • the first forwarding path is faulty.
  • the first network device may send a failure notification message to the source device through the reverse path of the first forwarding path (that is, the failure notification message is returned to the source device along the original path, and the failure notification message passes through the The network device between the first network device and the source-end device on the first forwarding path forwards to the source-end device), or a failure notification message (that is, the first-end device) can also be sent to the source-end device through, for example, the control device.
  • a network device sends the failure notification message to the control device, and the control device forwards the failure notification message to the source device), which is not limited in this embodiment of the present application.
  • the first network device may first execute step 402 and then execute step 403, or may first execute step 403 and then execute step 402, or the first The network device may execute step 402 and step 403 synchronously, which is not limited in this embodiment of the present application.
  • Step 404 The source device sets the first forwarding path as an invalid forwarding path according to the fault notification message.
  • the source device After receiving the failure notification message indicating the failure of the first forwarding path, the source device determines the failure of the first forwarding path according to the failure notification message, and can set the first forwarding path as an invalid forwarding path.
  • the device sends a packet to the destination device, it can select a forwarding path for the packet except the first forwarding path in the path table of the source device, so as to avoid the source device selecting a fault for the packet forwarding path.
  • the source device parses the failure notification message to determine the content of the failure notification message, determines the failure of the first forwarding path according to the content of the failure notification message, and then determines the failure of the source device.
  • a path entry corresponding to the first forwarding path in the path table is set as an invalid entry, so as to set the first forwarding path as an invalid forwarding path.
  • the source device adds an invalid mark to the path entry corresponding to the first forwarding path, where the invalid mark is, for example, a mark such as "invalid", "00" or "WX", which is used to indicate the path entry invalid, thereby indicating that the first forwarding path is invalid.
  • Step 405 The source device sends a second packet, where the second packet carries second source routing information and a destination identifier, and the second source routing information includes the port identifiers of each network device on the second forwarding path.
  • the source-end device After receiving the failure notification message, the source-end device determines that the first forwarding path is faulty, and the source-end device can determine the second forwarding path between the source-end device and the destination-end device, and use the second forwarding path to forward to the destination-end device.
  • the second forwarding path and the first forwarding path are two different forwarding paths between the source end device and the destination end device.
  • the source device sends a second packet, where the second packet carries second source routing information and the destination identifier, and the second source routing information includes port identifiers of each network device on the second forwarding path , the destination identifier indicates the destination device.
  • step 404 and step 405. The source device may first execute step 404 and then execute step 405, or may first execute step 405 and then execute step 404, or the first network
  • the device may execute step 404 and step 405 synchronously, which is not limited in this embodiment of the present application.
  • Step 406 when the second network device on the second forwarding path receives the second packet, forwards the second packet according to the second source routing information or destination identifier carried in the second packet, and preferentially according to the second packet.
  • the second packet is forwarded with the second source routing information.
  • step 406 For the implementation process of this step 406, reference may be made to the foregoing step 202, and details are not described herein again in this embodiment of the present application.
  • FIG. 5 shows a flowchart of still another packet transmission method provided by an embodiment of the present application.
  • This embodiment is described by taking as an example that the first packet does not meet the forwarding condition of the source route but meets the forwarding condition of the second forwarding table.
  • the method may include the following steps:
  • Step 501 The source device sends a first packet, where the first packet carries first source routing information and a destination identifier, the first source routing information includes the port identifiers of each network device on the first forwarding path, and the destination identifier Indicates the destination device.
  • step 501 For the implementation process of this step 501, reference may be made to the foregoing step 201, and details are not described herein again in this embodiment of the present application.
  • Step 502 When receiving the first packet, the first network device on the first forwarding path determines that the first packet does not meet the source route forwarding condition but meets the forwarding condition of the second forwarding table, and according to the first packet carries The destination identifier of the first packet is forwarded.
  • the first network device may determine whether the source route encapsulated in the first packet is valid according to the source route validity identifier carried in the first packet, and if the source route encapsulated in the first packet is invalid , the first network device determines that the first packet does not meet the source route forwarding condition but meets the second forwarding table forwarding condition, and the first network device searches for the forwarding of the first network device according to the destination identifier carried in the first packet published, so as to determine the outgoing port of the first packet from the ports of the first network device, and forward the first packet through the outgoing port of the first packet.
  • the first packet received by the first network device described in the embodiment shown in FIG. 5 is forwarded by other network devices on the first forwarding path, and the first network device may is not the ingress device of the first forwarding path.
  • the first packet in the embodiment shown in FIG. 2 to FIG. 5 may be a source routing packet (the second packet in the embodiment shown in FIG. 4 may also be a source routing packet), and the source The end device may send the first packet under the condition that the source route encapsulation condition is satisfied.
  • the source route encapsulation condition may include: both the source end device and the destination end device support the source route encapsulation function, and all network devices on the first forwarding path support the source route forwarding function.
  • the source end device can send an Ethernet packet.
  • the implementation scheme of the embodiment shown in FIG. 6 is the implementation scheme of the embodiment shown in FIG. 6 .
  • FIG. 6 shows a flowchart of still another packet transmission method provided by an embodiment of the present application.
  • the method may include the following steps:
  • Step 601 After determining that the source route encapsulation condition is not met, the source device sends a third packet, the third packet carries a destination identifier, the destination identifier indicates the destination device, and the encapsulation type of the third packet is Ethernet encapsulation.
  • the source end device can generate a third packet according to the destination end device, so that the third packet carries a destination identifier used to indicate the destination end device, and then sends the third packet.
  • the destination identifier may be the device identifier of the destination device, the IP address of the destination device, the LID of the destination device, or other identifiers used to indicate the destination device, which is not done in this embodiment of the present application. limited.
  • the encapsulation type of the third packet is Ethernet encapsulation, and the third packet may be called an Ethernet packet.
  • the third packet may also carry an ether type, and the ether type indicates that the encapsulation type of the third packet is ether encapsulation, so that the network device that receives the third packet determines the third packet according to the ether type.
  • the encapsulation type of the three packets is Ethernet encapsulation. It is easy to understand that the third packet may also carry a packet payload. In this embodiment of the present application, both the destination identifier and the ether type may be carried in the header of the third packet.
  • Step 602 When receiving the third packet, the third network device forwards the third packet according to the destination identifier carried in the third packet.
  • the third network device may be any network device in the message transmission system that can receive the third message, and the third network device may be a network device that provides access services for the source device, or may be a network device for the purpose of The network device that provides the access service by the terminal device or other network device in the message transmission system, which is not limited in this embodiment of the present application.
  • the third network device After receiving the third packet, the third network device determines, according to the Ethernet type carried by the third packet, that the encapsulation type of the third packet is Ethernet encapsulation (that is, determining that the third packet is an Ethernet packet), Then, look up the forwarding table of the third network device according to the destination identifier carried in the third packet, so as to determine the outgoing port of the third packet from the ports of the third network device, and use the outgoing port of the third packet to determine the outgoing port of the third packet. The port forwards the third packet.
  • Each network device in the message transmission system that receives the third message forwards the third message according to the implementation of step 603 until the third message reaches the destination device.
  • the packet transmission method provided by the above-mentioned embodiment shown in FIG. 6 is the commonly described forwarding table forwarding method.
  • the source-end device has the ability to judge, and the source-end device can judge whether If the source route encapsulation condition is satisfied, the source end device can send the packet according to the method provided by the embodiments shown in Figure 3 to Figure 5 if the source route encapsulation condition is satisfied, and if the source route encapsulation condition is not satisfied, The source device may send the message according to the method provided in the embodiment shown in FIG. 6 .
  • the source device may be a dual-mode forwarding device, which supports both source route forwarding and forwarding table forwarding, so that the source device can determine whether the source route encapsulation condition is satisfied, and thus determine whether to send source route packets or Ethernet packets.
  • the technical solutions provided by the embodiments of the present application do not require that all network devices in the communication network support the same forwarding function.
  • some network devices may support dual-mode forwarding, and some network devices support single-mode forwarding.
  • the communication network may be dual-mode forwarding. For the hybrid networking of the mode forwarding device and the single-mode forwarding device, the technical solutions provided by the embodiments of the present application can be effectively compatible with the traditional forwarding table forwarding method.
  • the network device forwards the packet in different ways; according to the source route forwarding path (that is, the forwarding path indicated by the source routing information carried in the packet sent by the source device) is faulty, and the network device forwards the packet in different ways.
  • the packet transmission method provided by the present application is described below with reference to specific examples.
  • FIG. 7 shows a schematic diagram of a packet transmission method provided by an embodiment of the present application.
  • FIG. 7 is an example to illustrate that the source route encapsulation condition is satisfied and the source route forwarding path is not faulty (that is, the outgoing ports indicated by the port identifier in the source route information are all in working state).
  • the forwarding path S1 is the first forwarding path (that is, the source route forwarding path) from the source end device a to the destination end device b.
  • Both the source end device a and the destination end device b support the source route encapsulation function and
  • the network device A, the network device B, and the network device D all support the source route forwarding function, so the source end device a is determined to satisfy the source route encapsulation condition.
  • the source end device a sends a packet 1 (for example, the first packet) to the destination end device b through the forwarding path S1, and the packet 1 carries the first source routing information (that is, network device A-port 1, Network device B-port 1, network device D-port 1), destination identifier b, source route validity identifier 1, source route type, and packet load.
  • the destination identifier b indicates the destination device b
  • the source route validity identifier 1 indicates that the source route encapsulated in the message 1 is valid
  • the source route type indicates that the encapsulation type of the message 1 is source route encapsulation.
  • the packet 1 sent by the source device a first reaches the network device A.
  • the network device A determines that the encapsulation type of the packet 1 is source route encapsulation according to the source route type carried by the packet 1.
  • the source route validity identifier 1 determines that the source route encapsulated in the packet 1 is valid, and, according to the port identifier of the network device A in the first source routing information carried in the packet 1 (that is, the network device A-port 1 ) determine that the outgoing port of the packet 1 is port 1 and determine that the port 1 is in the working state (that is, the UP state), so the network device A determines that the packet 1 meets the source route forwarding condition, and the network device A passes the Port 1 forwards the packet 1.
  • the packet 1 forwarded by the network device A through the port 1 reaches the network device B.
  • the network device B uses the same processing method as the network device A to determine that the received packet 1 meets the source route forwarding conditions.
  • Port 1 forwards the packet 1.
  • the network device D forwards the packet 1 through the port 1 of the network device D in the same processing manner as the network device A.
  • the packet 1 is forwarded from the source end device a to the destination end device b through the network device on the forwarding path S1 in a source route forwarding manner. Since the packet 1 is forwarded from the source end device a to the destination end device b in a source route forwarding manner, the transmission delay of the packet 1 from the source end device a to the destination end device b is relatively short.
  • FIG. 8 shows a schematic diagram of another packet transmission method provided by an embodiment of the present application.
  • Fig. 8 illustrates an example in which the source route encapsulation condition is satisfied but the source route forwarding path is faulty (that is, the outgoing ports indicated by at least one port identifier in the source route information are all in a non-working state).
  • the forwarding path S1 is the first forwarding path (that is, the source route forwarding path) from the source end device a to the destination end device b.
  • Both the source end device a and the destination end device b support the source route encapsulation function and
  • the network device A, the network device B, and the network device D all support the source route forwarding function, so the source end device a is determined to satisfy the source route encapsulation condition.
  • the source end device a sends a packet 1 (for example, the first packet) to the destination end device b through the forwarding path S1, and the packet 1 carries the first source routing information (that is, network device A-port 1, Network device B-port 1, network device D-port 1), destination identifier b, source route validity identifier 1, source route type, and packet load.
  • the destination identifier b indicates the destination device b
  • the source route validity identifier 1 indicates that the source route encapsulated in the packet 1 is valid
  • the source route type indicates that the encapsulation type of the packet 1 is source route encapsulation.
  • the packet 1 sent by the source device a first reaches the network device A.
  • the network device A determines that the encapsulation type of the packet 1 is source route encapsulation according to the source route type carried by the packet 1.
  • the source route validity identifier 1 determines that the source route encapsulated in the packet 1 is valid, and, according to the port identifier of the network device A in the first source routing information carried in the packet 1 (that is, the network device A-port 1 ) determines that the outgoing port of the packet 1 is port 1, but the port 1 of the network device A is in a non-working state (that is, the DOWN state), so the network device A determines that the packet 1 does not meet the source route forwarding conditions but The forwarding conditions of the first forwarding table are satisfied.
  • the network device A modifies the source route validity identifier 1 in the message 1 to the source route validity identifier 0, and the source route validity identifier 0 indicates that the source route encapsulated in the message 1 is invalid (that is, the network Device A sets the source route validity flag in the packet 1 to indicate that the source route encapsulated in the packet 1 is invalid).
  • the network device A searches the forwarding table of the network device A according to the destination identifier b carried in the packet 1 to determine that the outgoing port of the packet 1 is port 2, and the network device A forwards the modified packet through the port 2 of the network device A. of this message 1.
  • the packet 1 forwarded by the network device A through its port 2 reaches the network device C.
  • the network device C determines that the encapsulation type of the packet 1 is source route encapsulation.
  • the source route validity identifier 0 carried by 1 determines that the source route encapsulated in the packet 1 is invalid, so the network device C determines that the packet 1 does not meet the source route forwarding condition but meets the second forwarding table forwarding condition.
  • the network device C searches the forwarding table of the network device C according to the destination identifier b carried in the packet 1 to determine that the outgoing port of the packet 1 is port 1, and forwards the packet 1 through the port 1 of the network device C.
  • the packet 1 forwarded by the network device C through its port 1 reaches the network device D.
  • the network device D uses the same processing method as the network device C to determine that the packet 1 does not meet the source route forwarding condition but meets the second forwarding table. Forwarding conditions , the network device D searches the forwarding table of the network device D according to the destination identifier b carried in the packet 1 to determine that the outgoing port of the packet 1 is port 1, and forwards the packet 1 through the port 1 of the network device D. Finally, the packet 1 is forwarded from the source end device a to the destination end device b through the network device A, the network device C, and the network device D in a forwarding table forwarding manner.
  • network device A determines that port 1 (that is, the source route port) of network device A is in an inactive state, it forwards the packet 1 according to the destination identifier b carried in the packet 1, rather than forwarding the packet 1.
  • the packet 1 is discarded, so the loss of the packet 1 due to the failure of the forwarding path S1 can be avoided, and the flexibility and reliability of the packet transmission can be ensured.
  • the network device A may send a fault notification message to the source device a to inform the source device a of the forwarding path S1 (also known as the forwarding path S1). That is, the source route forwarding path) failure.
  • the source device a sets the forwarding path S1 as an invalid forwarding path according to the failure notification message.
  • the source-end device a can select a forwarding path other than the forwarding path S1 to send packets to the destination-end device b, so as to prevent the source-end device a from selecting a faulty forwarding path to send packets to the destination-end device b, ensuring that Reliability of message transmission.
  • FIG. 9 shows a schematic diagram of still another packet transmission method provided by an embodiment of the present application.
  • 9 shows a situation in which the source end device a sends a message to the destination end device b through the forwarding path S2 after receiving the failure notification message indicating the failure of the forwarding path S1.
  • the forwarding path S2 is the second forwarding path (that is, the source route forwarding path) from the source end device a to the destination end device b.
  • Both the source end device a and the destination end device b support the source route encapsulation function and
  • the network device A, the network device C, and the network device D all support the source route forwarding function, so the source end device a is determined to satisfy the source route encapsulation condition.
  • the source end device a sends a packet 2 to the destination end device b through the forwarding path S2, and the packet 2 carries the second source routing information (that is, network device A-port 2, network device C-port 1, Network device D-port 1), destination identifier b, source route validity identifier 1, source route type, and packet load, wherein the destination identifier b indicates the destination end device b, and the source route validity identifier 1 indicates the packet
  • the source route encapsulated in the message 2 is valid, and the source route type indicates that the encapsulation type of the message 2 is source route encapsulation.
  • the packet 2 is forwarded from the source end device a to the destination end device b through the network device A, the network device C, and the network device D in a source route forwarding manner.
  • the implementation process of forwarding the packet 2 by the network device A, the network device C, and the network device D in the source route forwarding manner may refer to the embodiment shown in FIG. 7 , and details are not described herein again in this embodiment.
  • FIG. 10 is a schematic diagram of still another packet transmission method provided by an embodiment of the present application.
  • FIG. 10 is illustrated by taking the source route encapsulation condition not being satisfied as an example.
  • the source device a can be a dual-mode access device.
  • the source device a supports both the source route encapsulation function and the Ethernet encapsulation function, and the destination device b does not support the source route encapsulation function.
  • the source device a determines that the source route encapsulation condition is not met, the source end device a sends a packet 3 (for example, a third packet) to the destination end device b, and the packet 3 carries the destination identifier b, the ether type and the packet payload.
  • the identifier b indicates the destination device b, and the ether type indicates that the encapsulation type of the packet 3 is ether encapsulation.
  • the packet 3 sent by the source device a first arrives at the network device A.
  • the network device A determines that the encapsulation type of the packet 3 is Ethernet encapsulation according to the Ethernet type carried by the packet 3, and according to the destination identifier carried by the packet 3 b. Find the forwarding table of the network device A to determine that the outgoing port of the packet 3 is port 3, and the network device A forwards the packet 3 through the port 3 of the network device A.
  • the packet 3 forwarded by the network device A through its port 3 reaches the network device E.
  • the network device E uses the same processing method as the network device A to determine that the outgoing port of the packet 3 is port 1, and the network device E passes the Port 1 of network device E forwards the packet 3.
  • the packet 3 forwarded by the network device E through its port 1 reaches the network device D.
  • the network device D uses the same processing method as the network device A to determine that the outgoing port of the packet 3 is port 1.
  • the network device D passes through the network Port 1 of device D forwards the packet 3.
  • the packet 3 is forwarded from the source end device a to the destination end device b through the network device A, the network device E, and the network device D in a forwarding table forwarding manner. Since the source end device a sends the Ethernet packet when it is determined that the source route encapsulation condition is not met, the packet transmission method provided by the present application can be well compatible with the traditional packet transmission method.
  • the network devices on the source route forwarding path (for example, the forwarding path S1 and the forwarding path S2) all support the forwarding table forwarding function and the source route forwarding function (that is, the network devices on the source route forwarding path are dual-mode). forwarding equipment) as an example.
  • the provided message transmission method can also be implemented by the following embodiment shown in FIG. 11 .
  • FIG. 11 is a schematic diagram of still another packet transmission method provided by an embodiment of the present application.
  • FIG. 11 takes as an example that there is a network device on the source route forwarding path that does not support the source route forwarding function.
  • the forwarding path S3 is a source route forwarding path from the source end device a to the destination end device b. Both the source end device a and the destination end device b support the source route encapsulation function.
  • Network device A, network device G and The network device D supports the source route forwarding function, and the network device F does not support the source route forwarding function.
  • the source end device a sends the message 4 to the destination end device b through the forwarding path S3.
  • network device A-port 3 network device F-port 1, network device G-port 1, network device D-port 1), destination identifier b, source route validity identifier 1, source route type, and message Load, where the destination identifier b indicates the destination device b, the source route validity identifier 1 indicates that the source route encapsulated in the packet 4 is valid, and the source route type indicates that the encapsulation type of the packet 4 is source route encapsulation .
  • the packet 4 sent by the source device a first reaches the network device A.
  • the network device A determines that the encapsulation type of the packet 4 is source route encapsulation according to the source route type carried by the packet 4.
  • the source route validity identifier 1 determines that the source route encapsulated in the packet 4 is valid, and is determined according to the port identifier of the network device A (that is, the network device A-port 3) in the source routing information carried in the packet 4
  • the outgoing port of the packet 4 is port 3 and the port 3 is in working state, but the network device A determines that its next-hop device (that is, the network device F) does not support the source route forwarding function, so the network device A determines according to
  • the destination identifier b carried in the packet 4 searches the forwarding table of the network device A to determine that the outgoing port of the packet 4 is port 3, and the network device A forwards the packet 4 through the port 3 of the network device A.
  • the packet 4 forwarded by the network device A through its port 3 reaches the network device F. Since the network device F does not support the source route forwarding function, the network device F searches for the network device F according to the destination identifier b carried in the packet 4. The forwarding table determines that the outgoing port of the packet 4 is port 1, and the network device F forwards the packet 4 through the port 1 of the network device F. The network device F reaches the network device G through the packet 4 forwarded by its port 1. The network device G determines that the encapsulation type of the packet 4 is source route encapsulation according to the source routing type carried in the packet 4.
  • the source route validity identifier 1 carried in the packet 4 determines that the source route encapsulated in the packet 4 is valid, and, according to the port identifier of the network device G in the source routing information carried in the packet 4 (that is, the network device G-port 1 ) determine that the outgoing port of the packet 4 is port 1 and the port 1 is in a working state, and the network device G determines that its next-hop device (that is, network device D) supports the source route forwarding function, so the network device G
  • the packet 4 is forwarded according to the port 1 indicated in the packet 4.
  • the packet 4 is forwarded from the source end device a to the destination end device b via the network device A, the network device F, the network device G, and the network device D.
  • FIG. 12 shows a schematic diagram of a logical structure of a source device 1200 provided by an embodiment of the present application, where the source device 1200 may be a server.
  • the source device 1200 may include, but is not limited to:
  • the sending module 1210 is configured to send a first packet, where the first packet carries first source routing information and a destination identifier, the first source routing information includes port identifiers of each network device on the first forwarding path, and the destination identifier Instruct the destination device, so that the first network device on the first forwarding path forwards the first packet according to the first source routing information or the destination identifier, and the first network device preferentially forwards the first packet according to the first source routing information the first message.
  • the sending module 1210 for the functional realization of the sending module 1210, reference may be made to the relevant descriptions of the above steps 201, 301, 401 and 501.
  • the encapsulation type of the first packet is source route encapsulation
  • the first packet also carries a source route validity identifier
  • the source route validity identifier indicates that the source route encapsulated in the first packet is valid or invalid.
  • the source device 1200 further includes:
  • the setting module 1220 is configured to set the first forwarding path as an invalid forwarding path if a failure notification message indicating a failure of the first forwarding path is received after the sending module 1210 sends the first packet.
  • the function implementation of the setting module 1220 may refer to the relevant description of the above-mentioned step 404 .
  • the sending module 1210 is further configured to, after sending the first packet, if a failure notification message indicating a failure of the first forwarding path is received, send a second packet, where the second packet carries the second source route information and the destination identifier, the second source routing information includes the port identifiers of each network device on the second forwarding path, so that the second network device on the second forwarding path is based on the second source routing information or the destination identifier. Forwarding the second packet, the second network device preferentially forwards the second packet according to the second source routing information.
  • the function implementation of the sending module 1210 may also refer to the relevant description of the above-mentioned step 405 .
  • the sending module 1210 is specifically configured to send the first packet when a source route encapsulation condition is met; wherein the source route encapsulation condition includes: both the source end device and the destination end device support a source route encapsulation function , and the network devices on the first forwarding path all support the source route forwarding function.
  • the sending module 1210 is further configured to send a third packet when the source route encapsulation condition is not satisfied, where the third packet carries the destination identifier, and the encapsulation type of the third packet is Ethernet encapsulation.
  • the function implementation of the sending module 1210 may also refer to the relevant description of the above step 601 .
  • the source device 1200 further includes:
  • the determining module 1230 is configured to determine the first forwarding path according to the path table of the source device before the sending module 1210 sends the first message, wherein the path table includes at least one path table related to the destination device entry, each path entry in the at least one path entry indicates a forwarding path between the source end device and the destination end device.
  • the source device 1200 further includes:
  • the building module 1240 is used to build the path table according to the network topology of the message transmission system before the determining module 1230 determines the first forwarding path according to the path table of the source device; or, the receiving module 1250 is used to determine the module 1230 Receive the path table from the control device before determining the first forwarding path according to the path table of the source device.
  • a packet sent by a source device may carry source routing information and a destination identifier, where the source routing information includes the port identifiers of each network device on the forwarding path, and the destination identifier Instruct the destination device, after receiving the packet, the network device on the forwarding path forwards the packet according to the source routing information or the destination identifier, and preferentially forwards the packet according to the source routing information. Therefore, if the forwarding path is not faulty, the network device on the forwarding path can forward the packet according to the source routing information, which helps to shorten the transmission delay of the packet from the source device to the destination device.
  • the network device on the forwarding path can forward the packet according to the destination identifier, which helps to avoid the failure of the forwarding path.
  • the message is lost.
  • the technical solution provided by the present application can reduce the packet loss rate and shorten the delay of packet transmission, which helps to improve the flexibility and reliability of packet transmission.
  • FIG. 13 shows a schematic diagram of a logical structure of a target network device 1300 provided by an embodiment of the present application.
  • the target network device 1300 may be a switch or a router, and the target network device 1300 may be described in the above embodiments. the first network device, the second network device or the third network device.
  • the target network device 1300 may include but is not limited to:
  • the forwarding module 1310 is configured to forward the first packet according to the first source routing information or the destination identification when receiving the first packet carrying the first source routing information and the destination identification, and preferentially according to the first source forwarding the first packet by routing information;
  • the first source routing information includes port identifiers of each network device on the first forwarding path, and the destination identifier indicates the destination end device.
  • the forwarding module 1310 For the functional realization of the forwarding module 1310, reference may be made to the relevant descriptions of the above steps 202, 302, 402, and 502.
  • the forwarding module 1310 is specifically configured to: if the first packet satisfies the source route forwarding condition, forward the first packet according to the first source routing information; if the first packet does not meet the source route If the forwarding condition is satisfied but the forwarding condition of the forwarding table is satisfied, the first packet is forwarded according to the destination identifier.
  • the encapsulation type of the first packet is source route encapsulation
  • the first packet also carries a source route validity identifier
  • the source route validity identifier indicates that the source route encapsulated in the first packet is valid or invalid.
  • the source route forwarding condition includes: the source route validity identifier indicates that the source route encapsulated in the first packet is valid, and the outgoing port indicated by the port identifier of the target network device in the first source route information is working. state.
  • the forwarding table forwarding condition includes: the source route validity identifier indicates that the source route encapsulated in the first packet is invalid.
  • the forwarding table forwarding condition includes: the source route validity identifier indicates that the source route encapsulated in the first packet is valid, but the outgoing port indicated by the port identifier of the target network device in the first source route information is in a non-existent state. working status.
  • the forwarding module 1310 is specifically configured to: if the first packet does not meet the source route forwarding condition but meets the forwarding table forwarding condition, set the source route validity identifier to indicate the source of the encapsulation of the first packet. The route is invalid; the first packet is forwarded according to the destination identifier.
  • the target network device 1300 further includes:
  • the sending module 1320 is configured to send a fault notification message to the source device if the first packet does not meet the source route forwarding condition but meets the forwarding table forwarding condition, where the fault notification message indicates that the first forwarding path is faulty.
  • the function implementation of the sending module 1320 may refer to the relevant description of the above-mentioned step 403 .
  • the forwarding module 1310 is further configured to forward the second packet according to the second source routing information or the destination identifier when receiving the second packet carrying the second source routing information and the destination identifier, And the second packet is forwarded preferentially according to the second source routing information; wherein, the second source routing information includes the port identifiers of each network device on the second forwarding path.
  • the function implementation of the forwarding module 1310 may also refer to the relevant description of the foregoing step 406 .
  • the target network device 1300 further includes:
  • the building module 1330 is used for constructing a forwarding table according to the network topology of the message transmission system before the forwarding module 1310 forwards the first message according to the destination identifier; or, the receiving module 1340 is used for forwarding the first message according to the destination identifier in the forwarding module 1310
  • the forwarding table is received from the control device before the document; wherein, the forwarding table includes at least one forwarding table entry, and each forwarding table entry in the at least one forwarding table entry indicates a mapping relationship between a destination identifier and a port of the target network device .
  • the forwarding module 1310 is further configured to forward the third packet according to the destination identifier when receiving the third packet carrying the destination identifier, where the encapsulation type of the third packet is Ethernet encapsulation.
  • the function implementation of the forwarding module 1310 may also refer to the relevant description of the above step 602 .
  • a packet sent by a source device may carry source routing information and a destination identifier, where the source routing information includes the port identifiers of each network device on the forwarding path, and the destination identifier Instruct the destination device, after receiving the packet, the network device on the forwarding path forwards the packet according to the source routing information or the destination identifier, and preferentially forwards the packet according to the source routing information. Therefore, if the forwarding path is not faulty, the network device on the forwarding path can forward the packet according to the source routing information, which helps to shorten the transmission delay of the packet from the source device to the destination device.
  • the network device on the forwarding path can forward the packet according to the destination identifier, which helps to avoid the failure of the forwarding path.
  • the message is lost.
  • the technical solution provided by the present application can reduce the packet loss rate and shorten the delay of packet transmission, which helps to improve the flexibility and reliability of packet transmission.
  • the source device and the target network device provided in the embodiments of the present application may also be implemented by an application-specific integrated circuit (ASIC), or a programmable logic device (PLD), and the above-mentioned
  • the PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
  • the packet transmission method provided by the above method embodiments may also be implemented by software.
  • each module in the source device and the target network device may also be software modules.
  • FIG. 14 shows a schematic diagram of a hardware structure of a communication device 1400 provided by an embodiment of the present application.
  • the communication device 1400 may be a server or a network device, for example, the communication device 1400 may be the source end device or the target network device described in the foregoing embodiments.
  • the communication device 1400 includes a processor 1402, a memory 1404, a communication interface 1406 and a bus 1408, and the processor 1402, the memory 1404 and the communication interface 1406 are communicatively connected to each other through the bus 1408.
  • the connection between the processor 1402, the memory 1404 and the communication interface 1406 shown in FIG. 14 is only exemplary, and during the implementation, the processor 1402, the memory 1404 and the communication interface 1406 may also be They are communicatively connected to each other using other connections than the bus 1408 .
  • the memory 1404 may be used to store a computer program 14042, which may include instructions and data.
  • the memory 1404 may be various types of storage media, for example, random access memory (RAM), read-only memory (ROM), non-volatile RAM ( non-volatile RAM, NVRAM), programmable ROM (programmable ROM, PROM), erasable PROM (erasable PROM, EPROM), electrically erasable PROM (electrically erasable PROM, EEPROM), flash memory, optical memory and registers, etc.
  • RAM random access memory
  • ROM read-only memory
  • non-volatile RAM non-volatile RAM
  • NVRAM non-volatile RAM
  • PROM programmable ROM
  • PROM erasable PROM
  • EPROM electrically erasable PROM
  • flash memory optical memory and registers, etc.
  • the memory 1404 may include hard disk and/or memory.
  • the processor 1402 may be a general-purpose processor, and the general-purpose processor may be a processor that performs specific steps and/or operations by reading and executing a computer program (eg, computer program 14042 ) stored in a memory (eg, memory 1404 ),
  • a general-purpose processor may use data stored in memory (eg, memory 1404) in performing the steps and/or operations described above.
  • the stored computer program can be executed, for example, to realize the relevant functions of the aforementioned setting module 1220 , determining module 1240 , building module 1240 , and building module 1330 .
  • a general-purpose processor may be, for example, but not limited to, a CPU.
  • processor 1402 may also be a special purpose processor, which may be a processor specially designed to perform particular steps and/or operations, such as, but not limited to, a digital signal processor ( digital signal processor, DSP), ASIC and FPGA, etc.
  • processor 1402 may also be a combination of multiple processors, such as a multi-core processor.
  • the processor 1402 may include at least one circuit to execute all or part of the steps of the packet transmission method provided by the above embodiments.
  • the communication interface 1406 may include an input/output (I/O) interface, a physical interface, and a logical interface, etc., which are used to realize the interconnection of devices within the communication device 1400, and the interfaces used to realize the communication between the communication device 1400 and other devices.
  • the physical interface can be a gigabit Ethernet interface (gigabit Ethernet, GE), which can be used to interconnect the communication device 1400 with other devices (such as network devices or servers), and the logical interface is an interface inside the communication device 1400, which can be used to interconnect the communication device 1400 with other devices (such as network devices or servers). It is used to realize the device interconnection inside the communication device 1400 .
  • the communication interface 1406 can be used for the communication device 1400 to communicate with other network devices and/or servers.
  • the communication interface 1406 is used for sending and receiving messages between the communication device 1400 and other network devices.
  • the communication interface 1406 can The related functions of the aforementioned sending module 1210 , receiving module 1250 , forwarding module 1310 , sending module 1320 and receiving module 1340 are implemented.
  • the bus 1408 may be any type of communication bus for implementing the interconnection of the processor 1402, the memory 1404 and the communication interface 1406, such as a system bus.
  • the above-mentioned devices may be respectively arranged on chips that are independent of each other, or at least part or all of them may be arranged on the same chip. Whether each device is independently arranged on different chips or integrated on one or more chips often depends on the needs of product design.
  • the embodiments of the present application do not limit the specific implementation form of the above device.
  • the communication device 1400 shown in FIG. 14 is only exemplary, and in the implementation process, the communication device 1400 may also include other components, which will not be listed one by one herein.
  • the communication device 1400 shown in FIG. 14 may transmit a message by executing all or part of the steps of the message transmission method provided in the foregoing embodiment.
  • FIG. 15 shows a schematic diagram of a hardware structure of a network device 1500 provided by an embodiment of the present application.
  • the network device 1500 may be the target network device described in the above embodiments.
  • the network device 1500 may be a switch, a router, or other network devices that forward packets.
  • the network device 1500 includes: a main control board 1510 , an interface board 1530 and an interface board 1540 .
  • a switching network board (not shown in the figure) may be included, and the switching network board is used to complete data exchange between each interface board (the interface board is also called a line card or a service board).
  • the main control board 1510 is used to complete functions such as system management, equipment maintenance, and protocol processing.
  • the interface board 1530 and the interface board 1540 are used to provide various service interfaces (eg, POS interface, GE interface, ATM interface, etc.), and realize packet forwarding.
  • the main control board 1510, the interface board 1530, and the interface board 1540 are connected to the system backplane through the system bus to realize intercommunication.
  • One or more processors 1531 are included on the interface board 1530 .
  • the processor 1531 is used to control and manage the interface board, communicate with the central processing unit 1512 on the main control board 1510, and perform packet forwarding processing.
  • the memory 1532 on the interface board 1530 is used to store the forwarding table, and the processor 1531 forwards the message by searching the forwarding table stored in the memory 1532 .
  • the interface board 1530 includes one or more network interfaces 1533 for receiving the packets sent by the previous hop node, and sending the processed packets to the next hop node according to the instructions of the processor 1531 .
  • the specific implementation process will not be repeated here.
  • the specific functions of the processor 1531 are also not repeated here.
  • this embodiment includes multiple interface boards and adopts a distributed forwarding mechanism. Under this mechanism, the operations on the interface board 1540 are basically similar to the operations on the interface board 1530 . For the sake of brevity ,No longer.
  • the processor 1531 and/or the processor 1541 in the interface board 1530 in FIG. 15 may be dedicated hardware or chips, such as a network processor or an application-specific integrated circuit, to implement the above functions. Special hardware or chip processing is adopted for the so-called forwarding plane.
  • the processor 1531 and/or the processor 1541 may also use a general-purpose processor, such as a general-purpose CPU, to implement the functions described above.
  • main control boards there may be one or more main control boards, and when there are multiple main control boards, they may include an active main control board and a backup main control board.
  • the multiple interface boards can communicate with each other through one or more switching network boards. When there are multiple interface boards, they can jointly implement load sharing and redundant backup.
  • the device does not need a switching network board, and the interface board is responsible for the processing function of the service data of the entire system.
  • the device includes multiple interface boards, which can realize data exchange among the multiple interface boards through the switching network board, and provide large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of network devices in a distributed architecture are greater than those in a centralized architecture.
  • the specific architecture used depends on the specific networking deployment scenario, and there is no restriction here.
  • the memory 1532 can be a ROM or other types of static storage devices that can store static information and instructions, a RAM or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable only memory device.
  • Read memory electrically erasable programmable read-only memory, EEPROM
  • compact disc read-only Memory CD-ROM
  • optical disc storage including compact disc, laser disc, optical disc, digital versatile disc, Blu-ray Disc, etc.
  • magnetic disk or other magnetic storage device or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and that can be accessed by a computer, without limitation.
  • the memory 1532 may exist independently and be connected to the processor 1531 through a communication bus.
  • the memory 1532 may also be integrated with the processor 1531.
  • the memory 1532 is used for storing program codes, and is controlled and executed by the processor 1531, so as to execute the message transmission method provided by the above embodiments.
  • the processor 1531 is used to execute program codes stored in the memory 1532 .
  • One or more software modules may be included in the program code.
  • the one or more software modules may be the functional modules provided in the above-mentioned embodiment of FIG. 13 .
  • the network interface 1533 can be a device using any transceiver for communicating with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area network ( wireless local area networks, WLAN), etc.
  • RAN radio access network
  • WLAN wireless local area network
  • FIG. 16 shows a schematic structural diagram of a message transmission system 1600 provided by an embodiment of the present application.
  • the message transmission system 1600 includes a source end device 1610, a destination end device 1620 and a plurality of network devices 1630-1650.
  • the source device 1610 is configured to send a first packet, where the first packet carries first source routing information and a destination identifier, where the first source routing information includes port identifiers of each network device on the first forwarding path, and the destination The identifier indicates the destination device 1620; the first network device (eg, network device 1630) on the first forwarding path is configured to forward the first packet according to the first source routing information or the destination identifier when receiving the first packet. the first packet, and the first packet is preferentially forwarded according to the first source routing information.
  • the first network device (eg, network device 1630) is configured to forward the first packet according to the first source routing information if the first packet satisfies the source route forwarding condition, and if the first packet does not If the source route forwarding condition is satisfied but the forwarding table forwarding condition is satisfied, the first packet is forwarded according to the destination identifier.
  • the encapsulation type of the first packet is source route encapsulation
  • the first packet also carries a source route validity identifier
  • the source route validity identifier indicates that the source route encapsulated in the first packet is valid or invalid.
  • the source route forwarding condition includes: the source route validity identifier indicates that the source route encapsulated in the first packet is valid, and the port identifier of the first network device (for example, network device 1630) in the first source route information indicates that the source route is valid.
  • the outgoing port is in the working state, for example, the UP state.
  • the forwarding table forwarding condition includes: the source route validity identifier indicates that the source route encapsulated in the first packet is invalid; or the source route validity identifier indicates that the source route encapsulated in the first packet is valid, but the first source route is valid.
  • the outgoing port indicated by the port identifier of the first network device (eg, network device 1630 ) in the routing information is in a non-working state, eg, a DOWN state.
  • the forwarding table forwarding condition includes: the source route validity identifier indicates that the source route encapsulated in the first packet is valid, but the first network device (for example, the network device 1630) in the first source route information is valid.
  • the outgoing port indicated by the port identifier is in a non-working state, and the first network device (for example, network device 1630) is specifically used to: if the first packet does not meet the source route forwarding condition but meets the forwarding table forwarding condition, set the source route
  • the validity identifier indicates that the source route encapsulated in the first packet is invalid, and the first packet is forwarded according to the destination identifier.
  • the forwarding table forwarding condition includes: the source route validity identifier indicates that the source route encapsulated in the first packet is valid, but the first network device (for example, the network device 1630) in the first source route information is valid.
  • the outgoing port indicated by the port identifier is in a non-working state, and the first network device (such as the network device 1630) is also used to send the source-end device 1610 to the source-end device 1610 if the first packet does not meet the source route forwarding condition but meets the forwarding table forwarding condition.
  • a fault notification message is sent, where the fault notification message indicates that the first forwarding path is faulty.
  • the source device 1610 is further configured to set the first forwarding path as an invalid forwarding path after receiving the failure notification message.
  • the source device 1610 is further configured to send a second packet after receiving the fault notification message, where the second packet carries second source routing information and the destination identifier, and the second source routing information includes Port identifiers of each network device on the second forwarding path; the second network device (eg, network device 1640 ) on the second forwarding path is configured to, when receiving the second packet, use the second source routing information or The destination identifier forwards the second packet, and preferentially forwards the second packet according to the second source routing information.
  • the second network device eg, network device 1640
  • the source end device 1610 is specifically configured to send the first packet when a source route encapsulation condition is met; wherein the source route encapsulation condition includes: both the source end device 1610 and the destination end device 1620 support source route encapsulation function, and the network devices on the first forwarding path all support the source route forwarding function.
  • the source end device 1610 is further configured to send a third packet when the source route encapsulation condition is not met, where the third packet carries the destination identifier, and the encapsulation type of the third packet is Ethernet encapsulation.
  • the source end device 1610 is further configured to determine the first forwarding path according to the path table of the source end device 1610 before sending the first packet; wherein, the path table includes at least a One path entry, each path entry in the at least one path entry indicates a forwarding path between the source end device 1610 and the destination end device 1620 .
  • the source device 1610 is further configured to construct the path table according to the network topology of the message transmission system 1600 before determining the first forwarding path according to the path table of the source device 1610, or, from the control device The routing table is received.
  • the first network device (for example, the network device 1630) is further configured to construct a forwarding table according to the network topology of the message transmission system 1600 before forwarding the first packet according to the destination identifier, or, from the control device Receive a forwarding table; wherein the forwarding table includes at least one forwarding table entry, and each forwarding table entry in the at least one forwarding table entry indicates a mapping relationship between a destination identifier and a port of the first network device.
  • the first network device (eg, network device 1630 ) is configured to, when receiving the first packet, if the first packet satisfies the source route forwarding condition but the first network device (eg, network device 1630 ) The one-hop device does not support the source route forwarding function, and forwards the first packet according to the destination identifier carried in the first packet, where the first-hop device is the next-hop device of the first network device (eg, network device 1630);
  • the first hop device is configured to forward the first packet according to the destination identifier carried in the first packet when receiving the first packet;
  • the second hop device of the first network device (eg, network device 1630 ) is configured to, when receiving the first packet, if the first packet satisfies the source route forwarding condition and the first network device (eg, network device 1630 ) ) of the third hop device supports the source route forwarding function, forwards the first packet according to the first source routing information carried in the first packet, the second hop device is the next hop device of the first hop device, and the The third hop device is the next hop device of the second hop device.
  • a packet sent by a source device may carry source routing information and a destination identifier, where the source routing information includes the port identifiers of each network device on the forwarding path, and the destination identifier Instruct the destination device, after receiving the packet, the network device on the forwarding path forwards the packet according to the source routing information or the destination identifier, and preferentially forwards the packet according to the source routing information. Therefore, if the forwarding path is not faulty, the network device on the forwarding path can forward the packet according to the source routing information, which helps to shorten the transmission delay of the packet from the source device to the destination device.
  • the network device on the forwarding path can forward the packet according to the destination identifier, which helps to avoid the failure of the forwarding path.
  • the message is lost.
  • the technical solution provided by the present application can avoid packet loss and shorten the packet transmission delay, which helps to improve the flexibility and reliability of packet transmission.
  • An embodiment of the present application provides a message transmission system, including: a source device and a target network device; the source device is the source device 1200 shown in FIG. 12 , and the target network device is the device shown in FIG. 13 .
  • the target network device 1300; or, at least one of the source device and the target network device is the communication device 1400 shown in FIG. 14 ; or, the target network device is the network device 1500 shown in FIG. 15 .
  • the source device is a server
  • the target network device is a forwarding device, such as a switch or a router.
  • Embodiments of the present application provide a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, all or all of the message transmission methods provided by the foregoing method embodiments are implemented. some steps.
  • the embodiments of the present application provide a computer program product containing instructions, when the computer program product runs on a computer, the computer is made to execute all or part of the steps of the message transmission method provided by the above method embodiments.
  • the embodiments of the present application provide a chip, where the chip includes a programmable logic circuit and/or program instructions, and is used to implement all or part of the steps of the message transmission method provided by the above method embodiments when the chip is running.
  • the above-mentioned embodiments it may be implemented in whole or in part by software, hardware, firmware or any combination thereof.
  • software it may be implemented in whole or in part in the form of a computer program product comprising one or more computer instructions.
  • the computer program instructions When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated.
  • the computer may be a general purpose computer, a computer network, or other programmable device.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be downloaded from a website, computer, server, or data
  • the center transmits to another website site, computer, server, or data center by wire (eg, coaxial cable, optical fiber, digital subscriber line) or wireless (eg, infrared, wireless, microwave, etc.).
  • the computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, a data center, or the like that includes one or more available media integrated.
  • the usable media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media, or semiconductor media (eg, solid state drives), and the like.
  • first and second etc. are used for descriptive purposes only and should not be construed to indicate or imply relative importance.
  • the term “at least one” refers to one or more, and “plurality” refers to two or more, unless expressly limited otherwise.
  • the disclosed apparatus and the like may be implemented by other structural manners.
  • the device embodiments described above are only illustrative.
  • the division of units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or integrated. to another system, or some features can be ignored, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical or other forms.
  • Units described as separate components may or may not be physically separated, and components described as units may or may not be physical units, and may be located in one place or distributed to multiple network devices (for example, terminal devices). )superior. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

一种报文传输方法、设备及系统,属于网络技术领域。该系统包括源端设备、目的端设备和多个网络设备;该源端设备用于发送第一报文,该第一报文携带第一源路由信息和目的标识,该第一源路由信息包括第一转发路径上的各个网络设备的端口标识,该目的标识指示该目的端设备;该第一转发路径上的第一网络设备用于在接收到该第一报文时,根据该第一源路由信息或该目的标识转发该第一报文,且优先根据该第一源路由信息转发该第一报文。由此,如果该第一源路由信息中的端口标识指示的出端口处于非工作状态导致该第一转发路径故障,该第一网络设备可以根据该目的标识转发该第一报文,有助于提高报文传输的灵活性和可靠性。

Description

报文传输方法、设备及系统 技术领域
本申请涉及网络技术领域,特别涉及一种报文传输方法、设备及系统。
背景技术
报文传输系统通常包括通信网络以及接入该通信网络的接入设备,通信网络中包括多个网络设备,网络设备通过转发不同接入设备的报文,实现该不同接入设备的通信。示例地,接入该通信网络的接入设备可以包括源端设备和目的端设备,该通信网络中的网络设备可以将该源端设备的报文转发给该目的端设备,实现该源端设备与该目的端设备的通信。
目前,报文传输系统中包括两种转发方式,分别为源路由转发方式和转发表转发方式。在源路由转发方式中,源端设备发送的报文携带源路由信息,该源路由信息包括该源端设备到目的端设备的转发路径上的各个网络设备的端口标识,该转发路径上的每个网络设备接收到该报文后,根据该报文携带的该网络设备的端口标识确定该报文的出端口,通过该报文的出端口转发该报文。在转发表转发方式中,源端设备发送的报文携带目的标识(例如目的端设备的地址),每个网络设备接收到该报文后,根据该报文携带的目的标识查找本地转发表,以从该网络设备的端口中确定该报文的出端口,通过该报文的出端口转发该报文。
但是,对于源路由转发方式,在转发路径故障时,该转发路径上的网络设备通常会将报文丢弃或者返回给源端设备使该源端设备对该报文重新选路,而丢弃报文容易导致报文传输的可靠性较差,将报文返回给源端设备重新选路容易导致报文的传输时延较长;对于转发表转发方式,网络设备查找本地转发表确定报文的出端口的耗时较长,导致报文的传输时延较长;因此目前的报文传输方案的灵活性和可靠性较差。
发明内容
本申请提供了一种报文传输方法、设备及系统,有助于提高报文传输的灵活性和可靠性。本申请的技术方案如下:
第一方面,提供了一种报文传输系统,包括:源端设备、目的端设备和多个网络设备;该源端设备用于发送第一报文,该第一报文携带第一源路由信息和目的标识,该第一源路由信息包括第一转发路径上的各个网络设备的端口标识,该目的标识指示该目的端设备;该第一转发路径上的第一网络设备用于在接收到该第一报文时,根据该第一源路由信息或该目的标识转发该第一报文,且优先根据该第一源路由信息转发该第一报文。
本申请提供的技术方案,由于源端设备发出的第一报文携带第一源路由信息和目的标识,第一转发路径上的第一网络设备接收到该第一报文后,根据该第一源路由信息或该目的标识转发该第一报文,且优先根据该第一源路由信息转发该第一报文。由此,如果该第一转发路径未故障,该第一网络设备可以根据该第一源路由信息转发该第一报文,有助于缩短该第一报文从该源端设备到该目的端设备的传输时延,如果该第一源路由信息中的端口标识指示的出端口处于非工作状态导致该第一转发路径故障,该第一网络设备可以根据该目的标识转发该第一报文,有助于避免由于该第一转发路径故障导致该第二报文丢失。本申请提供的技术方案可以降低丢包率且缩短报文传输时延,有助于提高报文传输的灵活性和可靠性。
可选地,第一网络设备用于如果第一报文满足源路由转发条件,根据第一源路由信息转发该第一报文,如果该第一报文不满足该源路由转发条件但满足转发表转发条件,根据目的标识转发该第一报文。
本申请提供的技术方案,第一网络设备在第一报文不满足同转发条件时采用不同转发方式转发该第一报文,有助于提高该第一报文传输的灵活性。
可选地,第一报文的封装类型为源路由封装,该第一报文还携带源路由有效性标识,该源路由有效性标识指示该第一报文封装的源路由有效或无效。示例地,该第一报文还携带源路由类型(type),该源路由类型指示该第一报文的封装类型为源路由封装。
可选地,源路由转发条件包括:该源路由有效性标识指示该第一报文封装的源路由有效,且该第一源路由信息中的该第一网络设备的端口标识指示的出端口处于工作状态,例如UP状态。其中,源端设备发送出的第一报文携带的该源路由有效性标识通常指示该第一报文封装的源路由有效。
可选地,转发表转发条件包括:该源路由有效性标识指示该第一报文封装的源路由无效。其中,如果第一网络设备接收到的第一报文满足该转发表转发条件,则该第一报文可以是经过第一转发路径上的其他网络设备转发给该第一网络设备的,该第一网络设备通常不是该第一转发路径的入口(ingress)设备。该其他网络设备在确定该第一报文携带的第一源路由信息中该其他网络设备的端口标识指示的端口处于非工作状态时,对该第一报文携带的源路由有效性标识进行修改,使修改后的源路由有效性标识指示该第一报文封装的源路由无效。
可选地,转发表转发条件包括:该源路由有效性标识指示该第一报文封装的源路由有效,但该第一源路由信息中的该第一网络设备的端口标识指示的出端口处于非工作状态,例如DOWN状态。其中,如果第一网络设备接收到的第一报文满足该转发表转发条件,该第一网络设备可以为该第一转发路径的入口设备或者其他设备。
可选地,转发表转发条件包括:该源路由有效性标识指示该第一报文封装的源路由有效,但该第一源路由信息中的第一网络设备的端口标识指示的出端口处于非工作状态,该第一网络设备具体用于:如果该第一报文不满足源路由转发条件但满足该转发表转发条件,设置该源路由有效性标识指示该第一报文封装的源路由无效,根据该目的标识转发该第一报文。
本申请提供的技术方案,第一网络设备在第一源路由信息中的该第一网络设备的端口标识指示的出端口处于非工作状态时设置该第一报文携带的源路由有效性标识指示该第一报文封装的源路由无效,可以便于后续其他网络设备接收到该第一报文后,确定该第一报文不满足源路由转发条件,并根据该第一报文携带的目的标识转发该第一报文。
可选地,转发表转发条件包括:该源路由有效性标识指示该第一报文封装的源路由有效,但该第一源路由信息中的第一网络设备的端口标识指示的出端口处于非工作状态,该第一网络设备还用于如果该第一报文不满足源路由转发条件但满足该转发表转发条件,向源端设备发送故障通知消息,该故障通知消息指示第一转发路径故障。
本申请提供的技术方案,第一网络设备在第一报文携带的源路由有效性标识指示该第一报文封装的源路由有效,但是该第一报文携带的第一源路由信息中的该第一网络设备的端口标识指示的出端口处于非工作状态时向源端设备发送故障通知消息告知第一转发路径故障,可以便于该源端设备获知该第一转发路径故障。
可选地,该源端设备还用于在接收到该故障通知消息之后,将该第一转发路径设置为无效转发路径。
本申请提供的技术方案,源端设备在接收到用于指示第一转发路径故障的故障通知消息之后,根据该故障通知消息将该第一转发路径设置为无效转发路径,可以避免该源端设备后续在对报文进行源路由选路时选取到故障的该第一转发路径。
可选地,该源端设备还用于在接收到该故障通知消息之后,发送第二报文,该第二报文携带第二源路由信息和该目的标识,该第二源路由信息包括第二转发路径上的各个网络设备的端口标识;该第二转发路径上的第二网络设备用于在接收到该第二报文时,根据该第二源路由信息或该目的标识转发该第二报文,且优先根据该第二源路由信息转发该第二报文。
本申请提供的技术方案,源端设备在接收到用于指示第一转发路径故障的故障通知消息之后,为第二报文选取的源路由路径是不同于该第一转发路径的第二转发路径,该源端设备选取该第二转发路径向目的端设备发送携带第二源路由信息和目的标识的第二报文,可以提高该第二报文传输的灵活性和可靠性。例如,如果该第二转发路径未故障,该第二转发路径上的第二网络设备可以根据该第二源路由信息转发该第二报文,有助于缩短该第二报文从该源端设备到该目的端设备的传输时延,如果该第二源路由信息中的端口标识指示的出端口处于非工作状态导致该第二转发路径故障,该第二网络设备可以根据该目的标识转发该第二报文,有助于避免由于该第二转发路径故障导致该第二报文丢失。
可选地,该源端设备具体用于在满足源路由封装条件时发送该第一报文;其中,该源路由封装条件包括:该源端设备和该目的端设备均支持源路由封装功能,且该第一转发路径上的网络设备均支持源路由转发功能。其中,网络设备通常都支持转发表转发功能,接入设备通常都支持以太封装功能,如果网络设备支持源路由转发功能,则该网络设备同时支持源路由转发功能和转发表转发功能,如果接入设备支持源路由封装功能,则该接入设备同时支持源路由封装功能和以太封装功能,本申请中,可以将同时支持源路由转发功能和转发表转发功能的网络设备称为双模转发设备,将仅支持转发表转发功能而不支持源路由转发功能的网络设备称为单模转发设备,将同时支持源路由封装功能和以太封装功能的接入设备称为双模接入设备,将仅支持以太封装功能的接入设备称为单模接入设备。
本申请提供的技术方案,源端设备在该源端设备和目的端设备均支持源路由封装功能(也即是该源端设备和该目的端设备均为双模接入设备),且第一转发路径上的网络设备均支持源路由转发功能(也即是第一转发路径上的网络设备均为双模转发设备)的情况下,发送第一报文,可以便于该第一报文以源路由转发方式被转发至该目的端设备以及便于该目的端设备能够对该第一报文进行解析。
可选地,源端设备还用于在不满足该源路由封装条件时发送第三报文,该第三报文携带该目的标识,该第三报文的封装类型为以太封装。其中,如果不满足该源路由封装条件,则该目的端设备为单模接入设备,和/或,该第一转发路径上包括单模转发设备,该源端设备通常为双模接入设备,以使得该源端设备具备判断是否满足该源路由封装条件的功能,从而确定发送源路由报文还是发送以太报文。
本申请提供的技术方案,源端设备在不满足源路由封装条件时发送第三报文,该第三报文为以太报文,因此可以保证本申请提供的报文传输方法与传统的以太报文传输方法兼容。
可选地,源端设备还用于在发送第一报文之前,根据该源端设备的路径表确定第一转发路径;其中,该路径表中包括与目的端设备相关的至少一个路径表项,该至少一个路径表项中的每个路径表项指示该源端设备与该目的端设备之间的一条转发路径。
本申请提供的技术方案,源端设备在发送第一报文之前确定第一转发路径,可以便于该 源端设备生成的该第一报文携带第一源路由信息来指示该第一转发路径。
可选地,源端设备还用于在根据该源端设备的路径表确定第一转发路径之前,根据报文传输系统的网络拓扑构建路径表,或者,从控制设备接收路径表。
本申请提供的技术方案,源端设备通过自行构建路径表或者从控制设备接收路径表,可以便于该源端设备根据该路径表确定第一转发路径。
可选地,第一网络设备还用于在根据目的标识转发第一报文之前,根据报文传输系统的网络拓扑构建转发表,或者,从控制设备接收转发表;其中,该转发表中包括至少一个转发表项,该至少一个转发表项中的每个转发表项指示一个目的标识与该第一网络设备的一个端口的映射关系。
本申请提供的技术方案,第一网络设备通过自行构建转发表或者从控制设备接收转发表,可以便于该第一网络设备根据第一报文携带的目的标识和该路径表确定第一报文的出端口。
可选地,第一网络设备用于在接收到第一报文时,如果该第一报文满足源路由转发条件但该第一网络设备的第一跳设备不支持源路由转发功能,根据该第一报文携带的目的标识转发该第一报文,该第一跳设备为该第一网络设备的下一跳设备;
该第一跳设备用于在接收到该第一报文时,根据该第一报文携带的目的标识转发该第一报文;
该第一网络设备的第二跳设备用于在接收到该第一报文时,如果该第一报文满足源路由转发条件且该第一网络设备的第三跳设备支持源路由转发功能,根据该第一报文携带的第一源路由信息转发该第一报文,该第二跳设备为该第一跳设备的下一跳设备,该第三跳设备为该第二跳设备的下一跳设备。
本申请提供的技术方案,第一网络设备在第一报文满足源路由转发条件但该第一网络设备的第一跳设备不支持源路由转发功能的情况下,根据该第一报文携带的目的标识转发该第一报文,该第一跳设备根据该第一报文携带的目的标识将该第一报文转发至该第一网络设备的第二跳设备后,该第二跳设备在该第一报文满足源路由转发条件且该第二跳设备的下一跳设备支持源路由转发功能的情况下,根据该第一报文携带的第一源路由信息转发该第一报文,该报文转发方式可以应用于转发路径中包括不支持源路由转发功能的设备的场景,在通信网络具有更好的普适性。
第二方面,提供了一种报文传输方法,应用于源端设备,该方法包括:发送第一报文,该第一报文携带第一源路由信息和目的标识,该第一源路由信息包括第一转发路径上的各个网络设备的端口标识,该目的标识指示目的端设备,以使得该第一转发路径上的第一网络设备根据该第一源路由信息或该目的标识转发该第一报文,该第一网络设备优先根据该第一源路由信息转发该第一报文。
可选地,该第一报文的封装类型为源路由封装,该第一报文还携带源路由有效性标识,该源路由有效性标识指示该第一报文封装的源路由有效或无效。
可选地,该方法还包括:在发送该第一报文之后,如果接收到指示该第一转发路径故障的故障通知消息,将该第一转发路径设置为无效转发路径。
可选地,该方法还包括:在发送该第一报文之后,如果接收到指示该第一转发路径故障的故障通知消息,发送第二报文,该第二报文携带第二源路由信息和该目的标识,该第二源路由信息包括第二转发路径上的各个网络设备的端口标识,以使得该第二转发路径上的第二 网络设备根据该第二源路由信息或该目的标识转发该第二报文,该第二网络设备优先根据该第二源路由信息转发该第二报文。
可选地,发送第一报文,包括:在满足源路由封装条件时发送该第一报文;其中,该源路由封装条件包括:该源端设备和该目的端设备均支持源路由封装功能,且该第一转发路径上的网络设备均支持源路由转发功能。
可选地,该方法还包括:在不满足该源路由封装条件时发送第三报文,该第三报文携带该目的标识,该第三报文的封装类型为以太封装。
可选地,该方法还包括:在发送该第一报文之前,根据该源端设备的路径表确定该第一转发路径;其中,该路径表中包括与该目的端设备相关的至少一个路径表项,该至少一个路径表项中的每个路径表项指示该源端设备与该目的端设备之间的一条转发路径。
可选地,该方法还包括:在根据该源端设备的路径表确定该第一转发路径之前,根据报文传输系统的网络拓扑构建该路径表,或者,从控制设备接收该路径表。
该第二方面以及该第二方面的各种可选实现方式的技术效果可以参考上述第一方面以及该第一方面的各种可选实现方式的技术效果,在此不在赘述。
第三方面,提供了一种报文传输方法,应用于目标网络设备,该方法包括:在接收到携带第一源路由信息和目的标识的第一报文时,根据该第一源路由信息或该目的标识转发该第一报文,且优先根据该第一源路由信息转发该第一报文;其中,该第一源路由信息包括第一转发路径上的各个网络设备的端口标识,该目的标识指示目的端设备。
可选地,根据该第一源路由信息或该目的标识转发该第一报文,且优先根据该第一源路由信息转发该第一报文,包括:如果该第一报文满足源路由转发条件,根据该第一源路由信息转发该第一报文;如果该第一报文不满足该源路由转发条件但满足转发表转发条件,根据该目的标识转发该第一报文。
可选地,该第一报文的封装类型为源路由封装,该第一报文还携带源路由有效性标识,该源路由有效性标识指示该第一报文封装的源路由有效或无效。
可选地,该源路由转发条件包括:该源路由有效性标识指示该第一报文封装的源路由有效,且该第一源路由信息中的该目标网络设备的端口标识指示的出端口处于工作状态。
可选地,该转发表转发条件包括:该源路由有效性标识指示该第一报文封装的源路由无效。
可选地,该转发表转发条件包括:该源路由有效性标识指示该第一报文封装的源路由有效,但该第一源路由信息中的该目标网络设备的端口标识指示的出端口处于非工作状态。
可选地,该转发表转发条件包括:该源路由有效性标识指示该第一报文封装的源路由有效,但该第一源路由信息中的该目标网络设备的端口标识指示的出端口处于非工作状态,如果该第一报文不满足源路由转发条件但满足转发表转发条件,根据该目的标识转发该第一报文,包括:如果该第一报文不满足源路由转发条件但满足该转发表转发条件,设置该源路由有效性标识指示该第一报文封装的源路由无效;根据该目的标识转发该第一报文。
可选地,该转发表转发条件包括:该源路由有效性标识指示该第一报文封装的源路由有效,但该第一源路由信息中的该目标网络设备的端口标识指示的出端口处于非工作状态,该方法还包括:如果该第一报文不满足源路由转发条件但满足该转发表转发条件,向该源端设备发送故障通知消息,该故障通知消息指示该第一转发路径故障。
可选地,该方法还包括:在接收到携带第二源路由信息和该目的标识的第二报文时,根 据该第二源路由信息或该目的标识转发该第二报文,且优先根据该第二源路由信息转发该第二报文;其中,该第二源路由信息包括第二转发路径上的各个网络设备的端口标识。
可选地,该方法还包括:在根据该目的标识转发该第一报文之前,根据报文传输系统的网络拓扑构建转发表,或者,从控制设备接收转发表;其中,该转发表中包括至少一个转发表项,该至少一个转发表项中的每个转发表项指示一个目的标识与该目标网络设备的一个端口的映射关系。
可选地,该方法还包括:在接收到携带该目的标识的第三报文时,根据该目的标识转发该第三报文,该第三报文的封装类型为以太封装。
可选地,根据该第一源路由信息或该目的标识转发该第一报文,且优先根据该第一源路由信息转发该第一报文,包括:如果该第一报文满足源路由转发条件但该第一网络设备的下一跳设备不支持源路由转发功能,根据该第一报文携带的目的标识转发该第一报文,如果该第一报文满足源路由转发条件且该第一网络设备的下一跳设备支持源路由转发功能,根据该第一报文携带的第一源路由信息转发该第一报文。
可选地,该目标网络设备是第一网络设备或第二网络设备。
该第三方面以及该第三方面的各种可选实现方式的技术效果可以参考上述第一方面以及该第一方面的各种可选实现方式的技术效果,在此不在赘述。
第四方面,提供了一种源端设备,该源端设备包括:
发送模块,用于发送第一报文,该第一报文携带第一源路由信息和目的标识,该第一源路由信息包括第一转发路径上的各个网络设备的端口标识,该目的标识指示目的端设备,以使得该第一转发路径上的第一网络设备根据该第一源路由信息或该目的标识转发该第一报文,该第一网络设备优先根据该第一源路由信息转发该第一报文。
可选地,该第一报文的封装类型为源路由封装,该第一报文还携带源路由有效性标识,该源路由有效性标识指示该第一报文封装的源路由有效或无效。
可选地,该源端设备还包括:设置模块,用于在发送该第一报文之后,如果接收到指示该第一转发路径故障的故障通知消息,将该第一转发路径设置为无效转发路径。
可选地,该发送模块,还用于在发送该第一报文之后,如果接收到指示该第一转发路径故障的故障通知消息,发送第二报文,该第二报文携带第二源路由信息和该目的标识,该第二源路由信息包括第二转发路径上的各个网络设备的端口标识,以使得该第二转发路径上的第二网络设备根据该第二源路由信息或该目的标识转发该第二报文,该第二网络设备优先根据该第二源路由信息转发该第二报文。
可选地,该发送模块,具体用于在满足源路由封装条件时发送该第一报文;其中,该源路由封装条件包括:该源端设备和该目的端设备均支持源路由封装功能,且该第一转发路径上的网络设备均支持源路由转发功能。
可选地,该发送模块,还用于在不满足该源路由封装条件时发送第三报文,该第三报文携带该目的标识,该第三报文的封装类型为以太封装。
可选地,该源端设备还包括:确定模块,用于在发送该第一报文之前,根据该源端设备的路径表确定该第一转发路径;其中,该路径表中包括与该目的端设备相关的至少一个路径表项,该至少一个路径表项中的每个路径表项指示该源端设备与该目的端设备之间的一条转发路径。
可选地,该源端设备还包括:构建模块,用于在根据该源端设备的路径表确定该第一转 发路径之前,根据报文传输系统的网络拓扑构建该路径表;或者,接收模块,用于在根据该源端设备的路径表确定该第一转发路径之前,从控制设备接收该路径表。
该第四方面以及该第四方面的各种可选实现方式的技术效果可以参考上述第一方面以及该第一方面的各种可选实现方式的技术效果,在此不在赘述。
第五方面,提供了一种目标网络设备,该目标网络设备包括:
转发模块,用于在接收到携带第一源路由信息和目的标识的第一报文时,根据该第一源路由信息或该目的标识转发该第一报文,且优先根据该第一源路由信息转发该第一报文;其中,该第一源路由信息包括第一转发路径上的各个网络设备的端口标识,该目的标识指示目的端设备。
可选地,该转发模块,具体用于:如果该第一报文满足源路由转发条件,根据该第一源路由信息转发该第一报文;如果该第一报文不满足该源路由转发条件但满足转发表转发条件,根据该目的标识转发该第一报文。
可选地,该第一报文的封装类型为源路由封装,该第一报文还携带源路由有效性标识,该源路由有效性标识指示该第一报文封装的源路由有效或无效。
可选地,该源路由转发条件包括:该源路由有效性标识指示该第一报文封装的源路由有效,且该第一源路由信息中的该目标网络设备的端口标识指示的出端口处于工作状态。
可选地,该转发表转发条件包括:该源路由有效性标识指示该第一报文封装的源路由无效。
可选地,该转发表转发条件包括:该源路由有效性标识指示该第一报文封装的源路由有效,但该第一源路由信息中的该目标网络设备的端口标识指示的出端口处于非工作状态。
可选地,该转发表转发条件包括:该源路由有效性标识指示该第一报文封装的源路由有效,但该第一源路由信息中的该目标网络设备的端口标识指示的出端口处于非工作状态,该转发模块,具体用于:如果该第一报文不满足源路由转发条件但满足该转发表转发条件,设置该源路由有效性标识指示该第一报文封装的源路由无效;根据该目的标识转发该第一报文。
可选地,该转发表转发条件包括:该源路由有效性标识指示该第一报文封装的源路由有效,但该第一源路由信息中的该目标网络设备的端口标识指示的出端口处于非工作状态,该目标网络设备还包括:发送模块,用于如果该第一报文不满足源路由转发条件但满足该转发表转发条件,向源端设备发送故障通知消息,该故障通知消息指示第一转发路径故障。
可选地,该转发模块,还用于在接收到携带第二源路由信息和该目的标识的第二报文时,根据该第二源路由信息或该目的标识转发该第二报文,且优先根据该第二源路由信息转发该第二报文;其中,该第二源路由信息包括第二转发路径上的各个网络设备的端口标识。
可选地,该目标网络设备还包括:构建模块,用于在转发模块根据目的标识转发第一报文之前,根据报文传输系统的网络拓扑构建转发表;或者,接收模块,用于在转发模块根据目的标识转发第一报文之前,从控制设备接收转发表;其中,该转发表中包括至少一个转发表项,该至少一个转发表项中的每个转发表项指示一个目的标识与该目标网络设备的一个端口的映射关系。
可选地,该转发模块,还用于在接收到携带该目的标识的第三报文时,根据该目的标识转发该第三报文,该第三报文的封装类型为以太封装。
可选地,该目标网络设备是第一网络设备或第二网络设备。
该第五方面以及该第五方面的各种可选实现方式的技术效果可以参考上述第一方面以及该第一方面的各种可选实现方式的技术效果,在此不在赘述。
第六方面,提供了一种通信设备,包括存储器和处理器;
该存储器用于存储计算机程序;
该处理器用于执行该存储器中存储的计算机程序以执行如上述第二方面或第二方面的任一可选方式所提供的报文传输方法,或者,执行如上述第三方面或第三方面的任一可选方式所提供的报文传输方法。
可选地,该通信设备是服务器或目标网络设备,该目标网络设备是上述第一网络设备或第二网络设备。
第七方面,提供了一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,该计算机程序被处理器执行时实现如上述第二方面或第二方面的任一可选方式所提供的报文传输方法,或者,实现如上述第三方面或第三方面的任一可选方式所提供的报文传输方法。
第八方面,提供一种包含指令的计算机程序产品,当该计算机程序产品在计算机上运行时,使得该计算机执行如上述第二方面或第二方面的任一可选方式所提供的报文传输方法,或者,执行如上述第三方面或第三方面的任一可选方式所提供的报文传输方法。
第九方面,提供一种芯片,该芯片包括可编程逻辑电路和/或程序指令,当该芯片运行时用于实现如上述第二方面或第二方面的任一可选方式所提供的报文传输方法,或者,实现如上述第三方面或第三方面的任一可选方式所提供的报文传输方法。
第十方面,提供一种报文传输系统,包括:源端设备和目标网络设备;
该源端设备为如上述第四方面所提供的源端设备,该目标网络设备为如上述第五方面所提供的目标网络设备;或者,该源端设备和该目标网络设备中的至少一个为如上述第六方面所提供的设备。
可选地,该源端设备是服务器,该目标网络设备是上述第一网络设备或第二网络设备。
本申请提供的技术方案带来的有益效果是:
本申请提供的报文传输方法、设备及系统,该报文传输系统包括源端设备、目的端设备和多个网络设备,该源端设备发送出的报文携带源路由信息和目的标识,该源路由信息包括转发路径上的各个网络设备的端口标识,该目的标识指示该目的端设备,该转发路径上的网络设备接收到该报文后,根据该源路由信息或该目的标识转发该报文,且优先根据该源路由信息转发该报文。由此,如果该转发路径未故障,该转发路径上的网络设备可以根据该源路由信息转发该报文,有助于缩短该报文从该源端设备到该目的端设备的传输时延,如果该源路由信息中的端口标识指示的出端口处于非工作状态导致该转发路径故障,该转发路径上的网络设备可以根据该目的标识转发该报文,有助于避免由于该转发路径故障导致该报文丢失。本申请提供的技术方案可以降低丢包率且缩短报文传输时延,有助于提高报文传输的灵活性和可靠性。
附图说明
图1是本申请实施例所涉及的一种实施环境的示意图;
图2是本申请实施例提供的一种报文传输方法的流程图;
图3是本申请实施例提供的另一种报文传输方法的流程图;
图4是本申请实施例提供的再一种报文传输方法的流程图;
图5是本申请实施例提供的又一种报文传输方法的流程图;
图6是本申请实施例提供的又一种报文传输方法的流程图;
图7是本申请实施例提供的一种报文传输方法的示意图;
图8是本申请实施例提供的另一种报文传输方法的示意图;
图9是本申请实施例提供的再一种报文传输方法的示意图;
图10是本申请实施例提供的又一种报文传输方法的示意图;
图11是本申请实施例提供的又一种报文传输方法的示意图;
图12是本申请实施例提供的一种源端设备的逻辑结构示意图;
图13是本申请实施例提供的一种目标网络设备的逻辑结构示意图;
图14是本申请实施例提供的一种通信设备的硬件结构示意图;
图15是本申请实施例提供的一种网络设备的硬件结构示意图;
图16是本申请实施例提供的一种报文传输系统的结构示意图。
具体实施方式
为使本申请的原理、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。
应理解的是,网络设备对报文转发的过程中,通常可以对报文进行一些处理,例如对报文头中的一些控制信息进行处理,但是网络设备通常不会改变该报文的关键内容,这些关键内容例如但不限于该报文的负载等。鉴于此,在本申请中,为了便于描述,将网络设备接收到的报文和转发出的报文采用同一称呼描述。例如,在下述各个实施例中,类似“第一网络设备在接收到第一报文时,根据该第一报文携带的第一源路由信息或目的标识转发该第一报文”的描述中,将该第一网络设备接收到的报文和转发出的报文均称为第一报文,可以理解的是,该第一网络设备接收到的第一报文与转发出的第一报文的关键内容相同,报文头中的控制信息可以不同,关于第二报文以及第三报文的描述与此同理。
在对本申请实施例进行详细介绍之前,首先介绍本申请的实施环境。
本申请提供的技术方案涉及的实施环境是一种通信系统,该通信系统可以是报文传输系统。其中,该报文传输系统可以包括通信网络以及接入该通信网络的接入设备,该通信网络包括多个网络设备,网络设备通过转发不同接入设备的报文,实现该不同接入设备的通信。其中,该通信网络可以是数据中心网络(data center network,DCN)、城域网络、广域网络或园区网络等,本申请实施例对通信网络的类型不做限定,在一些实施场景中,该通信网络又可以称为计算网络,例如,高性能计算(high performance computing,HPC)网络。可选地,根据网络拓扑的不同,该通信网络可以是2级Clos网络或者3级Clos网络,2级Clos网络又可以称为二级胖树网络,本申请实施例对此不做限定。
示例地,请参考图1,其示出了本申请实施例所涉及的一种实施环境的示意图,该实施环境提供一种报文传输系统,该报文传输系统包括通信网络00以及接入该通信网络00的接入设备011~013,该通信网络包括多个网络设备001~005,网络设备001~005通过转发接入 设备011~013的报文,实现接入设备011~013之间的通信。
其中,网络设备001~005中的每个网络设备可以是交换机、路由器(router)、虚拟交换机或虚拟路由器等在通信网络中用于转发报文的设备。网络设备001~005可以是相同的网络设备,例如,网络设备001~005均可以是交换机;或者,网络设备001~005可以是不同的网络设备,例如,网络设备001~005中的一部分是交换机,另一部分是路由器。
其中,接入设备011~013中的每个接入设备可以是主机、终端、服务器或虚拟机等各种类型的设备。接入设备011~013可以是相同类型的设备,例如,接入设备011~013均可以是服务器;或者,接入设备011~013可以是不同类型的设备,例如,接入设备011是服务器,接入设备012是终端、接入设备013是虚拟机。其中,该终端可以包括智能手机、平板电脑、台式计算机、物联网(internet of things,IoT)设备等,IoT设备可以是家用电器、智能家居、交通工具、工具设备、服务设备、服务设施或可穿戴设备等,IoT设备例如但不限于:智能冰箱、智能洗衣机、智能水表、智能电表、智能汽车、车载设备或可穿戴设备等等。
可选地,如图1所示,该通信网络00还包括控制设备000,该控制设备000分别与网络设备001~005通信连接,且该控制设备000还可以与接入设备011~013通信连接(图1中未示出)。为了便于与不同网络设备之间的通信连接以及网络设备与接入设备之间的通信连接进行区分,图1中以虚线的形式示出了控制设备000与网络设备001~005之间的通信连接。其中,该控制设备000用于对网络设备001~005以及接入设备011~013进行管理,网络设备001~005可以在该控制设备000的控制下转发报文,该接入设备011~013可以在该控制设备000的控制下发送以及接收报文。其中,该控制设备000可以进行网络拓扑采集、资源分配、路径计算、转发表计算并向接入设备011~013推送路径信息以及向网络设备001~005推送转发表,接入设备011~013根据该控制设备000推送的路径信息收发报文,网络设备001~005可以根据该控制设备000推送的转发表转发报文。其中,该控制设备000可以是控制器,具体可以是服务器、终端或转发设备(交换机、路由器、虚拟交换机或虚拟路由器等)。如果该控制设备000是转发设备,该控制设备000可以是通信网络中的指定网络设备(例如人工指定),或者是通过选举的方式从该通信网络中的多个网络设备中选举出的设备。
可选地,如图1所示,该通信网络00包括汇聚层和接入层,网络设备001~002位于汇聚层,网络设备003~005位于接入层,接入设备011通过网络设备003接入该通信网络00,接入设备012通过网络设备004接入该通信网络00,接入设备013通过网络设备005接入该通信网络00。本领域技术人员容易理解,该图1所示的通信网络00可以为2级Clos网络,其又可以称为叶-脊(leaf-spine)拓扑网络,位于汇聚层的网络设备001~002可以为脊(spine)设备,位于接入层的网络设备003~005可以为叶(leaf)设备,每个spine设备与所有的leaf设备连接,每个leaf设备与所有的spine设备连接(也即是spine设备与leaf设备全互连)。
本领域技术人员应当理解,该图1所示的报文传输系统仅用于举例,并非用于限制本申请实施例的技术方案,在实现过程中,该报文传输系统还可能包括其他设备,可以根据需要来配置网络设备的数量、接入设备的数量以及网络设备的之间的连接关系,网络设备与接入设备的连接关系,并且该通信网络的拓扑可以是其他拓扑。例如,spine设备与leaf设备可以不是全互连,再比如,汇聚层中的网络设备可以互连,又比如,通信网络还可以包括位于汇聚层之上的核心层,本申请实施例在此不再赘述。
通信网络中的网络设备通过转发不同接入设备的报文,实现不同接入设备的通信。按照 报文传输方向,接入设备可以包括源端设备(也即是报文的发出端,该源端设备通常是报文的构造者)和目的端设备(也即是报文的目的端,该目的端设备通常是报文的最终接收者),网络设备可以将该源端设备的报文转发给该目的端设备。目前,通信网络中存在两种转发方式,分别为源路由转发方式和转发表转发方式。在源路由转发方式中:源端设备发送的报文携带源路由信息,该源路由信息包括该源端设备到目的端设备的转发路径上的各个网络设备的端口标识,每个网络设备接收到该报文后,根据该报文携带的该网络设备的端口标识确定该报文的出端口,通过该报文的出端口转发该报文。在转发表转发方式中:源端设备发送的报文携带目的标识(例如目的端设备的地址),每个网络设备接收到该报文后,根据该报文携带的目的标识查找本地转发确定该报文的出端口,通过该报文的出端口转发该报文。
但是,在源路由转发方式中,转发路径的决策在于源端设备,源端设备在发送出报文之后,如果转发路径故障,该转发路径上的网络设备通常会将报文丢弃或者返回给源端设备使该源端设备对该报文重新选路,丢弃报文容易导致报文传输的可靠性较差,将报文返回给源端设备重新选路导致报文的传输时延较长,且可能引发网络拥塞。在转发表转发方式中,由于网络设备需要查找本地转发表才能确定报文的出端口,网络设备查找本地转发表确定报文的出端口的耗时较长,导致报文的传输时延较长。例如,以网络设备的芯片的时钟频率为1GHz(吉赫兹)为例,每个网络设备完成一次查表转发需要耗时3~40ns(纳秒),报文转发3跳的耗时长达100ns,在数据中心最常见的二级胖树网络中,报文从源端设备到达目的端设备的传输时延长达100ns。如果按大规模组网下的dragonfly/dragonfly+拓扑来看,报文从源端设备到达目的端设备多达5~7跳,查表转发的耗时会更长,导致报文的传输时延会更长。
有鉴于此,本申请实施例提供了一种报文传输方法、设备及系统,该报文传输系统包括源端设备、目的端设备和多个网络设备,该源端设备发送出的报文可以携带源路由信息和目的标识,该源路由信息包括转发路径上的各个网络设备的端口标识,该目的标识指示该目的端设备,该转发路径上的网络设备接收到该报文后,根据该源路由信息或该目的标识转发该报文,且优先根据该源路由信息转发该报文。由此,如果该转发路径未故障,该转发路径上的网络设备可以根据该源路由信息转发该报文,有助于缩短该报文从该源端设备到该目的端设备的传输时延,如果该源路由信息中的端口标识指示的出端口处于非工作状态导致该转发路径故障,该转发路径上的网络设备可以根据该目的标识转发该报文,有助于避免由于该转发路径故障导致该报文丢失。本申请提供的技术方案可以避免降低丢包率且缩短报文传输时延,有助于提高报文传输的灵活性和可靠性。本申请实施例提供的技术方案尤其适用于对传输性能(例如传输时延、丢包率)要求较高的业务,例如人工智能、实时大数据分析、深度学习、分布式计算、分布式存储以及计算存储分离等业务。下面结合附图介绍本申请的详细实现方案。
首先介绍本申请实施例提供的报文传输方法。
示例地,请参考图2,其示出了本申请实施例提供的一种报文传输方法的流程图。该报文传输方法可以应用于报文传输系统,该报文传输系统可以包括源端设备、目的端设备和多个网络设备。例如,该报文传输系统可以是图1所示的报文传输系统。参见图2,该方法可以包括如下几个步骤:
步骤201、源端设备发送第一报文,该第一报文携带第一源路由信息和目的标识,该第 一源路由信息包括第一转发路径上的各个网络设备的端口标识,该目的标识指示目的端设备。
可选地,源端设备首先确定该源端设备与目的端设备之间的第一转发路径,然后根据该第一转发路径和该目的端设备生成该第一报文,使该第一报文携带第一源路由信息和目的标识。其中,该第一源路由信息包括该第一转发路径上的各个网络设备的端口标识,该目的标识指示该目的端设备,例如该目的标识可以是该目的端设备的设备标识,该目的端设备的网际协议(Internet Protocol,IP)地址、该目的端设备的位置标识(location Identity,LID)或者是其他用于指示该目的端设备的标识。本领域技术人员可以理解,本申请实施例以第一报文携带网络设备的端口标识为例说明,实际应用中,该第一报文携带的可以是任何能够指示网络设备的端口的指示信息,本申请实施例对此不做限定。
可选地,第一报文的封装类型为源路由封装,因此该第一报文可以称为源路由报文。该第一报文还可以携带源路由有效性标识,该源路由有效性标识指示该第一报文封装的源路由有效或无效,例如指示该第一报文中的第一源路由信息有效或无效。示例地,该源路由有效性标识的值可以是“1”或“0”,“1”用于指示该第一报文封装的源路由有效,“0”用于指示该第一报文封装的源路由无效,或者,“0”用于指示该第一报文封装的源路由有效,“1”用于指示该第一报文封装的源路由无效,本申请实施例对此不做限定。在本申请实施例中,源端设备生成的该第一报文中的该源路由有效性标识指示该第一报文封装的源路由有效。
可选地,第一报文还可以携带源路由类型,该源路由类型指示该第一报文的封装类型为源路由封装,以便于接收到该第一报文的网络设备根据该源路由类型确定该第一报文的封装类型为源路由封装,本申请实施例对此不做限定。容易理解,该第一报文还可以携带报文负载(payload),在本申请实施例中,第一源路由信息、目的标识、源路由有效性标识以及该源路由类型均可以携带在该第一报文的头部。
源端设备生成第一报文后可以发送该第一报文。可选地,该源端设备发送第一报文可以是该源端设备通过第一转发路径向目的端设备发送该第一报文,该第一报文可以经过该第一转发路径上的网络设备转发到达该目的端设备。本领域技术人员容易理解,该源端设备通过该第一转发路径向该目的端设备发送该第一报文时,首先接收到该第一报文的是该第一转发路径上的首个网络设备(也即是该第一转发路径的入口设备)。
在本申请实施例中,源端设备维护有路径表,该源端设备的路径表中包括与目的端设备相关的至少一个路径表项,每个路径表项指示该源端设备与该目的端设备之间的一条转发路径,该源端设备在需要向该目的端设备发送报文时,可以从该路径表中确定第一转发路径或者通过路径计算确定该第一转发路径,本申请实施例对此不做限定。本申请实施例以源端设备从路径表中确定第一转发路径为例说明,则该源端设备从该路径表中确定第一转发路径之前,可以先获取该路径表。可选地,该路径表可以是该源端设备构建的,或者是控制设备构建好发送给该源端设备的,从而,该源端设备获取该路径表可以包括:该源端设备根据报文传输系统(例如图1所示的报文传输系统)的网络拓扑构建该路径表,或者,该源端设备从控制设备(例如图1中的控制设备000)接收该路径表,本申请实施例对此不做限定。
本申请实施例以源端设备根据报文传输系统的网络拓扑构建路径表为例说明。该源端设备可以根据报文传输系统的网络拓扑,通过路径算法计算该源端设备与该目的端设备之间的至少一条转发路径,根据每条转发路径的路径信息构建一个路径表项,根据该至少一条转发路径构建的至少一个路径表项生成该路径表。其中,控制设备构建该路径表的过程与此类似, 本申请实施例在此不再赘述。需要说明的是,报文传输系统中可能存在部分网络设备仅支持转发表转发功能而不支持源路由转发功能,部分网络设备同时支持转发表转发功能和源路由转发功能,部分接入设备仅支持以太封装功能而不支持源路由封装功能,部分接入设备同时支持以太封装功能和源路由封装功能,在本申请实施例中,可以将同时支持转发表转发功能和源路由转发功能的网络设备称为双模转发设备,将仅支持转发表转发功能而不支持源路由转发功能的网络设备称为单模转发设备,将同时支持以太封装功能和源路由封装功能的接入设备称为双模接入设备,将仅支持以太封装功能而不支持源路由封装功能的接入设备称为单模接入设备。控制设备和/或接入设备(例如源端设备)在根据报文传输系统的网络拓扑计算转发路径时,可以剔除该报文传输系统中的单模转发设备和单模接入设备,根据该报文传输系统中的双模转发设备和双模接入设备构成的网络拓扑计算转发路径。可选地,控制设备和/或接入设备可以采集报文传输系统的网络拓扑,在采集网络拓扑的过程中,控制设备和/或接入设备可以对网络设备是否为双模转发设备以及接入设备是否为双模接入设备进行识别,以便于在计算转发路径时,剔除该报文传输系统中的单模转发设备和单模接入设备。
步骤202、第一转发路径上的第一网络设备在接收到第一报文时,根据该第一报文携带的第一源路由信息或目的标识转发该第一报文,且优先根据该第一源路由信息转发该第一报文。
其中,第一网络设备可以是第一转发路径上的任意一个网络设备,例如,该第一网络设备可以是该第一转发路径的入口设备、出口(egress)设备或者是该入口设备与该出口设备之间的任意中转(transit)设备,本申请实施例对此不做限定。
第一网络设备在接收到第一报文时,可以确定该第一报文是否满足源路由转发条件,如果该第一报文满足源路由转发条件,该第一网络设备根据该第一报文携带的第一源路由信息转发该第一报文,如果该第一报文不满足源路由转发条件但满足转发表转发条件,该第一网络设备根据该第一报文携带的目的标识转发该第一报文。可选地,该第一报文的封装类型为源路由封装,该第一报文还携带源路由有效性标识。该源路由转发条件可以包括:该第一报文携带的源路由有效性标识指示该第一报文封装的源路由有效,且该第一报文携带的第一源路由信息中的该第一网络设备的端口标识指示的出端口处于工作状态。该转发表转发条件可以包括:该第一报文携带的源路由有效性标识指示该第一报文封装的源路由无效;或者,该第一报文携带的源路由有效性标识指示该第一报文封装的源路由有效但该第一报文携带的第一源路由信息中的该第一网络设备的端口标识指示的出端口处于非工作状态。
可选地,如果第一报文满足源路由转发条件,第一网络设备通过该第一报文携带的第一源路由信息中的该第一网络设备的端口标识指示的出端口转发该第一报文。如果该第一报文不满足源路由转发条件但满足转发表转发条件,该第一网络设备根据该第一报文携带的目的标识查找该第一网络设备的转发表,以从该第一网络设备的端口中确定该第一报文的出端口,并通过该第一报文的出端口转发该第一报文。其中,该转发表中包括至少一个转发表项,每个转发表项指示一个目的标识与该第一网络设备的一个端口的映射关系,该第一网络设备将该转发表中与该第一报文携带的目的标识对应的端口确定为该第一报文的出端口。
可选地,如果第一报文携带的源路由有效性标识指示该第一报文封装的源路由有效但该第一报文携带的第一源路由信息中的第一网络设备的端口标识指示的出端口处于非工作状态,该第一网络设备可以确定第一转发路径故障。在这种情况下,该第一网络设备在转发该第一报文时,可以设置该第一报文中的源路由有效性标识指示该第一报文封装的源路由无 效,然后转发设置源路由有效性标识后的第一报文,这样后续的网络设备接收到的第一报文中携带的源路由有效性标识指示该第一报文封装的源路由无效,该后续的网络设备可以根据该源路由有效性标识确定其接收到的第一报文满足转发表转发条件。示例地,该第一网络设备接收到的第一报文携带的源路由有效性标识的值是“1”,其指示该第一报文封装的源路由有效,如果该第一网络设备确定该第一报文携带的第一源路由信息中的该第一网络设备的端口标识指示的出端口处于非工作状态,该第一网络设备将该第一报文携带的源路由有效性标识的值从“1”修改为“0”,该源路由有效性标识的值“0”指示该第一报文封装的源路由无效,这样后续的网络设备接收到该第一报文后,根据该第一报文携带的源路由有效性标识的值“0”确定该第一报文满足转发表转发条件。容易理解,如果第一网络设备接收到的第一报文携带的源路由有效性标识指示该第一报文封装的源路由无效,该第一网络设备接收到的第一报文通常是该第一转发路径上的其他网络设备转发过来的,该第一网络设备不是该第一转发路径的入口设备。
可选地,第一网络设备在根据第一报文携带的目的标识转发该第一报文之前,可以获取该第一网络设备的转发表。在本申请实施例中,该转发表可以是该第一网络设备构建的,或者是控制设备构建好发送给该第一网络设备的,从而,该第一网络设备获取该路径表可以包括:该第一网络设备根据报文传输系统(例如图1所示的报文传输系统)的网络拓扑构建该转发表,或者,该第一网络设备从控制设备(例如图1中的控制设备000)接收该转发表,本申请实施例对此不做限定。
需要说明的是,第一网络设备在接收到第一报文之后,首先对该第一报文进行解析,以从该第一报文中提取第一源路由信息、目的标识、源路由有效性标识以及源路由类型等内容,然后执行判断以及转发的动作。例如,第一网络设备根据提取的信息判断该第一报文是否满足源路由转发条件,如果该第一报文不满足该源路由转发条件,判断该第一报文所满足的转发表转发条件。此外,本申请实施例对端口状态的描述中,所述的工作状态指的是UP状态,所述的非工作状态指的是DOWN状态,但是本申请实施例所述的工作状态和非工作状态仅仅是示例性的,在一些实施场景中,UP状态也可以称为激活状态,DOWN状态也可以称为非激活状态,或者,UP状态也可以称为正常状态,DOWN状态也可以称为异常状态或故障状态,本申请实施例对此不做限定。
综上所述,本申请实施例提供的报文传输方法,源端设备发送出的报文可以携带源路由信息和目的标识,该源路由信息包括转发路径上的各个网络设备的端口标识,该目的标识指示该目的端设备,该转发路径上的网络设备接收到该报文后,根据该源路由信息或该目的标识转发该报文,且优先根据该源路由信息转发该报文。由此,如果该转发路径未故障,该转发路径上的网络设备可以根据该源路由信息转发该报文,有助于缩短该报文从该源端设备到该目的端设备的传输时延,如果该源路由信息中的端口标识指示的出端口处于非工作状态导致该转发路径故障,该转发路径上的网络设备可以根据该目的标识转发该报文,有助于避免由于该转发路径故障导致该报文丢失。本申请提供的技术方案可以降低丢包率且缩短报文传输时延,有助于提高报文传输的灵活性和可靠性,本申请提供的技术方案能够适用于对传输性能要求较高的业务,例如人工智能、实时大数据分析、深度学习、分布式计算、分布式存储以及计算存储分离等业务。
根据图2所示实施例容易理解,在本申请实施例中,根据第一报文所满足转发条件的不 同,第一网络设备对该第一报文的处理方式不同。下面根据第一报文所满足转发条件的不同,分三个实施例对本申请的报文传输方法进行介绍。在下述实施例中,为了便于描述,将“第一报文携带的源路由有效性标识指示该第一报文封装的源路由有效,但该第一报文携带的第一源路由信息中的第一网络设备的端口标识指示的出端口处于非工作状态”这一转发条件称为第一转发表转发条件,将“第一报文携带的源路由有效性标识指示该第一报文封装的源路由无效”这一转发条件称为第二转发表转发条件。
示例地,请参考图3,其示出了本申请实施例提供的另一种报文传输方法的流程图。本实施例以第一报文满足源路由转发条件为例说明。参见图3,该方法可以包括如下几个步骤:
步骤301、源端设备发送第一报文,该第一报文携带第一源路由信息和目的标识,该第一源路由信息包括第一转发路径上的各个网络设备的端口标识,该目的标识指示目的端设备。
该步骤301的实现过程可以参考前述步骤201,本申请实施例在此不再赘述。
步骤302、第一转发路径上的第一网络设备在接收到第一报文时,确定该第一报文满足源路由转发条件,根据该第一报文携带的第一源路由信息转发该第一报文。
第一网络设备接收到第一报文后,可以根据该第一报文携带的源路由有效性标识确定该第一报文封装的源路由是否有效,如果该第一报文封装的源路由有效,该第一网络设备根据该第一报文携带的第一源路由信息中该第一网络设备的端口标识,在该第一网络设备的端口中确定该第一报文的出端口,并检测该第一报文的出端口是否处于工作状态,如果该第一报文的出端口处于工作状态,该第一网络设备确定该第一报文满足源路由转发条件,该第一网络设备通过该第一报文的出端口转发该第一报文。
示例地,请参考图4,其示出了本申请实施例提供的再一种报文传输方法的流程图。本实施例以第一报文不满足源路由转发条件但满足第一转发表转发条件为例说明。参见图4,该方法可以包括如下几个步骤:
步骤401、源端设备发送第一报文,该第一报文携带第一源路由信息和目的标识,该第一源路由信息包括第一转发路径上的各个网络设备的端口标识,该目的标识指示目的端设备。
该步骤401的实现过程可以参考前述步骤201,本申请实施例在此不再赘述。
步骤402、第一转发路径上的第一网络设备在接收到第一报文时,确定该第一报文不满足源路由转发条件但满足第一转发表转发条件,设置该第一报文中的源路由有效性标识指示该第一报文封装的源路由无效,并根据该第一报文携带的目的标识转发该第一报文。
第一网络设备接收到第一报文后,可以根据该第一报文携带的源路由有效性标识确定该第一报文封装的源路由是否有效;如果该第一报文封装的源路由有效,该第一网络设备根据该第一报文携带的第一源路由信息中该第一网络设备的端口标识,在该第一网络设备的端口中确定该第一报文的出端口,并检测该第一报文的出端口是否处于工作状态;如果该第一报文的出端口处于非工作状态,该第一网络设备确定该第一报文不满足源路由转发条件但满足第一转发表转发条件,该第一网络设备设置该第一报文中的源路由有效性标识指示该第一报文封装的源路由无效,根据该第一报文携带的目的标识查找该第一网络设备的转发表,以从该第一网络设备的端口中确定该第一报文的出端口,并通过该第一报文的出端口转发该第一 报文,也即是,该第一网络设备通过该第一报文的出端口转发设置源路由有效性标识后的第一报文,换句话讲,该第一网络设备发送出的第一报文中的源路由有效性标识指示该第一报文封装的源路由无效。
步骤403、第一转发路径上的第一网络设备在接收到第一报文时,确定该第一报文不满足源路由转发条件但满足第一转发表转发条件,向源端设备发送故障通知消息,该故障通知消息指示第一转发路径故障。
第一网络设备接收到第一报文后,如果该第一报文不满足源路由转发条件但满足第一转发表转发条件,该第一网络设备确定第一转发路径故障,该第一网络设备可以生成故障通知消息,并向源端设备发送该故障通知消息,其中,该故障通知消息指示该第一转发路径故障。示例地,该故障通知消息携带该第一转发路径的状态指示信息,该状态指示信息指示该第一转发路径故障,或者,该故障通知消息携带该第一网络设备的源路由端口状态,该源路由端口状态指示该第一网络设备的源路由端口(该源路由端口指的是第一源路由信息中的该第一网络设备的端口标识指示的端口)故障,从而指示该源路由端口所处的第一转发路径故障。
可选地,第一网络设备可以通过第一转发路径的反向路径向源端设备发送故障通知消息(也即是该故障通知消息沿原路返回给该源端设备,该故障通知消息通过该第一转发路径上处于该第一网络设备与该源端设备之间的网络设备转发给该源端设备),也可以通过例如控制设备向该源端设备发送故障通知消息(也即是该第一网络设备将该故障通知消息发送给控制设备,由控制设备将该故障通知消息转发给该源端设备),本申请实施例对此不做限定。
需要说明的是,本申请实施例不对步骤402与步骤403的执行顺序进行限定,第一网络设备可以先执行步骤402然后执行步骤403,也可以先执行步骤403然后执行步骤402,或者该第一网络设备可以同步执行步骤402和步骤403,本申请实施例对此不做限定。
步骤404、源端设备根据故障通知消息,将第一转发路径设置为无效转发路径。
源端设备接收到用于指示第一转发路径故障的故障通知消息之后,根据该故障通知消息确定该第一转发路径故障,并可以将该第一转发路径设置为无效转发路径,后续该源端设备在向该目的端设备发送报文时,可以在该源端设备的路径表中除该第一转发路径之外的转发路径为该报文选路,避免该源端设备为该报文选择故障的转发路径。
可选地,源端设备接收到故障通知消息之后,对该故障通知消息进行解析确定该故障通知消息的内容,根据该故障通知消息的内容确定第一转发路径故障,之后将该源端设备的路径表中与该第一转发路径对应的路径表项设置为无效表项,以将该第一转发路径设置为无效转发路径。示例地,该源端设备在与该第一转发路径对应的路径表项中添加无效标记,该无效标记例如“无效”、“00”或“WX”等标记,其用于指示该路径表项无效,从而指示该第一转发路径无效。
步骤405、源端设备发送第二报文,该第二报文携带第二源路由信息和目的标识,该第二源路由信息包括第二转发路径上的各个网络设备的端口标识。
源端设备接收到故障通知消息后,确定第一转发路径故障,该源端设备可以确定该源端设备与目的端设备之间的第二转发路径,通过该第二转发路径向该目标端设备发送报文,该第二转发路径与该第一转发路径是该源端设备与该目的端设备之间的两条不同的转发路径。可选地,该源端设备发送第二报文,该第二报文携带第二源路由信息和该目的标识,该第二源路由信息包括该第二转发路径上的各个网络设备的端口标识,该目的标识指示目的端设备。该源端设备发送第二报文的实现过程可以参考前述步骤201,本申请实施例在此不再赘 述。
需要说明的是,本申请实施例不对步骤404与步骤405的执行顺序进行限定,源端设备可以先执行步骤404然后执行步骤405,也可以先执行步骤405然后执行步骤404,或者该第一网络设备可以同步执行步骤404和步骤405,本申请实施例对此不做限定。
步骤406、第二转发路径上的第二网络设备在接收到第二报文时,根据该第二报文携带的第二源路由信息或目的标识转发该第二报文,且优先根据该第二源路由信息转发该第二报文。
该步骤406的实现过程可以参考前述步骤202,本申请实施例在此不再赘述。
示例地,请参考图5,其示出了本申请实施例提供的又一种报文传输方法的流程图。本实施例以第一报文不满足源路由转发条件但满足第二转发表转发条件为例说明。参见图5,该方法可以包括如下几个步骤:
步骤501、源端设备发送第一报文,该第一报文携带第一源路由信息和目的标识,该第一源路由信息包括第一转发路径上的各个网络设备的端口标识,该目的标识指示目的端设备。
该步骤501的实现过程可以参考前述步骤201,本申请实施例在此不再赘述。
步骤502、第一转发路径上的第一网络设备在接收到第一报文时,确定该第一报文不满足源路由转发条件但满足第二转发表转发条件,根据该第一报文携带的目的标识转发该第一报文。
第一网络设备接收到第一报文后,可以根据该第一报文携带的源路由有效性标识确定该第一报文封装的源路由是否有效,如果该第一报文封装的源路由无效,该第一网络设备确定该第一报文不满足源路由转发条件但满足第二转发表转发条件,该第一网络设备根据该第一报文携带的目的标识查找该第一网络设备的转发表,以从该第一网络设备的端口中确定该第一报文的出端口,并通过该第一报文的出端口转发该第一报文。结合前述图4实施例,该图5所示实施例中所述的第一网络设备接收到的第一报文是该第一转发路径上的其他网络设备转发过来的,该第一网络设备可以不是该第一转发路径的入口设备。
可选地,上述图2至图5所示实施例所述的第一报文可以为源路由报文(图4所示实施例中的第二报文也可以为源路由报文),源端设备可以在满足源路由封装条件的情况下发送该第一报文。其中,该源路由封装条件可以包括:该源端设备和该目的端设备均支持源路由封装功能,且该第一转发路径上的网络设备均支持源路由转发功能。可选地,如果该源端设备确定不满足该源路由封装条件,该源端设备可以发送以太报文,则作为一种可选实施例,本申请提供的报文传输方法还可以通过下述图6所示实施例的实现方案。
示例地,请参考图6,其示出了本申请实施例提供的又一种报文传输方法的流程图。参见图6,该方法可以包括如下几个步骤:
步骤601、源端设备确定不满足源路由封装条件后,发送第三报文,该第三报文携带目的标识,该目的标识指示目的端设备,该第三报文的封装类型为以太封装。
可选地,源端设备确定不满足源路由封装条件后,可以根据目的端设备生成第三报文,使该第三报文携带用于指示该目的端设备的目的标识,然后发送该第三报文。其中,该目的标识可以是该目的端设备的设备标识,该目的端设备的IP地址、该目的端设备的LID或者 是其他用于指示该目的端设备的标识,本申请实施例对此不做限定。
该第三报文的封装类型为以太封装,该第三报文可以称为以太报文。可选地,该第三报文还可以携带以太类型,该以太类型指示该第三报文的封装类型为以太封装,以便于接收到该第三报文的网络设备根据该以太类型确定该第三报文的封装类型为以太封装。容易理解,该第三报文还可以携带报文负载,在本申请实施例中,目的标识以及该以太类型均可以携带在该第三报文的头部。
步骤602、第三网络设备在接收到第三报文时,根据该第三报文携带的目的标识转发该第三报文。
其中,第三网络设备可以是报文传输系统中能够接收到第三报文的任意一个网络设备,该第三网络设备可以是为源端设备提供接入服务的网络设备,也可以是为目的端设备提供接入服务的网络设备或者是该报文传输系统中的其他网络设备,本申请实施例对此不做限定。
第三网络设备接收到第三报文后,根据该第三报文携带的以太类型确定该第三报文的封装类型为以太封装(也即是确定该第三报文为以太报文),然后根据该第三报文携带的目的标识查找该第三网络设备的转发表,以从该第三网络设备的端口中确定该第三报文的出端口,并通过该第三报文的出端口转发该第三报文。报文传输系统中接收到该第三报文的每个网络设备按照该步骤603的实现方式转发该第三报文,直至该第三报文到达该目的端设备。
需要说明的是,上述图6所示实施例提供的报文传输方法即为通常所述的转发表转发方法,在本申请实施例中,源端设备具备判断能力,该源端设备可以判断是否满足源路由封装条件,在满足源路由封装条件的情况下,该源端设备可以按照如图3至图5所示实施例提供的方法发送报文,在不满足源路由封装条件的情况下,该源端设备可以按照如图6所示实施例提供的方法发送报文。该源端设备可以是双模转发设备,其同时支持源路由转发和转发表转发,从而该源端设备可以判断是否满足该源路由封装条件,从而确定发送源路由报文还是发送以太报文。本申请实施例提供的技术方案不要求通信网络中的网络设备全部支持相同的转发功能,该通信网络可以存在部分网络设备支持双模转发,部分网络设备支持单模转发,该通信网络可以是双模转发设备和单模转发设备的混合组网,本申请实施例提供的技术方案能够与传统的转发表转发方式有效兼容。
根据前述实施例容易理解,在本申请实施例中,根据是否满足源路由封装条件,源端设备发送出的报文的封装类型不同,网络设备对报文的转发方式不同;根据源路由转发路径(也即是源端设备发送出的报文携带的源路由信息指示的转发路径)是否故障,网络设备对报文的转发方式不同。为了便于理解,下面结合具体示例介绍本申请提供的报文传输方法。
示例地,请参考图7,其示出了本申请实施例提供的一种报文传输方法的示意图。该图7以满足源路由封装条件且源路由转发路径未故障(也即是源路由信息中的端口标识指示的出端口均处于工作状态)为例说明。如图7所示,转发路径S1是源端设备a到目的端设备b的第一转发路径(也即是源路由转发路径),源端设备a和目的端设备b均支持源路由封装功能且网络设备A、网络设备B和网络设备D均支持源路由转发功能,因此该源端设备a确定满足源路由封装条件。该源端设备a通过该转发路径S1向该目的端设备b发送报文1(例如第一报文),该报文1携带第一源路由信息(也即是,网络设备A-端口1、网络设备B-端口1、网络设备D-端口1)、目的标识b、源路由有效性标识1、源路由类型以及报文负载。其中,该目的标识b指示该目的端设备b,该源路由有效性标识1指示该报文1中封装的源 路由有效,该源路由类型指示该报文1的封装类型为源路由封装。
源端设备a发送出的报文1首先到达网络设备A,该网络设备A根据该报文1携带的源路由类型确定该报文1的封装类型为源路由封装,根据该报文1携带的源路由有效性标识1确定该报文1中封装的源路由有效,以及,根据该报文1携带的第一源路由信息中该网络设备A的端口标识(也即是网络设备A-端口1)确定该报文1的出端口为端口1且确定该端口1处于工作状态(也即是UP状态),因此该网络设备A确定该报文1满足源路由转发条件,该网络设备A通过该端口1转发该报文1。该网络设备A通过端口1转发出的报文1到达网络设备B,该网络设备B采用与网络设备A同样的处理方式确定接收到的报文1满足源路由转发条件,通过该网络设备B的端口1转发该报文1。以此类推,网络设备D采用与网络设备A同样的处理方式通过该网络设备D的端口1转发该报文1。最终该报文1经过该转发路径S1上的网络设备以源路由转发方式从该源端设备a转发至该目的端设备b。由于该报文1以源路由转发方式从该源端设备a转发至该目的端设备b,因此该报文1从该源端设备a到达至该目的端设备b的传输时延较短。
示例地,请参考图8,其示出了本申请实施例提供的另一种报文传输方法的示意图。该图8以满足源路由封装条件但源路由转发路径故障(也即是源路由信息中的至少一个端口标识指示的出端口均处于非工作状态)为例说明。如图8所示,转发路径S1是源端设备a到目的端设备b的第一转发路径(也即是源路由转发路径),源端设备a和目的端设备b均支持源路由封装功能且网络设备A、网络设备B和网络设备D均支持源路由转发功能,因此该源端设备a确定满足源路由封装条件。该源端设备a通过该转发路径S1向该目的端设备b发送报文1(例如第一报文),该报文1携带第一源路由信息(也即是,网络设备A-端口1、网络设备B-端口1、网络设备D-端口1)、目的标识b、源路由有效性标识1、源路由类型以及报文负载。其中,该目的标识b指示该目的端设备b,该源路由有效性标识1指示该报文1中封装的源路由有效,该源路由类型指示该报文1的封装类型为源路由封装。
源端设备a发送出的报文1首先到达网络设备A,该网络设备A根据该报文1携带的源路由类型确定该报文1的封装类型为源路由封装,根据该报文1携带的源路由有效性标识1确定该报文1中封装的源路由有效,以及,根据该报文1携带的第一源路由信息中该网络设备A的端口标识(也即是网络设备A-端口1)确定该报文1的出端口为端口1,但是该网络设备A的端口1处于非工作状态(也即是DOWN状态),因此该网络设备A确定该报文1不满足源路由转发条件但满足第一转发表转发条件。该网络设备A将该报文1中的源路由有效性标识1修改为源路由有效性标识0,该源路由有效性标识0指示该报文1中封装的源路由无效(也即是该网络设备A设置该报文1中的源路由有效性标识指示该报文1中封装的源路由无效)。之后该网络设备A根据该报文1携带的目的标识b查找该网络设备A的转发表确定该报文1的出端口为端口2,该网络设备A通过该网络设备A的端口2转发修改后的该报文1。该网络设备A通过其端口2转发出的报文1到达网络设备C,网络设备C根据该报文1携带的源路由类型确定该报文1的封装类型为源路由封装,但是根据该报文1携带的源路由有效性标识0确定该报文1中封装的源路由无效,因此该网络设备C确定该报文1不满足源路由转发条件但满足第二转发表转发条件。该网络设备C根据该报文1携带的目的标识b查找该网络设备C的转发表确定该报文1的出端口为端口1,通过该网络设备C的端口1转发该报文1。该网络设备C通过其端口1转发的报文1到达网络设备D,该网络设备D采用与 网络设备C同样的处理方式确定该报文1不满足源路由转发条件但满足第二转发表转发条件,该网络设备D根据该报文1携带的目的标识b查找该网络设备D的转发表确定该报文1的出端口为端口1,通过该网络设备D的端口1转发该报文1。最终该报文1经过网络设备A、网络设备C和网络设备D以转发表转发方式从该源端设备a转发至该目的端设备b。由于网络设备A在确定该网络设备A的端口1(也即是源路由端口)处于非工作状态时,根据该报文1携带的目的标识b对该报文1进行转发,而不是将该报文1丢弃,因此可以避免由于转发路径S1故障导致报文1丢失,保证报文传输的灵活性和可靠性。
在图8所示实施例中,网络设备A在确定该网络设备A的端口1处于非工作状态之后,可以向源端设备a发送故障通知消息以告知该源端设备a该转发路径S1(也即是源路由转发路径)故障。源端设备a接收到该故障通知消息后,根据该故障通知消息设置该转发路径S1为无效转发路径。这样后续该源端设备a可以选择该转发路径S1之外的转发路径向该目的端设备b发送报文,避免该源端设备a选择故障的转发路径向该目的端设备b发送报文,保证报文传输的可靠性。
示例地,请参考图9,其示出了本申请实施例提供的再一种报文传输方法的示意图。该图9示的是源端设备a接收到用于指示转发路径S1故障的故障通知消息后,通过转发路径S2向目的端设备b发送报文的情况。如图9所示,转发路径S2是源端设备a到目的端设备b的第二转发路径(也即是源路由转发路径),源端设备a和目的端设备b均支持源路由封装功能且网络设备A、网络设备C和网络设备D均支持源路由转发功能,因此该源端设备a确定满足源路由封装条件。该源端设备a通过该转发路径S2向该目的端设备b发送报文2,该报文2携带第二源路由信息(也即是,网络设备A-端口2、网络设备C-端口1、网络设备D-端口1)、目的标识b、源路由有效性标识1、源路由类型以及报文负载,其中,该目的标识b指示该目的端设备b,该源路由有效性标识1指示该报文2中封装的源路由有效,该源路由类型指示该报文2的封装类型为源路由封装。该报文2经过网络设备A、网络设备C和网络设备D以源路由转发方式从该源端设备a转发至该目的端设备b。其中,网络设备A、网络设备C和网络设备D以源路由转发方式转发该报文2的实现过程可以参考图7所示实施例,本实施例在此不再赘述。
示例地,请参考图10,其示出了本申请实施例提供的又一种报文传输方法的示意图。该图10以不满足源路由封装条件为例说明。如图10所示,源端设备a可以是双模接入设备,该源端设备a同时支持源路由封装功能和以太封装功能,目的端设备b不支持以源路由封装功能,该源端设备a确定不满足源路由封装条件,该源端设备a向该目的端设备b发送报文3(例如第三报文),该报文3携带目的标识b、以太类型和报文负载,该目的标识b指示该目的端设备b,该以太类型指示该报文3的封装类型为以太封装。
源端设备a发送出的报文3首先到达网络设备A,该网络设备A根据该报文3携带的以太类型确定该报文3的封装类型为以太封装,根据该报文3携带的目的标识b查找该网络设备A的转发表确定该报文3的出端口为端口3,该网络设备A通过该网络设备A的端口3转发该报文3。该网络设备A通过其端口3转发出的报文3到达网络设备E,该网络设备E采用与网络设备A同样的处理方式确定该报文3的出端口为端口1,该网络设备E通过该网络设备E的端口1转发该报文3。该网络设备E通过其端口1转发的报文3到达网络设备D,该网络设备D采用与网络设备A同样的处理方式确定该报文3的出端口为端口1,该网络设 备D通过该网络设备D的端口1转发该报文3。最终该报文3经过网络设备A、网络设备E和网络设备D以转发表转发方式从该源端设备a转发至该目的端设备b。由于源端设备a在确定不满足源路由封装条件的情况下发送以太报文,因此本申请提供的报文传输方法能够与传统的报文传输方法很好的兼容。
上述各个实施例以源路由转发路径(例如转发路径S1、转发路径S2)上的网络设备均支持转发表转发功能和源路由转发功能(也即是源路由转发路径上的网络设备均为双模转发设备)为例说明。本申请实施例中,源路由转发路径上可以存在部分网络设备仅支持转发表转发功能而不支持源路由转发功能(也即是单模转发设备),则作为一种可选实现方式,本申请提供的报文传输方法还可以通过下述图11所示实施例来实现。
示例地,请参考图11,其示出了本申请实施例提供的又一种报文传输方法的示意图。该图11以源路由转发路径上存在不支持源路由转发功能的网络设备为例说明。如图11所示,转发路径S3是源端设备a到目的端设备b的一条源路由转发路径,源端设备a和目的端设备b均支持源路由封装功能,网络设备A、网络设备G和网络设备D均支持源路由转发功能,网络设备F不支持源路由转发功能,该源端设备a通过该转发路径S3向该目的端设备b发送报文4,该报文4携带源路由信息(也即是,网络设备A-端口3、网络设备F-端口1、网络设备G-端口1、网络设备D-端口1)、目的标识b、源路由有效性标识1、源路由类型以及报文负载,其中,该目的标识b指示该目的端设备b,该源路由有效性标识1指示该报文4中封装的源路由有效,该源路由类型指示该报文4的封装类型为源路由封装。
源端设备a发送出的报文4首先到达网络设备A,该网络设备A根据该报文4携带的源路由类型确定该报文4的封装类型为源路由封装,根据该报文4携带的源路由有效性标识1确定该报文4中封装的源路由有效,以及,根据该报文4携带的源路由信息中该网络设备A的端口标识(也即是网络设备A-端口3)确定该报文4的出端口为端口3且该端口3处于工作状态,但是该网络设备A确定其下一跳设备(也即是网络设备F)不支持源路由转发功能,因此该网络设备A根据该报文4携带的目的标识b查找该网络设备A的转发表确定该报文4的出端口为端口3,该网络设备A通过该网络设备A的端口3转发该报文4。该网络设备A通过其端口3转发出的报文4到达网络设备F,由于网络设备F不支持源路由转发功能,因此该网络设备F根据该报文4携带的目的标识b查找该网络设备F的转发表确定该报文4的出端口为端口1,该网络设备F通过该网络设备F的端口1转发该报文4。该网络设备F通过其端口1转发的报文4到达网络设备G,该网络设备G根据该报文4携带的源路由类型确定该报文4的封装类型为源路由封装,根据该报文4携带的源路由有效性标识1确定该报文4中封装的源路由有效,以及,根据该报文4携带的源路由信息中该网络设备G的端口标识(也即是网络设备G-端口1)确定该报文4的出端口为端口1且该端口1处于工作状态,并且该网络设备G确定其下一跳设备(也即是网络设备D)支持源路由转发功能,因此该网络设备G根据该报文4中指示的端口1转发该报文4。最终该报文4经过网络设备A、网络设备F、网络设备G和网络设备D从该源端设备a转发至该目的端设备b。
以上是对本申请报文传输方法的介绍,下面介绍本申请的装置实施例,本申请的装置实施例可以用于执行本申请的方法实施例。对于本申请装置实施例中未披露的细节,请参照本申请方法实施例。
请参考图12,其示出了本申请实施例提供的一种源端设备1200的逻辑结构示意图,该源端设备1200可以是服务器。参见图12,该源端设备1200可以包括但不限于:
发送模块1210,用于发送第一报文,该第一报文携带第一源路由信息和目的标识,该第一源路由信息包括第一转发路径上的各个网络设备的端口标识,该目的标识指示目的端设备,以使得该第一转发路径上的第一网络设备根据该第一源路由信息或该目的标识转发该第一报文,该第一网络设备优先根据该第一源路由信息转发该第一报文。其中,该发送模块1210的功能实现可以参考上述步骤201、步骤301、步骤401以及步骤501的相关描述。
可选地,该第一报文的封装类型为源路由封装,该第一报文还携带源路由有效性标识,该源路由有效性标识指示该第一报文封装的源路由有效或无效。
可选地,请继续参考图12,该源端设备1200还包括:
设置模块1220,用于在发送模块1210发送第一报文之后,如果接收到指示第一转发路径故障的故障通知消息,将该第一转发路径设置为无效转发路径。其中,该设置模块1220的功能实现可以参考上述步骤404的相关描述。
可选地,该发送模块1210,还用于在发送第一报文之后,如果接收到指示第一转发路径故障的故障通知消息,发送第二报文,该第二报文携带第二源路由信息和该目的标识,该第二源路由信息包括第二转发路径上的各个网络设备的端口标识,以使得该第二转发路径上的第二网络设备根据该第二源路由信息或该目的标识转发该第二报文,该第二网络设备优先根据该第二源路由信息转发该第二报文。其中,该发送模块1210的功能实现还可以参考上述步骤405的相关描述。
可选地,该发送模块1210,具体用于在满足源路由封装条件时发送该第一报文;其中,该源路由封装条件包括:该源端设备和该目的端设备均支持源路由封装功能,且该第一转发路径上的网络设备均支持源路由转发功能。
可选地,该发送模块1210,还用于在不满足该源路由封装条件时发送第三报文,该第三报文携带该目的标识,该第三报文的封装类型为以太封装。其中,该发送模块1210的功能实现还可以参考上述步骤601的相关描述。
可选地,请继续参考图12,该源端设备1200还包括:
确定模块1230,用于在发送模块1210发送第一报文之前,根据该源端设备的路径表确定该第一转发路径,其中,该路径表中包括与该目的端设备相关的至少一个路径表项,该至少一个路径表项中的每个路径表项指示该源端设备与该目的端设备之间的一条转发路径。
可选地,请继续参考图12,该源端设备1200还包括:
构建模块1240,用于在确定模块1230根据该源端设备的路径表确定该第一转发路径之前,根据报文传输系统的网络拓扑构建该路径表;或者,接收模块1250,用于在确定模块1230根据该源端设备的路径表确定该第一转发路径之前,从控制设备接收该路径表。
综上所述,本申请实施例的技术方案中,源端设备发送出的报文可以携带源路由信息和目的标识,该源路由信息包括转发路径上的各个网络设备的端口标识,该目的标识指示该目的端设备,该转发路径上的网络设备接收到该报文后,根据该源路由信息或该目的标识转发该报文,且优先根据该源路由信息转发该报文。由此,如果该转发路径未故障,该转发路径上的网络设备可以根据该源路由信息转发该报文,有助于缩短该报文从该源端设备到该目的端设备的传输时延,如果该源路由信息中的端口标识指示的出端口处于非工作状态导致该转发路径故障,该转发路径上的网络设备可以根据该目的标识转发该报文,有助于避免由于该 转发路径故障导致该报文丢失。本申请提供的技术方案可以降低丢包率且缩短报文传输时延,有助于提高报文传输的灵活性和可靠性。
请参考图13,其示出了本申请实施例提供的一种目标网络设备1300的逻辑结构示意图,该目标网络设备1300可以是交换机或路由器,且该目标网络设备1300可以是上述实施例所述的第一网络设备、第二网络设备或第三网络设备。参见图13,该目标网络设备1300可以包括但不限于:
转发模块1310,用于在接收到携带第一源路由信息和目的标识的第一报文时,根据该第一源路由信息或该目的标识转发该第一报文,且优先根据该第一源路由信息转发该第一报文;
其中,该第一源路由信息包括第一转发路径上的各个网络设备的端口标识,该目的标识指示目的端设备。其中,该转发模块1310的功能实现可以参考上述步骤202、步骤302、步骤402以及步骤502的相关描述。
可选地,该转发模块1310,具体用于:如果该第一报文满足源路由转发条件,根据该第一源路由信息转发该第一报文;如果该第一报文不满足该源路由转发条件但满足转发表转发条件,根据该目的标识转发该第一报文。
可选地,该第一报文的封装类型为源路由封装,该第一报文还携带源路由有效性标识,该源路由有效性标识指示该第一报文封装的源路由有效或无效。
可选地,源路由转发条件包括:该源路由有效性标识指示该第一报文封装的源路由有效,且该第一源路由信息中的该目标网络设备的端口标识指示的出端口处于工作状态。
可选地,转发表转发条件包括:该源路由有效性标识指示该第一报文封装的源路由无效。
可选地,转发表转发条件包括:该源路由有效性标识指示该第一报文封装的源路由有效,但该第一源路由信息中的该目标网络设备的端口标识指示的出端口处于非工作状态。
可选地,该转发模块1310,具体用于:如果该第一报文不满足该源路由转发条件但满足该转发表转发条件,设置该源路由有效性标识指示该第一报文封装的源路由无效;根据该目的标识转发该第一报文。
可选地,请继续参考图13,该目标网络设备1300还包括:
发送模块1320,用于如果该第一报文不满足该源路由转发条件但满足该转发表转发条件,向该源端设备发送故障通知消息,该故障通知消息指示该第一转发路径故障。其中,该发送模块1320的功能实现可以参考上述步骤403的相关描述。
可选地,该转发模块1310,还用于在接收到携带第二源路由信息和该目的标识的第二报文时,根据该第二源路由信息或该目的标识转发该第二报文,且优先根据该第二源路由信息转发该第二报文;其中,该第二源路由信息包括第二转发路径上的各个网络设备的端口标识。其中,该转发模块1310的功能实现还可以参考上述步骤406的相关描述。
可选地,请继续参考图13,该目标网络设备1300还包括:
构建模块1330,用于在转发模块1310根据目的标识转发第一报文之前根据报文传输系统的网络拓扑构建转发表;或者,接收模块1340,用于在转发模块1310根据目的标识转发第一报文之前从控制设备接收转发表;其中,该转发表中包括至少一个转发表项,该至少一个转发表项中的每个转发表项指示一个目的标识与该目标网络设备的一个端口的映射关系。
可选地,该转发模块1310,还用于在接收到携带该目的标识的第三报文时,根据该目的 标识转发该第三报文,该第三报文的封装类型为以太封装。其中,该转发模块1310的功能实现还可以参考上述步骤602的相关描述。
综上所述,本申请实施例的技术方案中,源端设备发送出的报文可以携带源路由信息和目的标识,该源路由信息包括转发路径上的各个网络设备的端口标识,该目的标识指示该目的端设备,该转发路径上的网络设备接收到该报文后,根据该源路由信息或该目的标识转发该报文,且优先根据该源路由信息转发该报文。由此,如果该转发路径未故障,该转发路径上的网络设备可以根据该源路由信息转发该报文,有助于缩短该报文从该源端设备到该目的端设备的传输时延,如果该源路由信息中的端口标识指示的出端口处于非工作状态导致该转发路径故障,该转发路径上的网络设备可以根据该目的标识转发该报文,有助于避免由于该转发路径故障导致该报文丢失。本申请提供的技术方案可以降低丢包率且缩短报文传输时延,有助于提高报文传输的灵活性和可靠性。
应理解的是,本申请实施例提供的源端设备和目标网络设备还可以用专用集成电路(application-specific integrated circuit,ASIC)实现,或可编程逻辑器件(programmable logic device,PLD)实现,上述PLD可以是复杂程序逻辑器件(complex programmable logical device,CPLD),现场可编程门阵列(field-programmable gate array,FPGA),通用阵列逻辑(generic array logic,GAL)或其任意组合。也可以通过软件实现上述方法实施例提供的报文传输方法,当通过软件实现上述方法实施例提供的报文传输方法时,该源端设备以及目标网络设备中的各个模块也可以为软件模块。
请参考图14,其示出了本申请实施例提供的一种通信设备1400的硬件结构示意图。该通信设备1400可以是服务器或网络设备,例如,该通信设备1400可以是前述实施例中所述的源端设备或目标网络设备。参见图14,该通信设备1400包括处理器1402、存储器1404、通信接口1406和总线1408,处理器1402、存储器1404和通信接口1406通过总线1408彼此通信连接。本领域技术人员应当明白,图14所示的处理器1402、存储器1404和通信接口1406之间的连接方式仅仅是示例性的,在实现过程中,处理器1402、存储器1404和通信接口1406也可以采用除了总线1408之外的其他连接方式彼此通信连接。
其中,存储器1404可以用于存储计算机程序14042,该计算机程序14042可以包括指令和数据。在本申请实施例中,存储器1404可以是各种类型的存储介质,例如,随机存取存储器(random access memory,RAM)、只读存储器(read-only memory,ROM)、非易失性RAM(non-volatile RAM,NVRAM)、可编程ROM(programmable ROM,PROM)、可擦除PROM(erasable PROM,EPROM)、电可擦除PROM(electrically erasable PROM,EEPROM)、闪存、光存储器和寄存器等。并且,该存储器1404可以包括硬盘和/或内存。
其中,处理器1402可以是通用处理器,通用处理器可以是通过读取并执行存储器(例如存储器1404)中存储的计算机程序(例如计算机程序14042)来执行特定步骤和/或操作的处理器,通用处理器在执行上述步骤和/或操作的过程中可能用到存储在存储器(例如存储器1404)中的数据。该存储的计算机程序例如可以被执行以实现前述设置模块1220、确定模块1240、构建模块1240以及构建模块1330的相关功能。通用处理器可以是,例如但不限于CPU。此外,处理器1402也可以是专用处理器,专用处理器可以是专门设计的用于执行特定步骤和/或操作的处理器,该专用处理器可以是,例如但不限于,数字信号处理器 (digital signal processor,DSP)、ASIC和FPGA等。此外,处理器1402还可以是多个处理器的组合,例如多核处理器。处理器1402可以包括至少一个电路,以执行上述实施例提供的报文传输方法的全部或部分步骤。
其中,通信接口1406可以包括输入/输出(input/output,I/O)接口、物理接口和逻辑接口等用于实现通信设备1400内部的器件互连的接口,以及用于实现通信设备1400与其他设备(例如网络设备或服务器)互连的接口。物理接口可以是千兆的以太接口(gigabit Ethernet,GE),其可以用于实现通信设备1400与其他设备(例如网络设备或服务器)互连,逻辑接口是通信设备1400内部的接口,其可以用于实现通信设备1400内部的器件互连。容易理解,通信接口1406可以用于通信设备1400与其他网络设备和/或服务器通信,例如,通信接口1406用于通信设备1400与其他网络设备之间报文的发送和接收,该通信接口1406可以实现前述发送模块1210、接收模块1250、转发模块1310、发送模块1320以及接收模块1340的相关功能。
其中,总线1408可以是任何类型的,用于实现处理器1402、存储器1404和通信接口1406互连的通信总线,例如系统总线。
上述器件可以分别设置在彼此独立的芯片上,也可以至少部分的或者全部的设置在同一块芯片上。将各个器件独立设置在不同的芯片上,还是整合设置在一个或者多个芯片上,往往取决于产品设计的需要。本申请实施例对上述器件的具体实现形式不做限定。
图14所示的通信设备1400仅仅是示例性的,在实现过程中,通信设备1400还可以包括其他组件,本文不再一一列举。该图14所示的通信设备1400可以通过执行上述实施例提供的报文传输方法的全部或部分步骤来传输报文。
请参考图15,其示出了本申请实施例提供的一种网络设备1500的硬件结构示意图。该网络设备1500可以为上述实施例中所述的目标网络设备。该网络设备1500可以为交换机,路由器或者其他转发报文的网络设备。在该实施例中,该网络设备1500包括:主控板1510、接口板1530和接口板1540。多个接口板的情况下可以包括交换网板(图中未示出),该交换网板用于完成各接口板(接口板也称为线卡或业务板)之间的数据交换。
主控板1510用于完成系统管理、设备维护、协议处理等功能。接口板1530和接口板1540用于提供各种业务接口(例如,POS接口、GE接口、ATM接口等),并实现报文的转发。主控板1510上主要有3类功能单元:系统管理控制单元、系统时钟单元和系统维护单元。主控板1510、接口板1530以及接口板1540之间通过系统总线与系统背板相连实现互通。接口板1530上包括一个或多个处理器1531。处理器1531用于对接口板进行控制管理并与主控板1510上的中央处理器1512进行通信,以及用于报文的转发处理。接口板1530上的存储器1532用于存储转发表,处理器1531通过查找存储器1532中存储的转发表进行报文的转发。
该接口板1530包括一个或多个网络接口1533用于接收上一跳节点发送的报文,并根据处理器1531的指示向下一跳节点发送处理后的报文。具体实现过程这里不再逐一赘述。所述处理器1531的具体功能这里同样不再逐一赘述。
可以理解,如图15所示,本实施例中包括多个接口板,采用分布式的转发机制, 这种机制下,接口板1540上的操作与所述接口板1530的操作基本相似,为了简洁,不再赘述。此外,可以理解的是,图15中的接口板1530中的处理器1531和/或处理器1541可以是专用硬件或芯片,如网络处理器或者专用集成电路来实现上述功能,这种实现方式即为通常所说的转发面采用专用硬件或芯片处理的方式。在另外的实施方式中,所述处理器1531和/或处理器1541也可以采用通用的处理器,如通用的CPU来实现以上描述的功能。
此外,需要说明的是,主控板可能有一块或多块,有多块的时候可以包括主用主控板和备用主控板。接口板可能有一块或多块,该设备的数据处理能力越强,提供的接口板越多。多块接口板的情况下,该多块接口板之间可以通过一块或多块交换网板通信,有多块的时候可以共同实现负荷分担冗余备份。在集中式转发架构下,该设备可以不需要交换网板,接口板承担整个系统的业务数据的处理功能。在分布式转发架构下,该设备包括多块接口板,可以通过交换网板实现多块接口板之间的数据交换,提供大容量的数据交换和处理能力。所以,分布式架构的网络设备的数据接入和处理能力要大于集中式架构的设备。具体采用哪种架构,取决于具体的组网部署场景,此处不做任何限定。
具体的实施例中,存储器1532可以是ROM或可存储静态信息和指令的其它类型的静态存储设备,RAM或者可存储信息和指令的其它类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only Memory,CD-ROM)或其它光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘或者其它磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其它介质,但不限于此。存储器1532可以是独立存在,通过通信总线与处理器1531相连接。存储器1532也可以和处理器1531集成在一起。
存储器1532用于存储程序代码,并由处理器1531来控制执行,以执行上述实施例所提供的报文传输方法。处理器1531用于执行存储器1532中存储的程序代码。程序代码中可以包括一个或多个软件模块。这一个或多个软件模块可以为上述图13实施例中提供的功能模块。
具体实施例中,该网络接口1533,可以是使用任何收发器一类的装置,用于与其它设备或通信网络通信,如以太网,无线接入网(radio access network,RAN),无线局域网(wireless local area networks,WLAN)等。
请参考图16,其示出了本申请实施例提供的一种报文传输系统1600的结构示意图。该报文传输系统1600包括源端设备1610、目的端设备1620和多个网络设备1630~1650。
该源端设备1610用于发送第一报文,该第一报文携带第一源路由信息和目的标识,该第一源路由信息包括第一转发路径上的各个网络设备的端口标识,该目的标识指示该目的端设备1620;该第一转发路径上的第一网络设备(例如网络设备1630)用于在接收到该第一报文时,根据该第一源路由信息或该目的标识转发该第一报文,且优先根据该第一源路由信息转发该第一报文。
可选地,该第一网络设备(例如网络设备1630)用于如果该第一报文满足源路由转发条件,根据该第一源路由信息转发该第一报文,如果该第一报文不满足该源路由转发条件但满足转发表转发条件,根据该目的标识转发该第一报文。
可选地,该第一报文的封装类型为源路由封装,该第一报文还携带源路由有效性标识,该源路由有效性标识指示该第一报文封装的源路由有效或无效。该源路由转发条件包括:该源路由有效性标识指示该第一报文封装的源路由有效,且该第一源路由信息中的该第一网络设备(例如网络设备1630)的端口标识指示的出端口处于工作状态,例如,UP状态。该转发表转发条件包括:该源路由有效性标识指示该第一报文封装的源路由无效;或者,该源路由有效性标识指示该第一报文封装的源路由有效,但该第一源路由信息中的该第一网络设备(例如网络设备1630)的端口标识指示的出端口处于非工作状态,例如,DOWN状态。
可选地,该转发表转发条件包括:该源路由有效性标识指示该第一报文封装的源路由有效,但该第一源路由信息中的该第一网络设备(例如网络设备1630)的端口标识指示的出端口处于非工作状态,该第一网络设备(例如网络设备1630)具体用于:如果该第一报文不满足源路由转发条件但满足该转发表转发条件,设置该源路由有效性标识指示该第一报文封装的源路由无效,根据该目的标识转发该第一报文。
可选地,该转发表转发条件包括:该源路由有效性标识指示该第一报文封装的源路由有效,但该第一源路由信息中的该第一网络设备(例如网络设备1630)的端口标识指示的出端口处于非工作状态,该第一网络设备(例如网络设备1630)还用于如果该第一报文不满足源路由转发条件但满足该转发表转发条件,向源端设备1610发送故障通知消息,该故障通知消息指示该第一转发路径故障。
可选地,该源端设备1610还用于在接收到该故障通知消息之后,将该第一转发路径设置为无效转发路径。
可选地,该源端设备1610还用于在接收到该故障通知消息之后,发送第二报文,该第二报文携带第二源路由信息和该目的标识,该第二源路由信息包括第二转发路径上的各个网络设备的端口标识;该第二转发路径上的第二网络设备(例如网络设备1640)用于在接收到该第二报文时,根据该第二源路由信息或该目的标识转发该第二报文,且优先根据该第二源路由信息转发该第二报文。
可选地,该源端设备1610具体用于在满足源路由封装条件时发送第一报文;其中,该源路由封装条件包括:该源端设备1610和该目的端设备1620均支持源路由封装功能,且该第一转发路径上的网络设备均支持源路由转发功能。
可选地,该源端设备1610还用于在不满足该源路由封装条件时发送第三报文,该第三报文携带该目的标识,该第三报文的封装类型为以太封装。
可选地,该源端设备1610还用于在发送第一报文之前,根据该源端设备1610的路径表确定第一转发路径;其中,该路径表中包括与目的端设备1620相关的至少一个路径表项,该至少一个路径表项中的每个路径表项指示该源端设备1610与该目的端设备1620之间的一条转发路径。
可选地,该源端设备1610还用于在根据该源端设备1610的路径表确定该第一转发路径之前,根据该报文传输系统1600的网络拓扑构建该路径表,或者,从控制设备接收该路径表。
可选地,该第一网络设备(例如网络设备1630)还用于在根据该目的标识转发该第一报 文之前,根据该报文传输系统1600的网络拓扑构建转发表,或者,从控制设备接收转发表;其中,该转发表中包括至少一个转发表项,该至少一个转发表项中的每个转发表项指示一个目的标识与该第一网络设备的一个端口的映射关系。
可选地,第一网络设备(例如网络设备1630)用于在接收到第一报文时,如果该第一报文满足源路由转发条件但该第一网络设备(例如网络设备1630)的第一跳设备不支持源路由转发功能,根据该第一报文携带的目的标识转发该第一报文,该第一跳设备为该第一网络设备(例如网络设备1630)的下一跳设备;
该第一跳设备用于在接收到该第一报文时,根据该第一报文携带的目的标识转发该第一报文;
该第一网络设备(例如网络设备1630)的第二跳设备用于在接收到该第一报文时,如果该第一报文满足源路由转发条件且该第一网络设备(例如网络设备1630)的第三跳设备支持源路由转发功能,根据该第一报文携带的第一源路由信息转发该第一报文,该第二跳设备为该第一跳设备的下一跳设备,该第三跳设备为该第二跳设备的下一跳设备。
综上所述,本申请实施例的技术方案中,源端设备发送出的报文可以携带源路由信息和目的标识,该源路由信息包括转发路径上的各个网络设备的端口标识,该目的标识指示该目的端设备,该转发路径上的网络设备接收到该报文后,根据该源路由信息或该目的标识转发该报文,且优先根据该源路由信息转发该报文。由此,如果该转发路径未故障,该转发路径上的网络设备可以根据该源路由信息转发该报文,有助于缩短该报文从该源端设备到该目的端设备的传输时延,如果该源路由信息中的端口标识指示的出端口处于非工作状态导致该转发路径故障,该转发路径上的网络设备可以根据该目的标识转发该报文,有助于避免由于该转发路径故障导致该报文丢失。本申请提供的技术方案可以避免报文丢失且缩短报文传输时延,有助于提高报文传输的灵活性和可靠性。
本申请实施例提供了一种报文传输系统,包括:源端设备和目标网络设备;该源端设备为如图12所示的源端设备1200,该目标网络设备为如图13所示的目标网络设备1300;或者,该源端设备和该目标网络设备中的至少一个为如图14所示的通信设备1400;或者,该目标网络设备为如图15所示的网络设备1500。可选地,该源端设备是服务器,该目标网络设备是转发设备,例如,交换机或路由器。
本申请实施例提供了一种计算机可读存储介质,该计算机可读存储介质内存储有计算机程序,当该计算机程序被处理器执行时实现如上述方法实施例提供的报文传输方法的全部或部分步骤。
本申请实施例提供了一种包含指令的计算机程序产品,当该计算机程序产品在计算机上运行时,使得该计算机执行如上述方法实施例提供的报文传输方法的全部或部分步骤。
本申请实施例提供了一种芯片,该芯片包括可编程逻辑电路和/或程序指令,当该芯片运行时用于实现如上述方法实施例提供的报文传输方法的全部或部分步骤。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实 现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现,所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机的可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者包含一个或多个可用介质集成的服务器、数据中心等数据存储装置。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质,或者半导体介质(例如固态硬盘)等。
在本申请中,术语“第一”和“第二”等仅用于描述目的,而不能理解为指示或暗示相对重要性。术语“至少一个”指一个或多个,“多个”指两个或两个以上,除非另有明确的限定。
本申请实施例提供的方法实施例和装置实施例等不同类型的实施例均可以相互参考,本申请实施例对此不做限定。本申请实施例提供的方法实施例操作的先后顺序能够进行适当调整,操作也能够根据情况进行响应增减,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化的方法,都应涵盖在本申请的保护范围之内,因此不再赘述。
在本申请提供的相应实施例中,应该理解到,所揭露的装置等可以通过其它的构成方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过些接口,装置或单元的间接耦合或通信连接,可以是电性或其它的形式。
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元描述的部件可以是或者也可以不是物理单元,既可以位于一个地方,或者也可以分布到多个网络设备(例如终端设备)上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
以上所述,仅为本申请的示例性实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。

Claims (30)

  1. 一种报文传输系统,其特征在于,包括:源端设备、目的端设备和多个网络设备;
    所述源端设备用于发送第一报文,所述第一报文携带第一源路由信息和目的标识,所述第一源路由信息包括第一转发路径上的各个网络设备的端口标识,所述目的标识指示所述目的端设备;
    所述第一转发路径上的第一网络设备用于在接收到所述第一报文时,根据所述第一源路由信息或所述目的标识转发所述第一报文,且优先根据所述第一源路由信息转发所述第一报文。
  2. 根据权利要求1所述的系统,其特征在于,
    所述第一网络设备用于如果所述第一报文满足源路由转发条件,根据所述第一源路由信息转发所述第一报文,如果所述第一报文不满足所述源路由转发条件但满足转发表转发条件,根据所述目的标识转发所述第一报文。
  3. 根据权利要求2所述的系统,其特征在于,
    所述第一报文的封装类型为源路由封装,所述第一报文还携带源路由有效性标识,所述源路由有效性标识指示所述第一报文封装的源路由有效或无效。
  4. 根据权利要求3所述的系统,其特征在于,
    所述源路由转发条件包括:所述源路由有效性标识指示所述第一报文封装的源路由有效,且所述第一源路由信息中的所述第一网络设备的端口标识指示的出端口处于工作状态。
  5. 根据权利要求3所述的系统,其特征在于,
    所述转发表转发条件包括:所述源路由有效性标识指示所述第一报文封装的源路由无效。
  6. 根据权利要求3所述的系统,其特征在于,
    所述转发表转发条件包括:所述源路由有效性标识指示所述第一报文封装的源路由有效,但所述第一源路由信息中的所述第一网络设备的端口标识指示的出端口处于非工作状态。
  7. 根据权利要求6所述的系统,其特征在于,
    所述第一网络设备具体用于:如果所述第一报文不满足所述源路由转发条件但满足所述转发表转发条件,设置所述源路由有效性标识指示所述第一报文封装的源路由无效,根据所述目的标识转发所述第一报文。
  8. 根据权利要求6或7所述的系统,其特征在于,
    所述第一网络设备还用于如果所述第一报文不满足所述源路由转发条件但满足所述转发表转发条件,向所述源端设备发送故障通知消息,所述故障通知消息指示所述第一转发路径故障。
  9. 根据权利要求8所述的系统,其特征在于,
    所述源端设备还用于在接收到所述故障通知消息之后,将所述第一转发路径设置为无效转发路径。
  10. 根据权利要求9所述的系统,其特征在于,
    所述源端设备还用于在接收到所述故障通知消息之后,发送第二报文,所述第二报文携带第二源路由信息和所述目的标识,所述第二源路由信息包括第二转发路径上的各个网络设备的端口标识;
    所述第二转发路径上的第二网络设备用于在接收到所述第二报文时,根据所述第二源路由信息或所述目的标识转发所述第二报文,且优先根据所述第二源路由信息转发所述第二报文。
  11. 根据权利要求1至10任一项所述的系统,其特征在于,
    所述源端设备具体用于在满足源路由封装条件时发送所述第一报文;
    其中,所述源路由封装条件包括:所述源端设备和所述目的端设备均支持源路由封装功能,且所述第一转发路径上的网络设备均支持源路由转发功能。
  12. 根据权利要求11所述的系统,其特征在于,
    所述源端设备还用于在不满足所述源路由封装条件时发送第三报文,所述第三报文携带所述目的标识,所述第三报文的封装类型为以太封装。
  13. 一种报文传输方法,其特征在于,应用于源端设备,所述方法包括:
    发送第一报文,所述第一报文携带第一源路由信息和目的标识,所述第一源路由信息包括第一转发路径上的各个网络设备的端口标识,所述目的标识指示目的端设备,以使得所述第一转发路径上的第一网络设备根据所述第一源路由信息或所述目的标识转发所述第一报文,所述第一网络设备优先根据所述第一源路由信息转发所述第一报文。
  14. 根据权利要求13所述的方法,其特征在于,
    所述第一报文的封装类型为源路由封装,所述第一报文还携带源路由有效性标识,所述源路由有效性标识指示所述第一报文封装的源路由有效或无效。
  15. 根据权利要求13或14所述的方法,其特征在于,所述方法还包括:
    在发送所述第一报文之后,如果接收到指示所述第一转发路径故障的故障通知消息,将所述第一转发路径设置为无效转发路径。
  16. 根据权利要求13至15任一项所述的方法,其特征在于,所述方法还包括:
    在发送所述第一报文之后,如果接收到指示所述第一转发路径故障的故障通知消息,发送第二报文,所述第二报文携带第二源路由信息和所述目的标识,所述第二源路由信息包括第二转发路径上的各个网络设备的端口标识,以使得所述第二转发路径上的第二网络设备根 据所述第二源路由信息或所述目的标识转发所述第二报文,所述第二网络设备优先根据所述第一源路由信息转发所述第二报文。
  17. 根据权利要求13至16任一项所述的方法,其特征在于,
    所述发送第一报文,包括:在满足源路由封装条件时发送所述第一报文;
    其中,所述源路由封装条件包括:所述源端设备和所述目的端设备均支持源路由封装功能,且所述第一转发路径上的网络设备均支持源路由转发功能。
  18. 根据权利要求17所述的方法,其特征在于,所述方法还包括:
    在不满足所述源路由封装条件时发送第三报文,所述第三报文携带所述目的标识,所述第三报文的封装类型为以太封装。
  19. 一种报文传输方法,其特征在于,应用于目标网络设备,所述方法包括:
    在接收到携带第一源路由信息和目的标识的第一报文时,根据所述第一源路由信息或所述目的标识转发所述第一报文,且优先根据所述第一源路由信息转发所述第一报文;
    其中,所述第一源路由信息包括第一转发路径上的各个网络设备的端口标识,所述目的标识指示目的端设备。
  20. 根据权利要求19所述的方法,其特征在于,
    所述根据所述第一源路由信息或所述目的标识转发所述第一报文,且优先根据所述第一源路由信息转发所述第一报文,包括:
    如果所述第一报文满足源路由转发条件,根据所述第一源路由信息转发所述第一报文;
    如果所述第一报文不满足所述源路由转发条件但满足转发表转发条件,根据所述目的标识转发所述第一报文。
  21. 根据权利要求20所述的方法,其特征在于,
    所述第一报文的封装类型为源路由封装,所述第一报文还携带源路由有效性标识,所述源路由有效性标识指示所述第一报文封装的源路由有效或无效。
  22. 根据权利要求21所述的方法,其特征在于,
    所述源路由转发条件包括:所述源路由有效性标识指示所述第一报文封装的源路由有效,且所述第一源路由信息中的所述目标网络设备的端口标识指示的出端口处于工作状态。
  23. 根据权利要求21所述的方法,其特征在于,
    所述转发表转发条件包括:所述源路由有效性标识指示所述第一报文封装的源路由无效。
  24. 根据权利要求21所述的方法,其特征在于,
    所述转发表转发条件包括:所述源路由有效性标识指示所述第一报文封装的源路由有效,但所述第一源路由信息中的所述目标网络设备的端口标识指示的出端口处于非工作状 态。
  25. 根据权利要求24所述的方法,其特征在于,
    所述如果所述第一报文不满足所述源路由转发条件但满足转发表转发条件,根据所述目的标识转发所述第一报文,包括:
    如果所述第一报文不满足所述源路由转发条件但满足所述转发表转发条件,设置所述源路由有效性标识指示所述第一报文封装的源路由无效;
    根据所述目的标识转发所述第一报文。
  26. 根据权利要求24或25所述的方法,其特征在于,所述方法还包括:
    如果所述第一报文不满足所述源路由转发条件但满足所述转发表转发条件,向所述源端设备发送故障通知消息,所述故障通知消息指示所述第一转发路径故障。
  27. 根据权利要求19至26任一项所述的方法,其特征在于,所述方法还包括:
    在接收到携带第二源路由信息和所述目的标识的第二报文时,根据所述第二源路由信息或所述目的标识转发所述第二报文,且优先根据所述第二源路由信息转发所述第二报文;
    其中,所述第二源路由信息包括第二转发路径上的各个网络设备的端口标识。
  28. 根据权利要求19至27任一项所述的方法,其特征在于,所述方法还包括:
    在接收到携带所述目的标识的第三报文时,根据所述目的标识转发所述第三报文,所述第三报文的封装类型为以太封装。
  29. 一种通信设备,其特征在于,包括存储器和处理器;
    所述存储器用于存储计算机程序;
    所述处理器用于执行所述存储器中存储的计算机程序以执行如权利要求13至18任一项所述的报文传输方法,或者,执行如权利要求19至28任一项所述的报文传输方法。
  30. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求13至18任一项所述的报文传输方法,或者,执行如权利要求19至28任一项所述的报文传输方法。
PCT/CN2021/133526 2020-12-08 2021-11-26 报文传输方法、设备及系统 WO2022121707A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP21902414.8A EP4246919A4 (en) 2020-12-08 2021-11-26 PACKET TRANSMISSION METHOD, DEVICE AND SYSTEM
US18/329,878 US12273265B2 (en) 2020-12-08 2023-06-06 Packet transmission method, device, and system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011443680.6 2020-12-08
CN202011443680.6A CN114615179A (zh) 2020-12-08 2020-12-08 报文传输方法、设备及系统

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/329,878 Continuation US12273265B2 (en) 2020-12-08 2023-06-06 Packet transmission method, device, and system

Publications (1)

Publication Number Publication Date
WO2022121707A1 true WO2022121707A1 (zh) 2022-06-16

Family

ID=81856017

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/133526 WO2022121707A1 (zh) 2020-12-08 2021-11-26 报文传输方法、设备及系统

Country Status (4)

Country Link
US (1) US12273265B2 (zh)
EP (1) EP4246919A4 (zh)
CN (1) CN114615179A (zh)
WO (1) WO2022121707A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024027269A1 (zh) * 2022-07-30 2024-02-08 华为技术有限公司 一种报文传输方法和装置

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114650242B (zh) * 2020-12-21 2025-05-09 华为技术有限公司 路径故障检测方法、装置、相关设备及存储介质
CN117792877A (zh) * 2022-09-27 2024-03-29 华为技术有限公司 一种报文传输方法及装置
CN119420689B (zh) * 2025-01-02 2025-05-30 阿里云飞天(杭州)云计算技术有限公司 网络通信系统及方法、设备、存储介质及程序产品

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020024974A1 (en) * 2000-07-31 2002-02-28 Georgios Karagiannis Jitter reduction in Differentiated Services (DiffServ) networks
CN101562531A (zh) * 2008-04-15 2009-10-21 中国移动通信集团公司 一种网络故障处理方法、系统及路由器
US20120307629A1 (en) * 2011-06-01 2012-12-06 Cisco Technology, Inc. Source routing convergence in constrained computer networks
US20130215739A1 (en) * 2012-02-21 2013-08-22 Yikun Zhang Routing method for a wireless multi-hop network

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6496503B1 (en) * 1999-06-01 2002-12-17 Intel Corporation Device initialization and operation using directed routing
US20190253341A1 (en) * 2018-02-15 2019-08-15 128 Technology, Inc. Service Related Routing Method and Apparatus

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020024974A1 (en) * 2000-07-31 2002-02-28 Georgios Karagiannis Jitter reduction in Differentiated Services (DiffServ) networks
CN101562531A (zh) * 2008-04-15 2009-10-21 中国移动通信集团公司 一种网络故障处理方法、系统及路由器
US20120307629A1 (en) * 2011-06-01 2012-12-06 Cisco Technology, Inc. Source routing convergence in constrained computer networks
US20130215739A1 (en) * 2012-02-21 2013-08-22 Yikun Zhang Routing method for a wireless multi-hop network

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4246919A4 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024027269A1 (zh) * 2022-07-30 2024-02-08 华为技术有限公司 一种报文传输方法和装置

Also Published As

Publication number Publication date
CN114615179A (zh) 2022-06-10
EP4246919A1 (en) 2023-09-20
US12273265B2 (en) 2025-04-08
EP4246919A4 (en) 2024-04-24
US20230318971A1 (en) 2023-10-05

Similar Documents

Publication Publication Date Title
WO2022121707A1 (zh) 报文传输方法、设备及系统
CN111901235B (zh) 处理路由的方法和装置、以及数据传输的方法和装置
US8672566B2 (en) Node apparatus and communication method
WO2021043181A1 (zh) 一种数据传输方法及装置
US20220124025A1 (en) Method for forwarding packet in data center network and related apparatus
CN113472646B (zh) 一种数据传输方法、节点、网络管理器及系统
WO2020119644A1 (zh) 一种转发表项生成方法、装置及设备
WO2020173424A1 (zh) 报文处理的方法和网关设备
CN114760165B (zh) 报文传输方法、设备及系统
CN114124753B (zh) 一种报文发送方法及设备
US11463349B2 (en) Fault diagnosis method and apparatus thereof
CN113872868B (zh) 通知消息传输方法、装置及系统、存储介质
WO2022257854A1 (zh) 一种报文发布方法、转发路径处理方法及装置
JP7273125B2 (ja) BIERv6パケットを送信するための方法および第1のネットワークデバイス
CN104348737B (zh) 一种组播报文的传输方法及交换机
KR20240022456A (ko) 메시지 처리 방법, 디바이스, 네트워크 기기 및 매체
JP7528373B2 (ja) パケット送信方法、対応関係取得方法、装置、およびシステム
WO2023093513A1 (zh) 路径感知方法、装置及系统
WO2023160124A1 (zh) 确定路径的方法和装置
CN114640615B (zh) 一种路由通告方法、路由生成方法及设备
CN116234063A (zh) 一种数据传输方法和装置
CN103856400A (zh) FCoE报文转发方法、设备及系统
CN115242699A (zh) 报文传输方法、切片生成方法、装置及系统
CN115150320B (zh) 报文传输方法、装置及系统
CN113132129A (zh) 网络管理方法、装置及系统、存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21902414

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021902414

Country of ref document: EP

Effective date: 20230616

NENP Non-entry into the national phase

Ref country code: DE