WO2022061561A1 - 一种报文传输方法及装置 - Google Patents

一种报文传输方法及装置 Download PDF

Info

Publication number
WO2022061561A1
WO2022061561A1 PCT/CN2020/117003 CN2020117003W WO2022061561A1 WO 2022061561 A1 WO2022061561 A1 WO 2022061561A1 CN 2020117003 W CN2020117003 W CN 2020117003W WO 2022061561 A1 WO2022061561 A1 WO 2022061561A1
Authority
WO
WIPO (PCT)
Prior art keywords
network device
packet
control entry
network
identifier
Prior art date
Application number
PCT/CN2020/117003
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 PCT/CN2020/117003 priority Critical patent/WO2022061561A1/zh
Priority to CN202080105163.XA priority patent/CN116158062A/zh
Priority to BR112023005185A priority patent/BR112023005185A2/pt
Priority to EP20954415.4A priority patent/EP4210290A4/en
Priority to JP2023518432A priority patent/JP2023542219A/ja
Priority to MX2023003359A priority patent/MX2023003359A/es
Publication of WO2022061561A1 publication Critical patent/WO2022061561A1/zh
Priority to US18/187,437 priority patent/US20230224245A1/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/02Topology update or discovery
    • H04L45/033Topology update or discovery by updating distance vector protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • H04L45/04Interdomain routing, e.g. hierarchical 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/38Flow based 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/56Routing software
    • H04L45/566Routing instructions carried by the data packet, e.g. active networks

