WO2024016985A1 - 报文处理方法、通信系统以及相关装置 - Google Patents

报文处理方法、通信系统以及相关装置 Download PDF

Info

Publication number
WO2024016985A1
WO2024016985A1 PCT/CN2023/103607 CN2023103607W WO2024016985A1 WO 2024016985 A1 WO2024016985 A1 WO 2024016985A1 CN 2023103607 W CN2023103607 W CN 2023103607W WO 2024016985 A1 WO2024016985 A1 WO 2024016985A1
Authority
WO
WIPO (PCT)
Prior art keywords
communication device
bgp
message
flow rules
flow
Prior art date
Application number
PCT/CN2023/103607
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
Priority claimed from CN202210976328.1A external-priority patent/CN117478751A/zh
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2024016985A1 publication Critical patent/WO2024016985A1/zh

Links

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/74Address processing for routing

Definitions

  • the present application relates to the field of communications, and in particular to message processing methods, communications systems and related devices.
  • Border Gateway Protocol (BGP) flow specification (FS) function passes BGP FS routes and traffic policies to BGP FS peers to control attack traffic.
  • Border Gateway Protocol Flow Rules Version 1 BGP FSv1
  • AFI address family identifier
  • SAFI subsequence address family identifier
  • Embodiments of the present application provide a message processing method, a communication system and related devices.
  • the AFI and SAFI included in the BGP message generated and sent by the communication device respectively identify the flow rule Flowspec address family and Flowspec sub-address.
  • Family extends Flowspec to represent a collection of Flowspec features.
  • the type field included in the network layer reachability information (NLRI) in the BGP message has different values to indicate that the BGP message publishes different types of flow rules.
  • the first aspect of the embodiments of the present application provides a message processing method, which is applied to a first communication device.
  • the method includes:
  • the first communication device establishes a BGP session with the second communication device.
  • the first communication device can generate and send a BGP message to the second communication device.
  • the BGP message includes AFI, SAFI and NLRI.
  • AFI identifies the flow rule Flowspec address family
  • SAFI identifies the Flowspec sub-address family
  • AFI and SAFI indicate the Flowspec feature set.
  • NLRI includes a type field, indicating the type of flow rule published by the BGP message. Different values of the type field have different corresponding flow rules.
  • the first communication device may generate a first BGP message, the first BGP message includes a first NLRI, and the value of the type field of the first NLRI is a first value, indicating that the first BGP message publishes a first type of flow rules.
  • BGP messages publish routes, and routes carry flow rules and specify matching conditions and actions.
  • the AFI and SAFI included in the BGP message generated and sent by the communication device respectively identify the Flowspec address family and the Flowspec sub-address family to represent the Flowspec feature set and extend the Flowspec carried in the BGP message.
  • the type field included in the NLRI in the BGP message has different values to indicate that the BGP message publishes different types of flow rules.
  • the combination of AFI and SAFI in the BGP message and the type field in the NLRI represent different information respectively, which not only expands the Flowspec type, but also reduces the redundancy in the message. remaining information, reducing overhead.
  • the first communication device in addition to generating the first BGP message, can also generate a second BGP message, where the second BGP message includes the AFI, the SAFI, and the second NLRI.
  • the AFI and SAFI in the second BGP message are similar to the AFI and SAFI in the first BGP message, identifying the Flowspec address family and the Flowspec sub-address family respectively.
  • the type field of the second NLRI included in the second BGP message is the second value.
  • the second BGP message publishes the flow rule of the second type.
  • the second value is the same as the second value.
  • One value is different, and the flow rule of the second type is different from the flow rule of the first type.
  • the first communication device in addition to generating a first BGP message indicating a first type of flow rule, can also generate a second type of flow rule indicating a second type of flow rule that is different from the first type of flow rule. BGP messages. That is to say, the first communication device can generate and send multiple messages indicating different types of flow rules to the second communication device to achieve control of multiple types of traffic, further enriching the application scenarios of the technical solution of the present application.
  • the second type of flow rule includes: The second type of flow rule includes: IPv4 flow rule, IPv6 flow rule, VPNv4 flow rule, VPNv6 flow rule, L2 flow rule, L2VPN One of flow rules, SFC flow rules, and SFC VPN flow rules. It should be noted that the types of flow rules are not limited to the above types. In future communication technologies, they can also be expanded. Other types of flow rules are not limited here.
  • the first communication device before generating the first BGP message, configures a connection with the second communication device, and enables the implementation of the present application on the first communication device itself.
  • the BGP Flowspec address family capability provided by the example (that is, the AFI field identifies the Flowspec address family, and the SAFI field identifies the Flowspec sub-address family).
  • the first communication device will send a first BGP OPEN message to the second communication device.
  • the first BGP OPEN message is used for capability notification: to notify the second communication device of the capabilities of the first communication device, that is, to instruct the first communication device.
  • the communication device supports the BGP Flowspec address family.
  • the first BGP OPEN message carries an AFI that identifies the Flowspec address family and a SAFI that identifies the Flowspec sub-address family.
  • the second communication device before generating the first BGP message, configures a connection with the first communication device, and enables the implementation of the present application on the second communication device itself.
  • the BGP Flowspec address family capability provided by the example (that is, the AFI field identifies the Flowspec address family, and the SAFI field identifies the Flowspec sub-address family).
  • the second communication device will send a second BGP OPEN message to the first communication device.
  • the second BGP OPEN message is used for capability notification: notifying the first communication device of the capabilities of the second communication device, that is, instructing the second communication device.
  • the communication device supports the BGP Flowspec address family.
  • the second BGP OPEN message carries an AFI that identifies the Flowspec address family and a SAFI that identifies the Flowspec sub-address family.
  • the first communication device and the second communication device will negotiate the BGP Flowspec address family expansion capabilities, so that both communicating parties support the Flowspec address family, which provides technical support for the implementation of the technical solution of this application and improves practicality. feasibility and achievability.
  • the first communication device or the second communication device may have multiple device forms, including: switches, routers, or chips, etc., which are not specifically limited here.
  • the switch or router can be either a physical network element or a virtual network element (that is, a combination of one or more functional modules implemented by pure software), and the details are not limited here.
  • the first communication device and the second communication device can perform role allocation, the first communication device is a route reflect (route reflect, RR) device, and the second communication device is a forwarding device; If the first communication device is a forwarding device, then the second communication device is a forwarding device or an RR device, which is not limited here.
  • the first communication device is a route reflect (route reflect, RR) device
  • the second communication device is a forwarding device
  • the first type of flow rules indicated by the first BGP message include: IPv4 flow rules, IPv6 flow rules, VPNv4 flow rules, VPNv6 flow rules, L2 flow rules, L2VPN flow One of rules, SFC flow rules, and SFC VPN flow rules.
  • IPv4 flow rules IPv6 flow rules
  • VPNv4 flow rules VPNv6 flow rules
  • L2 flow rules L2VPN flow One of rules
  • SFC flow rules SFC VPN flow rules
  • SFC VPN flow rules SFC VPN flow rules
  • the first communication device in addition to sending BGP messages to the second communication device, can also receive BGP messages from the second communication device.
  • the first communication device may receive the third BGP message from the second communication device, where the third BGP message includes the AFI, the SAFI, and the third NLRI.
  • AFI identifies the Flowspec address family
  • SAFI identifies the Flowspec sub-address family
  • the value of the type field of the third NLRI is the third value
  • the third BGP message publishes the third type of flow rule.
  • the third value may be the same as the first value or the second value, or may be different from the first value or the second value. That is to say, the third type of flow rule published in the third BGP message may be the same as or different from the first type of flow rule or the second type of flow rule.
  • the first communication device After receiving the third BGP message, the first communication device will save the third type of flow rule into an access control list (access control list, ACL) or policy based routing table (policy based routing, PRB).
  • access control list access control list
  • policy based routing table policy based routing
  • the third type of flow rules include: IPv4 flow rules, IPv6 flow rules, VPNv4 flow rules, VPNv6 flow rules, L2 flow rules, L2VPN flow rules, SFC flow rules, SFC One of the VPN flow rules.
  • IPv4 flow rules IPv6 flow rules
  • VPNv4 flow rules VPNv6 flow rules
  • L2 flow rules L2VPN flow rules
  • SFC flow rules SFC One of the VPN flow rules.
  • the first communication device in addition to sending BGP messages to the second communication device, can also receive BGP messages from the second communication device, which enriches the application scenarios of the technical solution of the present application.
  • the second aspect of the embodiment of the present application provides a message processing method, which is applied to a second communication device and includes:
  • the second communication device establishes a BGP session with the first communication device, and the second communication device receives a BGP message from the first communication device, where the BGP message includes AFI, SAFI and NLRI.
  • AFI identifies the flow rule Flowspec address family
  • SAFI identifies the Flowspec sub-address family
  • AFI and SAFI indicate the Flowspec feature set.
  • NLRI includes a type field, indicating the type of flow rule published by the BGP message. Different values of the type field have different corresponding flow rules.
  • the second communication device may receive the first BGP message from the first communication device, the first BGP message includes the first NLRI, and the type field of the first NLRI is a first value, indicating the first BGP
  • the packet publishes the first type of flow rule.
  • the second communication device will save the flow rule of the first type, and may save the flow rule of the first type in the ACL or PRB.
  • the second communication device may perform flow control according to the first type of flow rule.
  • the AFI and SAFI included in the BGP message received by the communication device respectively identify the Flowspec address family and the Flowspec sub-address family to represent the Flowspec feature set and extend the Flowspec carried in the BGP message.
  • the type field included in the NLRI in the BGP message has different values to indicate that the BGP message publishes different types of flow rules.
  • the combination of AFI and SAFI in the BGP message and the type field in the NLRI represent different information respectively, which not only expands the Flowspec type, but also reduces the redundancy in the message. remaining information, reducing overhead.
  • the second communication device may also receive a second BGP message from the first communication device, where the second BGP message includes the AFI, SAFI and second NLRI.
  • the AFI and SAFI in the second BGP message are similar to the AFI and SAFI in the first BGP message, identifying the Flowspec address family and the Flowspec sub-address family respectively.
  • the type field of the second NLRI included in the second BGP message is the second value.
  • the second BGP message publishes the flow rule of the second type.
  • the second value is the same as the second value.
  • One value is different, and the flow rule of the second type is different from the flow rule of the first type.
  • the second communication device may save the second type of flow rule into the ACL or PRB. In subsequent processing, the second communication device may perform flow control according to the second type of flow rule.
  • the second communication device can receive multiple BGP messages indicating different types of flow rules from the first communication device to realize control of multiple types of traffic, further enriching the application of the technical solution of the present application. Scenes.
  • the second type of flow rule includes: The second type of flow rule includes: IPv4 flow rule, IPv6 flow rule, VPNv4 flow rule, VPNv6 flow rule, L2 flow rule, L2VPN One of flow rules, SFC flow rules, and SFC VPN flow rules. It should be noted that the types of flow rules are not limited to the above types. In future communication technologies, other types of flow rules can also be expanded, and there are no specific limitations here.
  • the second communication device before receiving the first BGP message from the first communication device, the second communication device will also receive the first BGP OPEN message from the first communication device,
  • the first BGP OPEN message is used for capability notification: to notify the second communication device of the capabilities of the first communication device, that is, to instruct the first communication device to support the BGP Flowspec address family (i.e., the AFI field identifies the Flowspec address family, and the SAFI field identifies Flowspec subaddress family).
  • the first BGP OPEN message carries an AFI that identifies the Flowspec address family and a SAFI that identifies the Flowspec sub-address family.
  • the second communication device before receiving the first BGP message from the first communication device, configures a connection with the first communication device, and in the second communication device
  • the local end enables the BGP Flowspec address family capability provided by the embodiment of this application (that is, the AFI field identifies the Flowspec address family, and the SAFI field identifies the Flowspec sub-address family).
  • the second communication device will send a second BGP OPEN message to the first communication device.
  • the second BGP OPEN message is used for capability notification: notifying the first communication device of the capabilities of the second communication device, that is, instructing the second communication device.
  • the device supports the BGP Flowspec address family.
  • the first communication device and the second communication device negotiate the BGP Flowspec address family expansion capabilities, so that both communicating parties support the Flowspec address family, which provides technical support for the implementation of the technical solution of the present application and improves practicality. feasibility and feasibility Presentity.
  • the first communication device or the second communication device may have multiple device forms, including: switches, routers, or chips, etc., which are not specifically limited here.
  • the switch or router can be either a physical network element or a virtual network element (that is, a combination of one or more functional modules implemented by pure software), and the details are not limited here.
  • the first communication device and the second communication device can perform role allocation, the first communication device is the RR device, and the second communication device is the forwarding device; if the first communication device is the forwarding device device, then the second communication device is a forwarding device or an RR device, and the details are not limited here.
  • the first type of flow rules include: IPv4 flow rules, IPv6 flow rules, VPNv4 flow rules, VPNv6 flow rules, L2 flow rules, L2VPN flow rules, SFC flow rules, SFC One of the VPN flow rules.
  • the second communication device in addition to receiving BGP messages from the first communication device, can also generate and send BGP messages to the first communication device.
  • the second communication device may generate a third BGP message, and the third BGP message includes the AFI, the SAFI, and the third NLRI.
  • the AFI identifier in the third BGP message identifies the Flowspec address family
  • the SAFI identifies the Flowspec sub-address family
  • the type field of the third NLRI takes a third value, indicating that the third BGP message publishes a third type of flow rule.
  • the third value may be the same as the first value or the second value, or may be different from the first value or the second value.
  • the third type of flow rule published in the third BGP message may be the same as or different from the first type of flow rule or the second type of flow rule, and there is no specific limitation here.
  • the third type of flow rules include: IPv4 flow rules, IPv6 flow rules, VPNv4 flow rules, VPNv6 flow rules, L2 flow rules, L2VPN flow rules, SFC flow rules, SFC One of the VPN flow rules. It should be noted that the types of flow rules are not limited to the above types. In future communication technologies, other types of flow rules can also be expanded, and there are no specific limitations here.
  • the second communication device in addition to receiving BGP messages from the first communication device, can also send BGP messages to the first communication device, which enriches the application scenarios of the technical solution of the present application.
  • the third aspect of the embodiment of the present application provides a communication system, including a first communication device and a second communication device.
  • the first communication device is configured to perform the first communication in any possible implementation of the first aspect and the first aspect.
  • the operations performed by the device; the second communication device is configured to perform the operations performed by the second communication device in the aforementioned second aspect and any possible implementation of the second aspect.
  • the fourth aspect of the embodiments of the present application provides a communication device.
  • the communication device includes a transceiver unit and a processing unit.
  • the transceiver unit is configured to perform the aforementioned first aspect and what the first communication device performs in any possible implementation of the first aspect.
  • the processing unit is configured to perform operations other than the sending operation and receiving operation performed by the first communication device in the aforementioned first aspect and any possible implementation of the first aspect.
  • the processing unit is configured to generate a first BGP message, the first BGP message includes AFI, SAFI and the first NLRI, the AFI identifies the Flowspec address family, and the SAFI identifies the Flowspec sub-address. family; the first NLRI includes a type field, the value of the type field of the first NLRI is the first value, and the first BGP message publishes the first type of flow rule.
  • the transceiver unit is configured to send the first BGP message to the second communication device.
  • the processing unit is also configured to generate a second BGP message, the second BGP message includes AFI, SAFI and a second NLRI, the second NLRI includes a type field, and the second NLRI
  • the value of the type field is the second value
  • the second BGP message publishes the flow rule of the second type
  • the second value is different from the first value
  • the flow rule of the second type is different from the flow rule of the first type.
  • the transceiver unit is also used to send the second BGP message to the second communication device.
  • the second type of flow rules include: IPv4 flow rules, IPv6 flow rules, VPNv4 flow rules, VPNv6 flow rules, L2 flow rules, L2VPN flow rules, SFC flow rules, SFC One of the VPN flow rules.
  • the transceiver unit is also configured to send a first BGP OPEN message to the second communication device, where the first BGP OPEN message indicates that the first communication device supports the BGP Flowspec address family.
  • the first BGP OPEN message carries the AFI and SAFI.
  • the transceiver unit is also configured to receive a second BGP OPEN message from the second communication device, and the second BGP OPEN message indicates that the second communication device supports the BGP Flowspec address family. .
  • the first communication device or the second communication device includes: a switch, a router, or a chip.
  • the switch or router can be either a physical network element or a virtual network element (that is, a combination of one or more functional modules implemented by pure software), and the details are not limited here.
  • the first communication device is a RR device, and the second communication device is a forwarding device; or, the first communication device is a forwarding device, and the second communication device is a forwarding device or an RR device.
  • the first type of flow rules include: IPv4 flow rules, IPv6 flow rules, VPNv4 flow rules, VPNv6 flow rules, L2 flow rules, L2VPN flow rules, SFC flow rules, SFC One of the VPN flow rules.
  • the transceiver unit is also configured to receive a third BGP message from the second communication device.
  • the third BGP message includes AFI, SAFI and a third NLRI.
  • the third NLRI Including a type field, the value of the type field of the third NLRI is the third value, and the third BGP message publishes the flow rule of the third type.
  • the processing unit is also used to save the third type of flow rules.
  • the fifth aspect of the embodiment of the present application provides a communication device.
  • the communication device includes a transceiver unit and a processing unit.
  • the transceiver unit is configured to perform the aforementioned second aspect and what the second communication device performs in any possible implementation of the second aspect.
  • the processing unit is configured to perform operations other than the sending operation and receiving operation performed by the second communication device in the aforementioned second aspect and any possible implementation of the second aspect.
  • the transceiver unit is configured to receive the first BGP message from the first communication device, the first BGP message includes AFI, SAFI and first NLRI, and the AFI identifies the Flowspec address family, SAFI identification Flowspec sub-address family; the first NLRI includes a type field, the type field of the first NLRI takes the first value, and the first BGP message publishes the first type of flow rule.
  • the processing unit is also used to save the first type of flow rules.
  • the transceiver unit is also configured to receive a second BGP message from the first communication device.
  • the second BGP message includes AFI, SAFI and a second NLRI.
  • the second NLRI Including a type field, the value of the type field of the second NLRI is the second value, and the second BGP message publishes the flow rule of the second type.
  • the processing unit is also used to save the second type of flow rules.
  • the second type of flow rules include: IPv4 flow rules, IPv6 flow rules, VPNv4 flow rules, VPNv6 flow rules, L2 flow rules, L2VPN flow rules, SFC flow rules, SFC One of the VPN flow rules.
  • the transceiver unit is also configured to receive a first BGP OPEN message from the first communication device, where the first BGP OPEN message indicates that the first communication device supports the BGP Flowspec address family. .
  • the first BGP OPEN message carries the AFI and SAFI.
  • the transceiver unit is also configured to send a second BGP OPEN message to the first communication device, and the second BGP OPEN message indicates that the second communication device supports the BGP Flowspec address family.
  • the first communication device or the second communication device includes: a switch, a router, or a chip.
  • the switch or router can be either a physical network element or a virtual network element (that is, a combination of one or more functional modules implemented by pure software), and the details are not limited here.
  • the first communication device is a RR device, and the second communication device is a forwarding device; or, the first communication device is a forwarding device, and the second communication device is a forwarding device or an RR device.
  • the first type of flow rules include: IPv4 flow rules, IPv6 flow rules, VPNv4 flow rules, VPNv6 flow rules, L2 flow rules, L2VPN flow rules, SFC flow rules, SFC One of the VPN flow rules.
  • the processing unit is also used to generate a third BGP message, the third BGP message includes AFI, SAFI and a third NLRI, the third NLRI includes a type field, and the third NLRI
  • the value of the type field is a third value
  • the third BGP message publishes the flow rule of the third type; the transceiver unit is also used to send the third BGP message to the first communication device.
  • a sixth aspect of the present application provides a communication device, including a processor and a memory.
  • the processor stores instructions.
  • the instructions stored in the memory are run on the processor, any one of the foregoing first aspect and the first aspect is implemented. Possible implementation manners, or the method shown in the second aspect and any possible implementation manner of the second aspect.
  • a seventh aspect of this application provides a computer-readable storage medium.
  • the computer-readable storage medium stores instructions. When the instructions are run on a processor, the first aspect and any possible implementation manner of the first aspect are implemented. , or the second aspect and any of the second aspect One possible implementation is shown.
  • An eighth aspect of the present application provides a computer program product.
  • the computer program product When executed on a processor, it implements the first aspect and any possible implementation of the first aspect, or the second aspect and the second aspect. Any possible implementation is shown.
  • Figure 1 is a format diagram of the MP_REACH_NLRI attribute
  • Figure 2 is a schematic diagram of BGP messages applying the BGP FSv2 standard
  • FIG. 3 is a schematic diagram of the system architecture of the message processing method provided by the embodiment of the present application.
  • Figure 4 is a schematic flow chart of the message processing method provided by the embodiment of the present application.
  • FIG. 5 is a schematic diagram of BGP messages provided by the embodiment of this application.
  • Figure 6 shows an address family view of the BGP FSv2 standard
  • Figure 7 is an address family view provided by an embodiment of the present application.
  • Figure 8 is another schematic flow chart of the message processing method provided by the embodiment of the present application.
  • Figure 9 is a schematic diagram of a communication system provided by an embodiment of the present application.
  • Figure 10 is a schematic structural diagram of a communication device provided by an embodiment of the present application.
  • Figure 11 is another schematic structural diagram of a communication device provided by an embodiment of the present application.
  • This application provides a message processing method, a communication system and related devices.
  • the AFI and SAFI included in the BGP message generated and sent by the communication device respectively identify the Flowspec address family and the Flowspec
  • the subaddress family collectively represents a set of Flowspec characteristics and extends the type of Flowspec carried in BGP packets.
  • the type field included in the NLRI in the BGP message has different values, that is, the BGP message publishes different types of flow rules.
  • At least one of a, b, or c can mean: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c can be single or multiple .
  • the multi-protocol network layer reachability information (MP_REACH_NLRI) attribute is defined in the multi-protocol border gateway protocol (MP-BGP), which is used for publishing Network layer reachable routes and next hop information.
  • MP-BGP multi-protocol border gateway protocol
  • the MP_REACH_NLRI attribute includes at least one triplet, and each triplet includes an address family information field, a next hop information field, and a network reachability information field.
  • Figure 1 is a schematic diagram of the format of the MP_REACH_NLRI attribute.
  • the address family information field includes AFI and SAFI; the next hop information field includes the next hop network address length and the next hop network address; the network reachability information field includes at least one NLRI, each NLRI consists of a length and NLRI value.
  • BGP Flowspec routing uses the MP_REACH_NLRI attribute to convey traffic policies, and represents different types of Flowspec by combining AFI and SAFI in BGP messages.
  • BGP FSv2 In order to solve this problem, the BGP FSv2 standard being defined continues the design idea of BGP FSv1, continues to use the "AFI+SAFI" granularity, and continues to use the MP_REACH_NLRI attribute by redefining SAFI and reusing existing AFI. , extending the type of Flowspec.
  • TBD1 means 1 to be defined.
  • TBD1 is a variable name used as an example and does not mean that the specified value is 1.
  • TBD1 can be specified by the standards organization as 135 or other possible values in the future, and there is no specific limit here.
  • the content carried by NLRI includes IPv4Flowspec protocol information, which belongs to IP traffic rules. Therefore, the type field in NLRI is defined according to the FSv2 standard, and its value is 1.
  • the value in the sub-type length value (sub-TLV) of NLRI includes an "IP Head TLV".
  • the "IP Head TLV” contains both the AFI field and the SAFI field, and the AFI value is 1 and the SAFI value is TBD1, which is consistent with the AFI and SAFI values in MP_REACH_NLRI.
  • Figure 2 is only an example of one type of Flowspec.
  • the value field in NLRI will also include the AFI field and SAFI field.
  • the value of the ⁇ AFI, SAFI> combination in NLRI in the FSv2 standard is exactly the same as the value of the ⁇ AFI, SAFI> combination in MP_REACH_NLRI of FSv2, resulting in unnecessary existence in BGP messages. Redundant information increases message overhead.
  • the AFI and SAFI included in the BGP message generated and sent by the communication device respectively identify the Flowspec address family and the Flowspec sub-address family to represent the Flowspec feature set and extend the Flowspec carried in the BGP message.
  • the type field included in the NLRI in the BGP message has different values to indicate that the BGP message publishes different types of flow rules.
  • the combination of AFI and SAFI in the BGP message and the type field in the NLRI respectively represent different information.
  • the Flowspec type is extended.
  • the FSv1 standard also reduces redundant information in messages and reduces overhead.
  • Figure 3 is a schematic diagram of the system architecture of the message processing method provided by the embodiment of the present application.
  • a BGP session is established between communication device 1 and communication device 2.
  • communication device 1 and communication device 2 can send BGP messages to each other.
  • the communication device 1 or the communication device 2 includes a switch, a router, or a chip, and the device types of the two devices may be the same or different, and the details are not limited here.
  • the switch or router can be either a physical network element or a virtual network element (that is, a combination of one or more functional modules implemented by pure software), and the details are not limited here.
  • the communication device 1 or the communication device 2 can be a forwarding device or an RR device, and the details are not limited here.
  • the communication device 1 is a forwarding device
  • the communication device 2 can be a forwarding device or an RR device
  • the communication device 1 is an RR device
  • the communication device 2 is a forwarding device.
  • Figure 4 is a schematic flowchart of a message processing method provided by an embodiment of the present application, including the following steps:
  • the communication device 1 generates the first BGP message.
  • the first BGP message includes AFI, SAFI and the first NLRI.
  • the AFI identifies the Flowspec address family and the SAFI identifies the Flowspec sub-address family.
  • the type field of the first NLRI indicates the first BGP message. The type of flow rule published by the document.
  • the MP_REACH_NLRI attribute is used to transmit flow rules between communication devices. That is to say, the format of the BGP message generated by communication device 1 to carry the flow rules is similar to the format shown in Figure 1 . For clarity of explanation, please refer to Figure 5.
  • Figure 5 is a schematic diagram of a BGP message provided by an embodiment of the present application.
  • AFI and SAFI use values to be defined, AFI identifies the Flowspec address family, SAFI identifies the Flowspec sub-address family, and AFI and SAFI are combined Identifies a collection of different Flowspec features.
  • TBD3 or TBD4 is an example variable name as a whole, which does not mean that the specified value is 3 or 4.
  • TBD3 may be designated by the standards organization as 16400 or other possible values in the future, and TBD3 may be designated by the standards organization as 85 or other possible values in the future. The details are not limited here.
  • NLRI includes the NLRI Type field, which indicates the Flowspec type published by the BGP message.
  • the value of the NLRI Type field is different from the indicated Flowspec type, as shown in the lower left table in Figure 5.
  • Figure 5 is only an illustration of the NLRI Type field. In actual applications, the value of this field and the corresponding Flowspec type can be different. It is enough to make different values correspond to different Flowspec types. , there is no specific limit here.
  • the communication device 1 can generate a first BGP message, where the first BGP message includes AFI, SAFI and first NLRI.
  • AFI identifies the Flowspec address family
  • SAFI identifies the Flowspec sub-address family
  • the value of the type field of the first NLRI is the first value
  • the first BGP message publishes the first type of flow rule.
  • the first BGP message may also be called a BGP update message.
  • the first BGP message publishes a route and carries a first type of flow rule in the route.
  • the flow rule specifies a matching condition ( condition) and action (action) to achieve the purpose of controlling flow.
  • the first type of flow rules include: IPv4 flow rules, IPv6 flow rules, VPNv4 flow rules, VPNv6 flow rules, L2 flow rules, L2VPN flow rules, SFC flow rules, SFC VPN flow rules kind of. It should be noted that the types of flow rules are not limited to the above types. In future communication technologies, other types of flow rules can also be expanded, and there are no specific limitations here.
  • Communication device 1 sends the first BGP message to communication device 2.
  • the communication device 1 When the communication device 1 and the communication device 2 establish a BGP session, the communication device 1 sends the first BGP message to the communication device 2.
  • Communication device 2 saves the flow rule published by the first BGP message.
  • the communication device 2 receives the first BGP message from the communication device 1. Since the AFI identifier Flowspec address family and the SAFI identifier Flowspec sub-address family in the MP_REACH_NLRI attribute in the first BGP message, the communication device 2 recognizes the first BGP message. The text is an update message of the BGP Flowspec address family. Further, the communication device 2 identifies the NLRI Type field in the NLRI in the MP_REACH_NLRI attribute, determines the type of Flowspec published by the first BGP message, and converts the flow rule published by the first BGP message (that is, the first type flow rules) are saved to the access control list (access control list, ACL) or policy based routing table (policy based routing, PRB).
  • access control list access control list, ACL
  • policy based routing table policy based routing table
  • the communication device 2 can identify the first BGP message as an IPv4Flowspec update message.
  • the communication device 2 parses the IPv4Flowspec information from the IPv4Flowspec update message and installs the corresponding routing table entry in the IPv4flow routing table.
  • the AFI and SAFI included in the BGP message generated and sent by the communication device respectively identify the Flowspec address family and the Flowspec sub-address family to represent the Flowspec feature set and extend the Flowspec carried in the BGP message.
  • the type field included in the NLRI in the BGP message has different values to indicate that the BGP message publishes different types of flow rules.
  • the combination of AFI and SAFI in the BGP message and the type field in the NLRI respectively represent different information.
  • the Flowspec type is extended.
  • the FSv1 standard also reduces redundant information in messages and reduces overhead.
  • the address family view provided by the embodiment of this application may be as shown in Figure 7 .
  • the packet processing method provided by the embodiment of the present application sets one Flowspec address family (for example, flowspec-family in Figure 7).
  • flowspec-family can be considered as a container for all different types of Flowspec applications. In this container view, you can choose to individually enable one or more types of Flowspec applications among all different types of Flowspec applications. In the embodiment shown in FIG. 7 , eight known types of Flowspec applications are listed. In the future communication field, there may be more types of Flowspec applications, which are not limited here.
  • the container of the Flowspec application (AFI identifies the Flowspec address family, SAFI identifies the Flowspec address family) corresponds to a transport layer connection (TCP session). Enabling or disabling a single Flowspec application alone will not affect The connection of TCP session ensures the reliability of transmission effect.
  • Figure 8 is a schematic flowchart of a message processing method provided by an embodiment of the present application, including the following steps:
  • Communication device 1 sends the first BGP OPEN message to communication device 2.
  • the first BGP OPEN message indicates that communication device 1 supports the BGP Flowspec address family.
  • Communication device 1 configures the connection with communication device 2, and enables the BGP Flowspec address family capability provided by the embodiment of the present application on the communication device 1 (i.e., the AFI field identifies the Flowspec address family, and the SAFI field identifies the Flowspec sub-address family). .
  • communication device 1 After the configuration is completed, communication device 1 will send the first BGP OPEN message to communication device 2.
  • This first BGP OPEN message is used for capability notification: notifying communication device 2 of the capabilities of communication device 1, that is, instructing communication device 1 Supports BGP Flowspec address family.
  • the first BGP OPEN message contains multi-protocol extension capability parameters, where the AFI field of one multi-protocol extension capability parameter identifies the Flowspec address family, and the SAFI field identifies the Flowspec sub-address family.
  • the communication device 2 sends the second BGP OPEN message to the communication device 1.
  • the second BGP OPEN message indicates that the communication device 2 supports the BGP Flowspec address family.
  • the communication device 2 will also configure the connection with the communication device 1, and enable the BGP Flowspec address family capability (i.e. AFI) provided by the embodiment of the present application on the communication device 2 itself.
  • AFI BGP Flowspec address family capability
  • the field identifies the Flowspec address family, and the SAFI field identifies the Flowspec sub-address family).
  • communication device 2 After the configuration is completed, communication device 2 will send a second BGP OPEN message to communication device 1.
  • This second BGP OPEN message is used for capability notification: notifying communication device 1 of the capabilities of communication device 2, that is, instructing communication device 2. Supports BGP Flowspec address family.
  • the second BGP OPEN message contains multi-protocol extension capability parameters, where the AFI field of one multi-protocol extension capability parameter identifies the Flowspec address family, and the SAFI field identifies the Flowspec sub-address family.
  • step 801 may be performed first, step 802 may be performed first, or step 801 and step 802 may be performed at the same time. The details will not be done here. limited.
  • Communication device 1 and communication device 2 establish a BGP session.
  • step 801 and step 802 communication device 1 and communication device 2 send and receive BGP OPEN messages to each other and establish a BGP session.
  • Communication device 1 or communication device 2 obtains the Flowspec multi-protocol extension capability parameters sent by the opposite end from the BGP OPEN message sent by the opposite end to the local end: the AFI field identifies the Flowspec address family, and the SAFI field identifies the Flowspec sub-address family; at the same time, the local end
  • the Flowspec multi-protocol extension capability parameters are also sent to the opposite end: the AFI field identifies the Flowspec address family, and the SAFI field identifies the Flowspec sub-address family.
  • the BGP session between communication device 1 and communication device 2 has the ability to send and receive new types of Flowspec multi-protocol extension update messages.
  • the new type means that the AFI field identifies the Flowspec address family, and the SAFI field identifies the Flowspec sub-address family.
  • the communication device 1 and the communication device 2 will negotiate the BGP Flowspec address family expansion capabilities, so that both communicating parties support the Flowspec address family, which provides technical support for the implementation of the technical solution of the present application and improves the practicality and Achievability.
  • the communication device 1 generates the first BGP message, where the first BGP message includes the AFI, SAFI and the first NLRI.
  • Communication device 1 sends the first BGP message to communication device 2.
  • Communication device 2 saves the flow rule published by the first BGP message.
  • Steps 804 to 806 are similar to steps 401 to 403 in the embodiment shown in FIG. 4 , and will not be described again here.
  • the communication device 1 generates a second BGP message, and the second BGP message includes the AFI, SAFI and the first NLRI.
  • the communication device 1 in addition to generating the first BGP message, can also generate a second BGP message, where the second BGP message includes the AFI, the SAFI, and the second NLRI.
  • the AFI and SAFI in the second BGP message are similar to the AFI and SAFI in the first BGP message, and both adopt the definitions shown in Figure 5, which will not be described again here.
  • the second NLRI also adopts the definition of the embodiment shown in Figure 5 and includes a type field.
  • the value of the type field of the second NLRI is a second value, indicating that the second BGP message publishes a second type of flow rule.
  • the second value is different from the first value, so the second type of flow rule published by the second BGP message is different from the first type of flow rule published by the first BGP message.
  • the second type of flow rules include: IPv4 flow rules, IPv6 flow rules, VPNv4 flow rules, VPNv6 flow rules, L2 flow rules, L2VPN flow rules, SFC flow rules, SFC VPN flow rules kind of. It should be noted that the types of flow rules are not limited to the above types. In future communication technologies, other types of flow rules can also be expanded, and there are no specific limitations here.
  • Communication device 1 sends the second BGP message to communication device 2.
  • Communication device 2 saves the flow rules published by the second BGP message.
  • Communication device 2 receives the second BGP message from communication device 1. Since the AFI identifier Flowspec address family and SAFI identifier Flowspec sub-address family in the MP_REACH_NLRI attribute in the second BGP message, communication device 2 recognizes the second BGP message. The text is an update message of the BGP Flowspec address family. Further, the communication device 2 identifies the NLRI Type field in the NLRI in the MP_REACH_NLRI attribute, determines the type of Flowspec published by the second BGP message, and converts the flow rule published by the second BGP message (that is, the second type flow rules) are saved in ACL or PRB.
  • the communication device 1 in addition to generating a first BGP message indicating a first type of flow rule, can also generate a second BGP message indicating a second type of flow rule that is different from the first type of flow rule. message. That is to say, the communication device 1 can generate and send multiple messages indicating different types of flow rules to the communication device 2 to achieve control of multiple types of traffic, further enriching the application scenarios of the technical solution of the present application.
  • the communication device 2 generates a third BGP message, and the third BGP message includes the AFI, SAFI and the third NLRI.
  • the communication device 2 in addition to receiving the BGP message from the communication device 1, can also generate and send a message to the communication device 1. Communication device 1 sends a BGP message.
  • the communication device 2 may generate a third BGP message, where the third BGP message includes the AFI, SAFI and the third NLRI.
  • the AFI and SAFI in the third BGP message are similar to the AFI and SAFI in the first BGP message, and both adopt the definitions shown in Figure 5, which will not be described again here.
  • the third NLRI also adopts the definition of the embodiment shown in Figure 5 and includes a type field.
  • the value of the type field of the third NLRI is a third value, indicating that the third BGP message publishes a third type of flow rule.
  • the third value may be the same as the first value or the second value, or may be different from the first value or the second value, and the details are not limited here.
  • the third type of flow rule published in the third BGP message may be the same as or different from the first type of flow rule or the second type of flow rule, and there is no specific limitation here.
  • the same meaning of the two types of flow rules mentioned here means that the third type of flow rules and the first type of flow rules are rules formulated for the same type of traffic (such as IPv4 flow), and It does not mean that the control methods for this type of traffic (including matching conditions and actions) are the same.
  • the third type of flow rules include: IPv4 flow rules, IPv6 flow rules, VPNv4 flow rules, VPNv6 flow rules, L2 flow rules, L2VPN flow rules, SFC flow rules, SFC VPN flow rules kind of. It should be noted that the types of flow rules are not limited to the above types. In future communication technologies, other types of flow rules can also be expanded, and there are no specific limitations here.
  • Communication device 2 sends the third BGP message to communication device 1.
  • Communication device 1 stores the flow rules published by the third BGP message.
  • Communication device 1 receives the third BGP message from communication device 2. Since the AFI identifier Flowspec address family and SAFI identifier Flowspec sub-address family in the MP_REACH_NLRI attribute in the third BGP message, communication device 1 recognizes the second BGP message. The text is an update message of the BGP Flowspec address family. Further, the communication device 1 identifies the NLRI Type field in the NLRI in the MP_REACH_NLRI attribute, determines the type of Flowspec published by the third BGP message, and converts the flow rule published by the third BGP message (that is, the third type of Flow rules) are saved in ACL or PRB.
  • communication device 1 in addition to sending BGP messages to communication device 2, communication device 1 can also receive BGP messages from communication device 2. In other words, in addition to receiving BGP messages from the communication device 1, the communication device 2 can also send BGP messages to the communication device 1, which enriches the application scenarios of the technical solution of the present application.
  • step 804 does not limit the order of any step from step 804 to step 806, any step from step 807 to step 809, or any step from step 810 to step 812.
  • the communication device 1 can perform different operations.
  • the third type of flow rule can be considered to be the latest flow rule.
  • the communication device 1 will overwrite the flow rules of the first type with the flow rules of the third type, and perform flow control based on the flow rules of the third type.
  • the communication device 1 may not consider the order of step 804 and step 812, but use the flow rules corresponding to high priority to overwrite the flow rules corresponding to low priority according to the priority.
  • priority includes packet priority or flow rule priority.
  • the communication device 1 or the communication device 2 may have multiple device forms, and may be a switch or a router. In addition, it may also be other device forms, such as a chip, etc. There are no specific limitations here. Among them, the switch or router can be either a physical network element or a virtual network element (that is, a combination of one or more functional modules implemented by pure software), and the details are not limited here. The functions described above can be implemented by a single board on a switch or router, or by a processing circuit on a chip. There are no specific limitations here.
  • the communication device 1 may also be called the first communication device, and the communication device 2 may also be called the second communication device.
  • FIG. 9 is a schematic diagram of a communication system provided by an embodiment of the present application.
  • the communication system 900 includes a first communication device 901 and a second communication device 902 .
  • the first communication device 901 is used to perform the operations performed by the communication device 1 in the embodiment shown in FIGS. 3 to 8
  • the second communication device 902 is used to perform the operations performed by the communication device 2 in the embodiment shown in FIGS. 3 to 8 .
  • the specific operations performed will not be described here.
  • FIG. 10 is a schematic structural diagram of a communication device provided by an embodiment of the present application.
  • the communication device 1000 includes a transceiver unit 1001 and a processing unit 1002 .
  • the transceiver unit 1001 is used to perform the receiving operation and the sending operation performed by the communication device 1 in the embodiment shown in FIGS. 3 to 8; the processing unit 1002 is used to perform the aforementioned FIGS. 3 to 8.
  • the communication device 1 in the embodiment shown in FIG. 8 performs operations other than the reception operation and the transmission operation.
  • the transceiver unit 1001 is used to perform the receiving operation and the sending operation performed by the communication device 2 in the embodiment shown in FIG. 3 to FIG. 8; the processing unit 1002 is used to perform the aforementioned FIG. 3 to FIG.
  • the communication device 2 in the embodiment shown in FIG. 8 performs operations other than the reception operation and the transmission operation.
  • the communication device 1000 will be described first as the communication device 1 .
  • the processing unit 1002 is configured to generate a first BGP message, the first BGP message includes AFI, SAFI and the first NLRI, the AFI identifies the Flowspec address family, and the SAFI identifies the Flowspec sub-address family;
  • One NLRI includes a type field, the value of the type field of the first NLRI is the first value, and the first BGP message publishes the flow rule of the first type.
  • the transceiver unit 1001 is configured to send the first BGP message to the communication device 2.
  • the processing unit 1002 is also configured to generate a second BGP message, the second BGP message includes AFI, SAFI and a second NLRI, the second NLRI includes a type field, and the type field of the second NLRI
  • the value is the second value
  • the second BGP message publishes the flow rule of the second type
  • the second value is different from the first value
  • the flow rule of the second type is different from the flow rule of the first type.
  • the transceiver unit 1001 is also used to send the second BGP message to the communication device 2.
  • the second type of flow rules include: IPv4 flow rules, IPv6 flow rules, VPNv4 flow rules, VPNv6 flow rules, L2 flow rules, L2VPN flow rules, SFC flow rules, SFC VPN flow rules kind of.
  • the transceiver unit 1001 is also used to send a first BGP OPEN message to the communication device 2.
  • the first BGP OPEN message indicates that the communication device 1 supports the BGP Flowspec address family.
  • the first BGP OPEN message carries AFI and SAFI.
  • the transceiver unit 1001 is also used to receive a second BGP OPEN message from the communication device 2.
  • the second BGP OPEN message indicates that the communication device 2 supports the BGP Flowspec address family.
  • the communication device 1 or the communication device 2 includes: a switch, a router, or a chip.
  • the switch or router can be either a physical network element or a virtual network element (that is, a combination of one or more functional modules implemented by pure software), and the details are not limited here.
  • the communication device 1 is a RR device, and the communication device 2 is a forwarding device; or, the communication device 1 is a forwarding device, and the communication device 2 is a forwarding device or an RR device.
  • the first type of flow rules include: IPv4 flow rules, IPv6 flow rules, VPNv4 flow rules, VPNv6 flow rules, L2 flow rules, L2VPN flow rules, SFC flow rules, SFC VPN flow rules kind of.
  • the transceiver unit 1001 is also configured to receive a third BGP message from the communication device 2.
  • the third BGP message includes AFI, SAFI and a third NLRI.
  • the third NLRI includes a type field, The value of the type field of the third NLRI is the third value, and the third BGP message publishes the flow rule of the third type.
  • the processing unit 1002 is also used to save the third type of flow rules.
  • the communication device 1000 will be described as the communication device 2 .
  • the transceiver unit 1001 is configured to receive the first BGP message from the communication device 1.
  • the first BGP message includes AFI, SAFI and the first NLRI.
  • the AFI identifier is the Flowspec address family and the SAFI identifier.
  • the first NLRI includes a type field, the value of the type field of the first NLRI is the first value, and the first BGP message publishes the first type of flow rule.
  • processing unit 1002 also used to save the first type of flow rules.
  • the transceiver unit 1001 is also configured to receive a second BGP message from the communication device 1.
  • the second BGP message includes AFI, SAFI and a second NLRI.
  • the second NLRI includes a type field, The value of the type field of the second NLRI is the second value, and the second BGP message publishes the flow rule of the second type.
  • the processing unit 1002 is also used to save the second type of flow rule.
  • the second type of flow rules include: IPv4 flow rules, IPv6 flow rules, VPNv4 flow rules, VPNv6 flow rules, L2 flow rules, L2VPN flow rules, SFC flow rules, SFC VPN flow rules kind of.
  • the transceiver unit 1001 is also used to receive the first BGP OPEN message from the communication device 1.
  • the first BGP OPEN message indicates that the communication device 1 supports the BGP Flowspec address family.
  • the first BGP OPEN message carries AFI and SAFI.
  • the transceiver unit 1001 is also used to send a second BGP OPEN message to the communication device 1.
  • the second BGP OPEN message indicates that the communication device 2 supports the BGP Flowspec address family.
  • the communication device 1 or the communication device 2 includes: a switch, a router, or a chip.
  • the switch or router can be either a physical network element or a virtual network element (that is, a combination of one or more functional modules implemented by pure software), and the details are not limited here.
  • the communication device 1 is a RR device, and the communication device 2 is a forwarding device; or, the communication device 1 is a forwarding device, and the communication device 2 is a forwarding device or an RR device.
  • the first type of flow rules include: IPv4 flow rules, IPv6 flow rules, VPNv4 flow rules, VPNv6 flow rules, L2 flow rules, L2VPN flow rules, SFC flow rules, SFC VPN flow rules kind of.
  • the processing unit 1002 is also configured to generate a third BGP message.
  • the third BGP message includes AFI, SAFI and a third NLRI.
  • the third NLRI includes a type field.
  • the type field of the third NLRI The value is the third value, and the third BGP message publishes the third type of flow rule; the transceiver unit 1001 is also used to send the third BGP message to the communication device 1.
  • FIG. 11 is a schematic structural diagram of a communication device provided by an embodiment of the present application.
  • the communication device 1100 includes a memory 1101 and a processor 1102.
  • the memory 1101 and the processor 1102 are connected through a bus 1103, and the memory 1101 is used to store instructions.
  • the processor 1102 can communicate with the memory 1101. When the instructions stored in the memory 1101 are run by the processor 1102, a series of operations performed by the communication device 1 or the communication device 2 in the embodiments shown in FIGS. 3 to 8 are implemented. operate.
  • the memory 1101 may be volatile storage or persistent storage.
  • the processor 1102 may be a central processing unit (CPU) or a single-core processor. In addition, it may also be other types of processors, such as a dual-core processor, and the details are not limited here.
  • the communication device 1100 may also include one or more operating systems, such as Windows Server TM , Mac OS X TM , Unix TM , Linux TM , FreeBSD TM , etc.
  • operating systems such as Windows Server TM , Mac OS X TM , Unix TM , Linux TM , FreeBSD TM , etc.
  • the disclosed systems, devices and methods can be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or can be integrated into another system, or some features can be ignored, or not implemented.
  • the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the devices or units may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application can be integrated into one processing unit, each unit can exist physically alone, or two or more units can be integrated into one unit.
  • the above integrated units can be implemented in the form of hardware or software functional units.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage media.
  • the technical solution of the present application is essentially or contributes to the existing technology, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to cause a computer device (which may be a personal computer, a server, or a communication device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program code. .

Landscapes

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

Abstract

本申请实施例公开了报文处理方法、通信系统以及相关装置,用于扩展BGP报文指示的流规则的,减少报文开销。本申请实施例方法包括:第一通信装置生成并向第二通信装置发送第一BGP报文,第一BGP报文包括AFI、SAFI和第一NLRI,AFI标识Flowspec地址族、SAFI标识Flowspec子地址族;第一NLRI包括类型字段,第一NLRI的类型字段取值为第一值,第一BGP报文发布第一类型的流规则。

Description

报文处理方法、通信系统以及相关装置
本申请要求于2022年07月20日提交中国国家知识产权局、申请号为202210863293.0、申请名称为“一种简化BGP flowspec通信集的通信方法和设备”的中国专利申请的优先权,以及于2022年8月15日提交中国国家知识产权局、申请号为CN202210976328.1、发明名称为“报文处理方法、通信系统以及相关装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信领域,尤其涉及报文处理方法、通信系统以及相关装置。
背景技术
边界网关协议(border gateway protocol,BGP)流规则(flow specification,FS)功能通过传递BGP FS路由,将流量策略传递给BGP FS对等体,以达到控制攻击流量的目的。
在当前使用的边界网关协议流规则版本1(BGP FSv1)的相关标准中,为地址族标识(address family identifiers,AFI)和子地址族标识(subsequence address family identifier,SAFI)各自定义了两个取值,通过组合AFI和SAFI表示四种不同类型的流规则,随着通信技术的发展,这四种流规则的类型有限,无法满足通信需求。
发明内容
本申请实施例提供了报文处理方法、通信系统以及相关装置,在报文处理方法中,通信装置生成并发送的BGP报文所包括的AFI和SAFI分别标识流规则Flowspec地址族和Flowspec子地址族,以表示Flowspec特性集合,对Flowspec进行了扩展。同时,BGP报文中的网络层可达性信息(network layer reachability information,NLRI)包括的类型字段具有不同的取值,以表示BGP报文发布不同类型的流规则。
本申请实施例第一方面提供了一种报文处理方法,该方法应用于第一通信装置,方法包括:
第一通信装置与第二通信装置建立BGP会话,第一通信装置可以生成并向第二通信装置发送BGP报文,BGP报文中包括AFI、SAFI和NLRI。AFI标识流规则Flowspec地址族、SAFI标识Flowspec子地址族,AFI和SAFI指示Flowspec特性集合。NLRI包括类型字段,指示BGP报文所发布的流规则的类型。类型字段的取值不同,对应的流规则不同。示例性的,第一通信装置可以生成第一BGP报文,第一BGP报文包括第一NLRI,第一NLRI的类型字段取值为第一值,表示第一BGP报文发布第一类型的流规则。可以理解的是,BGP报文发布的是路由,路由中携带流规则,指定匹配条件(condition)和动作(action)。
从以上技术方案可以看出,本申请具有以下优点:
通信装置生成并发送的BGP报文所包括的AFI和SAFI分别标识Flowspec地址族和Flowspec子地址族,以表示Flowspec特性集合,对BGP报文所携带的Flowspec进行了扩展。同时,BGP报文中的NLRI包括的类型字段,具有不同的取值,以表示BGP报文发布不同类型的流规则。换而言之,本申请实施例中,BGP报文中的AFI、SAFI的组合,与NLRI中的类型字段分别表示不同的信息,在扩展了Flowspec类型的同时,又减少了报文中的冗余信息,降低了开销。
在第一方面的一种可能的实现方式中,第一通信装置除了生成第一BGP报文之外,还可以生成第二BGP报文,第二BGP报文包括AFI、SAFI和第二NLRI。第二BGP报文中的AFI、SAFI与第一BGP报文中的AFI、SAFI类似,分别标识Flowspec地址族和Flowspec子地址族。
与第一BGP报文不同的是,第二BGP报文包括的第二NLRI的类型字段取值为第二值,第二BGP报文发布的是第二类型的流规则,第二值与第一值不同,且第二类型的流规则与第一类型的流规则不同。
本申请实施例中,第一通信装置除了能够生成第一BGP报文,指示第一类型的流规则之外,还可以生成指示与第一类型的流规则不同的第二类型流规则的第二BGP报文。也就是说,第一通信装置可以生成并向第二通信装置发送指示不同类型流规则的多个报文,实现对多种类型的流量的控制,进一步丰富了本申请技术方案的应用场景。
在第一方面的一种可能的实现方式中,第二类型的流规则包括:第二类型的流规则包括:IPv4流规则、IPv6流规则、VPNv4流规则、VPNv6流规则、L2流规则、L2VPN流规则、SFC流规则、SFC VPN流规则中的一种。需要注意的是,流规则的类型并不局限于上述类型,在未来的通信技术中,还可以扩展 其他类型的流规则,具体此处不做限定。
本申请实施例中,第二BGP报文所能携带的流规则类型有多种可能,可以根据实际应用的需要选择,丰富了本申请实施例的应用场景,提升了灵活性。
在第一方面的一种可能的实现方式中,在生成第一BGP报文之前,第一通信装置配置与第二通信装置之间的连接,并在第一通信装置本端使能本申请实施例提供的BGP Flowspec地址族能力(即AFI字段标识Flowspec地址族,SAFI字段标识Flowspec子地址族)。第一通信装置会向第二通信装置发送第一BGP开始OPEN报文,该第一BGP OPEN报文用于做能力通告:向第二通信装置通告第一通信装置的能力,也即指示第一通信装置支持BGP Flowspec地址族。
在第一方面的一种可能的实现方式中,第一BGP OPEN报文携带标识Flowspec地址族的AFI和标识Flowspec子地址族SAFI。
在第一方面的一种可能的实现方式中,在生成第一BGP报文之前,第二通信装置配置与第一通信装置之间的连接,并在第二通信装置本端使能本申请实施例提供的BGP Flowspec地址族能力(即AFI字段标识Flowspec地址族,SAFI字段标识Flowspec子地址族)。第二通信装置会向第一通信装置发送第二BGP开始OPEN报文,该第二BGP OPEN报文用于做能力通告:向第一通信装置通告第二通信装置的能力,也即指示第二通信装置支持BGP Flowspec地址族。
在第一方面的一种可能的实现方式中,第二BGP OPEN报文携带标识Flowspec地址族的AFI和标识Flowspec子地址族SAFI。
本申请实施例中,第一通信装置与第二通信装置会进行BGP Flowspec地址族扩展能力的协商,使得通信双方均支持Flowspec地址族,为本申请技术方案的实现提供了技术支持,提升了实用性和可实现性。
在第一方面的一种可能的实现方式中,第一通信装置或者第二通信装置可以有多种设备形态,包括:交换机、路由器、或者芯片等,具体此处不做限定。其中,交换机或者路由器既可以是物理网元,也可以是虚拟网元(即纯软件实现的一个或者多个功能模块的组合),具体此处不做限定。
在第一方面的一种可能的实现方式中,第一通信装置和第二通信装置可以进行角色分配,第一通信装置为路由反射(route reflect,RR)设备,第二通信装置为转发设备;如果第一通信装置为转发设备,那么第二通信装置为转发设备或者RR设备,具体此处不做限定。
本申请实施例中,第一通信装置或者第二通信装置的设备形态和角色分配均有多种可能,能够灵活适用不同的应用场景,提升了本申请技术方案的实用性。
在第一方面的一种可能的实现方式中,第一BGP报文指示的第一类型的流规则包括:IPv4流规则、IPv6流规则、VPNv4流规则、VPNv6流规则、L2流规则、L2VPN流规则、SFC流规则、SFC VPN流规则中的一种。需要注意的是,流规则的类型并不局限于上述类型,在未来的通信技术中,还可以扩展其他类型的流规则,具体此处不做限定。
本申请实施例中,第一BGP报文所能携带的流规则类型有多种可能,可以根据实际应用的需要选择,丰富了本申请实施例的应用场景,提升了灵活性。
在第一方面的一种可能的实现方式中,第一通信装置除了向第二通信装置发送BGP报文之外,还可以接收来自于第二通信装置的BGP报文。示例性的,第一通信装置可以接收来自于第二通信装置的第三BGP报文,第三BGP报文包括AFI、SAFI和第三NLRI。
其中,AFI标识Flowspec地址族,SAFI标识Flowspec子地址族,第三NLRI的类型字段取值为第三值,第三BGP报文发布第三类型的流规则。第三值可以与第一值或者第二值相同,也可以与第一值或者第二值不同。也就是说,第三BGP报文发布的第三类型的流规则,可以与第一类型的流规则或者第二类型的流规则相同或者不同。
第一通信装置收到第三BGP报文之后,会将第三类型的流规则保存至访问控制列表(access control list,ACL)或者策略路由表(policy based routing,PRB)中。
在第一方面的一种可能的实现方式中,第三类型的流规则包括:IPv4流规则、IPv6流规则、VPNv4流规则、VPNv6流规则、L2流规则、L2VPN流规则、SFC流规则、SFC VPN流规则中的一种。需要注意 的是,流规则的类型并不局限于上述类型,在未来的通信技术中,还可以扩展其他类型的流规则,具体此处不做限定。
本申请实施例中,第一通信装置除了能向第二通信装置发送BGP报文之外,还可以接收来自于第二通信装置的BGP报文,丰富了本申请技术方案的应用场景。
本申请实施例第二方面提供了一种报文处理方法,该方法应用与第二通信装置,包括:
第二通信装置与第一通信装置建立BGP会话,第二通信装置接收来自于第一通信装置的BGP报文,BGP报文中包括AFI、SAFI和NLRI。AFI标识流规则Flowspec地址族、SAFI标识Flowspec子地址族,AFI和SAFI指示Flowspec特性集合。NLRI包括类型字段,指示BGP报文所发布的流规则的类型。类型字段的取值不同,对应的流规则不同。示例性的,第二通信装置可以接收来自于第一通信装置的第一BGP报文,第一BGP报文包括第一NLRI,第一NLRI的类型字段取值为第一值,表示第一BGP报文发布第一类型的流规则。第二通信装置会保存第一类型的流规则,可以将第一类型的流规则保存至ACL或者PRB中。在后续的处理过程中,第二通信装置可以根据第一类型的流规则进行流量控制。
在本申请实施例中,通信装置接收的BGP报文所包括的AFI和SAFI分别标识Flowspec地址族和Flowspec子地址族,以表示Flowspec特性集合,对BGP报文所携带的Flowspec进行了扩展。同时,BGP报文中的NLRI包括的类型字段,具有不同的取值,以表示BGP报文发布不同类型的流规则。换而言之,本申请实施例中,BGP报文中的AFI、SAFI的组合,与NLRI中的类型字段分别表示不同的信息,在扩展了Flowspec类型的同时,又减少了报文中的冗余信息,降低了开销。
在第二方面的一种可能的实现方式中,第二通信装置还可以接收来自于第一通信装置的第二BGP报文,第二BGP报文包括AFI、SAFI和第二NLRI。第二BGP报文中的AFI、SAFI与第一BGP报文中的AFI、SAFI类似,分别标识Flowspec地址族和Flowspec子地址族。
与第一BGP报文不同的是,第二BGP报文包括的第二NLRI的类型字段取值为第二值,第二BGP报文发布的是第二类型的流规则,第二值与第一值不同,且第二类型的流规则与第一类型的流规则不同。第二通信装置可以将第二类型的流规则保存至ACL或者PRB中。在后续的处理过程中,第二通信装置可以根据第二类型的流规则进行流量控制。
本申请实施例中,第二通信装置可以接收来自于第一通信装置的指示不同类型流规则的多个BGP报文,实现对多种类型的流量的控制,进一步丰富了本申请技术方案的应用场景。
在第二方面的一种可能的实现方式中,第二类型的流规则包括:第二类型的流规则包括:IPv4流规则、IPv6流规则、VPNv4流规则、VPNv6流规则、L2流规则、L2VPN流规则、SFC流规则、SFC VPN流规则中的一种。需要注意的是,流规则的类型并不局限于上述类型,在未来的通信技术中,还可以扩展其他类型的流规则,具体此处不做限定。
本申请实施例中,第二BGP报文所能携带的流规则类型有多种可能,可以根据实际应用的需要选择,丰富了本申请实施例的应用场景,提升了灵活性。
在第二方面的一种可能的实现方式中,在接收来自于第一通信装置的第一BGP报文之前,第二通信装置还会接收来自于第一通信装置的第一BGP OPEN报文,该第一BGP OPEN报文用于做能力通告:向第二通信装置通告第一通信装置的能力,也即指示第一通信装置支持BGP Flowspec地址族(即AFI字段标识Flowspec地址族,SAFI字段标识Flowspec子地址族)。
在第二方面的一种可能的实现方式中,第一BGP OPEN报文携带标识Flowspec地址族的AFI和标识Flowspec子地址族SAFI。
在第二方面的一种可能的实现方式中,在接收来自于第一通信装置的第一BGP报文之前,第二通信装置配置与第一通信装置之间的连接,并在第二通信装置本端使能本申请实施例提供的BGP Flowspec地址族能力(即AFI字段标识Flowspec地址族,SAFI字段标识Flowspec子地址族)。第二通信装置会向第一通信装置发送第二BGP OPEN报文,该第二BGP OPEN报文用于做能力通告:向第一通信装置通告第二通信装置的能力,也即指示第二通信装置支持BGP Flowspec地址族。
本申请实施例中,第一通信装置与第二通信装置会进行BGP Flowspec地址族扩展能力的协商,使得通信双方均支持Flowspec地址族,为本申请技术方案的实现提供了技术支持,提升了实用性和可实 现性。
在第二方面的一种可能的实现方式中,第一通信装置或者第二通信装置可以有多种设备形态,包括:交换机、路由器、或者芯片等,具体此处不做限定。其中,交换机或者路由器既可以是物理网元,也可以是虚拟网元(即纯软件实现的一个或者多个功能模块的组合),具体此处不做限定。
在第二方面的一种可能的实现方式中,第一通信装置和第二通信装置可以进行角色分配,第一通信装置为RR设备,第二通信装置为转发设备;如果第一通信装置为转发设备,那么第二通信装置为转发设备或者RR设备,具体此处不做限定。
本申请实施例中,第一通信装置或者第二通信装置的设备形态和角色分配均有多种可能,能够灵活适用不同的应用场景,提升了本申请技术方案的实用性。
在第二方面的一种可能的实现方式中,第一类型的流规则包括:IPv4流规则、IPv6流规则、VPNv4流规则、VPNv6流规则、L2流规则、L2VPN流规则、SFC流规则、SFC VPN流规则中的一种。
本申请实施例中,第一BGP报文所能携带的流规则类型有多种可能,可以根据实际应用的需要选择,丰富了本申请实施例的应用场景,提升了灵活性。
在第二方面的一种可能的实现方式中,第二通信装置处理能接收来自于第一通信装置BGP报文之外,还可以生成并向第一通信装置发送BGP报文。示例性的,第二通信装置可以生成第三BGP报文,第三BGP报文包括AFI、SAFI和第三NLRI。第三BGP报文中的AFI标识标识Flowspec地址族,SAFI标识Flowspec子地址族,第三NLRI的类型字段取值为第三值,指示第三BGP报文发布第三类型的流规则。第三值可以与第一值或者第二值相同,也可以与第一值或者第二值不同。也就是说,第三BGP报文发布的第三类型的流规则,可以与第一类型的流规则或者第二类型的流规则相同或者不同,具体此处不做限定。
在第二方面的一种可能的实现方式中,第三类型的流规则包括:IPv4流规则、IPv6流规则、VPNv4流规则、VPNv6流规则、L2流规则、L2VPN流规则、SFC流规则、SFC VPN流规则中的一种。需要注意的是,流规则的类型并不局限于上述类型,在未来的通信技术中,还可以扩展其他类型的流规则,具体此处不做限定。
本申请实施例中,第二通信装置除了接收来自于第一通信装置的BGP报文外,还可以向第一通信装置发送BGP报文,丰富了本申请技术方案的应用场景。
本申请实施例第三方面提供了一种通信系统,包括第一通信装置和第二通信装置,第一通信装置用于执行前述第一方面以及第一方面任一种可能的实现中第一通信装置所执操作;第二通信装置用于执行前述第二方面以及第二方面任一种可能的实现中第二通信装置所执操作。
本申请实施例第四方面提供了一种通信装置,该通信装置包括收发单元和处理单元,收发单元用于执行前述第一方面以及第一方面任一种可能的实现中第一通信装置所执行的发送操作和接收操作,处理单元用于执行前述第一方面以及第一方面任一种可能的实现中第一通信装置所执行的发送操作和接收操作以外的操作。
在第四方面的一种可能的实现方式中,处理单元,用于生成第一BGP报文,第一BGP报文包括AFI、SAFI和第一NLRI,AFI标识Flowspec地址族、SAFI标识Flowspec子地址族;第一NLRI包括类型字段,第一NLRI的类型字段取值为第一值,第一BGP报文发布第一类型的流规则。收发单元,用于向第二通信装置发送第一BGP报文。
在第四方面的一种可能的实现方式中,处理单元,还用于生成第二BGP报文,第二BGP报文包括AFI、SAFI和第二NLRI,第二NLRI包括类型字段,第二NLRI的类型字段取值为第二值,第二BGP报文发布第二类型的流规则,第二值与第一值不同,且第二类型的流规则与第一类型的流规则不同。收发单元,还用于向第二通信装置发送第二BGP报文。
在第四方面的一种可能的实现方式中,第二类型的流规则包括:IPv4流规则、IPv6流规则、VPNv4流规则、VPNv6流规则、L2流规则、L2VPN流规则、SFC流规则、SFC VPN流规则中的一种。
在第四方面的一种可能的实现方式中,收发单元,还用于向第二通信装置发送第一BGP OPEN报文,第一BGP OPEN报文指示第一通信装置支持BGP Flowspec地址族。
在第四方面的一种可能的实现方式中,第一BGP OPEN报文携带AFI和SAFI。
在第四方面的一种可能的实现方式中,收发单元,还用于接收来自于第二通信装置的第二BGP OPEN报文,第二BGP OPEN报文指示第二通信装置支持BGP Flowspec地址族。
在第四方面的一种可能的实现方式中,第一通信装置或者第二通信装置包括:交换机、路由器、或者芯片。其中,交换机或者路由器既可以是物理网元,也可以是虚拟网元(即纯软件实现的一个或者多个功能模块的组合),具体此处不做限定。
在第四方面的一种可能的实现方式中,第一通信装置为RR设备,第二通信装置为转发设备;或者,第一通信装置为转发设备,第二通信装置为转发设备或者RR设备。
在第四方面的一种可能的实现方式中,第一类型的流规则包括:IPv4流规则、IPv6流规则、VPNv4流规则、VPNv6流规则、L2流规则、L2VPN流规则、SFC流规则、SFC VPN流规则中的一种。
在第四方面的一种可能的实现方式中,收发单元,还用于接收来自于第二通信装置的第三BGP报文,第三BGP报文包括AFI、SAFI和第三NLRI,第三NLRI包括类型字段,第三NLRI的类型字段取值为第三值,第三BGP报文发布第三类型的流规则。处理单元,还用于保存第三类型的流规则。
本申请实施例第五方面提供了一种通信装置,该通信装置包括收发单元和处理单元,收发单元用于执行前述第二方面以及第二方面任一种可能的实现中第二通信装置所执行的发送操作和接收操作,处理单元用于执行前述第二方面以及第二方面任一种可能的实现中第二通信装置所执行的发送操作和接收操作以外的操作。
在第五方面的一种可能的实现方式中,收发单元,用于接收来自于第一通信装置的第一BGP报文,第一BGP报文包括AFI、SAFI和第一NLRI,AFI标识Flowspec地址族、SAFI标识Flowspec子地址族;第一NLRI包括类型字段,第一NLRI的类型字段取值为第一值,第一BGP报文发布第一类型的流规则。处理单元,还用于保存第一类型的流规则。
在第五方面的一种可能的实现方式中,收发单元,还用于接收来自于第一通信装置的第二BGP报文,第二BGP报文包括AFI、SAFI和第二NLRI,第二NLRI包括类型字段,第二NLRI的类型字段取值为第二值,第二BGP报文发布第二类型的流规则。处理单元,还用于保存第二类型的流规则。
在第五方面的一种可能的实现方式中,第二类型的流规则包括:IPv4流规则、IPv6流规则、VPNv4流规则、VPNv6流规则、L2流规则、L2VPN流规则、SFC流规则、SFC VPN流规则中的一种。
在第五方面的一种可能的实现方式中,收发单元,还用于接收来自于第一通信装置的第一BGP OPEN报文,第一BGP OPEN报文指示第一通信装置支持BGP Flowspec地址族。
在第五方面的一种可能的实现方式中,第一BGP OPEN报文携带AFI和SAFI。
在第五方面的一种可能的实现方式中,收发单元,还用于向第一通信装置发送第二BGP OPEN报文,第二BGP OPEN报文指示第二通信装置支持BGP Flowspec地址族。
在第五方面的一种可能的实现方式中,第一通信装置或者第二通信装置包括:交换机、路由器、或者芯片。其中,交换机或者路由器既可以是物理网元,也可以是虚拟网元(即纯软件实现的一个或者多个功能模块的组合),具体此处不做限定。
在第五方面的一种可能的实现方式中,第一通信装置为RR设备,第二通信装置为转发设备;或者,第一通信装置为转发设备,第二通信装置为转发设备或者RR设备。
在第五方面的一种可能的实现方式中,第一类型的流规则包括:IPv4流规则、IPv6流规则、VPNv4流规则、VPNv6流规则、L2流规则、L2VPN流规则、SFC流规则、SFC VPN流规则中的一种。
在第五方面的一种可能的实现方式中,处理单元,还用于生成第三BGP报文,第三BGP报文包括AFI、SAFI和第三NLRI,第三NLRI包括类型字段,第三NLRI的类型字段取值为第三值,第三BGP报文发布第三类型的流规则;收发单元,还用于向第一通信装置发送第三BGP报文。
本申请第六方面提供了一种通信装置,包括处理器和存储器,处理器存储指令,当存储在存储器上的指令在处理器上运行时,实现前述第一方面以及第一方面的任一种可能的实现方式,或者第二方面以及第二方面的任一种可能的实现方式所示的方法。
本申请第七方面提供了一种计算机可读存储介质,计算机可读存储介质中保存有指令,当指令在处理器上运行时,实现第一方面以及第一方面的任一种可能的实现方式,或者第二方面以及第二方面的任 一种可能的实现方式所示的方法。
本申请第八方面提供了一种计算机程序产品,当计算机程序产品在处理器上执行时,实现第一方面以及第一方面的任一种可能的实现方式,或者第二方面以及第二方面的任一种可能的实现方式所示的方法。
第六方面至第八方面所示的有益效果与第一方面以及第一方面的任一种可能的实现方式,或者,第二方面以及第二方面的任一种可能的实现方式类似,此处不再赘述。
附图说明
图1为MP_REACH_NLRI属性的一个格式示意图;
图2为应用BGP FSv2标准的BGP报文的一个示意图;
图3为本申请实施例提供的报文处理方法的系统架构的示意图;
图4为本申请实施例提供的报文处理方法的一个流程示意图;
图5为本申请实施例提供的BGP报文的一个示意图;
图6为BGP FSv2标准的一个地址族视图;
图7为本申请实施例提供的一个地址族视图;
图8为本申请实施例提供的报文处理方法的另一个流程示意图;
图9为本申请实施例提供的通信系统的一个示意图;
图10为本申请实施例提供的通信装置的一个结构示意图;
图11为本申请实施例提供的通信装置的另一个结构示意图。
具体实施方式
本申请提供了本申请实施例提供了报文处理方法、通信系统以及相关装置,在报文处理方法中,通信装置生成并发送的BGP报文所包括的AFI和SAFI分别标识Flowspec地址族和Flowspec子地址族,共同表示Flowspec特性集合,对BGP报文所携带的Flowspec的类型进行了扩展。同时,BGP报文中的NLRI包括的类型字段具有不同的取值,也即BGP报文发布不同类型的流规则。
下面结合附图,对本申请的实施例进行描述。本领域普通技术人员可知,随着技术的发展和新场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的术语在适当情况下可以互换,这仅仅是描述本申请的实施例中对相同属性的对象在描述时所采用的区分方式。此外,术语“包括”和“具有”以及他们的任何变形,其目的在于覆盖不排他的包含,以便包含一系列单元的过程、方法、系统、产品或设备不必限于那些单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它单元。另外,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个),可以表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。
在多协议-边界网关协议(multi-protocol border gateway protocol,MP-BGP)中定义有多协议可达网络层可达性信息(multi-protocol network layer reachability information,MP_REACH_NLRI)属性,该属性用于发布网络层可达路由以及下一跳信息。MP_REACH_NLRI属性包括至少一个三元组,每个三元组中包括地址族信息域、下一跳信息域和网络可达性信息域。
请参阅图1,图1为MP_REACH_NLRI属性的格式示意图。
如图1所示,地址族信息域包括AFI和SAFI;下一跳信息域包括下一跳网络地址长度和下一跳网络地址;网络可达性信息域包括至少一个NLRI,每个NLRI由长度和NLRI值组成。
在BGP FSv1标准中,BGP Flowspec路由利用MP_REACH_NLRI属性传递流量策略,通过组合BGP报文中的AFI和SAFI来表示不同类型的Flowspec。
示例性的,BGP FSv1中AFI和SAFI的组合如下表1所示:
表1
如表1所示,在BGP FSv1标准中,为AFI和SAFI各自定义了两个取值,通过组合AFI和SAFI表示四种不同类型的流规则。但是随着通信技术的发展,这四种流规则的类型有限,无法满足通信需求。
为了解决这一问题,正在定义的BGP FSv2标准中,延续了BGP FSv1的设计思路,继续使用“AFI+SAFI”的粒度,通过重新定义SAFI和复用已有的AFI的方式,继续使用MP_REACH_NLRI属性,对Flowspec的类型进行扩展。
具体来说,BGP FSv2标准中AFI和SAFI的组合如下表2所示:
表2
如表2所示,相较于BGP FSv1标准,BGP FSv2标准所支持的流规则类型由4个扩展到8个。其中,TBD1意为待定义(to be defined)的1,TBD1整体为一个用来示例的变量名字,并不表示指定的值为1。TBD1将来可以被标准组织指定为135或者其他可能的数值,具体此处不做限定。
接下来,以BGP FSv2标准中,BGP报文携带IPv4FlowSpec为例,进行说明。请参阅图2,图2为BGP FSv2标准中BGP报文的一个示意图。
如图2所示,当AFI为1,SAFI为TBD1时,NLRI承载的内容包括IPv4Flowspec协议信息,属于IP流量规则,因此按FSv2标准定义NLRI中的type字段,取值为1。
当NLRI中的type字段取值为1时,NLRI的子类型长度值(sub type-length-value,sub-TLV)中的value包括一个“IP Head TLV”。该“IP Head TLV”中同时包含AFI字段和SAFI字段,且其中的AFI取值为1,SAFI取值为TBD1,与MP_REACH_NLRI中的AFI和SAFI取值一致。
需要注意的是,图2只是对一种Flowspec的示例,在实际应用中,对于其他类型的Flowspec,NLRI中的value字段中也会包括AFI字段和SAFI字段。
也就是说,对于同一种类型的Flowspec,FSv2标准中NLRI中<AFI、SAFI>组合的取值与FSv2的MP_REACH_NLRI中<AFI、SAFI>组合的取值完全相同,导致BGP报文中存在不必要的冗余信息,增加了报文开销。
在本申请实施例中,通信装置生成并发送的BGP报文所包括的AFI和SAFI分别标识Flowspec地址族和Flowspec子地址族,以表示Flowspec特性集合,对BGP报文所携带的Flowspec进行了扩展。同时,BGP报文中的NLRI包括的类型字段,具有不同的取值,以表示BGP报文发布不同类型的流规则。换而言之,本申请实施例中,BGP报文中的AFI、SAFI的组合,与NLRI中的类型字段分别表示不同的信息,在相较于FSv1标准扩展了Flowspec类型的同时,相较于FSv1标准又减少了报文中的冗余信息,降低了开销。
下面,对本申请实施例提供的报文处理方法进行说明。首先请参阅图3,图3为本申请实施例提供的报文处理方法的系统架构的示意图。
如图3所示,通信装置1与通信装置2之间建立BGP会话,通过BGP会话,通信装置1和通信装置2能够向对方发送BGP报文。利用MP_REACH_NLRI属性在BGP报文中携带流规则,使得对方解析流规则,并根据流规则进行流量筛选,实现控制攻击流量的目的。
需要注意的是,通信装置1或者通信装置2包括交换机、路由器或者芯片,两个设备的设备类型可以相同,也可以不同,具体此处不做限定。其中,交换机或者路由器既可以是物理网元,也可以是虚拟网元(即纯软件实现的一个或者多个功能模块的组合),具体此处不做限定。
通信装置1和通信装置2在通信过程中的角色分配也有多种可能,通信装置1或者通信装置2可以转发设备或者RR设备,具体此处不做限定。示例性的,如果通信装置1是转发设备,那么通信装置2可以是转发设备,也可以是RR设备;如果通信装置1是RR设备,那么通信装置2为转发设备。
接下来,请参阅图4,图4为本申请实施例提供的报文处理方法的一个流程示意图,包括以下步骤:
401.通信装置1生成第一BGP报文,第一BGP报文包括AFI、SAFI和第一NLRI,AFI标识Flowspec地址族、SAFI标识Flowspec子地址族,第一NLRI的类型字段指示第一BGP报文发布的流规则的类型。
本申请实施例中,通信装置之间使用MP_REACH_NLRI属性来传输流规则,也就是说,通信装置1所生成的用于承载流规则的BGP报文的格式与图1所示的格式类似。为了说明的清楚,请参阅图5,图5为本申请实施例提供的BGP报文的示意图。
如图5所示,在本申请实施例中,通信装置所生成的BGP报文中,AFI和SAFI使用待定义的值,AFI标识Flowspec地址族,SAFI标识Flowspec子地址族,AFI和SAFI组合起来标识不同Flowspec特性所组合起来的集合。其中,TBD3或者TBD4整体为一个示例的变量名字,并不是说指定的值为3或者4。示例性的,TBD3将来可以被标准组织指定为16400或者其他可能的数值,TBD3将来可以被标准组织指定为85或者其他可能的数值,具体此处不做限定。
当MP_REACH_NLRI中的AFI标识Flowspec地址族,SAFI标识Flowspec子地址族时,本申请实施例重新定义了MP_REACH_NLRI中的NLRI。如图5所示,NLRI包括NLRI Type字段,该字段指示BGP报文所发布的Flowspec类型。NLRI Type字段的取值和所指示的Flowspec类型不同可以如图5中左下方的表格所示。
需要注意的是,图5只是对NLRI Type字段的一个示意,在实际应用中,该字段的取值和所对应的Flowspec类型可以有不同的情况,只有使得不同取值对应不同的Flowspec类型即可,具体此处不做限定。
基于本申请实施例所定义的MP_REACH_NLRI,通信装置1可以生成第一BGP报文,第一BGP报文包括AFI、SAFI和第一NLRI。其中,AFI标识Flowspec地址族,SAFI标识Flowspec子地址族,第一NLRI的类型字段取值为第一值,第一BGP报文发布了第一类型的流规则。可以理解的是,第一BGP报文也可以称为BGP更新(update)报文,第一BGP报文发布的是路由,在路由中携带第一类型的流规则,该流规则指定匹配条件(condition)和动作(action),以达到控制流量的目的。
在一些可选的实施例中,第一类型的流规则包括:IPv4流规则、IPv6流规则、VPNv4流规则、VPNv6流规则、L2流规则、L2VPN流规则、SFC流规则、SFC VPN流规则中的一种。需要注意的是,流规则的类型并不局限于上述类型,在未来的通信技术中,还可以扩展其他类型的流规则,具体此处不做限定。
本申请实施例中,第一BGP报文所能携带的流规则类型有多种可能,可以根据实际应用的需要选择,丰富了本申请实施例的应用场景,提升了灵活性。
402.通信装置1向通信装置2发送第一BGP报文。
在通信装置1和通信装置2建立了BGP会话的情况下,通信装置1会向通信装置2发送第一BGP报文。
403.通信装置2保存第一BGP报文发布的流规则。
通信装置2接收来自于通信装置1的第一BGP报文,由于第一BGP报文中MP_REACH_NLRI属性中的AFI标识Flowspec地址族,SAFI标识Flowspec子地址族,通信装置2即识别出第一BGP报文为BGP Flowspec地址族的更新报文。进一步地,通信装置2识别MP_REACH_NLRI属性中的NLRI中的NLRI Type字段,确定出第一BGP报文所发布的Flowspec的类型,并将第一BGP报文发布的流规则(也即第一类 型的流规则)保存至访问控制列表(access control list,ACL)或者策略路由表(policy based routing,PRB)中。
示例性的,假设第一BGP报文中NLRI Type字段的取值为图5所示的1,那么通信装置2能够识别第一BGP报文为IPv4Flowspec更新报文。通信装置2从IPv4Flowspec更新报文中解析出IPv4Flowspec信息,在IPv4flow路由表中安装对应的路由表项。
在本申请实施例中,通信装置生成并发送的BGP报文所包括的AFI和SAFI分别标识Flowspec地址族和Flowspec子地址族,以表示Flowspec特性集合,对BGP报文所携带的Flowspec进行了扩展。同时,BGP报文中的NLRI包括的类型字段,具有不同的取值,以表示BGP报文发布不同类型的流规则。换而言之,本申请实施例中,BGP报文中的AFI、SAFI的组合,与NLRI中的类型字段分别表示不同的信息,在相较于FSv1标准扩展了Flowspec类型的同时,相较于FSv1标准又减少了报文中的冗余信息,降低了开销。
在前文对图2所示的BGP FSv2标准的说明中,介绍了该标准中在MP_REACH_NLRI的开头的位置上的(AFI、SAFI)组合就描述了某种类型的Flowspec应用。那么,在具体应用时,每种类型的Flowspec应用都需要占据一个地址族视图。示例性的,BGP FSv2标准的地址族视图如图6所示。
基于图6所示的配置方式,BGP FSv2标准中,配置规模会随着(AFI、SAFI)组合的增加线性增长。对应每个(AFI、SAFI)组合都支持的命令行,需要在每个(AFI、SAFI)组合下重复配置,导致配置方案繁琐。
在本申请实施例提供的报文处理方法中,可以实现一种新的配置方案。示例性的,本申请实施例提供的地址族视图可以如图7所示。
与图6所示的在BGP视图下平行设置多个不同类型的Flowspec地址族配置不同,本申请实施例所提供的报文处理方法设置一个Flowspec地址族(例如图7中的flowspec-family)。flowspec-family可以认为是所有不同类型的Flowspec应用的一个容器,在该容器视图下,可以选择单独使能所有不同类型的Flowspec应用中的一个或多个类型的Flowspec应用。在图7所示实施例中,列举了已知的8种类型的Flowspec应用,在未来的通信领域中,还可能有更多类型Flowspec应用,具体此处不做限定。
对比图6和图7可知,本申请实施例中,Flowspec相关的配置方式,从简单的平行罗列变成了层次化的实现模式,配置规模也不会随着(AFI、SAFI)组合的增加线性增长,简化了配置规模。
另外,本申请实施例中,Flowspec应用的容器(AFI标识Flowspec地址族,SAFI标识Flowspec地址族)对应一个传输层的连接(TCP会话),单独使能或去使能单个Flowspec应用,不会影响TCP会话的连接,保证传输效果的可靠性。
接下来,请参阅图8,图8为本申请实施例提供的报文处理方法的流程示意图,包括以下步骤:
801.通信装置1向通信装置2发送第一BGP OPEN报文,第一BGP OPEN报文指示通信装置1支持BGP Flowspec地址族。
通信装置1配置与通信装置2之间的连接,并在通信装置1本端使能本申请实施例提供的BGP Flowspec地址族能力(即AFI字段标识Flowspec地址族,SAFI字段标识Flowspec子地址族)。
配置完成之后,通信装置1会向通信装置2发送第一BGP OPEN报文,该第一BGP OPEN报文用于做能力通告:向通信装置2通告通信装置1的能力,也即指示通信装置1支持BGP Flowspec地址族。
在一些可选的实施例中,第一BGP OPEN报文包含多协议扩展能力参数,其中1个多协议扩展能力参数的AFI字段标识Flowspec地址族,SAFI字段标识Flowspec子地址族。
802.通信装置2向通信装置1发送第二BGP OPEN报文,第二BGP OPEN报文指示通信装置2支持BGP Flowspec地址族。
与步骤801中通信装置1执行的操作类似,通信装置2也会配置与通信装置1之间的连接,并在通信装置2本端使能本申请实施例提供的BGP Flowspec地址族能力(即AFI字段标识Flowspec地址族,SAFI字段标识Flowspec子地址族)。
配置完成之后,通信装置2会向通信装置1发送第二BGP OPEN报文,该第二BGP OPEN报文用于做能力通告:向通信装置1通告通信装置2的能力,也即指示通信装置2支持BGP Flowspec地址族。
在一些可选的实施例中,第二BGP OPEN报文包含多协议扩展能力参数,其中1个多协议扩展能力参数的AFI字段标识Flowspec地址族,SAFI字段标识Flowspec子地址族。
需要注意的是,本申请实施例并不限定步骤801与步骤802之间的顺序,可以先执行步骤801,也可以先执行步骤802,还可以同时执行步骤801和步骤802,具体此处不做限定。
803.通信装置1与通信装置2建立BGP会话。
经过步骤801和步骤802,通信装置1和通信装置2之间互相发送和接收了BGP OPEN报文,建立了BGP会话。
通信装置1或者通信装置2,从对端发送给本端的BGP OPEN报文获取到对端发送的Flowspec多协议扩展能力参数:AFI字段标识Flowspec地址族,SAFI字段标识Flowspec子地址族;同时本端也向对端发送了Flowspec多协议扩展能力参数:AFI字段标识Flowspec地址族,SAFI字段标识Flowspec子地址族。那么,通信装置1同通信装置2之间的这个BGP会话即具备收发新类型的Flowspec多协议扩展更新报文的能力。其中,新类型是指AFI字段标识Flowspec地址族,SAFI字段标识Flowspec子地址族。
本申请实施例中,通信装置1与通信装置2会进行BGP Flowspec地址族扩展能力的协商,使得通信双方均支持Flowspec地址族,为本申请技术方案的实现提供了技术支持,提升了实用性和可实现性。
804.通信装置1生成第一BGP报文,第一BGP报文包括AFI、SAFI和第一NLRI。
805.通信装置1向通信装置2发送第一BGP报文。
806.通信装置2保存第一BGP报文发布的流规则。
步骤804至步骤806,与前述图4所示实施例中步骤401至步骤403类似,具体此处不再赘述。
807.通信装置1生成第二BGP报文,第二BGP报文包括AFI、SAFI和第一NLRI。
在一些可选的实施例中,通信装置1除了生成第一BGP报文之外,还可以生成第二BGP报文,第二BGP报文包括AFI、SAFI和第二NLRI。
第二BGP报文中的AFI、SAFI与第一BGP报文中的AFI、SAFI类似,均采用图5所示的定义,具体此处不再赘述。
第二NLRI也采用图5所示实施例的定义,包括类型字段,第二NLRI的类型字段取值为第二值,指示第二BGP报文发布第二类型的流规则。第二值与第一值不同,因此第二BGP报文发布的第二类型的流规则与第一BGP报文发布的第一类型的流规则不同。
在一些可选的实施例中,第二类型的流规则包括:IPv4流规则、IPv6流规则、VPNv4流规则、VPNv6流规则、L2流规则、L2VPN流规则、SFC流规则、SFC VPN流规则中的一种。需要注意的是,流规则的类型并不局限于上述类型,在未来的通信技术中,还可以扩展其他类型的流规则,具体此处不做限定。
本申请实施例中,第二BGP报文所能携带的流规则类型有多种可能,可以根据实际应用的需要选择,丰富了本申请实施例的应用场景,提升了灵活性。
808.通信装置1向通信装置2发送第二BGP报文。
809.信装置2保存第二BGP报文发布的流规则。
通信装置2接收来自于通信装置1的第二BGP报文,由于第二BGP报文中MP_REACH_NLRI属性中的AFI标识Flowspec地址族,SAFI标识Flowspec子地址族,通信装置2即识别出第二BGP报文为BGP Flowspec地址族的更新报文。进一步地,通信装置2识别MP_REACH_NLRI属性中的NLRI中的NLRI Type字段,确定出第二BGP报文所发布的Flowspec的类型,并将第二BGP报文发布的流规则(也即第二类型的流规则)保存至ACL或者PRB中。
本申请实施例中,通信装置1除了能够生成第一BGP报文,指示第一类型的流规则之外,还可以生成指示与第一类型的流规则不同的第二类型流规则的第二BGP报文。也就是说,通信装置1可以生成并向通信装置2发送指示不同类型流规则的多个报文,实现对多种类型的流量的控制,进一步丰富了本申请技术方案的应用场景。
810.通信装置2生成第三BGP报文,第三BGP报文包括AFI、SAFI和第三NLRI。
在一些可选的实施例中,通信装置2除了接收来自于通信装置1的BGP报文之外,也可以生成并向 通信装置1发送BGP报文。
示例性的,通信装置2可以生成第三BGP报文,第三BGP报文包括AFI、SAFI和第三NLRI。
第三BGP报文中的AFI、SAFI与第一BGP报文中的AFI、SAFI类似,均采用图5所示的定义,具体此处不再赘述。
第三NLRI也采用图5所示实施例的定义,包括类型字段,第三NLRI的类型字段取值为第三值,指示第三BGP报文发布第三类型的流规则。第三值可以与第一值或者第二值相同,也可以与第一值或者第二值不同,具体此处不做限定。也就是说,第三BGP报文发布的第三类型的流规则,可以与第一类型的流规则或者第二类型的流规则相同或者不同,具体此处不做限定。
需要注意的是,此处所说的两个类型的流规则相同的含义是指,第三类型的流规则与第一类型的流规则均是针对同一种流量(例如IPv4flow)所制定的规则,并不意味着对于该种流量的控制方式(包括匹配的条件和动作)相同。
在一些可选的实施方式中,第三类型的流规则包括:IPv4流规则、IPv6流规则、VPNv4流规则、VPNv6流规则、L2流规则、L2VPN流规则、SFC流规则、SFC VPN流规则中的一种。需要注意的是,流规则的类型并不局限于上述类型,在未来的通信技术中,还可以扩展其他类型的流规则,具体此处不做限定。
811.通信装置2向通信装置1发送第三BGP报文。
812.通信装置1存第三BGP报文发布的流规则。
通信装置1接收来自于通信装置2的第三BGP报文,由于第三BGP报文中MP_REACH_NLRI属性中的AFI标识Flowspec地址族,SAFI标识Flowspec子地址族,通信装置1即识别出第二BGP报文为BGP Flowspec地址族的更新报文。进一步地,通信装置1识别MP_REACH_NLRI属性中的NLRI中的NLRI Type字段,确定出第三BGP报文所发布的Flowspec的类型,并将第三BGP报文发布的流规则(也即第三类型的流规则)保存至ACL或者PRB中。
本申请实施例中,通信装置1除了能向通信装置2发送BGP报文之外,还可以接收来自于通信装置2的BGP报文。换言之,通信装置2除了能接收来自于通信装置1的BGP报文之外,还可以向通信装置1发送BGP报文,丰富了本申请技术方案的应用场景。
需要注意的是,本申请实施例并不限定步骤804步骤806任一步、步骤807至步骤809中任一步、步骤810至步骤812中任一步之间的先后顺序。
示例性的,假设图8所示实施例中,第一BGP报文指示的第一类型的流规则与第三BGP报文指示的第三类型的流规则相同(例如,均是为IPv6flow匹配的条件和动作),但是第一类型的流规则中具体的条件和动作,与第三类型的规则中具体的动作和条件不同,那么通信装置1可以执行不同的操作。
在一些可选的实施方式中,假设通信装置1先执行步骤804,后执行步骤812,可以认为第三类型的流规则为最新的流规则。通信装置1会用第三类型的流规则覆盖第一类型的流规则,基于第三类型的流规则进行流量控制。
在一些可选的实施方式中,通信装置1也可以不考虑步骤804与步骤812的顺序,而是根据优先级的高低,用高优先对应的流规则覆盖低优先级对应的流规则。其中,优先级包括报文优先级或者流规则优先级。
在一些可选的实施例中,通信装置1或者通信装置2的设备形态有多种可能,可以是交换机,也可以是路由器,除此之外,还可以是其他的设备形态,例如芯片等,具体此处不做限定。其中,交换机或者路由器既可以是物理网元,也可以是虚拟网元(即纯软件实现的一个或者多个功能模块的组合),具体此处不做限定。上述介绍的功能,可以由交换机上或者路由器上的单板,或者芯片上的处理电路实现,具体此处不做限定。
在本申请实施例中,通信装置1和通信装置2在通信过程中的角色分配也有多种可能:如果通信装置1为RR设备,那么通信装置2为转发设备;如果通信装置1为转发设备,那么通信装置2为转发设备或者RR设备,具体此处不做限定。
本申请实施例中,通信装置1或者通信装置2的设备形态和角色分配均有多种可能,能够灵活适用不同的应用场景,提升了本申请技术方案的实用性。
需要注意的是,前述说明中,通信装置1也可以被称为第一通信装置,通信装置2也可以被称为第二通信装置。
接下来,对本申请实施例提供的通信系统和相关装置进行说明。
请参阅图9,图9为本申请实施例提供的通信系统的示意图。
如图9所示,通信系统900包括第一通信装置901和第二通信装置902。第一通信装置901用于执行前述图3至图8所示实施例中通信装置1所执行的操作,第二通信装置902用于执行前述图3至图8所示实施例中通信装置2所执行的操作,具体此处不再赘述。
请参阅图10,图10为本申请实施例提供的通信装置的结构示意图。
如图10所示,通信装置1000包括收发单元1001和处理单元1002。如果通信装置1000作为通信装置1,那么收发单元1001,用于执行前述图3至图8所示实施例中通信装置1执行的接收操作和发送操作;处理单元1002,用于执行前述图3至图8所示实施例中通信装置1执行的接收操作和发送操作以外的操作。如果通信装置1000作为通信装置2,那么收发单元1001,用于执行前述图3至图8所示实施例中通信装置2执行的接收操作和发送操作;处理单元1002,用于执行前述图3至图8所示实施例中通信装置2执行的接收操作和发送操作以外的操作。
下面,先对通信装置1000作为通信装置1进行说明。
在一些可选的实施方式中,处理单元1002,用于生成第一BGP报文,第一BGP报文包括AFI、SAFI和第一NLRI,AFI标识Flowspec地址族、SAFI标识Flowspec子地址族;第一NLRI包括类型字段,第一NLRI的类型字段取值为第一值,第一BGP报文发布第一类型的流规则。收发单元1001,用于向通信装置2发送第一BGP报文。
在一些可选的实施方式中,处理单元1002,还用于生成第二BGP报文,第二BGP报文包括AFI、SAFI和第二NLRI,第二NLRI包括类型字段,第二NLRI的类型字段取值为第二值,第二BGP报文发布第二类型的流规则,第二值与第一值不同,且第二类型的流规则与第一类型的流规则不同。收发单元1001,还用于向通信装置2发送第二BGP报文。
在一些可选的实施方式中,第二类型的流规则包括:IPv4流规则、IPv6流规则、VPNv4流规则、VPNv6流规则、L2流规则、L2VPN流规则、SFC流规则、SFC VPN流规则中的一种。
在一些可选的实施方式中,收发单元1001,还用于向通信装置2发送第一BGP OPEN报文,第一BGP OPEN报文指示通信装置1支持BGP Flowspec地址族。
在一些可选的实施方式中,第一BGP OPEN报文携带AFI和SAFI。
在一些可选的实施方式中,收发单元1001,还用于接收来自于通信装置2的第二BGP OPEN报文,第二BGP OPEN报文指示通信装置2支持BGP Flowspec地址族。
在一些可选的实施方式中,通信装置1或者通信装置2包括:交换机、路由器、或者芯片。其中,交换机或者路由器既可以是物理网元,也可以是虚拟网元(即纯软件实现的一个或者多个功能模块的组合),具体此处不做限定。
在一些可选的实施方式中,通信装置1为RR设备,通信装置2为转发设备;或者,通信装置1为转发设备,通信装置2为转发设备或者RR设备。
在一些可选的实施方式中,第一类型的流规则包括:IPv4流规则、IPv6流规则、VPNv4流规则、VPNv6流规则、L2流规则、L2VPN流规则、SFC流规则、SFC VPN流规则中的一种。
在一些可选的实施方式中,收发单元1001,还用于接收来自于通信装置2的第三BGP报文,第三BGP报文包括AFI、SAFI和第三NLRI,第三NLRI包括类型字段,第三NLRI的类型字段取值为第三值,第三BGP报文发布第三类型的流规则。处理单元1002,还用于保存第三类型的流规则。
下面,对通信装置1000作为通信装置2进行说明。
在一些可选的实施方式中,收发单元1001,用于接收来自于通信装置1的第一BGP报文,第一BGP报文包括AFI、SAFI和第一NLRI,AFI标识Flowspec地址族、SAFI标识Flowspec子地址族;第一NLRI包括类型字段,第一NLRI的类型字段取值为第一值,第一BGP报文发布第一类型的流规则。处理单元 1002,还用于保存第一类型的流规则。
在一些可选的实施方式中,收发单元1001,还用于接收来自于通信装置1的第二BGP报文,第二BGP报文包括AFI、SAFI和第二NLRI,第二NLRI包括类型字段,第二NLRI的类型字段取值为第二值,第二BGP报文发布第二类型的流规则。处理单元1002,还用于保存第二类型的流规则。
在一些可选的实施方式中,第二类型的流规则包括:IPv4流规则、IPv6流规则、VPNv4流规则、VPNv6流规则、L2流规则、L2VPN流规则、SFC流规则、SFC VPN流规则中的一种。
在一些可选的实施方式中,收发单元1001,还用于接收来自于通信装置1的第一BGP OPEN报文,第一BGP OPEN报文指示通信装置1支持BGP Flowspec地址族。
在一些可选的实施方式中,第一BGP OPEN报文携带AFI和SAFI。
在一些可选的实施方式中,收发单元1001,还用于向通信装置1发送第二BGP OPEN报文,第二BGP OPEN报文指示通信装置2支持BGP Flowspec地址族。
在一些可选的实施方式中,通信装置1或者通信装置2包括:交换机、路由器、或者芯片。其中,交换机或者路由器既可以是物理网元,也可以是虚拟网元(即纯软件实现的一个或者多个功能模块的组合),具体此处不做限定。
在一些可选的实施方式中,通信装置1为RR设备,通信装置2为转发设备;或者,通信装置1为转发设备,通信装置2为转发设备或者RR设备。
在一些可选的实施方式中,第一类型的流规则包括:IPv4流规则、IPv6流规则、VPNv4流规则、VPNv6流规则、L2流规则、L2VPN流规则、SFC流规则、SFC VPN流规则中的一种。
在一些可选的实施方式中,处理单元1002,还用于生成第三BGP报文,第三BGP报文包括AFI、SAFI和第三NLRI,第三NLRI包括类型字段,第三NLRI的类型字段取值为第三值,第三BGP报文发布第三类型的流规则;收发单元1001,还用于向通信装置1发送第三BGP报文。
下面,请参阅图11,图11为本申请实施例提供的通信装置的一个结构示意图。
如图11所示,通信装置1100包括存储器1101和处理器1102,存储器1101和处理器1102通过总线1103连接,存储器1101用于存储指令。
处理器1102可以与存储器1101通信,存储在存储器1101上的指令在处理器1102运行时,实现前述图3至图8所示实施例中通信装置1或者通信装置2所执行的操作中的一系列操作。
其中,存储器1101可以是易失性存储或持久存储。处理器1102可以是中央处理器(central processing units,CPU),也可以是单核处理器,除此之外,还可以是其他类型的处理器,例如双核处理器,具体此处不做限定。
通信装置1100还可以包括一个或一个以上操作系统,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM等。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个 计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者通信装置等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。