Definitions

  • the present application relates to the field of communication technologies, and in particular, to a message transmission method and device.
  • IBGP internal border gateway protocol
  • AS autonomous system
  • the four routers can form IBGP peers.
  • IBGP connections need to be established.
  • the AS includes many routers, a large number of IBGP connections need to be established, which consumes a lot of network resources and controller resources.
  • a route transmission scheme is proposed. Specifically, in an AS, one of the routers is used as a route reflector (router reflector, RR), and the other routers are used as clients to establish IBGP connections with the RR respectively.
  • RR route reflector
  • R0 is used as the RR
  • IBGP connections are established with R1, R2, and R3, respectively
  • R1, R2, and R3 are the clients of the RR.
  • each client actually only needs to process the routing information related to its service requirements. to discard. Therefore, each client needs to configure a routing filtering policy adapted to the local machine, so that the client can filter unnecessary routing information according to the configured routing filtering policy.
  • the amount of routing information reflected by the RR will increase exponentially, which requires higher device processing capabilities of the RR, which will aggravate network congestion; The workload will also increase greatly, and different clients often need to configure different routing filtering policies, which is difficult to maintain.
  • embodiments of the present application provide a packet transmission method and device, so as to reduce the amount of routing information reflected by the RR, reduce network congestion, and simplify service deployment.
  • a first aspect provides a packet transmission method, the method includes: a first network device obtains at least one control entry, the at least one control entry is located in at least one first packet, the at least one first packet respectively include the device identifier of the network device to which the first packet is to be sent; the first network device is identified as the second network device according to the device identifier included in some or all of the at least one first packet the device identifier, and determine the target control entry sent to the second network device, where the target control entry is one or more control entries in the at least one control entry; the first network device sends the second network device to the second network device.
  • the network device sends at least one second packet, the target control entry is located in the at least one second packet, and the at least one second packet respectively includes a device identifier of the second network device.
  • the first network device may identify the device as the device of the second network device according to the device in the first packet where the control entries are located. identify, determine the target control entry to be sent to the second network device, and then send one or more second packets including the target control entry to the second network device, so that the second network device only obtains the control entry required by itself . Therefore, not only can the pressure of the first network device to issue the control entry be reduced, but also the network congestion can be reduced. At the same time, there is no need to deploy filtering policies on the second network device, which simplifies service deployment.
  • the first network device is a route reflection device.
  • the second network device is a route reflection device, or the second network device is a client device.
  • the first network device when a first-level route reflection device exists in the application scenario, the first network device is a route reflection device, and the second network device is a client device; when there is a second-level route reflection device in the application scenario, the first network device is a route reflection device. It is a first-level route reflection device, and the second network device is a second-level route reflection device.
  • the at least one second packet further includes a device identifier of the third network device, and the device identifier of the third network device uses instructing the second network device to determine a control entry to the third network device from the target control entries according to the device identification of the third network device.
  • the second network device is a secondary route reflection device
  • the second packet may further include the device identifier of the third network device.
  • the second network device may determine the target control entry to be sent to the third network device according to the device ID in the second packet as the third network device ID, and then the second network device may only send the desired target to the third network device Control entry.
  • the second network device may receive a fifth packet sent by the third network device, where the fifth packet includes the third network device The device ID of the device.
  • the second network device may match the device identification of the third network device in the fifth packet with the device identification of the third network device in one or more second packets to which the target control entry belongs, and select the matching second network device from the matching second network device.
  • the target control entry sent to the third network device is determined in the message.
  • the at least one second packet is a Border Gateway Protocol BGP packet
  • the device identifier of the second network device is respectively located in the extended community attribute of the at least one second packet.
  • the device identifier included in the first packet or the second packet may be located in the extended community attribute in the packet, and the first network device may determine the extended community attribute by parsing the first packet Whether the device identifier included in the first packet is the device identifier of the second network device.
  • the device identifier of the second network device is a router identifier Router-ID.
  • the device identifier of the second network device may be a router identifier, and the router identifier may specifically be an IP address or a loopback address of the second network device.
  • the method further includes: before the first network device acquires the at least one control entry, receiving, by the first network device, a third packet sent by the second network device , the third packet includes the device identification of the second network device; the first network device is identified as the second network according to the device identification included in some or all of the at least one first packet
  • the device identification of the device, and determining the target control entry sent to the second network device includes: the first network device according to the device identification of the second network device received from the third packet and the target control entry
  • the device identifier of the second network device in one or more of the first packets to which the control entry belongs is matched, and it is determined from the one or more first packets to send the device to the second network device.
  • the target control entry sent sent.
  • the second network device sends a third packet including its own device identification to the first network device in advance, so that the first network device can learn the device identification of the second network device.
  • the device identification of the second network device obtained from the third packet and the device identification of the second network device in the first packet may be used. match to determine the target control entry from the matched first message.
  • control entry is a flow rule flowspec, or a segment routing SR policy, or a routing policy distribution RPD.
  • the at least one control entry is acquired by the first network device from a controller or a server, or the at least one control entry is received by the first network device from a fourth network device, Or the at least one control entry is locally configured by the first network device.
  • the first network device when the first network device is the head node, it can obtain the control entry from the controller or the server, or it can be configured locally; when the first network device is the middle node or the tail node, it can receive the control entry. Sent by a primary network device.
  • the at least one control entry when the at least one control entry is received by the first network device from a fourth network device, the at least one control entry is the fourth network device according to the first network device.
  • the device identification of the network device is determined.
  • the upper-level network device may determine the target control entry to be sent to the first network device according to the device identification of the first network device, and then send the required control entry to the first network device. target control entry.
  • a message transmission system includes: a first network device and a second network device; the first network device is used to acquire at least one control entry, so at least A control entry is located in at least one first packet, and the at least one first packet respectively includes the device identifier of the network device to which the first packet is to be sent; the first network device is also used to The device identifier included in some or all of the at least one first packet is the device identifier of the second network device, and the target control entry to be sent to the second network device is determined, and the target control entry is the One or more control entries in at least one control entry; the first network device is further configured to send at least one second packet to the second network device, and the target control entry is located in the at least one second message, the at least one second message respectively includes the device identifier of the second network device; the second network device is configured to receive the at least one second message.
  • the system further includes: a third network device, and the at least one second packet further includes a device identifier of the third network device; the second network device further uses determining a control entry to be sent to the third network device from the target control entry according to the device identification of the third network device, where the control entry is at least one or more control entries in the target control entry ; the second network device is further configured to send at least one fourth message to the third network device, the control entry is located in the at least one fourth message, and the at least one fourth message respectively includes The device identifier of the third network device.
  • the second network device is further configured to send a third packet to the first network device, where the third packet includes a device identifier of the second network device.
  • the third network device is further configured to send a fifth packet to the second network device, where the fifth packet includes the device identifier of the third network device.
  • a device for transmitting a message includes: an acquiring unit, configured to acquire at least one control entry, where the at least one control entry is located in at least one first message, the The at least one first message respectively includes the device identifier of the network device to which the first message needs to be sent; the determining unit is configured to determine according to the device included in some or all of the at least one first message The device identifier identified as the second network device determines a target control entry to be sent to the second network device, where the target control entry is one or more control entries in the at least one control entry; a sending unit, used for Sending at least one second packet to the second network device, the target control entry is located in the at least one second packet, and the at least one second packet respectively includes the device identifier of the second network device .
  • the apparatus is a route reflection device.
  • the second network device is a route reflection device, or the second network device is a client device.
  • the at least one second packet when the second network device is a route reflection device, the at least one second packet further includes a device identifier of the third network device, and the device identifier of the third network device uses instructing the second network device to determine a control entry to the third network device from the target control entries according to the device identification of the third network device.
  • the at least one second packet is a Border Gateway Protocol BGP packet
  • the device identifier of the second network device is respectively located in the extended community attribute of the at least one second packet.
  • the device identifier of the second network device is a router identifier Router-ID.
  • the apparatus further includes: a receiving unit, the receiving unit is further configured to receive a third packet sent by the second network device before executing the obtaining unit, the The third packet includes the device identifier of the second network device; the determining unit is specifically configured to, according to the device identifier of the second network device received from the third packet and the target control entry belonging to match the device identifier of the second network device in one or more of the first packets, and determine from the one or more first packets the device to send to the second network device. Describe the target control entry.
  • control entry is a flow rule flowspec, or a segment routing SR policy, or a routing policy distribution RPD.
  • the at least one control entry is acquired by the apparatus from a controller or a server, or the at least one control entry is received by the apparatus from a fourth network device, or the at least one control entry is The entry is locally configured by the first network device.
  • the at least one control entry when the at least one control entry is received by the apparatus from a fourth network device, the at least one control entry is determined by the fourth network device according to a device identifier of the apparatus of.
  • a communication device including: a processor, a memory; the memory, for storing computer-readable instructions or a computer program; the processor, for reading the computer
  • the readable instructions or the computer program enable the communication device to implement the message transmission method described in the first aspect.
  • a computer-readable storage medium includes an instruction or a computer program, which, when executed on a computer, causes the computer to execute the message transmission method described in the first aspect above.
  • the first network device determines the device identifier of the second network device according to the device identifier included in the first packet to which each control entry belongs.
  • a target control entry sent to the second network device where the target control entry is used to instruct the second network device to perform local control, and the target control entry is one or more control entries in the at least one acquired control entry.
  • the first network device sends at least a second packet to the second network device, wherein the target control entry is located in at least one second packet and the second packet includes a device identifier of the second network device.
  • the first network device when forwarding the control entry to the second network device, can match the target control entry required by the second network device according to the device identifier of the second network device , and then only the target control entry is sent to the second network device, thereby reducing the pressure on the first network device to issue the control entry and reducing network congestion.
  • the filtering policies there is no need to deploy filtering policies on the second network device, which simplifies service deployment.
  • Fig. 1a is a schematic diagram of full connection in a BGP network architecture
  • Figure 1b is a schematic diagram of route reflection in a BGP network architecture
  • FIG. 2a is a schematic diagram of an application scenario provided by an embodiment of the present application.
  • FIG. 2b is a schematic diagram of another application scenario provided by an embodiment of the present application.
  • Fig. 3 is a kind of message transmission flow chart provided by the embodiment of the present application.
  • FIG. 4a is a schematic structural diagram of an UPDATE message provided by an embodiment of the present application.
  • FIG. 4b is a schematic structural diagram of a device identification provided by an embodiment of the application.
  • FIG. 5 is another flow chart of message transmission provided by an embodiment of the present application.
  • FIG. 6 is a structural diagram of a message transmission apparatus provided by an embodiment of the present application.
  • FIG. 7 is a structural diagram of a message transmission system provided by an embodiment of the present application.
  • FIG. 8 is a structural diagram of a communication device provided by an embodiment of the present application.
  • FIG. 9 is a structural diagram of another communication device provided by an embodiment of the present application.
  • a first-level route reflection device is used as an example for description.
  • the network device R0 is a route reflection device
  • the network device R1 and the network device R2 are clients corresponding to the route reflection device R0.
  • FIG. 2b Another example is the schematic diagram of another application scenario shown in FIG. 2b, in which the network system includes two-stage route reflection devices as an example for description.
  • the network device R0 serves as a first-level route reflection device
  • the network device R1 and the network device R2 serve as a second-level route reflection device.
  • the next-level network devices connected to the first-level route reflection device R0 are the network device R1 and the network device R2 performing the RR role.
  • R0, R1 and R2 are all network devices with RR reflection function. Furthermore, R1 and R2 may also be referred to as clients of R0 with respect to R0. Since the secondary route reflection devices R1 and R2 simultaneously serve as clients of the primary route reflection device R0, it is not necessary to establish a full connection between the network device R1 and the network device R2.
  • the next-level network devices connected to the secondary route reflection device R1 are the network devices R3 and R4 that perform the client role, and the next-level network devices connected to the secondary route reflection device R2 are the network devices R5 and R4 that perform the client role.
  • Network device R6 is Among them, R3-R6, as clients, receive the route or policy reflected by RR, but do not have the function of route reflection. Where possible, R3 and R4 are peers of each other, and R5 and R6 are peers of each other.
  • each network device may also be referred to as a node, which is a device with a packet forwarding function in a network system, for example, may be a router, a switch, a repeater, or a label switching router (LSR), etc.
  • a node which is a device with a packet forwarding function in a network system, for example, may be a router, a switch, a repeater, or a label switching router (LSR), etc.
  • LSR label switching router
  • the head node in one case, may be the node that generates the first packet, that is, the node indicated by the source address in the first packet. In this case, the head node is the first node on the end-to-end transmission path of the packet. In another case, it may be a node connected to the server or the controller and obtain the first message from the server or the controller.
  • the tail node in one case, it can be the node indicated by the destination address in the first message; in another case, it is the node connected to the node indicated by the destination address; It may be the last node on the end-to-end transmission path that needs to perform local control according to the control entry in the first packet.
  • the intermediate node is one or more forwarding nodes that pass between the head node and the tail node when the message is forwarded.
  • FIG. 3 is a flowchart of a message transmission method provided by an embodiment of the present application.
  • the roles of the head node 201, the intermediate node 202, and the tail node 203 named in the following embodiments are mainly used to distinguish different functions that different network devices can perform in the packet forwarding path, and the positions of different network devices in the network topology can be. Determined in combination with different business scenarios.
  • the method may include:
  • the head node 201 acquires at least one first packet.
  • the head node 201 first acquires at least one first packet including one or more control entries. That is, the head node 201 may acquire one or more first packets, and each first packet may include one or more control entries.
  • each first message includes the device identifier of the network device to which the first message needs to be sent.
  • the device identification of the network device may be a router-id, which may be an Internet protocol (Internet protocol, IP) address or a loopback address of the network device, or the device identification may be an identification of the network device ( identification, ID), etc. For example, still taking FIG.
  • the head node 201 is the network device R0
  • the intermediate nodes 202 are the network device R1 and the network device R2 respectively, wherein the router identifier of the network device R1 is 1.1.1.1, and the router identifier of the network device R2 is 2.2.2.2.
  • the first packet includes the routing identifier 1.1.1.1, it indicates that one or more control entries in the first packet are sent to the network device R1.
  • the first packet includes the routing identifier 2.2.2.2, it indicates that one or more control entries in the first packet can be sent to the network device R2.
  • the control entry is used to instruct the network device receiving the control entry to perform local control, and the control entry can be a flow rule (flow specification, flowspec), a segment routing (SR) policy, or a route policy distribution (route policy distribution) , RPD) etc.
  • the above example takes the head node 201 as R0 in FIG. 2b as an example. In other possible situations, the head node may also be R1 or R2 in FIG. 2b.
  • the head node 201 obtains the at least one first packet in the following manner.
  • the head node 201 can obtain the at least one first packet from the controller or server to which it is connected, that is, the controller or the server generates at least one first packet.
  • the first network device may receive at least one first message sent by the controller or the server.
  • the head node 201 is configured locally, specifically, the head node 201 may acquire from local configuration information, for example, the local configuration information may be manually configured in the head node 201 according to actual business requirements of the user.
  • the first message may be a border gateway protocol (border gateway protocol, BGP) message, specifically, the first message may be an update (UPDATE) message in the BGP message, and the update message at least includes: Device identification field, control entry field.
  • BGP border gateway protocol
  • the update message may include not only a device identification field, a control entry field, but also a reserved field and the like.
  • the reserved field may carry other attribute fields. In some possible cases, the other attribute fields can be used to fine-tune the control entry.
  • the head node 201 uses the device identification field and other attribute fields to jointly determine the first packet that should be sent to a certain device and includes multiple control entries, and the device identification field of the determined first packet includes the device identification and the The device identifiers concerned by the head node 201 match, and the attributes included in the other attribute fields of the determined first packet match the attributes concerned by the head node 201 .
  • the device identifier included in the first packet may be located in an extended community attribute of the first packet, and the device identifier is indicated by a type-length-value (TLV) in the extended community attribute.
  • TLV type-length-value
  • the Type field is used to indicate the extended community attribute type
  • the Length field is used to indicate the number of bytes included in the "Value” field, such as 8 bytes (Byte)
  • the Value field is used to indicate the device identification, as shown in Figure 4b.
  • the Value field includes the global administrator Global
  • the Global Administrator carries the device ID.
  • the Value field may include multiple Global Administrators, and each Global Administrator carries a device identifier.
  • one or more device identifiers carried in the first packet may also be located in other possible types of packets, or in other possible types of packets. field, even different device identifiers can be located in different types of fields, as long as the device on the receiving side of the first packet can identify and understand, so that the receiving side device can match the corresponding device identifiers to determine the message to be forwarded.
  • the target control entry is sufficient.
  • the head node 201 determines the target control entry to be sent to the intermediate node 202 according to the device identification included in part or all of the at least one first packet as the device identification of the intermediate node 202.
  • the head node 201 When the head node 201 sends the control entry to the intermediate node 202, in order to ensure that the sent control entry is the control entry required by the intermediate node 202, and to reduce the sending pressure of the head node 201, the head node 201
  • the device identifier included in some or all of the packets is the device identifier of the intermediate node 202 , and the target control entry sent to the intermediate node 202 is determined. That is, the head node 201 determines a target control entry sent to the intermediate node 202 from the control entries included in each acquired first packet, where the first packet to which the target control entry belongs includes the device identifier of the intermediate node 202 .
  • the head node 201 obtains 100 first packets, and the device ID included in the 20 first packets is 1.1.1.1, then the head node 201 can use the 20 first packets. All control entries included in the first message are determined as target control entries.
  • the intermediate node 202 may be R1 or R2 in FIG. 2b.
  • the head node 201 may receive a third packet sent by the intermediate node 202, where the third packet includes the device identifier of the intermediate node 202, so as to notify the head node 201 of the corresponding device through the third packet.
  • Equipment Identity The head node 201 may match the device identification of the intermediate node 202 received from the third packet with the first packet including the device identification of the intermediate node 202, and determine from the matched first packet to send to the intermediate node 202 the target control entry, and then obtain the second packet according to the target control entry.
  • the third packet may further include other attribute fields, and when the head node 201 determines the target control entry to be sent to the intermediate node 202, the device identification of the intermediate node 202 received from the third packet may be used by the head node 201. and other attributes are matched with the first packet including the device identifier of the intermediate node 202 and the attribute field, and the target control entry sent to the intermediate node 202 is determined from the matched first packet. That is, when the head node 201 determines the matching first packet according to the device identifier of the intermediate node 202, all control entries included in the matching first packet may be determined as target control entries.
  • the head node 201 determines the matching first packet according to the device identification of the intermediate node 202, it can also determine the first packet satisfying the other attributes from the matching first packets according to other attributes, and the first packet satisfying the other attributes can be determined.
  • the control entry included in the first message of other attributes is determined as the target control entry.
  • the target control entry may be composed of one or more control entries, and may be distributed in one first packet, or may be distributed in multiple first packets. For example, if the head node 201 determines the matching 20 first packets from the 100 first packets obtained according to the device identification of the intermediate node 202, the head node 201 then selects the 20 first packets from the 20 first packets according to other attributes. If it is determined that there are 5 first packets including the other attributes, the control entries in the 5 first packets are used as target control entries.
  • the head node 201 After determining the target control entry according to the at least one first packet, the head node 201 acquires at least one second packet according to the target control entry.
  • the at least one second packet is the packet determined by the head node 201 and used to carry the target control entry.
  • the manner of acquiring the at least one second packet includes at least the following situations.
  • the head node 201 may use the first packet matched by the device identifier of the intermediate node 202 as the second packet. That is, all control entries in each first packet matched above are determined as target control entries. For example, if the head node 201 obtains a total of 50 first packets, of which 20 first packets include the device identifier of the intermediate node 202, the 20 first packets are matched first packets, and the head node 201 will The matched first packet is used as the second packet, so that 20 second packets are determined.
  • the head node 201 first selects the device identification included in part or all of the first packet as the device identification of the intermediate node 202 according to the device identification of the intermediate node 202, and then selects the part or the device identification that matches the intermediate node 202.
  • the control entries in all the first packets are determined as the target control entries sent to the intermediate node 202, and the target control entries are re-encapsulated to obtain at least one second packet. For example, if the head node 201 determines 50 target control entries from one of the first packets (including 100 control entries) according to the device identifier of the intermediate node 202, the head node 202 re-encapsulates the 50 target control entries, Obtain at least one second message.
  • the head node 201 first determines the target control entry sent to the intermediate node 202 from the device identification included in part or all of the first packet as the device identification of the intermediate node 202 according to the device identification of the intermediate node 202 .
  • the head node 201 then generates at least one second packet according to the target control entry and the locally stored control entry that needs to be sent to the intermediate node 202 before acquiring the at least one first packet.
  • the head node 201 sends at least one second packet to the intermediate node 202.
  • the head node 201 After the head node 201 determines the target control entry to be sent to the intermediate node 202 according to the device identification of the intermediate node 202 , it can acquire at least one second packet according to the target control entry, and send the at least one second packet to the intermediate node 202 .
  • the target control entry determined by the head node 201 through S302 may be located in at least one second packet, and each second packet includes the device identifier of the intermediate node 202 .
  • the second packet may be a Border Gateway Protocol BGP packet, and the device identifier included in the second packet may be located in the extended community attribute of the second packet, and the specific expression form may be added by adding a type in the extended community attribute.
  • the length value TLV is defined, for example, as shown in Figure 4b.
  • the intermediate node 202 determines the target control entry to be sent to the tail node 203 according to the device ID included in part or all of the at least one second packet as the device ID of the tail node 203.
  • the intermediate node 202 may determine the direction to the tail node according to the device identifier of the tail node 203 included in some or all of the at least one second packet.
  • the second packet sent by the head node 201 to the intermediate node 202 may further include the device identifier of the tail node 203 .
  • the second packet sent by the head node 201 may include not only the device ID 1.1.1.1, but also the device ID.
  • the device identifier 1.1.1.1 is used to indicate that the at least one second packet is a packet sent to the intermediate node 202, and the intermediate node 202 can receive and store the at least one second packet; device identifier 3.3. 3.3 can be used to instruct the intermediate node 202 to determine the target control entry to be sent to the tail node 203 from the at least one second message according to the device ID, and the tail node 203 is the network device with the device ID of 3.3.3.3.
  • the tail node 203 can be R3 or R4, or when the intermediate node 202 is R2, the tail node 203 can be R5 or R6.
  • the first packet obtained by the head node 201 also includes the device identifier 3.3.3.3. In this way, the head node 201 is sending a message including the target control entry to the intermediate node 202. At least the second packet still carries the device identification 3.3.3.3.
  • the intermediate node 202 may receive the fifth packet sent by the tail node 203, where the fifth packet includes the device identifier of the tail node 203, The device identifier corresponding to itself is notified to the intermediate node 202 through the fifth message. In this way, when the intermediate node 202 receives at least one second packet from the head node 201, the intermediate node 202 can receive the device identification of the tail node 203 from the fifth packet and the second packet including the device identification of the tail node 203 according to the second packet.
  • the fifth packet may further include other attribute fields, and when the intermediate node 202 determines the target control entry to be sent to the tail node 203, the device identification of the tail node 203 received from the fifth packet and other The attribute is matched with the second packet including the device identifier of the tail node 203 and the attribute field, and the target control entry sent to the tail node 203 is determined from the matched second packet.
  • the intermediate node 202 sends at least one fourth packet to the tail node 203.
  • the intermediate point 202 After the intermediate point 202 determines the target control entry to be sent to the tail node 203 according to the device identifier of the tail node 203 , it generates at least one fourth packet according to the target control entry, and sends the at least one fourth packet to the tail node 203 .
  • the target control entry determined by the intermediate node 202 through S304 may be located in at least one fourth packet, and each fourth packet includes the device identifier of the tail node 203.
  • the fourth packet may be a BGP packet. For the format of the fourth packet and the encapsulation format of the device identifier of the tail node 203 in the fourth packet, reference may be made to the relevant description of the first packet in S301.
  • the tail node 203 may perform different processing in different application scenarios. Specifically, it can include the following operations:
  • the tail node 203 no longer forwards the fourth packet after receiving the fourth packet.
  • the tail node 203 may only receive the fourth packet and perform local control according to the target control entry in the fourth packet, for example, when the target The control entry is a flow rule, and the tail node 203 can select a path according to the flow rule to realize the adjustment of the service traffic transmission path; or when the target control entry is a segment routing policy, the tail node 203 can obtain the specified route according to the segment routing policy.
  • the segment list of the path is used to forward the subsequently received service traffic through the segment list; or when the target control entry is routing policy distribution, the tail node can change its own routing processing behavior according to the routing policy distribution. In the above situation, the tail node 203 may no longer forward the fourth packet.
  • tail node 203 has a peer node
  • the tail node 203 when the tail node 203 receives the fourth packet sent by the intermediate node 202, the tail node 203 can forward the fourth packet to the peer node.
  • the peer node can determine the required control entry from the fourth message according to the local policy. It can be understood that the above situation is only an example, and the processing operation performed by the tail node 204 on the packet may be determined in combination with a specific application scenario.
  • the head node After acquiring the at least one first packet, the head node identifies the device as the tail according to the device identifier included in some or all of the at least one first packet.
  • the device identifier of the node determines the target control entry sent to the tail node, and sends at least one second message to the tail node.
  • the target control entry is located in at least one second packet, and the second packet includes the device identifier of the tail node.
  • the head node when there is no intermediate forwarding node between the head node and the tail node, the head node directly determines the target control entry sent to the tail node according to the device identifier of the tail node.
  • the intermediate node 202 may not support the route screening function, then the intermediate node 202 may not execute S304 and S305, but directly send at least one second packet received from the head node 201 to the tail node 203, and then the tail node 203 determines the required control entry according to the local policy.
  • the method provided in this embodiment may also be applied to a possible network system architecture.
  • the network system includes more than three levels of RRs, where each level of RR can be determined by using a corresponding method provided by this embodiment.
  • the route to be sent to the next-level network device for example, the next-level network device may be an RR with a route reflection function, or a client without a route reflection function.
  • FIG. 5 is a flowchart of another message transmission method provided by the embodiments of the present application. As shown in FIG. 5 , the method may include:
  • the first network device acquires at least one control entry, where the at least one control entry is located in at least one first packet.
  • the first network device may be the head node 201 and the intermediate node 202 described in the foregoing embodiments.
  • the first network device may acquire at least one control entry.
  • the first network device may be obtained according to local configuration information, or obtained from a controller or a server.
  • S301 for the specific implementation of acquiring at least one control entry by the first network device, reference may be made to S301.
  • the first network device determines at least one control entry from a packet received by the fourth network device that is an upper-level network device.
  • the upper-level network device may be, for example, the head node 201 .
  • the fourth network device may determine at least one control entry to be sent to the first network device from the packet obtained by itself according to the device identification of the first network device, and send the at least one control entry to the first network device .
  • the first network device may be a route reflection device, and for a specific implementation of the fourth network device determining at least one control entry to send to the first network device according to the device identifier of the first network device, see S302 or S304.
  • each first packet includes a device identification of a network device to which the first packet is to be sent, and the device identification may be a router identification.
  • Control entries can be flow rules flowspec, or SR policies for segment routing, or RPD distribution for routing policies, etc.
  • S301 For the format of the first packet and the format of the encapsulation device identifier, reference may be made to S301.
  • the first network device determines the target control entry to be sent to the second network device according to the device identifier included in part or all of the at least one first packet as the device identifier of the second network device.
  • the first network device may determine, from the acquired at least one first packet, that the device identifier included in some or all of the first packets is the device identifier of the second network device, so as to determine the device identifier of the second network device.
  • the target control entry sent by the device may be determined, from the acquired at least one first packet, that the device identifier included in some or all of the first packets is the device identifier of the second network device, so as to determine the device identifier of the second network device.
  • the first network device may receive a third packet sent by the second network device, where the third packet contains Including the device identification of the second network device; the first network device according to the device identification of the second network device received from the third packet and the device of the second network device in the one or more first packets to which the target control entry belongs If the identifiers match, the target control entry sent to the second network device is determined from the one or more first packets.
  • the first network device determining the target control entry to be sent to the second network device reference may be made to S302 or S304.
  • the first network device sends at least one second packet to the second network device, and the target control entry is located in the at least one second packet.
  • each second packet includes a device identifier of the second network device, and the device identifier of the second network device is a router identifier Router-ID.
  • the first network device acquiring at least one second packet reference may be made to S302.
  • the second packet may be a Border Gateway Protocol BGP packet
  • the device identifier of the second network device may be located in the extended community attribute of the second packet.
  • the second packet may be an UPDATE packet in the BGP packet.
  • the format of the UPDATE packet and the encapsulation format of the device identifier reference may be made to the relevant description of S301.
  • the first network device may be a route reflection device, and in this case, the second network device may be a client device, such as R1 or R2 as shown in FIG. 2a.
  • the second network device is a next-level route reflection device, such as R1 or R2 in FIG. 2b.
  • the second network device may have a corresponding client device (third network device), such as R3, R4 or R5, R6 in Figure 2b, then at least one second packet also includes a third The device identifier of the network device, where the device identifier of the third network device is used to instruct the second network device to determine the control entry sent to the third network device from the target control entries according to the device identifier of the third network device.
  • the second network device determining the control entry sent to the third network device reference may be made to S302 or S304.
  • the second network device may receive the fifth packet sent by the third network device.
  • the fifth packet includes the device identification of the third network device.
  • the device identification of the third network device received by the second network device from the fifth packet matches the device identification of the third network device in the second packet.
  • the target control entry sent by the device For specific implementation, refer to S304.
  • the specific operation after receiving the second packet may refer to the relevant description of S305, which is not described in this embodiment. Repeat.
  • the embodiments of the present application further provide a message transmission system.
  • the system may include a first network device 601 and a second network device 602 .
  • the first network device 601 is configured to acquire at least one control entry, so at least one control entry is located in at least one first packet, and the at least one first packet respectively includes the address to which the first packet is to be sent.
  • the device ID of the network device The implementation of the first network device may refer to S301 or S501.
  • the first network device 601 is further configured to determine, according to the device identifier included in some or all of the at least one first packet, that the device identifier is the device identifier of the second network device to send to the second network device
  • the target control item is one or more control items in the at least one control item.
  • the implementation of the first network device may refer to S302, S304 or S502.
  • the first network device 601 is further configured to send at least one second packet to the second network device, the target control entry is located in the at least one second packet, and the at least one second packet is respectively The device identification of the second network device is included.
  • the specific implementation of the first network device may refer to S303, S305 or S503.
  • the second network device 602 is configured to receive the at least one second packet.
  • the system further includes: a third network device 603, the at least one second packet further includes a device identifier of the third network device; the second network device 602, is further configured to determine a control entry to be sent to the third network device from the target control entry according to the device identification of the third network device, where the control entry is at least one or more of the target control entries Control entry.
  • the third network device 603 reference may be made to S304 or S503.
  • the second network device 602 is further configured to send at least one fourth packet to the third network device, the control entry is located in the at least one fourth packet, and the at least one fourth packet respectively includes The device identifier of the third network device.
  • the control entry is located in the at least one fourth packet
  • the at least one fourth packet respectively includes The device identifier of the third network device.
  • the second network device 602 is further configured to send a third packet to the first network device, where the third packet includes a device identifier of the second network device.
  • the third packet includes a device identifier of the second network device.
  • the third network device 603 is further configured to send a fifth packet to the second network device, where the fifth packet includes the device identifier of the third network device.
  • the fifth packet includes the device identifier of the third network device.
  • an embodiment of the present application further provides a message transmission device, which will be described below with reference to the accompanying drawings.
  • the apparatus can be applied to a first network device to perform the functions of the first network device in the embodiment shown in FIG. 5 , the apparatus 700 It may include an acquisition unit 701 , a determination unit 702 and a transmission unit 703 .
  • the obtaining unit 701 is configured to obtain at least one control entry, where the at least one control entry is located in at least one first packet, and the at least one first packet respectively includes the information of the network device to which the first packet is to be sent. Equipment Identity.
  • the specific implementation of acquiring the control entry by the acquiring unit 701 may refer to S301 in the embodiment described in FIG. 3 .
  • the specific implementation of obtaining the control entry by the obtaining unit 601 may refer to S303 or S305.
  • a determining unit 702 configured to determine the target control entry sent to the second network device according to the device identifier included in some or all of the at least one first message as the device identifier of the second network device,
  • the target control entry is one or more of the at least one control entry.
  • the specific implementation of the determining unit 703 may refer to S302 or S304.
  • a sending unit 703, configured to send at least one second packet to the second network device, the target control entry is located in the at least one second packet, and the at least one second packet respectively includes the first 2.
  • the specific implementation of the sending unit 703 may refer to S303 or S305.
  • the apparatus is a route reflection device.
  • the network device applied by the apparatus 700 may be a route reflection device, such as the head node 201 or the intermediate node 202 .
  • the second network device is a route reflection device, or the second network device is a client device.
  • the second network device may be a route reflection device, for example, the first network device is the head node 201 and the second network device is the intermediate node 202 .
  • the second network device is a client device, for example, the first network device is the intermediate node 202 and the second network device is the tail node 203 .
  • the at least one second packet when the second network device is a route reflection device, the at least one second packet further includes a device identifier of the third network device, and the device identifier of the third network device uses instructing the second network device to determine a control entry to the third network device from the target control entries according to the device identification of the third network device.
  • the at least one second packet is a BGP packet
  • the device identifier of the second network device is respectively located in the extended community attribute of the at least one second packet.
  • the format of the BGP protocol packet and the encapsulation format of the device identifier refer to S301.
  • the device identifier of the second network device is a router identifier.
  • the apparatus further includes: a receiving unit (not shown in FIG. 7 ),
  • the receiving unit is further configured to, before executing the obtaining unit, receive a third packet sent by the second network device, where the third packet includes the device identifier of the second network device; the a determining unit, specifically configured to, according to the device identifier of the second network device received from the third packet and the second network in one or more of the first packets to which the target control entry belongs The device identifiers of the devices match, and the target control entry sent to the second network device is determined from the one or more first messages.
  • the specific implementation of the receiving unit and the determining unit may refer to S302.
  • control entry is a flowspec, or an SR policy, or an RPD.
  • the at least one control entry is acquired by the apparatus from a controller or a server, or the at least one control entry is received by the apparatus from a fourth network device, or the at least one control entry is The entry is locally configured by the first network device.
  • the at least one control entry is acquired by the apparatus from a controller or a server, or the at least one control entry is received by the apparatus from a fourth network device, or the at least one control entry is The entry is locally configured by the first network device.
  • the at least one control entry when the at least one control entry is received by the apparatus from a fourth network device, the at least one control entry is determined by the fourth network device according to a device identifier of the apparatus of.
  • a device identifier of the apparatus of For the implementation of receiving the control entry from the fourth network device by the network device to which the apparatus 700 is applied, reference may be made to S301.
  • FIG. 8 is a schematic structural diagram of a communication device provided by an embodiment of the present application, and the communication device may be, for example, the head node 201, the intermediate node 202, or the tail node 203 in the embodiment shown in FIG.
  • the first network device, the second network device, or the third network device in the embodiment shown in FIG. 7 may also be implemented by a device of the packet transmission apparatus 700 in the embodiment shown in FIG. 7 .
  • the communication device 800 includes at least a processor 810 .
  • Communication device 800 may also include communication interface 820 and memory 830 .
  • the number of processors 810 in the communication device 800 may be one or more, and one processor is taken as an example in FIG. 8 .
  • the processor 810, the communication interface 820, and the memory 830 may be connected through a bus system or other manners, and FIG. 8 takes the connection through the bus system 840 as an example.
  • Processor 810 may be a CPU, NP, or a combination of CPU and NP.
  • the processor 810 may further include hardware chips.
  • the above-mentioned hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof.
  • the above-mentioned PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a general-purpose array logic (generic array logic, GAL) or any combination thereof.
  • the processor 810 may perform the related functions of acquiring at least one control entry and determining the target control entry in the foregoing method embodiments.
  • the processor 810 may perform related functions such as determining the target control entry according to the device identifier in the foregoing method example.
  • the communication interface 820 is used for receiving and sending messages.
  • the communication interface 820 may include a receiving interface and a sending interface.
  • the receiving interface may be used to receive packets, and the sending interface may be used to send packets.
  • the number of communication interfaces 820 may be one or more.
  • the memory 830 may include a volatile memory (English: volatile memory), such as random-access memory (RAM); the memory 830 may also include a non-volatile memory (English: non-volatile memory), such as a fast memory A flash memory (English: flash memory), a hard disk drive (HDD) or a solid-state drive (SSD); the memory 830 may also include a combination of the above-mentioned types of memory.
  • the memory 830 may, for example, store the aforementioned correspondence between the identification information and the tunnels.
  • the memory 830 stores an operating system and programs, executable modules or data structures, or their subsets, or their extended sets, wherein the programs may include various operation instructions for implementing various operations.
  • the operating system may include various system programs for implementing various basic services and handling hardware-based tasks.
  • the processor 810 may read the program in the memory 830 to implement the message transmission method provided by the embodiment of the present application.
  • the memory 830 may be a storage device in the communication device 800 , or may be a storage device independent of the communication device 800 .
  • the bus system 840 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus or the like.
  • PCI peripheral component interconnect
  • EISA extended industry standard architecture
  • the bus system 840 can be divided into an address bus, a data bus, a control bus, and the like. For ease of presentation, only one thick line is used in FIG. 8, but it does not mean that there is only one bus or one type of bus.
  • FIG. 9 is a schematic structural diagram of another communication device 900 provided by an embodiment of the present application.
  • the communication device 900 may be configured as the head node 201 , the intermediate node 202 , or the tail node 203 in the foregoing embodiments, or may be the same as in the foregoing embodiments.
  • the communication device 900 includes: a main control board 910 and an interface board 930 .
  • the main control board 910 is also called a main processing unit (main processing unit, MPU) or a route processing card (route processor card).
  • the main control board 910 controls and manages each component in the network device 900 Equipment maintenance, protocol processing functions.
  • the main control board 910 includes: a central processing unit 911 and a memory 912 .
  • the interface board 930 is also referred to as a line processing unit (LPU), a line card or a service board.
  • the interface board 930 is used to provide various service interfaces and realize data packet forwarding.
  • the service interface includes, but is not limited to, an Ethernet interface, a POS (Packet over SONET/SDH) interface, etc.
  • the Ethernet interface is, for example, a flexible Ethernet service interface (Flexible Ethernet Clients, FlexE Clients).
  • the interface board 930 includes: a central processing unit 931 , a network processor 932 , a forwarding table entry storage 934 and a physical interface card (ph8sical interface card, PIC) 933 .
  • the central processing unit 931 on the interface board 930 is used to control and manage the interface board 930 and communicate with the central processing unit 911 on the main control board 910 .
  • the network processor 932 is used to implement packet forwarding processing.
  • the network processor 932 may be in the form of a forwarding chip.
  • the processing of the uplink packet includes: processing of the incoming interface of the packet, and searching of the forwarding table; processing of the downlink packet: searching of the forwarding table, and so on.
  • the physical interface card 933 is used to realize the interconnection function of the physical layer, the original traffic enters the interface board 930 through this, and the processed packets are sent from the physical interface card 933 .
  • the physical interface card 933 includes at least one physical interface, and the physical interface is also called a physical port.
  • the physical interface card 933 corresponds to the FlexE physical interface 204 in the system architecture 200 .
  • the physical interface card 933 is also called a daughter card, which can be installed on the interface board 930 and is responsible for converting the photoelectric signal into a message, checking the validity of the message and forwarding it to the network processor 932 for processing.
  • the central processor 931 of the interface board 903 can also perform the functions of the network processor 932 , such as implementing software forwarding based on a general-purpose CPU, so that the network processor 932 is not required in the physical interface card 933 .
  • the communication device 900 includes a plurality of interface boards.
  • the communication device 900 further includes an interface board 940 .
  • the interface board 940 includes a central processing unit 941 , a network processor 942 , a forwarding table entry storage 944 and a physical interface card 943 .
  • the communication device 900 further includes a switch fabric board 920 .
  • the switch fabric 920 may also be referred to as a switch fabric unit (switch fabric unit, SFU).
  • SFU switch fabric unit
  • the switching network board 920 is used to complete data exchange between the interface boards.
  • the interface board 930 and the interface board 940 can communicate through the switch fabric board 920 .
  • the main control board 910 and the interface board 930 are coupled.
  • the main control board 910 , the interface board 930 , the interface board 940 , and the switching network board 920 are connected to the system backplane through a system bus to achieve intercommunication.
  • an inter-process communication (inter-process communication, IPC) channel is established between the main control board 910 and the interface board 930, and the main control board 910 and the interface board 930 communicate through the IPC channel.
  • IPC inter-process communication
  • the communication device 900 includes a control plane and a forwarding plane
  • the control plane includes a main control board 910 and a central processing unit 931
  • the forwarding plane includes various components that perform forwarding, such as forwarding entry storage 934, physical interface card 933, and network processing device 932.
  • the control plane performs functions such as routers, generating forwarding tables, processing signaling and protocol packets, and configuring and maintaining the status of devices.
  • the control plane delivers the generated forwarding tables to the forwarding plane.
  • the network processor 932 based on the The delivered forwarding table forwards the packets received by the physical interface card 933 by looking up the table.
  • the forwarding table issued by the control plane may be stored in the forwarding table entry storage 934 .
  • the control plane and forwarding plane may be completely separate and not on the same device.
  • the central processor 911 may acquire the control entry; and determine the target control entry according to the device identification of the second network device.
  • the network processor 932 may trigger the physical interface card 933 to send the second packet including the target control entry to the second network device.
  • the central processor 911 may determine the second tunnel according to the identification information in the packet.
  • the network processor 932 may trigger the physical interface card 933 to determine the target control entry according to the determined device identifier of the third network device, and send a packet including the target control entry to the third network device.
  • the sending unit 703 and the like in the message transmission apparatus 700 may be equivalent to the physical interface card 933 or the physical interface card 943 in the communication device 900; the acquiring unit 701 and the determining unit 702 and the like in the message transmission apparatus 700 may be equivalent to The central processing unit 911 or the central processing unit 931 in the communication device 900 .
  • the operations on the interface board 940 in the embodiments of the present application are the same as the operations on the interface board 930, and for brevity, details are not repeated here.
  • the communication device 900 in this embodiment may correspond to the first network device or the second network device in each of the above method embodiments, and the main control board 910 , the interface board 930 and/or the interface board 940 in the communication device 900
  • the functions and/or various steps performed by the first network device or the second network device in the foregoing method embodiments can be implemented, which are not repeated here for brevity.
  • main control boards there may be one or more main control boards, and when there are more than one main control board, it may include an active main control board and a backup main control board.
  • a network device may have at least one switching network board, and the switching network board realizes data exchange between multiple interface boards, providing 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 form of the network device can also be that there is only one board, that is, there is no switching network board, and the functions of the interface board and the main control board are integrated on this board.
  • the central processing unit on the board can be combined into a central processing unit on this board to perform the functions of the two superimposed, the data exchange and processing capacity of this form of equipment is low (for example, low-end switches or routers and other networks. equipment).
  • the specific architecture used depends on the specific networking deployment scenario.
  • the above-mentioned first network device or second network device may be implemented as a virtualized device.
  • the virtualization device may be a virtual machine (English: Virtual Machine, VM) running a program for sending a message, and the virtual machine is deployed on a hardware device (for example, a physical server).
  • a virtual machine refers to a complete computer system with complete hardware system functions simulated by software and running in a completely isolated environment.
  • the virtual machine can be configured as a first network device or a second network device.
  • the first network device or the second network device may be implemented based on a general-purpose physical server in combination with a network function virtualization (Network Functions Virtualization, NFV) technology.
  • Network Functions Virtualization Network Functions Virtualization
  • the first network device or the second network device is a virtual host, a virtual router or a virtual switch.
  • Those skilled in the art can virtualize a first network device or a second network device having the above functions on a general physical server in combination with the NFV technology by reading this application, and details are not described herein again.
  • network devices in the above-mentioned various product forms respectively have any functions of the first network device or the second network device in the above method embodiments, and details are not described herein again.
  • An embodiment of the present application further provides a chip, including a processor and an interface circuit, where the interface circuit is used to receive instructions and transmit them to the processor; the processor, for example, may be one of the message transmission apparatuses 700 shown in FIG. 7 .
  • the specific implementation form can be used to execute the above method for message transmission.
  • the processor is coupled to a memory, and the memory is used to store programs or instructions, and when the programs or instructions are executed by the processor, the chip system enables the method in any of the foregoing method embodiments.
  • the number of processors in the chip system may be one or more.
  • the processor can be implemented by hardware or by software.
  • the processor may be a logic circuit, an integrated circuit, or the like.
  • the processor may be a general-purpose processor implemented by reading software codes stored in memory.
  • the memory may be integrated with the processor, or may be provided separately from the processor, which is not limited in this application.
  • the memory can be a non-transitory processor, such as a read-only memory ROM, which can be integrated with the processor on the same chip, or can be provided on different chips.
  • the setting method of the processor is not particularly limited.
  • the system-on-chip may be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), or a system on chip (SoC), It can also be a central processing unit (CPU), a network processor (NP), a digital signal processing circuit (DSP), or a microcontroller (microcontroller).
  • controller unit, MCU it can also be a programmable logic device (PLD) or other integrated chips.
  • Embodiments of the present application also provide a computer-readable storage medium, including instructions or computer programs, which, when executed on a computer, cause the computer to execute the message transmission method provided by the above embodiments.
  • the embodiments of the present application also provide a computer program product including an instruction or a computer program, which, when running on a computer, enables the computer to execute the message transmission method provided by the above embodiments.
  • At least one (item) refers to one or more, and "a plurality” refers to two or more.
  • “And/or” is used to describe the relationship between related objects, indicating that there can be three kinds of relationships, for example, “A and/or B” can mean: only A, only B, and both A and B exist , where A and B can be singular or plural.
  • the character “/” generally indicates that the associated objects are an “or” relationship.
  • At least one item(s) below” or similar expressions thereof refer to any combination of these items, including any combination of single item(s) or plural items(s).
  • At least one (a) of a, b or c can mean: a, b, c, "a and b", “a and c", “b and c", or "a and b and c" ", where a, b, c can be single or multiple.
  • a software module can be placed in random access memory (RAM), internal memory, read only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other in the technical field. in any other known form of storage medium.
  • RAM random access memory
  • ROM read only memory
  • electrically programmable ROM electrically erasable programmable ROM
  • registers hard disk, removable disk, CD-ROM, or any other in the technical field. in any other known form of storage medium.

Landscapes

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

Abstract

本申请实施例公开了一种报文传输方法及装置,第一网络设备在获取到一条或多条控制条目后,根据每个控制条目所属的第一报文中包括的设备标识为第二网络设备的设备标识确定出向第二网络设备发送的目标控制条目。第一网络设备向第二网络设备发送至少一个第二报文,其中,目标控制条目位于至少一个第二报文中,且该第二报文包括第二网络设备的设备标识。可见,第一网络设备在向第二网络设备转发控制条目时,根据第二网络设备的设备标识确定出第二网络设备所需要的目标控制条目,进而仅向第二网络设备发送目标控制条目,降低第一网络设备发布控制条目的压力,减小网络拥塞。同时,无需在第二网络设备部署过滤策略,简化业务部署工作。

Description

一种报文传输方法及装置 技术领域
本申请涉及通信技术领域,具体涉及一种报文传输方法及装置。
背景技术
在数据传输过程中,为保证内部边界网关协议(internal border gateway protocol,IBGP)对等体之间的连通性,需要在IBGP对等体之间建立全连接。如图1a所示,在一个自治域(autonomous system,AS)中包括4个路由器。该4个路由器可以构成IBGP对等体(peer),为保证路由器之间的联通性,需要建立6条IBGP连接。当AS包括较多的路由器时,需要建立的IBGP连接数较大,对网络资源和控制器资源的消耗非常大。为解决上述问题,提出利用路由发射方案。具体为,在一个AS内,将其中一个路由器作为路由反射器(router reflector,RR),其它路由器作为客户机分别与RR建立IBGP连接,客户机(client)之间无需建立IBGP连接,RR向各个客户机传递(反射)路由信息。如图1b所示,将R0作为RR,分别与R1、R2和R3之间建立IBGP连接,R1、R2和R3作为RR的客户机。
然而,在进行业务部署时,虽然RR将所获取的全部路由信息发送给每个客户机,但每个客户机实际只需处理与其业务需求相关的路由信息,对于其他无业务需求的路由信息将进行丢弃。因此,每个客户机上均需要配置适配本机的路由过滤策略,以便客户机根据所配置的路由过滤策略过滤不需要的路由信息。当存在成千上百个客户机时,一方面RR所反射的路由信息量将成倍增加,对RR的设备处理能力要求更高,加剧网络拥塞;另一方面,客户机配置路由过滤策略的工作量也会大量增加,并且不同客户机往往需要配置不同的路由过滤策略,维护难度较大。
发明内容
有鉴于此,本申请实施例提供一种报文传输方法及装置,以降低RR所反射路由信息量,减少网络拥塞,简化业务部署。
为解决上述问题,本申请实施例提供的技术方案如下:
第一方面,提供了一种报文传输方法,该方法包括:第一网络设备获取至少一个控制条目,所述至少一个控制条目位于至少一个第一报文中,所述至少一个第一报文分别包括所述第一报文需发往的网络设备的设备标识;所述第一网络设备根据所述至少一个第一报文中的部分或全部报文中包括的设备标识为第二网络设备的设备标识,确定向所述第二网络设备发送的目标控制条目,所述目标控制条目为所述至少一个控制条目中的一个或多个控制条目;所述第一网络设备向所述第二网络设备发送至少一个第二报文,所述目标控制条目位于所述至少一个第二报文中,所述至少一个第二报文分别包括所述第二网络设备的设备标识。在该实施例中,第一网络设备在获取到一个或多个控制条目,在向第二网络设备发送之前,可以根据控制条目所位于的第一报文中设备标识为第二网络设备的设备标识,确定向第二网络设备发送的目标控制条目,进而将包括目标控制条目的一个或多个第二报文发送给第二网络设备,从而使得第二网络设备只获取自身所需的控制条目。因此,不仅可以降低第一网络设备发布控制条 目的压力,减小网络拥塞。同时,无需在第二网络设备部署过滤策略,简化业务部署工作。
在一种可能的实现方式中,所述第一网络设备为路由反射设备。
在一种可能的实现方式中,所述第二网络设备为路由反射设备,或者所述第二网络设备为客户端设备。在该实现方式中,当应用场景存在一级路由反射设备时,第一网络设备为路由反射设备,第二网络设备为客户端设备;当应用场景存在二级路由反射设备时,第一网络设备为一级路由反射设备,第二网络设备为二级路由反射设备。
在一种可能的实现方式中,当所述第二网络设备为路由反射设备,所述至少一个第二报文中还包括第三网络设备的设备标识,所述第三网络设备的设备标识用于指示所述第二网络设备根据所述第三网络设备的设备标识从所述目标控制条目中确定发往所述第三网络设备的控制条目。在该实现方式中,当第二网络设备为二级路由反射设备时,其可以存在对应的客户机,即第三网络设备,则第二报文中还可以包括第三网络设备的设备标识。第二网络设备可以根据第二报文中设备标识为第三网络设备标识,确定向第三网络设备发送的目标控制条目,进而第二网络设备可以仅向第三网络设备发送其所需的目标控制条目。
在一种可能的实现方式中,当第二网络设备存在对应的第三网络设备时,第二网络设备可以接收第三网络设备发送的第五报文,该第五报文中包括第三网络设备的设备标识。第二网络设备可以根据第五报文中的第三网络设备的设备标识以及目标控制条目所属的一个或多个第二报文中的第三网络设备的设备标识相匹配,从匹配的第二报文中确定向第三网络设备发送的目标控制条目。
在一种可能的实现方式中,所述至少一个第二报文为边界网关协议BGP报文,所述第二网络设备的设备标识分别位于所述至少一个第二报文的扩展团体属性中。在该实现方式中,第一报文或第二报文中所包括的设备标识可以位于该报文中的扩展团体属性中,第一网络设备通过解析第一报文中的扩展团体属性可以确定第一报文所包括的设备标识是否为第二网络设备的设备标识。
在一种可能的实现方式中,所述第二网络设备的设备标识为路由器标识Router-ID。在该实现方式中,第二网络设备的设备标识可以为路由器标识,该路由器标识具体可以为该第二网络设备的IP地址或loopback地址。
在一种可能的实现方式中,所述方法还包括:在所述第一网络设备获取所述至少一条控制条目之前,所述第一网络设备接收所述第二网络设备发送的第三报文,所述第三报文中包括所述第二网络设备的设备标识;所述第一网络设备根据所述至少一个第一报文中的部分或全部报文中包括的设备标识为第二网络设备的设备标识,确定向所述第二网络设备发送的目标控制条目,包括:所述第一网络设备根据从所述第三报文接收的所述第二网络设备的设备标识与所述目标控制条目所属的一个或多个所述第一报文中的所述第二网络设备的设备标识相匹配,从所述一个或多个所述第一报文中确定向所述第二网络设发送的所述目标控制条目。在该实现方式中,第二网络设备预先向第一网络设备发送包括自身设备标识的第三报文,以使得第一网络设备可以获知 第二网络设备的设备标识。当第一网络设备在确定向第二网络设备发送的目标控制条目时,可以根据从第三报文中获取的第二网络设备的设备标识以及第一报文中的第二网络设备的设备标识相匹配,以从匹配的第一报文中确定出目标控制条目。
在一种可能的实现方式中,所述控制条目为流规则flowspec,或者为分段路由SR策略,或者为路由策略分发RPD。
在一种可能的实现方式中,所述至少一条控制条目为所述第一网络设备从控制器或服务器获取,或者所述至少一条控制条目为所述第一网络设备从第四网络设备接收,或者所述至少一条控制条目为所述第一网络设备本地配置的。在该实现方式中,当第一网络设备为头节点时,其可以从控制器或服务器获取控制条目,或者为本地配置的;当第一网络设备为中间节点或尾节点时,其可以接收上一级网络设备发送的。
在一种可能的实现方式中,当所述至少一条控制条目为所述第一网络设备从第四网络设备接收的时,所述至少一条控制条目为所述第四网络设备根据所述第一网络设备的设备标识确定的。当第一网络设备为中间节点或尾节点时,上一级网络设备可以根据第一网络设备的设备标识确定出向第一网络设备发送的目标控制条目,进而向第一网络设备发送其所需的目标控制条目。
在本申请实施例第二方面,提供了一种报文传输系统,所述系统包括:第一网络设备和第二网络设备;所述第一网络设备,用于获取至少一条控制条目,所以至少一条控制条目位于至少一个第一报文中,所述至少一个第一报文分别包括所述第一报文需发往的网络设备的设备标识;所述第一网络设备,还用于根据所述至少一个第一报文中的部分或全部报文中包括的设备标识为第二网络设备的设备标识,确定向所述第二网络设备发送的目标控制条目,所述目标控制条目为所述至少一条控制条目中的一个或多个控制条目;所述第一网络设备,还用于向所述第二网络设备发送至少一个第二报文,所述目标控制条目位于所述至少一个第二报文,所述至少一个第二报文分别包括所述第二网络设备的设备标识;所述第二网络设备,用于接收所述至少一个第二报文。
在一种可能的实现方式中,所述系统还包括:第三网络设备,所述至少一个第二报文中还包括所述第三网络设备的设备标识;所述第二网络设备,还用于根据所述第三网络设备的设备标识从所述目标控制条目中确定向所述第三网络设备发送的控制条目,所述控制条目为所述目标控制条目中的至少一条或多条控制条目;所述第二网络设备,还用于向所述第三网络设备发送至少一个第四报文,所述控制条目位于所述至少一个第四报文,所述至少一个第四报文分别包括所述第三网络设备的设备标识。
在一种可能的实现方式中,所述第二网络设备,还用于向所述第一网络设备发送第三报文,所述第三报文包括所述第二网络设备的设备标识。
在一种可能的实现方式中,所述第三网络设备,还用于向所述第二网络设备发送第五报文,所述第五报文包括所述第三网络设备的设备标识。
在本申请实施例第三方面,提供了一种报文传输装置,所述装置包括:获取单元,用于获取至少一个控制条目,所述至少一个控制条目位于至少一个第一报文中,所述 至少一个第一报文分别包括所述第一报文需发往的网络设备的设备标识;确定单元,用于根据所述至少一个第一报文中的部分或全部报文中包括的设备标识为第二网络设备的设备标识,确定向所述第二网络设备发送的目标控制条目,所述目标控制条目为所述至少一个控制条目中的一个或多个控制条目;发送单元,用于向所述第二网络设备发送至少一个第二报文,所述目标控制条目位于所述至少一个第二报文中,所述至少一个第二报文分别包括所述第二网络设备的设备标识。
在一种可能的实现方式中,所述装置为路由反射设备。
在一种可能的实现方式中,所述第二网络设备为路由反射设备,或者所述第二网络设备为客户端设备。
在一种可能的实现方式中,当所述第二网络设备为路由反射设备,所述至少一个第二报文中还包括第三网络设备的设备标识,所述第三网络设备的设备标识用于指示所述第二网络设备根据所述第三网络设备的设备标识从所述目标控制条目中确定发往所述第三网络设备的控制条目。
在一种可能的实现方式中,所述至少一个第二报文为边界网关协议BGP报文,所述第二网络设备的设备标识分别位于所述至少一个第二报文的扩展团体属性中。
在一种可能的实现方式中,所述第二网络设备的设备标识为路由器标识Router-ID。
在一种可能的实现方式中,所述装置还包括:接收单元,所述接收单元,还用于在执行所述获取单元之前,接收所述第二网络设备发送的第三报文,所述第三报文中包括所述第二网络设备的设备标识;所述确定单元,具体用于根据从所述第三报文接收的所述第二网络设备的设备标识与所述目标控制条目所属的一个或多个所述第一报文中的所述第二网络设备的设备标识相匹配,从所述一个或多个所述第一报文中确定向所述第二网络设发送的所述目标控制条目。
在一种可能的实现方式中,所述控制条目为流规则flowspec,或者为分段路由SR策略,或者为路由策略分发RPD。
在一种可能的实现方式中,所述至少一条控制条目为所述装置从控制器或服务器获取,或者所述至少一条控制条目为所述装置从第四网络设备接收,或者所述至少一条控制条目为所述第一网络设备本地配置的。
在一种可能的实现方式中,当所述至少一条控制条目为所述装置从第四网络设备接收的时,所述至少一条控制条目为所述第四网络设备根据所述装置的设备标识确定的。
在本申请实施例第四方面,提供了一种通信设备,包括:处理器,存储器;所述存储器,用于存储计算机可读指令或者计算机程序;所述处理器,用于读取所述计算机可读指令或所述计算机程序,以使得所述通信设备实现第一方面所述的报文传输方法。
在本申请实施例第五方面,一种计算机可读存储介质包括指令或计算机程序,当其在计算机上运行时,使得计算机执行以上第一方面所述的报文传输方法。
根据本申请实施例提供的技术方案,第一网络设备在获取到一条或多条控制条目 后,根据每个控制条目所属的第一报文中包括的设备标识为第二网络设备的设备标识确定出向第二网络设备发送的目标控制条目,该目标控制条目用于指示第二网络设备进行本地控制,且该目标控制条目为所获取的至少一条控制条目中的一个或多个控制条目。第一网络设备向第二网络设备发送至少第二报文,其中目标控制条目至少位于一个第二报文中且该第二报文包括第二网络设备的设备标识。可见,通过本申请实施例提供的报文传输方法,第一网络设备在向第二网络设备转发控制条目时,可以根据第二网络设备的设备标识匹配出第二网络设备所需要的目标控制条目,进而仅向第二网络设备发送目标控制条目,降低第一网络设备发布控制条目的压力,减小网络拥塞。同时,无需在第二网络设备部署过滤策略,简化业务部署工作。
附图说明
为了更清楚地说明本发明具体实施方式或现有技术中的技术方案,下面将对具体实施方式或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1a为一种BGP网络架构中全连接示意图;
图1b为一种BGP网络架构中路由反射示意图;
图2a为本申请实施例提供的一种应用场景示意图;
图2b为本申请实施例提供的另一种应用场景示意图;
图3为本申请实施例提供的一种报文传输流程图;
图4a为本申请实施例提供的一种UPDATE报文结构示意图;
图4b为本申请实施例提供的一种设备标识结构示意图;
图5为本申请实施例提供的另一种报文传输流程图;
图6为本申请实施例提供的一种报文传输装置结构图;
图7为本申请实施例提供的一种报文传输系统结构图;
图8为本申请实施例提供的一种通信设备结构图;
图9为本申请实施例提供的另一种通信设备结构图。
具体实施方式
为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分的实施例,而不是全部的实施例。基于本发明中的实施例,都应当属于本发明保护的范围。
参见图2a所示的一种应用场景示意图,在该网络系统中,以包括一级路由反射设备为例进行说明。具体地,网络设备R0为路由反射设备,网络设备R1和网络设备R2作为路由反射设备R0对应的客户机。再例如图2b所示的另一种应用场景示意图,在该网络系统中以包括两级路由反射设备为例进行说明。具体地,网络设备R0作为一级路由反射设备,网络设备R1和网络设备R2作为二级路由反射设备。其中,一级路由反射设备R0连接的下一级网络设备为执行RR角色的网络设备R1和网络设备R2。其中,R0、R1和R2均为具有RR反射功能 的网络设备。此外,R1和R2相对于R0也可以称为R0的客户机。由于二级路由反射设备R1和R2同时作为一级路由反射设备R0的客户机,因此,网络设备R1和网络设R2之间无需建立全连接。二级路由反射设备R1连接的下一级网络设备为执行客户机角色的网络设备R3和网络设备R4,二级路由反射设备R2连接的下一级网络设备为执行客户机角色的网络设备R5和网络设备R6。其中,R3-R6作为客户机,接收RR反射的路由或策略,但本身不具有路由反射功能。在可能的情形中,R3和R4互为peer,R5和R6互为peer。
其中,各个网络设备也可以称为节点,为网络系统中具有报文转发功能的设备,例如,可以为路由器、交换机、转发器或者标签交换路由器(label switching router,LSR)等。在图2a所示的应用场景下,存在两条传输路径,分别为R0-R1、R0-R2。其中R0为头节点,R1或R2为尾节点。在图2b所示的应用场景下,存在多条传输路径,包括R0-R1-R3、R0-R1-R4、R0-R2-R5、R0-R2-R6。在该实施例中,R0为头节点201、R1和R2为中间节点202,R3、R4、R5和R6为尾节点。
其中,头节点,在一种情形中,其可以为生成第一报文的节点,也就是第一报文中源地址指示的节点。在该情况下,头节点为该报文端到端传输路径上的第一个节点。在另一种情形中,其可以为与服务器或控制器所连接的节点,从服务器或控制器获取第一报文。
尾节点,在一种情形中,其可以为第一报文中目的地址指示的节点;在另一种情形中,为与目的地址指示的节点所连接的节点;在另一种情形中,也可以为端到端传输路径上最后一个需要根据第一报文中的控制条目进行本地控制的节点。
中间节点为报文转发时在头节点和尾节点之间经过的一个或多个转发节点。
为便于理解,下面将结合图2b所示的网络系统结构为例进行说明,参见图3,该图为本申请实施例提供的一种报文传输方法的流程图。下述实施例中命名的头节点201、中间节点202和尾节点203角色主要用于区分报文转发路径中不同网络设备可以执行的不同功能,而不同网络设备在网络拓扑中所处的位置可以结合不同的业务场景具体确定。如图3所示,该方法可以包括:
S301:头节点201获取至少一个第一报文中。
本实施例中,头节点201首先获取至少一个包括一个或多个控制条目的第一报文。即,头节点201可以获取一个或多个第一报文,且每个第一报文中可以包括一个或多个控制条目。其中,每个第一报文中分别包括该第一报文所需发往的网络设备的设备标识。其中,网络设备的设备标识可以为路由器标识(router-id),该路由器标识可以为网络设备的互联网协议(Internet protocol,IP)地址或环回loopback地址,或者设备标识为网络设备的身份标识(identification,ID)等。例如,仍以图2b为例,头节点201为网络设备R0,中间节点202分别为网络设备R1、网络设备R2,其中,网络设备R1的路由器标识为1.1.1.1,网络设备R2的路由器标识为2.2.2.2。若第一报文包括路由标识1.1.1.1,则表明该第一报文中的一个或多个控制条目发往网络设备R1。若第一报文包括路由标识2.2.2.2,则表明该第一报文中的一个或多个控制条目可以发往网络设备R2。其中,控制条目用于指示接收该控制条目的网络设备进行本地控制,该控制条目可以为流规则(flow specification,flowspec)、分段路由(segment routing,SR)策略或者路由策略分布(route policy distribution,RPD)等。
以上示例以头节点201为图2b中的R0为例,在其他可能的情形中,头节点也可以为图2b中的R1或R2。
头节点201通过以下方式获取至少一个第一报文,一种是,头节点201可以从其所连接的控制器或服务器获取至少一个第一报文,即由控制器或服务器生成至少一个第一报文,第一网络设备可以接收控制器或服务器发送的至少一个第一报文。另一种是,头节点201根据本地配置的,具体地,头节点201可以从本地配置信息中获取,该本地配置信息例如可以为用户根据需要实际业务需求在头节点201中手动配置。
其中,第一报文可以为边界网关协议(border gateway protocol,BGP)报文,具体地,第一报文可以为BGP报文中的更新(UPDATE)报文,该更新报文中至少包括:设备标识字段、控制条目字段。如图4a所示的一种更新报文的结构示意图,该更新报文不仅可以包括设备标识字段、控制条目字段,还可以包括预留字段等。其中,预留字段可以携带其他属性字段。在某些可能的情形中,该其他属性字段可以用于对控制条目进行细化筛选。例如,头节点201利用设备标识字段和其他属性字段共同确定应发往某一设备的、包括多个控制条目的第一报文,该确定的第一报文的设备标识字段包括的设备标识与头节点201关注的设备标识相匹配,且该确定的第一报文的其他属性字段包括的属性与头节点201关注的属性相匹配。。该第一报文中所包括的设备标识可以位于第一报文的扩展团体属性中,通过扩展团体属性中的类型长度值(type-length-value,TLV)来指示设备标识。其中,Type字段用于指示扩展团体属性类型,Length字段用于指示“Value”字段所包括的字节数,如8字节(Byte),Value字段用于指示设备标识,如图4b所示。作为一种可能的实现,当第一报文中的扩展团体属性为基于IP地址的扩展团体属性时,Value字段包括全局管理员Global
Administrator信息字段,该Global Administrator携带设备标识。当第一报文中包括多个设备标识时,Value字段可以包括多个Global Administrator,每个Global Administrator携带一个设备标识。
上述携带方式仅作为可能的示例,在其他可能的应用场景或设计方式中,第一报文携带的一个或多个设备标识也可以位于其他可能类型的报文中,或者位于报文的其他可能字段,甚至不同的设备标识可以位于不同类型的字段中,只要对于接收第一报文侧的设备而言可以识别和理解,以使得接收侧设备可以通过相应的设备标识进行匹配而确定需转发的目标控制条目即可。
S302:头节点201根据至少一个第一报文中的部分或全部报文中包括的设备标识为中间节点202的设备标识,确定向中间节点202发送的目标控制条目。
头节点201在向中间节点202发送控制条目时,为保证所发送的控制条目为中间节点202所需要的控制条目,以及降低头节点201发送压力,头节点201可以根据至少一个第一报文中的部分或全部报文中包括的设备标识为中间节点202的设备标识,确定出向中间节点202发送的目标控制条目。即,头节点201从获取的每个第一报文所包括的控制条目中,确定出向中间节点202发送的目标控制条目,该目标控制条目所属的第一报文包括中间节点202的设备标识。例如,中间节点202的设备标识为1.1.1.1,头节点201获取100个第一报文,其中20个第一报文所包括的设备标识为1.1.1.1,则头节点201可以将该20个第一报文中所包 括的全部控制条目确定为目标控制条目。其中,中间节点202可以为图2b中的R1或R2。
在实际应用中,头节点201可以接收中间节点202发送的第三报文,该第三报文中包括中间节点202的设备标识,以通过该第三报文向头节点201通告自身所对应的设备标识。头节点201可以根据从第三报文接收的中间节点202的设备标识与包括该中间节点202的设备标识的第一报文相匹配,并从匹配的第一报文中确定向中间节点202发送的目标控制条目,进而根据目标控制条目获取第二报文。在一种情形中,第三报文中还可以包括其他属性字段,则头节点201在确定向中间节点202发送的目标控制条目时,可以根据从第三报文接收的中间节点202的设备标识以及其他属性与包括该中间节点202的设备标识以及属性字段的第一报文相匹配,并从匹配的第一报文中确定向中间节点202发送的目标控制条目。也就是,当头节点201根据中间节点202的设备标识确定出匹配的第一报文时,可以将匹配的第一报文中所包括的所有控制条目确定为目标控制条目。或者,当头节点201根据中间节点202的设备标识确定出匹配的第一报文后,还可以根据其他属性从匹配的第一报文中确定出满足该其他属性的第一报文,将该满足其他属性的第一报文中所包括的控制条目确定为目标控制条目。该目标控制条目可以由一个或多个控制条目组成,并且可以分布在一个第一报文中,也可以分布在多个第一报文中。例如,头节点201根据中间节点202的设备标识从获取的100个第一报文中确定出匹配的20个第一报文,则头节点201再根据其他属性从该20个第一报文中确定出包括该其他属性的第一报文共5个,则将该5个第一报文中的控制条目作为目标控制条目。
头节点201在根据至少一个第一报文确定出目标控制条目后,根据该目标控制条目获取至少一个第二报文。该至少一个第二报文即为头节点201确定出的用于携带目标控制条目的报文。获取该至少一个第二报文的方式至少包括以下几种情形。
一种情形是,头节点201可以将通过中间节点202的设备标识所匹配到的第一报文作为第二报文。即将上述所匹配到的每个第一报文中的所有控制条目确定为目标控制条目。例如,头节点201共获取50个第一报文,其中20个第一报文中包括中间节点202的设备标识,则该20个第一报文为匹配的第一报文,头节点201将该匹配的第一报文作为第二报文,从而确定出20个第二报文。
另一种情形是,头节点201首先根据中间节点202的设备标识从部分或全部第一报文中包括的设备标识为中间节点202的设备标识,将该匹配中间节点202的设备标识的部分或全部第一报文中的控制条目确定为向中间节点202发送的目标控制条目,并对该目标控制条目进行重新封装,获得至少一个第二报文。例如,头节点201根据中间节点202的设备标识从其中一个第一报文(包括100个控制条目)中确定出50个目标控制条目,则头节点202重新对该50个目标控制条目进行封装,获得至少一个第二报文。
再一种情形是,头节点201首先根据中间节点202的设备标识从部分或全部第一报文中包括的设备标识为中间节点202的设备标识,确定出向中间节点202发送的目标控制条目。头节点201再根据目标控制条目以及本地在获取至少一个第一报文之前即存储的需要发往中间节点202的控制条目生成至少一个第二报文。
S303:头节点201向中间节点202发送至少一个第二报文。
当头节点201根据中间节点202的设备标识确定出向中间节点202发送的目标控制条目后,可以根据该目标控制条目获取至少一个第二报文,并向中间节点202发送该至少一个第二报文。其中,头节点201通过S302所确定的目标控制条目可以位于至少一个第二报文中,且每个第二报文中均包括中间节点202的设备标识。其中,第二报文可以为边界网关协议BGP报文,第二报文中所包括的设备标识可以位于第二报文的扩展团体属性中,具体表现形式可以通过在扩展团体属性中新增类型长度值TLV进行定义,例如图4b所示。关于第二报文的格式和设备标识在第二报文中的封装格式可以参见S301中第一报文的相关描述。
S304:中间节点202根据至少一个第二报文中的部分或全部报文中包括的设备标识为尾节点203的设备标识,确定向尾节点203发送的目标控制条目。
本实施例中,中间节点202在接收到头节点201发送的至少一个第二报文后,可以根据至少一个第二报文中的部分或全部报文中包括尾节点203的设备标识,确定向尾节点203发送的目标控制条目。其中,头节点201向中间节点202所发送的第二报文中还可以包括尾节点203的设备标识。例如,中间节点202的设备标识为1.1.1.1、尾节点203的设备标识为3.3.3.3,则头节点201所发送的第二报文中不仅可以包括设备标识1.1.1.1,还可以包括设备标识3.3.3.3,其中,设备标识1.1.1.1用于指示该至少一个第二报文为发往中间节点202的报文,中间节点202可以接收并保存该至少一个第二报文;设备标识3.3.3.3则可用于指示中间节点202根据该设备标识从该至少一个第二报文中确定出需要发往尾节点203的目标控制条目,该尾节点203即为设备标识为3.3.3.3的网络设备。作为示例,如图2b所示,在中间节点202为R1时,尾节点203可以为R3或R4,或者在中间节点202为R2时,尾节点203可以为R5或R6。在可能的实现中,在头节点201获取的第一报文中除了包括设备标识1.1.1.1,即还包括设备标识3.3.3.3,如此,头节点201在向中间节点202发送包括目标控制条目的至少第二报文时,仍携带设备标识3.3.3.3。
在实际应用中,中间节点202在确定向尾节点203发送的目标控制条目之前,中间节点202可以接收尾节点203发送的第五报文,该第五报文中包括尾节点203的设备标识,以通过该第五报文向中间节点202通告自身所对应的设备标识。如此,在中间节点202从头节点201接收到至少一个第二报文时,中间节点202可以根据从第五报文接收的尾节点203的设备标识与包括该尾节点203的设备标识的第二报文相匹配,从匹配的第二报文中确定向尾节点203发送的目标控制条目,并获取包括向该尾节点203发送的目标控制条目的至少一个第四报文。在一种情形中,第五报文还可以包括其他属性字段,中间节点202在确定向尾节点203发送的目标控制条目时,可以根据从第五报文接收的尾节点203的设备标识以及其他属性与包括该尾节点203的设备标识以及属性字段的第二报文相匹配,从匹配的第二报文中确定向尾节点203发送的目标控制条目。其中,关于中间节点202确定向尾节点203发送目标控制条目以及根据目标控制条目获取第四报文的具体实现可以参见S302中第二报文获取方式的相关描述。
S305:中间节点202向尾节点203发送至少一个第四报文。
当中间点202根据尾节点203的设备标识确定出向尾节点203发送的目标控制条目后,根据该目标控制条目生成至少一个第四报文,并向尾节点203发送该至少一个第四报文。中 间节点202通过S304所确定的目标控制条目可以位于至少一个第四报文中,且每个第四报文中均包括尾节点203的设备标识。其中,第四报文可以为边界网关协议BGP报文,关于第四报文的格式以及尾节点203的设备标识在第四报文中封装格式可以参见S301中关于第一报文的相关描述。
在本实施例中,尾节点203在接收到第四报文后,在不同的应用场景下可以执行不同的处理。具体可以包括以下操作:
一种情形是,尾节点203在接收到第四报文后不再进行转发。例如,当尾节点203为与用户设备所连接的网络设备时,该情况下,尾节点203可以仅接收第四报文,并根据第四报文中的目标控制条目进行本地控制,例如当目标控制条目为流规则,尾节点203可以根据该流规则选择路径,以实现对业务流量传输路径的调整;或者当目标控制条目为分段路由策略,尾节点203可以根据该分段路由策略获取指定路径的段列表,以通过该段列表对后续接收的业务流量进行转发;或者当目标控制条目为路由策略分发,尾节点可以根据路由策略分发改变自身的路由处理行为。在上述情形中,尾节点203可以不再对第四报文进行转发。
另一种情形是,当尾节点203存在对等体节点时,尾节点203在接收到中间节点202发送的第四报文时,可以将第四报文转发给对等体节点。对等体节点可以根据本地策略从第四报文中确定出所需的控制条目。可以理解的,上述情形仅作为示例,尾节点204对报文进行的处理操作可结合具体应用场景确定。
本实施例以图2b所示的网络系统为例进行说明。当实际应用场景为图2a所示的网络系统架构时,头节点在获取到至少一个第一报文后,根据该至少一个第一报文中的部分或全部报文中包括的设备标识为尾节点的设备标识,确定向尾节点发送的目标控制条目,并向尾节点发送至少一个第二报文。其中,目标控制条目位于至少一个第二报文中,该第二报文中包括尾节点的设备标识。即,当头节点与尾节点之间不存在中间转发节点时,头节点直接根据尾节点的设备标识确定出向尾节点发送的目标控制条目。具体实现可以参见S301-S305中的相关描述。或者,在一种可能的情形中,中间节点202也可能不支持路由筛选功能,则中间节点202也可以不执行S304和S305,而是直接将从头节点201接收的至少一个第二报文直接发送至尾节点203,然后由尾节点203根据本地策略确定出其所需要的控制条目。再或者,本实施例提供的而方法也可以应用在可能的网络系统架构中,如网络系统中包括三级以上的RR,其中每一级RR均可利用本实施例可提供的相应的方法确定需发往下一级网络设备的路由,该下一级网络设备例如可以是具有路由反射功能的RR,也可以是不具有路由反射功能的客户机。
为便于理解本申请实施例提供的技术方案,参见图5,该图为本申请实施例提供的另一种报文传输方法流程图,如图5所示,该方法可以包括:
S501:第一网络设备获取至少一个控制条目,该至少一个控制条目位于至少一个第一报文中。
本实施例中,第一网络设备可以为前述实施例中描述的头节点201、中间节点202。
当第一网络设备为头节点201时,第一网络设备可以获取至少一个控制条目。具体地,第一网络设备可以根据本地配置信息获取,或者从控制器或服务器获取。其中,关于第一 网络设备获取至少一个控制条目的具体实现可以参见S301。
当第一网络设备为中间节点202时,第一网络设备从作为上一级网络设备的第四网络设备接收的报文中确定至少一个控制条目。作为一种可能的情形,该上一级网络设备例如可以是头节点201。具体地,第四网络设备可以根据第一网络设备的设备标识从自身所获取的报文中确定向第一网络设备发送的至少一个控制条目,并将该至少一个控制条目发送给第一网络设备。其中,第一网络设备可以为路由反射设备,关于第四网络设备根据第一网络设备的设备标识确定向第一网络设备发送的至少一个控制条目的具体实现可以参见S302或S304。
其中,每个第一报文均包括第一报文需发往的网络设备的设备标识,该设备标识可以为路由器标识。控制条目可以为流规则flowspec,或者为分段路由SR策略,或者为路由策略分发RPD等。其中,关于第一报文的格式以及封装设备标识的格式可以参见S301。
S502:第一网络设备根据至少一个第一报文中的部分或全部报文中包括的设备标识为第二网络设备的设备标识,确定向第二网络设备发送的目标控制条目。
本实施例中,第一网络设备可以从所获取的至少一个第一报文中确定出部分或全部第一报文中包括的设备标识为第二网络设备的设备标识,从而确定向第二网络设备发送的目标控制条目。在一种具体的实现方式中,第一网络设备在确定向第二网络设备发送的目标控制条目之前,第一网络设备可以接收第二网络设备发送的第三报文,该第三报文中包括第二网络设备的设备标识;第一网络设备根据从第三报文接收的第二网络设备的设备标识与目标控制条目所属的一个或多个第一报文中的第二网络设备的设备标识相匹配,从一个或多个第一报文中确定向第二网络设备发送的目标控制条目。其中,关于第一网络设备确定向第二网络设备发送的目标控制条目的具体实现可以参见S302或S304。
S503:第一网络设备向第二网络设备发送至少一个第二报文,目标控制条目位于至少一个第二报文中。
当第一网络设备确定出向第二网络设备发送的目标控制条目后,可以根据该目标控制条目获取至少一个第二报文,以将该至少一个第二报文发送给第二网络设备。其中,每个第二报文中包括第二网络设备的设备标识,该第二网络设备的设备标识为路由器标识Router-ID。其中,关于第一网络设备获取至少一个第二报文的具体实现可以参见S302。
在一种具体的实现方式中,第二报文可以为边界网关协议BGP报文,则第二网络设备的设备标识可以位于第二报文的扩展团体属性中。具体地,第二报文可以为BGP报文中的UPDATE报文,关于UPDATE报文的格式以及设备标识的封装格式可以参见S301的相关描述。
在一种具体的实现方式中,第一网络设备可以为路由反射设备,该情况下,第二网络设备可以为客户端设备,如图2a所示R1或R2。或者,第二网络设备为下一级路由反射设备,如图2b中的R1或R2。当第二网络设备为路由反射设备时,其可以存在对应的客户端设备(第三网络设备),如图2b中R3、R4或R5、R6,则至少一个第二报文中还包括第三网络设备的设备标识,该第三网络设备的设备标识用于指示第二网络设备根据该第三网络设备的设备标识从目标控制条目中确定发往第三网络设备的控制条目。其中,关于第二网络设备确定 发往第三网络设备的控制条目的实现可以参见S302或S304。
当第二网络设备存在对应的第三网络设备时,第二网络设备在确定发送第三网络设备的目标控制条目之前,第二网络设备可以接收第三网络设备发送的第五报文,该第五报文包括第三网络设备的设备标识。第二网络设备从第五报文接收的第三网络设备的设备标识与第二报文中的第三网络设备的设备标识相匹配,从一个或多个第二报文中确定向第三网络设备发送的目标控制条目。具体实现可以参见S304。
具体地,当第二网络设备为尾节点时,如图2中的R3、R4、R5或R6时,其接收第二报文后的具体操作可以参见S305的相关描述,本实施例在此不再赘述。
基于上述方法实施例,本申请实施例还提供了一种报文传输系统,参见图6所示的一种报文传输系统结构图,该系统可以包括第一网络设备601和第二网络设备602。
所述第一网络设备601,用于获取至少一条控制条目,所以至少一条控制条目位于至少一个第一报文中,所述至少一个第一报文分别包括所述第一报文需发往的网络设备的设备标识。其中,第一网络设备的实现可以参见S301或S501。
所述第一网络设备601,还用于根据所述至少一个第一报文中的部分或全部报文中包括的设备标识为第二网络设备的设备标识,确定向所述第二网络设备发送的目标控制条目,所述目标控制条目为所述至少一条控制条目中的一个或多个控制条目。其中,第一网络设备的实现可以参见S302、S304或S502。
所述第一网络设备601,还用于向所述第二网络设备发送至少一个第二报文,所述目标控制条目位于所述至少一个第二报文,所述至少一个第二报文分别包括所述第二网络设备的设备标识。其中,第一网络设备的具体实现可以参见S303、S305或S503。
所述第二网络设备602,用于接收所述至少一个第二报文。
在一种可能的实现方式中,所述系统还包括:第三网络设备603,所述至少一个第二报文中还包括所述第三网络设备的设备标识;所述第二网络设备602,还用于根据所述第三网络设备的设备标识从所述目标控制条目中确定向所述第三网络设备发送的控制条目,所述控制条目为所述目标控制条目中的至少一条或多条控制条目。关于第三网络设备603的实现可以参见S304或S503。
所述第二网络设备602,还用于向所述第三网络设备发送至少一个第四报文,所述控制条目位于所述至少一个第四报文,所述至少一个第四报文分别包括所述第三网络设备的设备标识。其中,关于第二网络设备602的实现可以参见S305或S503。
在一种可能的实现方式中,所述第二网络设备602,还用于向所述第一网络设备发送第三报文,所述第三报文包括所述第二网络设备的设备标识。其中,关于第二网络设备602的实现可以参见S302或S502。
在一种可能的实现方式中,所述第三网络设备603,还用于向所述第二网络设备发送第五报文,所述第五报文包括所述第三网络设备的设备标识。其中,关于第三网络设备603的实现可以参见S304或S503。
另外,本申请实施例还提供了一种报文传输装置,下面将结合附图对该装置进行说明。
参见图7,该图为本申请实施例提供的一种报文传输装置结构示意图,该装置能够应 用于第一网络设备,执行图5所示实施例中第一网络设备的功能,该装置700可以包括获取单元701、确定单元702和发送单元703。
获取单元701,用于获取至少一个控制条目,所述至少一个控制条目位于至少一个第一报文中,所述至少一个第一报文分别包括所述第一报文需发往的网络设备的设备标识。
当装置700所应用的第一网络设备为头节点201时,获取单元701获取控制条目的具体实现可以参见图3所述实施例中的S301。当装置700所应用的第一网络设备为中间节点202或尾节点203时,获取单元601获取控制条目的具体实现可以参见S303或S305。
确定单元702,用于根据所述至少一个第一报文中的部分或全部报文中包括的设备标识为第二网络设备的设备标识,确定向所述第二网络设备发送的目标控制条目,所述目标控制条目为所述至少一个控制条目中的一个或多个控制条目。
其中,确定单元703的具体实现可以参见S302或S304。
发送单元703,用于向所述第二网络设备发送至少一个第二报文,所述目标控制条目位于所述至少一个第二报文中,所述至少一个第二报文分别包括所述第二网络设备的设备标识。
其中,发送单元703的具体实现可以参见S303或S305。
在一种可能的实现方式中,所述装置为路由反射设备。其中,装置700所应用的网络设备可以为路由反射设备,例如头节点201或中间节点202。
在一种可能的实现方式中,所述第二网络设备为路由反射设备,或者所述第二网络设备为客户端设备。
当装置700所应用的第一网络设备为路由反射设备时,第二网络设备可以为路由反射设备,如第一网络设备为头节点201、第二网络设备为中间节点202。或者第二网络设备为客户端设备,如第一网络设备为中间节点202、第二网络设备为尾节点203。
在一种可能的实现方式中,当所述第二网络设备为路由反射设备,所述至少一个第二报文中还包括第三网络设备的设备标识,所述第三网络设备的设备标识用于指示所述第二网络设备根据所述第三网络设备的设备标识从所述目标控制条目中确定发往所述第三网络设备的控制条目。
在一种可能的实现方式中,所述至少一个第二报文为BGP报文,所述第二网络设备的设备标识分别位于所述至少一个第二报文的扩展团体属性中。关于BGP协议报文的格式和设备标识的封装格式可以参见S301。
在一种可能的实现方式中,所述第二网络设备的设备标识为路由器标识。
在一种可能的实现方式中,所述装置还包括:接收单元(图7中未示出),
所述接收单元,还用于在执行所述获取单元之前,接收所述第二网络设备发送的第三报文,所述第三报文中包括所述第二网络设备的设备标识;所述确定单元,具体用于根据从所述第三报文接收的所述第二网络设备的设备标识与所述目标控制条目所属的一个或多个所述第一报文中的所述第二网络设备的设备标识相匹配,从所述一个或多个所述第一报文中确定向所述第二网络设发送的所述目标控制条目。
其中,关于接收单元和确定单元的具体实现可以参见S302。
在一种可能的实现方式中,所述控制条目为flowspec,或者为SR策略,或者为RPD。
在一种可能的实现方式中,所述至少一条控制条目为所述装置从控制器或服务器获取,或者所述至少一条控制条目为所述装置从第四网络设备接收,或者所述至少一条控制条目为所述第一网络设备本地配置的。其中,关于获取控制条目的具体实现可以参见S301。
在一种可能的实现方式中,当所述至少一条控制条目为所述装置从第四网络设备接收的时,所述至少一条控制条目为所述第四网络设备根据所述装置的设备标识确定的。其中,关于装置700所应用的网络设备从第四网络设备接收控制条目的实现可以参见S301。
关于报文传输装置700具体可执行的功能和实现,可以参见图5所示实施例中关于第一网络设备的相应描述,此处不再赘述。
图8为本申请实施例提供的一种通信设备的结构示意图,该通信设备例如可以是图3所示实施例中的头节点201、中间节点202或尾节点203,或者也可以是图5所示实施例中的第一网络设备、第二网络设备或第三网络设备,或者也可以是图7所示实施例中的报文传输装置700的设备实现。
请参阅图8所示,通信设备800至少包括处理器810。通信设备800还可以包括通信接口820和存储器830。其中通信设备800中的处理器810的数量可以一个或多个,图8中以一个处理器为例。本申请实施例中,处理器810、通信接口820和存储器830可通过总线系统或其它方式连接,其中,图8中以通过总线系统840连接为例。
处理器810可以是CPU、NP、或者CPU和NP的组合。处理器810还可以进一步包括硬件芯片。上述硬件芯片可以是专用集成电路(application-specific integrated circuit,ASIC),可编程逻辑器件(programmable logic device,PLD)或其组合。上述PLD可以是复杂可编程逻辑器件(complex programmable logic device,CPLD),现场可编程逻辑门阵列(field-programmable gate array,FPGA),通用阵列逻辑(generic array logic,GAL)或其任意组合。
当通信设备包括头节点201时,处理器810可以执行上述方法实施例中获取至少一个控制条目以及确定目标控制条目等的相关功能。当通信设备为中间节点202或尾结点203时,处理器810可以执行上述方法实例中根据设备标识确定目标控制条目等相关功能。
通信接口820用于接收和发送报文,具体地,通信接口820可以包括接收接口和发送接口。其中,接收接口可以用于接收报文,发送接口可以用于发送报文。通信接口820的个数可以为一个或多个。
存储器830可以包括易失性存储器(英文:volatile memory),例如随机存取存储器(random-access memory,RAM);存储器830也可以包括非易失性存储器(英文:non-volatile memory),例如快闪存储器(英文:flash memory),硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD);存储器830还可以包括上述种类的存储器的组合。存储器830例如可以存储前文提及的标识信息和隧道之间的对应关系。
可选地,存储器830存储有操作系统和程序、可执行模块或者数据结构,或者它们的子集,或者它们的扩展集,其中,程序可包括各种操作指令,用于实现各种操作。操作系统可包括各种系统程序,用于实现各种基础业务以及处理基于硬件的任务。处理器810可以 读取存储器830中的程序,实现本申请实施例提供的报文传输方法。
其中,存储器830可以为通信设备800中的存储器件,也可以为独立于通信设备800的存储装置。
总线系统840可以是外设部件互连标准(peripheral component interconnect,PCI)总线或扩展工业标准结构(extended industry standard architecture,EISA)总线等。总线系统840可以分为地址总线、数据总线、控制总线等。为便于表示,图8中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
图9是本申请实施例提供的另一种通信设备900的结构示意图,通信设备900可以配置为前述实施例中的头节点201、中间节点202或尾节点203,或者也可以是前述实施例中的第一网络设备、第二网络设备或第三网络设备,或图7所示实施例中的报文传输装置700的设备实现。
通信设备900包括:主控板910和接口板930。
主控板910也称为主处理单元(main processing unit,MPU)或路由处理卡(route processor card),主控板910对网络设备900中各个组件的控制和管理,包括路由计算、设备管理、设备维护、协议处理功能。主控板910包括:中央处理器911和存储器912。
接口板930也称为线路接口单元卡(line processing unit,LPU)、线卡(line card)或业务板。接口板930用于提供各种业务接口并实现数据包的转发。业务接口包括而不限于以太网接口、POS(Packet over SONET/SDH)接口等,以太网接口例如是灵活以太网业务接口(Flexible Ethernet Clients,FlexE Clients)。接口板930包括:中央处理器931、网络处理器932、转发表项存储器934和物理接口卡(ph8sical interface card,PIC)933。
接口板930上的中央处理器931用于对接口板930进行控制管理并与主控板910上的中央处理器911进行通信。
网络处理器932用于实现报文的转发处理。网络处理器932的形态可以是转发芯片。具体而言,上行报文的处理包括:报文入接口的处理,转发表查找;下行报文的处理:转发表查找等等。
物理接口卡933用于实现物理层的对接功能,原始的流量由此进入接口板930,以及处理后的报文从该物理接口卡933发出。物理接口卡933包括至少一个物理接口,物理接口也称物理口,物理接口卡933对应于系统架构200中的FlexE物理接口204。物理接口卡933也称为子卡,可安装在接口板930上,负责将光电信号转换为报文并对报文进行合法性检查后转发给网络处理器932处理。在一些实施例中,接口板903的中央处理器931也可执行网络处理器932的功能,比如基于通用CPU实现软件转发,从而物理接口卡933中不需要网络处理器932。
可选地,通信设备900包括多个接口板,例如通信设备900还包括接口板940,接口板940包括:中央处理器941、网络处理器942、转发表项存储器944和物理接口卡943。
可选地,通信设备900还包括交换网板920。交换网板920也可以称为交换网板单元(switch fabric unit,SFU)。在网络设备有多个接口板930的情况下,交换网板920用于完成各接口板之间的数据交换。例如,接口板930和接口板940之间可以通过交换网板920通信。
主控板910和接口板930耦合。例如。主控板910、接口板930和接口板940,以及交换网板920之间通过系统总线与系统背板相连实现互通。在一种可能的实现方式中,主控板910和接口板930之间建立进程间通信协议(inter-process communication,IPC)通道,主控板910和接口板930之间通过IPC通道进行通信。
在逻辑上,通信设备900包括控制面和转发面,控制面包括主控板910和中央处理器931,转发面包括执行转发的各个组件,比如转发表项存储器934、物理接口卡933和网络处理器932。控制面执行路由器、生成转发表、处理信令和协议报文、配置与维护设备的状态等功能,控制面将生成的转发表下发给转发面,在转发面,网络处理器932基于控制面下发的转发表对物理接口卡933收到的报文查表转发。控制面下发的转发表可以保存在转发表项存储器934中。在一些实施例中,控制面和转发面可以完全分离,不在同一设备上。
如果通信设备900被配置为第一网络设备,中央处理器911可以获取控制条目;根据第二网络设备的设备标识确定目标控制条目。网络处理器932可以触发物理接口卡933向第二网络设备发送包括目标控制条目的第二报文。
如果通信设备900被配置为第二网络设备,中央处理器911可以根据报文中的标识信息确定第二隧道。网络处理器932可以触发物理接口卡933根据确定的第三网络设备的设备标识确定目标控制条目,并向第三网络设备发送包括目标控制条目的报文。
应理解,报文传输装置700中的发送单元703等可以相当于通信设备900中的物理接口卡933或物理接口卡943;报文传输装置700中的获取单元701和确定单元702等可以相当于通信设备900中的中央处理器911或中央处理器931。
应理解,本申请实施例中接口板940上的操作与接口板930的操作一致,为了简洁,不再赘述。应理解,本实施例的通信设备900可对应于上述各个方法实施例中的第一网络设备或第二网络设备,该通信设备900中的主控板910、接口板930和/或接口板940可以实现上述各个方法实施例中的第一网络设备或第二网络设备所具有的功能和/或所实施的各种步骤,为了简洁,在此不再赘述。
应理解,主控板可能有一块或多块,有多块的时候可以包括主用主控板和备用主控板。接口板可能有一块或多块,网络设备的数据处理能力越强,提供的接口板越多。接口板上的物理接口卡也可以有一块或多块。交换网板可能没有,也可能有一块或多块,有多块的时候可以共同实现负荷分担冗余备份。在集中式转发架构下,网络设备可以不需要交换网板,接口板承担整个系统的业务数据的处理功能。在分布式转发架构下,网络设备可以有至少一块交换网板,通过交换网板实现多块接口板之间的数据交换,提供大容量的数据交换和处理能力。所以,分布式架构的网络设备的数据接入和处理能力要大于集中式架构的设备。可选地,网络设备的形态也可以是只有一块板卡,即没有交换网板,接口板和主控板的功能集成在该一块板卡上,此时接口板上的中央处理器和主控板上的中央处理器在该一块板卡上可以合并为一个中央处理器,执行两者叠加后的功能,这种形态设备的数据交换和处理能力较低(例如,低端交换机或路由器等网络设备)。具体采用哪种架构,取决于具体的组网部署场景。
在一些可能的实施例中,上述第一网络设备或第二网络设备可以实现为虚拟化设备。 例如,虚拟化设备可以是运行有用于发送报文功能的程序的虚拟机(英文:Virtual Machine,VM),虚拟机部署在硬件设备上(例如,物理服务器)。虚拟机指通过软件模拟的具有完整硬件系统功能的、运行在一个完全隔离环境中的完整计算机系统。可以将虚拟机配置为第一网络设备或第二网络设备。例如,可以基于通用的物理服务器结合网络功能虚拟化(Network Functions Virtualization,NFV)技术来实现第一网络设备或第二网络设备。第一网络设备或第二网络设备为虚拟主机、虚拟路由器或虚拟交换机。本领域技术人员通过阅读本申请即可结合NFV技术在通用物理服务器上虚拟出具有上述功能的第一网络设备或第二网络设备,此处不再赘述。
应理解,上述各种产品形态的网络设备,分别具有上述方法实施例中第一网络设备或第二网络设备的任意功能,此处不再赘述。
本申请实施例还提供了一种芯片,包括处理器和接口电路,接口电路,用于接收指令并传输至处理器;处理器,例如可以是图7示出的报文传输装置700的一种具体实现形式,可以用于执行上述报文传输的方法。其中,所述处理器与存储器耦合,所述存储器用于存储程序或指令,当所述程序或指令被所述处理器执行时,使得该芯片系统实现上述任一方法实施例中的方法。
可选地,该芯片系统中的处理器可以为一个或多个。该处理器可以通过硬件实现也可以通过软件实现。当通过硬件实现时,该处理器可以是逻辑电路、集成电路等。当通过软件实现时,该处理器可以是一个通用处理器,通过读取存储器中存储的软件代码来实现。
可选地,该芯片系统中的存储器也可以为一个或多个。该存储器可以与处理器集成在一起,也可以和处理器分离设置,本申请并不限定。示例性的,存储器可以是非瞬时性处理器,例如只读存储器ROM,其可以与处理器集成在同一块芯片上,也可以分别设置在不同的芯片上,本申请对存储器的类型,以及存储器与处理器的设置方式不作具体限定。
示例性的,该芯片系统可以是现场可编程门阵列(field programmable gate array,FPGA),可以是专用集成芯片(application specific integrated circuit,ASIC),还可以是系统芯片(system on chip,SoC),还可以是中央处理器(central processor unit,CPU),还可以是网络处理器(network processor,NP),还可以是数字信号处理电路(digital signal processor,DSP),还可以是微控制器(micro controller unit,MCU),还可以是可编程控制器(programmable logic device,PLD)或其他集成芯片。
本申请实施例还提供了一种计算机可读存储介质,包括指令或计算机程序,当其在计算机上运行时,使得计算机执行以上实施例提供的报文传输方法。
本申请实施例还提供了一种包含指令或计算机程序的计算机程序产品,当其在计算机上运行时,使得计算机执行以上实施例提供的报文传输方法。
需要说明的是,本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的系统或装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。
应当理解,在本申请中,“至少一个(项)”是指一个或者多个,“多个”是指两个或两 个以上。“和/或”,用于描述关联对象的关联关系,表示可以存在三种关系,例如,“A和/或B”可以表示:只存在A,只存在B以及同时存在A和B三种情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b或c中的至少一项(个),可以表示:a,b,c,“a和b”,“a和c”,“b和c”,或“a和b和c”,其中a,b,c可以是单个,也可以是多个。
还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
结合本文中所公开的实施例描述的方法或算法的步骤可以直接用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。
对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本申请。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本申请的精神或范围的情况下,在其它实施例中实现。因此,本申请将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。