Claims (27)

  1. 一种报文处理方法,其特征在于,所述方法应用于第一通信装置,所述方法包括:
    生成第一边界网关协议BGP报文,所述第一BGP报文包括地址族标识AFI、子地址族标识SAFI和第一网络层可达性信息NLRI,所述AFI标识流规则Flowspec地址族、所述SAFI标识Flowspec子地址族;所述第一NLRI包括类型字段,所述第一NLRI的类型字段取值为第一值,所述第一BGP报文发布第一类型的流规则;
    向第二通信装置发送所述第一BGP报文。
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    生成第二BGP报文,所述第二BGP报文包括所述AFI、所述SAFI和第二NLRI,所述第二NLRI包括类型字段,所述第二NLRI的类型字段取值为第二值,所述第二BGP报文发布第二类型的流规则,所述第二值与所述第一值不同,且所述第二类型的流规则与所述第一类型的流规则不同;
    向所述第二通信装置发送所述第二BGP报文。
  3. 根据权利要求2所述的方法,其特征在于,所述第二类型的流规则包括:
    网际协议版本四IPv4流规则、网际协议版本六IPv6流规则、虚拟专用网版本四VPNv4流规则、虚拟专用网版本六VPNv6流规则、二层L2流规则、L2 VPN流规则、业务功能链SFC流规则、SFC VPN流规则中的一种。
  4. 根据权利要求1至3中任一项所述的方法,其特征在于,在所述生成第一BGP报文之前,所述方法还包括:
    向所述第二通信装置发送第一BGP开始OPEN报文,所述第一BGP OPEN报文指示所述第一通信装置支持BGP Flowspec地址族。
  5. 根据权利要求4所述的方法,其特征在于,所述第一BGP OPEN报文携带所述AFI和所述SAFI。
  6. 根据权利要求1至5中任一项所述的方法,其特征在于,在所述生成第一BGP报文之前,所述方法还包括:
    接收来自于所述第二通信装置的第二BGP OPEN报文,所述第二BGP OPEN报文指示所述第二通信装置支持BGP Flowspec地址族。
  7. 根据权利要求1至6中任一项所述的方法,其特征在于,所述第一通信装置或者所述第二通信装置包括:交换机、路由器、或者芯片。
  8. 根据权利要求1至7中任一项所述的方法,其特征在于,第一通信装置为路由反射RR设备,第二通信装置为转发设备。
  9. 根据权利要求1至8中任一项所述的方法,其特征在于,所述第一类型的流规则包括:
    IPv4流规则、IPv6流规则、VPNv4流规则、VPNv6流规则、L2流规则、L2 VPN流规则、SFC流规则、SFC VPN流规则中的一种。
  10. 根据权利要求1至9中任一项所述的方法,其特征在于,所述方法还包括:
    接收来自于所述第二通信装置的第三BGP报文,所述第三BGP报文包括所述AFI、所述SAFI和第三NLRI,所述第三NLRI包括类型字段,所述第三NLRI的类型字段取值为第三值,所述第三BGP报文发布第三类型的流规则;
    保存所述第三类型的流规则。
  11. 一种报文处理方法,其特征在于,所述方法应用于第二通信装置,所述方法包括:
    接收来自于第一通信装置的第一BGP报文,所述第一BGP报文包括AFI、SAFI和第一NLRI,所述AFI标识Flowspec地址族、所述SAFI标识Flowspec子地址族;所述第一NLRI包括类型字段,所述第一NLRI的类型字段取值为第一值,所述第一BGP报文发布第一类型的流规则;
    保存所述第一类型的流规则。
  12. 根据权利要求11所述的方法,其特征在于,所述方法还包括:
    接收来自于第一通信装置的第二BGP报文,所述第二BGP报文包括所述AFI、所述SAFI和第二NLRI,所述第二NLRI包括类型字段,所述第二NLRI的类型字段取值为第二值,所述第二BGP报文发布第二类 型的流规则;
    保存所述第二类型的流规则。
  13. 根据权利要求12所述的方法,其特征在于,所述第二类型的流规则包括:
    IPv4流规则、IPv6流规则、VPNv4流规则、VPNv6流规则、L2流规则、L2 VPN流规则、SFC流规则、SFC VPN流规则中的一种。
  14. 根据权利要求11至13中任一项所述的方法,其特征在于,在所述接收来自于第一通信装置的第一BGP报文之前,所述方法还包括:
    接收来自于所述第一通信装置的第一BGP OPEN报文,所述第一BGP OPEN报文指示所述第一通信装置支持BGP Flowspec地址族。
  15. 根据权利要求14所述的方法,其特征在于,所述第一BGP OPEN报文携带所述AFI和所述SAFI。
  16. 根据权利要求11至13中任一项所述的方法,其特征在于,在所述接收来自于第一通信装置的第一BGP报文之前,所述方法还包括:
    向所述第一通信装置发送第二BGP OPEN报文,所述第二BGP OPEN报文指示所述第二通信装置支持BGP Flowspec地址族。
  17. 根据权利要求11至16中任一项所述的方法,其特征在于,所述第一通信装置或者所述第二通信装置包括:交换机、路由器、或者芯片。
  18. 根据权利要求11至17中任一项所述的方法,其特征在于,第一通信装置为RR设备,第二通信装置为转发设备。
  19. 根据权利要求11至18中任一项所述的方法,其特征在于,所述第一类型的流规则包括:
    IPv4流规则、IPv6流规则、VPNv4流规则、VPNv6流规则、L2流规则、L2 VPN流规则、SFC流规则、SFC VPN流规则中的一种。
  20. 根据权利要求11至19中任一项所述的方法,其特征在于,所述方法还包括:
    生成第三BGP报文,所述第三BGP报文包括所述AFI、所述SAFI和第三NLRI,所述第三NLRI包括类型字段,所述第三NLRI的类型字段取值为第三值,所述第三BGP报文发布第三类型的流规则;
    向所述第一通信装置发送所述第三BGP报文。
  21. 一种通信系统,其特征在于,所述通信系统包括第一通信装置和第二通信装置,所述第一通信装置用于执行权利要求1至10中任一项所述的方法,所述第二通信装置用于执行权利要求11至20中任一项所述的方法。
  22. 一种通信装置,其特征在于,包括:
    收发单元,用于执行权利要求1至10中所述的方法中的接收操作和发送操作;
    处理单元,用于执行权利要求1至10中所述的方法中接收操作和发送操作以外的操作。
  23. 一种通信装置,其特征在于,包括:
    收发单元,用于执行权利要求11至20中所述的方法中的接收操作和发送操作;
    处理单元,用于执行权利要求11至20中所述的方法中接收操作和发送操作以外的操作。
  24. 一种通信装置,其特征在于,包括:处理器和存储器;
    所述存储器存储有指令,当所述指令在所述处理器上运行时,实现权利要求1至10中任一项所述的方法。
  25. 一种通信装置,其特征在于,包括:处理器和存储器;
    所述存储器存储有指令,当所述指令在所述处理器上运行时,实现权利要求11至20中任一项所述的方法。
  26. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有指令,当所述指令在处理器上运行时,实现权利要求1至20中任一项所述的方法。
  27. 一种计算机程序产品,其特征在于,当所述计算机程序产品在处理器上执行时,实现权利要求1至20中任一项所述的方法。