Claims (26)

  1. 一种报文传输方法,其特征在于,所述方法包括:
    第一网络设备获取至少一个控制条目,所述至少一个控制条目位于至少一个第一报文中,所述至少一个第一报文分别包括所述第一报文需发往的网络设备的设备标识;
    所述第一网络设备根据所述至少一个第一报文中的部分或全部报文中包括的设备标识为第二网络设备的设备标识,确定向所述第二网络设备发送的目标控制条目,所述目标控制条目为所述至少一个控制条目中的一个或多个控制条目;
    所述第一网络设备向所述第二网络设备发送至少一个第二报文,所述目标控制条目位于所述至少一个第二报文中,所述至少一个第二报文分别包括所述第二网络设备的设备标识。
  2. 根据权利要求1所述的方法,其特征在于,所述第一网络设备为路由反射设备。
  3. 根据权利要求1或2所述的方法,其特征在于,所述第二网络设备为路由反射设备,或者所述第二网络设备为客户端设备。
  4. 根据权利要求3所述的方法,其特征在于,当所述第二网络设备为路由反射设备,所述至少一个第二报文中还包括第三网络设备的设备标识,所述第三网络设备的设备标识用于指示所述第二网络设备根据所述第三网络设备的设备标识从所述目标控制条目中确定发往所述第三网络设备的控制条目。
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述至少一个第二报文为边界网关协议BGP报文,所述第二网络设备的设备标识分别位于所述至少一个第二报文的扩展团体属性中。
  6. 根据权利要求1-5任一项所述的方法,其特征在于,所述第二网络设备的设备标识为路由器标识Router-ID。
  7. 根据权利要求1-6所述的方法,其特征在于,所述方法还包括:
    在所述第一网络设备获取所述至少一条控制条目之前,所述第一网络设备接收所述第二网络设备发送的第三报文,所述第三报文中包括所述第二网络设备的设备标识;
    所述第一网络设备根据所述至少一个第一报文中的部分或全部报文中包括的设备标识为第二网络设备的设备标识,确定向所述第二网络设备发送的目标控制条目,包括:
    所述第一网络设备根据从所述第三报文接收的所述第二网络设备的设备标识与所述目标控制条目所属的一个或多个所述第一报文中的所述第二网络设备的设备标识相匹配,从所述一个或多个所述第一报文中确定向所述第二网络设发送的所述目标控制条目。
  8. 根据权利要求1-7任一项所述的方法,其特征在于,所述控制条目为流规则flowspec,或者为分段路由SR策略,或者为路由策略分发RPD。
  9. 根据权利要求1-8任一项所述的方法,其特征在于,所述至少一条控制条目为所述第一网络设备从控制器或服务器获取,或者所述至少一条控制条目为所述第一网络设备从第四网络设备接收,或者所述至少一条控制条目为所述第一网络设备本地配置的。
  10. 根据权利要求9所述的方法,其特征在于,当所述至少一条控制条目为所述第一网络设备从第四网络设备接收的时,所述至少一条控制条目为所述第四网络设备根据所述 第一网络设备的设备标识确定的。
  11. 一种报文传输系统,其特征在于,所述系统包括:第一网络设备和第二网络设备;
    所述第一网络设备,用于获取至少一条控制条目,所以至少一条控制条目位于至少一个第一报文中,所述至少一个第一报文分别包括所述第一报文需发往的网络设备的设备标识;
    所述第一网络设备,还用于根据所述至少一个第一报文中的部分或全部报文中包括的设备标识为第二网络设备的设备标识,确定向所述第二网络设备发送的目标控制条目,所述目标控制条目为所述至少一条控制条目中的一个或多个控制条目;
    所述第一网络设备,还用于向所述第二网络设备发送至少一个第二报文,所述目标控制条目位于所述至少一个第二报文,所述至少一个第二报文分别包括所述第二网络设备的设备标识;
    所述第二网络设备,用于接收所述至少一个第二报文。
  12. 根据权利要求11所述的系统,其特征在于,所述系统还包括:第三网络设备,所述至少一个第二报文中还包括所述第三网络设备的设备标识;
    所述第二网络设备,还用于根据所述第三网络设备的设备标识从所述目标控制条目中确定向所述第三网络设备发送的控制条目,所述控制条目为所述目标控制条目中的至少一条或多条控制条目;
    所述第二网络设备,还用于向所述第三网络设备发送至少一个第四报文,所述控制条目位于所述至少一个第四报文,所述至少一个第四报文分别包括所述第三网络设备的设备标识。
  13. 根据权利要求11或12所述的系统,其特征在于,所述第二网络设备,还用于向所述第一网络设备发送第三报文,所述第三报文包括所述第二网络设备的设备标识。
  14. 根据权利要求11-13任一项所述的系统,其特征在于,所述第三网络设备,还用于向所述第二网络设备发送第五报文,所述第五报文包括所述第三网络设备的设备标识。
  15. 一种报文传输装置,其特征在于,所述装置包括:
    获取单元,用于获取至少一个控制条目,所述至少一个控制条目位于至少一个第一报文中,所述至少一个第一报文分别包括所述第一报文需发往的网络设备的设备标识;
    确定单元,用于根据所述至少一个第一报文中的部分或全部报文中包括的设备标识为第二网络设备的设备标识,确定向所述第二网络设备发送的目标控制条目,所述目标控制条目为所述至少一个控制条目中的一个或多个控制条目;
    发送单元,用于向所述第二网络设备发送至少一个第二报文,所述目标控制条目位于所述至少一个第二报文中,所述至少一个第二报文分别包括所述第二网络设备的设备标识。
  16. 根据权利要求15所述的装置,其特征在于,所述装置为路由反射设备。
  17. 根据权利要求15或16所述的装置,其特征在于,所述第二网络设备为路由反射设备,或者所述第二网络设备为客户端设备。
  18. 根据权利要求17所述的方法,其特征在于,当所述第二网络设备为路由反射设备,所述至少一个第二报文中还包括第三网络设备的设备标识,所述第三网络设备的设备标识 用于指示所述第二网络设备根据所述第三网络设备的设备标识从所述目标控制条目中确定发往所述第三网络设备的控制条目。
  19. 根据权利要求15-18任一项所述的装置,其特征在于,所述至少一个第二报文为边界网关协议BGP报文,所述第二网络设备的设备标识分别位于所述至少一个第二报文的扩展团体属性中。
  20. 根据权利要求14-19任一项所述的装置,其特征在于,所述第二网络设备的设备标识为路由器标识Router-ID。
  21. 根据权利要求15-20所述的装置,其特征在于,所述装置还包括:接收单元,
    所述接收单元,还用于在执行所述获取单元之前,接收所述第二网络设备发送的第三报文,所述第三报文中包括所述第二网络设备的设备标识;
    所述确定单元,具体用于根据从所述第三报文接收的所述第二网络设备的设备标识与所述目标控制条目所属的一个或多个所述第一报文中的所述第二网络设备的设备标识相匹配,从所述一个或多个所述第一报文中确定向所述第二网络设发送的所述目标控制条目。
  22. 根据权利要求15-21任一项所述的装置,其特征在于,所述控制条目为流规则flowspec,或者为分段路由SR策略,或者为路由策略分发RPD。
  23. 根据权利要求15-22任一项所述的装置,其特征在于,所述至少一条控制条目为所述装置从控制器或服务器获取,或者所述至少一条控制条目为所述装置从第四网络设备接收,或者所述至少一条控制条目为所述第一网络设备本地配置的。
  24. 根据权利要求23所述的装置,其特征在于,当所述至少一条控制条目为所述装置从第四网络设备接收的时,所述至少一条控制条目为所述第四网络设备根据所述装置的设备标识确定的。
  25. 一种通信设备,其特征在于,包括:处理器,存储器;
    所述存储器,用于存储计算机可读指令或者计算机程序;
    所述处理器,用于读取所述计算机可读指令或所述计算机程序,以使得所述通信设备实现如权利要求1-10中任一项所述的报文传输方法。
  26. 一种计算机可读存储介质包括指令或计算机程序,当其在计算机上运行时,使得计算机执行以上权利要求1-10任意一项所述的报文传输方法。