PCT/CN2023/103607 2022-07-20 2023-06-29 报文处理方法、通信系统以及相关装置 WO2024016985A1 (zh)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202210863293 2022-07-20
CN202210863293.0 2022-07-20
CN202210976328.1A CN117478751A (zh) 2022-07-20 2022-08-15 报文处理方法、通信系统以及相关装置
CN202210976328.1 2022-08-15

Publications (1)

Publication Number Publication Date
WO2024016985A1 true WO2024016985A1 (zh) 2024-01-25

Family

ID=89617034

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/103607 WO2024016985A1 (zh) 2022-07-20 2023-06-29 报文处理方法、通信系统以及相关装置

Country Status (1)

Country Link
WO (1) WO2024016985A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170093641A1 (en) * 2015-09-30 2017-03-30 Telefonaktiebolaget Lm Ericsson (Publ) Route refresh mechanism for border gateway protocol link state
CN107925624A (zh) * 2016-07-01 2018-04-17 华为技术有限公司 基于业务功能链sfc的报文转发方法、装置和系统
US20190140950A1 (en) * 2016-07-01 2019-05-09 Huawei Technologies Co., Ltd. Method, apparatus, and system for forwarding packet in service function chaining sfc
WO2021174237A2 (en) * 2021-06-24 2021-09-02 Futurewei Technoogies, Inc. Extending border gateway protocol (bgp) flowspec origination authorization using path attributes
CN114513457A (zh) * 2020-10-28 2022-05-17 北京华为数字技术有限公司 Bgp流规则路由的发布方法、网络设备及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170093641A1 (en) * 2015-09-30 2017-03-30 Telefonaktiebolaget Lm Ericsson (Publ) Route refresh mechanism for border gateway protocol link state
CN107925624A (zh) * 2016-07-01 2018-04-17 华为技术有限公司 基于业务功能链sfc的报文转发方法、装置和系统
US20190140950A1 (en) * 2016-07-01 2019-05-09 Huawei Technologies Co., Ltd. Method, apparatus, and system for forwarding packet in service function chaining sfc
CN114513457A (zh) * 2020-10-28 2022-05-17 北京华为数字技术有限公司 Bgp流规则路由的发布方法、网络设备及存储介质
WO2021174237A2 (en) * 2021-06-24 2021-09-02 Futurewei Technoogies, Inc. Extending border gateway protocol (bgp) flowspec origination authorization using path attributes