PCT/CN2020/117003 2020-09-23 2020-09-23 一种报文传输方法及装置 WO2022061561A1 (zh)

Priority Applications (7)

Application Number Priority Date Filing Date Title
PCT/CN2020/117003 WO2022061561A1 (zh) 2020-09-23 2020-09-23 一种报文传输方法及装置
CN202080105163.XA CN116158062A (zh) 2020-09-23 2020-09-23 一种报文传输方法及装置
BR112023005185A BR112023005185A2 (pt) 2020-09-23 2020-09-23 Método, sistema e aparelho de transmissão de pacotes, dispositivo de comunicação e meio de armazenamento legível por computador
EP20954415.4A EP4210290A4 (en) 2020-09-23 2020-09-23 PACKET TRANSMISSION METHOD AND APPARATUS
JP2023518432A JP2023542219A (ja) 2020-09-23 2020-09-23 パケット伝送方法および装置
MX2023003359A MX2023003359A (es) 2020-09-23 2020-09-23 Metodo y aparato de transmision de paquetes.
US18/187,437 US20230224245A1 (en) 2020-09-23 2023-03-21 Packet Transmission Method and Apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/117003 WO2022061561A1 (zh) 2020-09-23 2020-09-23 一种报文传输方法及装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/187,437 Continuation US20230224245A1 (en) 2020-09-23 2023-03-21 Packet Transmission Method and Apparatus