Similar Documents

Publication Publication Date Title
US8913613B2 (en) Method and system for classification and management of inter-blade network traffic in a blade server
US20180375764A1 (en) Providing Network Efficiencies in Forwarding Packets Among Provider Networks and Applying Segment Routing Policies
US9935882B2 (en) Configuration of network elements for automated policy-based routing
US10038668B2 (en) Computerized system and method for handling network traffic
US8634415B2 (en) Method and system for routing network traffic for a blade server
CN113261248A (zh) 安全sd-wan端口信息分发
CN112929274A (zh) 一种处理路由的方法、设备及系统
WO2021082575A1 (zh) 一种报文转发方法、设备、存储介质及系统
KR20010052198A (ko) 무선 통신망에서의 축소 패킷 헤더
WO2021233327A1 (zh) 报文处理方法及装置、通告方法及装置、网桥节点、源设备、存储介质及报文处理系统
JP2001237876A (ja) Ip仮想プライベート網の構築方法及びip仮想プライベート網
US20160088578A1 (en) Link layer discovery protocol (lldp) on multiple nodes of a distributed fabric
EP3796601A1 (en) Method and apparatus for managing virtual private network
US7688819B2 (en) Faster routing protocol convergence using efficient message markup
WO2022184169A1 (zh) 报文转发方法、系统、存储介质及电子装置
WO2022222750A1 (zh) 报文转发方法、装置、网络设备及存储介质
EP3072265B1 (en) Filtering at lower network protocol layers
Rayes et al. The internet in IoT
WO2024016985A1 (zh) 报文处理方法、通信系统以及相关装置
WO2023274083A1 (zh) 路由发布和转发报文的方法、装置、设备和存储介质
WO2022111666A1 (zh) 一种路由通告方法、装置及系统
WO2022166465A1 (zh) 一种报文处理方法及相关装置
WO2022227800A1 (zh) 一种通信方法及装置
CN112994928B (zh) 一种虚拟机的管理方法、装置及系统
JPH11112503A (ja) ネットワークシステムおよびネットワーク機器

Legal Events

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

Ref document number: 23842050

Country of ref document: EP

Kind code of ref document: A1