Publications (1)

Publication Number Publication Date
WO2022061561A1 true WO2022061561A1 (zh) 2022-03-31

Family

ID=80844513

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/117003 WO2022061561A1 (zh) 2020-09-23 2020-09-23 一种报文传输方法及装置

Country Status (7)

Country Link
US (1) US20230224245A1 (zh)
EP (1) EP4210290A4 (zh)
JP (1) JP2023542219A (zh)
CN (1) CN116158062A (zh)
BR (1) BR112023005185A2 (zh)
MX (1) MX2023003359A (zh)
WO (1) WO2022061561A1 (zh)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060245374A1 (en) * 2005-04-28 2006-11-02 Keyur Patel Method to scale hierarchical route reflectors using automated outbound route filtering-list mechanism
CN101155175A (zh) * 2006-09-27 2008-04-02 华为技术有限公司 一种基于bgp协议的出路由过滤的方法和装置
CN104753794A (zh) * 2013-12-26 2015-07-01 中国移动通信集团辽宁有限公司 路由信息传递方法、系统及路由反射器

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080101385A1 (en) * 2006-10-30 2008-05-01 At&T Knowledge Ventures, L.P. System and method for filtering routing updates
CN112291145B (zh) * 2015-07-06 2024-05-14 华为技术有限公司 路由控制的方法、设备和系统

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060245374A1 (en) * 2005-04-28 2006-11-02 Keyur Patel Method to scale hierarchical route reflectors using automated outbound route filtering-list mechanism
CN101155175A (zh) * 2006-09-27 2008-04-02 华为技术有限公司 一种基于bgp协议的出路由过滤的方法和装置
CN104753794A (zh) * 2013-12-26 2015-07-01 中国移动通信集团辽宁有限公司 路由信息传递方法、系统及路由反射器

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
See also references of EP4210290A4 *
W. WANG A. WANG CHINA TELECOM H. WANG HUAWEI TECHNOLOGIES G. MISHRA VERIZON INC. S. ZHUANG J. DONG HUAWEI TECHNOLOGIES: "Route Distinguisher Outbound Route Filter (RD-ORF) for BGP-4; draft-wang-idr-rd-orf-03.txt", ROUTE DISTINGUISHER OUTBOUND ROUTE FILTER (RD-ORF) FOR BGP-4; DRAFT-WANG-IDR-RD-ORF-03.TXT, no. 3, 24 August 2020 (2020-08-24), pages 1 - 14, XP015141359 *

Also Published As

Publication number Publication date
CN116158062A8 (zh) 2024-05-24
US20230224245A1 (en) 2023-07-13
MX2023003359A (es) 2023-03-29
EP4210290A1 (en) 2023-07-12
EP4210290A4 (en) 2023-11-01
CN116158062A (zh) 2023-05-23
JP2023542219A (ja) 2023-10-05
BR112023005185A2 (pt) 2023-04-25

Similar Documents

Publication Publication Date Title
US20210084009A1 (en) Route generation method and device
JP7105248B2 (ja) 高性能コンピューティング環境においてパーティションメンバーシップに関連して定義されるマルチキャストグループメンバーシップを提供するシステムおよび方法
CN110535760B (zh) 聚合接口的转发检测
US10237179B2 (en) Systems and methods of inter data center out-bound traffic management
US9479349B2 (en) VLAG PIM multicast traffic load balancing
EP2731313A1 (en) Distributed cluster processing system and message processing method thereof
WO2021135420A1 (zh) 业务链的故障保护方法、装置、设备、系统及存储介质
WO2022048418A1 (zh) 一种转发报文的方法、设备和系统
WO2022111372A1 (zh) 报文传输方法、装置、设备及计算机可读存储介质
WO2022261881A1 (zh) 一种网卡管理系统、报文处理方法及设备
WO2022188530A1 (zh) 一种路由处理方法及网络设备
WO2022088685A1 (zh) 一种语义名称获取方法、装置、设备及存储介质
WO2022061561A1 (zh) 一种报文传输方法及装置
WO2022063065A1 (zh) 一种路由信息传输方法及装置
EP3817341A1 (en) Bulk configuration of devices behind a network address translation device
CN114301839A (zh) 一种组播报文传输方法及装置
WO2022133646A1 (zh) 一种路由传输方法及装置
WO2024093306A1 (zh) 通信方法及装置
WO2022143572A1 (zh) 一种报文处理方法及相关设备
WO2022161061A1 (zh) 一种故障检测方法、网络设备及系统
WO2022037330A1 (zh) 传输虚拟专用网的段标识vpn sid的方法、装置和网络设备
WO2022166464A1 (zh) 一种报文传输方法、系统及设备
WO2022257854A1 (zh) 一种报文发布方法、转发路径处理方法及装置
CN114025025B (zh) SRv6 SID的发布方法及网络设备
US9712650B2 (en) PIM fast failover using PIM graft message

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2023518432

Country of ref document: JP

Kind code of ref document: A

REG Reference to national code

Ref country code: BR

Ref legal event code: B01A

Ref document number: 112023005185

Country of ref document: BR

ENP Entry into the national phase

Ref document number: 2020954415

Country of ref document: EP

Effective date: 20230404

ENP Entry into the national phase

Ref document number: 112023005185

Country of ref document: BR

Kind code of ref document: A2

Effective date: 20230321

NENP Non-entry into the national phase

Ref country code: DE