WO2021093372A1 - Data packet processing method and device, and storage medium and system - Google Patents

Data packet processing method and device, and storage medium and system Download PDF

Info

Publication number
WO2021093372A1
WO2021093372A1 PCT/CN2020/105056 CN2020105056W WO2021093372A1 WO 2021093372 A1 WO2021093372 A1 WO 2021093372A1 CN 2020105056 W CN2020105056 W CN 2020105056W WO 2021093372 A1 WO2021093372 A1 WO 2021093372A1
Authority
WO
WIPO (PCT)
Prior art keywords
segment
micro
network device
identifier
segment identifier
Prior art date
Application number
PCT/CN2020/105056
Other languages
French (fr)
Chinese (zh)
Inventor
白涛
杜正贤
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2021093372A1 publication Critical patent/WO2021093372A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • H04L45/04Interdomain routing, e.g. hierarchical routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/34Source routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/50Routing or path finding of packets in data switching networks using label swapping, e.g. multi-protocol label switch [MPLS]

Definitions

  • This application relates to the field of communications, a method, equipment, storage medium and system for processing data messages.
  • Micro segmentation It is a type that can be based on (Internet Protocol, IP) address, IP network segment, Media Access Control (MAC) address, virtual machine (VM) name, container,
  • IP Internet Protocol
  • MAC Media Access Control
  • VM virtual machine
  • the virtual network division method that the operating system implements the subnet division can support fine-grained network isolation. For example, different devices belonging to the same virtual local network (virtual local network, VLAN) can also be isolated from each other.
  • a micro-segment corresponds to an endpoint group.
  • An endpoint group is a set of endpoints with the same characteristics.
  • the endpoints provide applications or services.
  • the endpoints can be virtual machines.
  • An endpoint group represents a group of applications or services. These applications or services are grouped into a micro-segment and can have the same security policy level.
  • Segment routing is a protocol designed to forward data messages in a network based on the concept of source routing.
  • the head node inserts a set of ordered segment identifiers into the data message to explicitly specify the forwarding path of the data message.
  • MPLS multi-protocol label switching
  • MPLS-SR MPLS-based segment routing
  • SR is applied to Internet Protocol version 6 ( Internet Protocol Version 6, IPv6) data plane, it is called segment routing based on IPv6 (SRv6).
  • Segment ID (Segment ID, SID) represents a node or a link.
  • SID is represented as a 128-bit value; in SR-MPLS, the SID is represented as a label value.
  • An SRv6 segment identifier can include a functional part, which indicates that the network device that issues the segment identifier needs to execute The corresponding action.
  • Segment ID List (SID List, SID List): A list containing a group of segment IDs. After receiving the data message, the head node in the segment routing network inserts 1 SID into the data message. The List can display the indication One forwarding path.
  • This application provides a data message processing method and device, which are used to implement data message access control in a segment routing network according to micro-segmentation information, and reduce configuration complexity.
  • a data packet processing method including: a first network device in a segment routing network receives a first data packet, the first data packet includes a first micro-segment segment identifier, and the first network device in the segment routing network A micro-segment segment identifier is used to identify a micro-segment of a second network device in the segment routing network, the first data packet is a data packet sent to the second network device; the first network device Determine a processing action on the first data packet according to the first micro-segmentation segment identifier; the first network device performs the processing action on the first data packet.
  • the network device in the SR network directly obtains the micro-segment segment identifier from the received data message, and then the network device performs corresponding processing actions on the data message according to the micro-segment segment identifier, which can reduce the complexity of network configuration and further reduce The number of table lookups when the network device implements access control of the data message according to the micro-segmentation.
  • the determining, by the first network device, a processing action on the first data packet according to the first micro-segmentation identifier includes: the first network device according to the first micro-segmentation segment The corresponding relationship between the identifier and the processing action is determined, and the processing action on the first data packet is determined.
  • the network device in the SR network directly determines the processing action according to the corresponding relationship between the micro-segmentation segment identifier and the processing action, thereby reducing the number of table lookups when the network device implements the access control of the data message according to the micro-segmentation.
  • the first network device performs a processing action on the first data packet according to the first micro-segment identification, including: the first network device identifies from the first micro-segment identification Obtain the first micro-segment directly in the middle; the first network device performs the processing action on the first data packet according to the first micro-segment.
  • the network device in the SR network directly obtains the micro-segment segment identifier from the received data message, and directly obtains the micro-segment from the micro-segment identifier, and then the network device performs corresponding processing actions on the data message according to the micro-segment , Can reduce the complexity of network configuration, and further reduce the number of table lookups when the network device implements data message access control according to micro-segmentation.
  • the first network device and the second network device are the same network device
  • the first micro-segment segment identifier includes a functional part
  • the first network device is based on the first differential
  • the method further includes: the first network device determines that the functional part is used to indicate: the first network device according to the first micro-segment segment
  • the identifier determines the processing action for the first data packet.
  • the network configuration can be reduced.
  • the first data message further includes a second micro-segment segment identifier, and the second micro-segment segment identifier is used to identify a micro-segment of a third network device in the segment routing network, so
  • the first network device performing a processing action on the first data packet according to the first micro-segmentation identifier includes: the first network device performs a processing action on the first data packet according to the first micro-segmentation identifier and the second micro-segmentation identifier pair The first data message performs a processing action.
  • the first network device executes the processing action according to the first micro-segment segment identifier and the second micro-segment segment identifier, including: the first micro-segment segment identifier includes the first micro-segment, so The second micro-segment segment identifier includes a second micro-segment; the first network device performs the processing action on the first data packet according to the first micro-segment and the second micro-segment.
  • the first data message further includes a second micro-segment segment identifier
  • the second micro-segment segment identifier is used to identify a micro-segment of a third network device in the segment routing network, so
  • the first micro-segmentation segment identifier and the second micro-segmentation segment identifier are added to the first data packet by the third network device, and the first network device determines the corresponding
  • the processing action of the first data packet includes: the first network device determines a processing action on the first data packet according to the correspondence between a matching condition and the processing action, and the matching condition includes the The first micro-segmentation segment identifier and the second micro-segmentation segment identifier.
  • the segment identifier list of the first data packet includes the first micro-segment segment identifier.
  • the segment identifier list further includes the second micro-segment segment identifier, or the first data message further includes metadata, and the metadata includes the second micro-segment segment identifier.
  • the second micro-segmentation segment identifier is carried in the source and destination address of the header of the first data message.
  • the segment identification list is carried in the segment routing header or the multi-protocol label switching label stack of the first data packet.
  • the network device carries the first micro-segment segment identifier in the segment identifier list, and the segment identifier list is carried in the segment routing header of the second number message or the multi-protocol label switching label stack, which is conducive to the use of segment routing networks.
  • the control and forwarding mechanism of the invention reduces the complexity of the implementation of the solution of the present invention.
  • the network device carries the second micro-segment segment identifier in the segment identifier list or metadata, which is similar to directly carrying the micro-segment feature of the data message in the message, which is beneficial for routing between other devices in the segment of the network.
  • Obtaining the second micro-segment segment identifier without complicated configuration and multiple table lookups is beneficial to reduce the overall segment routing network equipment overhead.
  • the segment routing header of the first data message further includes a carrying flag, and the carrying flag identifies a carrying manner of the second micro-segment segment identifier.
  • the network device carries a carrying flag that identifies the second micro-segment segment identifier carrying mode in the segment routing header of the first data packet, so that the first network device can use the indication of the carrying flag to obtain information from the position indicated by the carrying flag. Obtain the second micro-segmentation segment identifier directly.
  • the processing action includes: forwarding, discarding, marking, redirection, or mirroring.
  • the solution of the present invention can match the requirements of multiple network services and meet more application scenarios.
  • the second network device and the first network device are the same device.
  • the first network device sends a notification message, the notification message carrying the first micro-segment segment identifier; or the first network device sends a border network protocol link state message,
  • the link state message carries the first micro-segment segment identifier; or the first network device sends a path calculation unit communication protocol message, and the path calculation unit communication protocol message carries the first micro-segment segment identifier.
  • the first network device can issue a micro-segment segment identifier that identifies its own micro-segment, so that other network devices in this segment of the routing network can obtain the micro-segment identification information of the first network device, and route to other networks in the segment.
  • the device notifies the first network device that it has the ability to process data packets according to the micro-segmentation identifier, and the corresponding routing information.
  • the first network device performing the processing action on the first data packet includes: the first network device generates a second A data message, the second data message does not include the first micro-segmentation segment identifier; the first network device sends the second data message.
  • the first network device when the processing action includes forwarding or marking, performs a processing action on the first data packet according to the first micro-segmentation segment identifier, including: A network device strips the list of segment identifiers in the first data message to obtain a second data message; when the second micro-segment segment identifier is carried in the metadata, the first network device also strips all The metadata in the first data message is used to obtain the second data message; the first network device sends the second data message.
  • the SRH in the data message is stripped, and when the second micro-segment segment identifier is carried in the metadata, the metadata is also stripped Method, the method of stripping the relevant information in the segment routing network is similar to restoring the forwarded data message, so as to avoid affecting the subsequent forwarding of the data message.
  • the second network device and the first network device are different devices.
  • the first data message further includes a micro-segment node segment identifier
  • the micro-segment node segment identifier is the segment identifier of the first network device
  • the micro-segment node segment identifier is used for Instruct the first network device to process the first data packet according to the first micro-segmentation identifier.
  • the first network device sends a notification message, the notification message carrying the micro-segment node segment identifier; or the first network device sends a border network protocol link state message,
  • the link state message publishes the micro-segment node segment identifier; or the first network device sends a path calculation unit communication protocol message, and the path calculation unit communication protocol message carries the micro-segment node segment identifier.
  • the intermediate node in the segment of the routing network issues its micro-segment node segment identifier, so that the first network device can generate the micro-segment node when the second data packet is generated according to the first data packet.
  • the segment identifier is carried in the second data message, so that the intermediate node can also perform processing actions on the data message according to the carried first and second micro-segment segment identifiers.
  • a data packet processing method including: a first network device in a segment routing network receives a first data packet; the first network device determines a first data packet according to the first data packet A micro-segment segment identifier, the first micro-segment segment identifier is used to identify a micro-segment of a second network device in the segment routing network, the first data message does not include the first micro-segment segment identifier, and the first micro-segment segment identifier A data message is a data message sent to the second network device; the first network device determines a processing action on the first data message according to the first micro-segmentation identifier; the first network The device performs the processing action on the first data packet.
  • the head node in the SR network can determine the micro-segment segment identifier of the tail node to be sent to the data message corresponding to the received data message according to the segment identifier table according to the longest matching principle (it can be called the destination micro-segment segment identifier) , Without the need to configure the relationship between the IP addresses of all devices in the entire network and micro-segmentation on the head node, which can reduce the complexity of network configuration.
  • determining, by the first network device, a processing action on the first data packet according to the first micro-segmentation segment identifier includes:
  • the first network device determines a processing action on the first data packet according to the correspondence between the first micro-segmentation segment identifier and the processing action.
  • the method further includes: the second network device obtains the corresponding A relationship, the corresponding relationship includes a mapping relationship between the first micro-segmentation segment identifier and the processing action.
  • the second network device performing a processing action on the first data packet according to the first micro-segment identifier includes: the second network device performs a processing action on the first data packet according to the first micro-segment identifier And a second micro-segment segment identifier to execute the processing action, where the second micro-segment segment identifier is used to identify a micro-segment of the second network device; the method further includes: the second network device according to the received first A data message determines the second micro-segmentation segment identifier.
  • the second network device executes the processing action according to the first micro-segment segment identifier and the second micro-segment segment identifier, including: the first micro-segment segment identifier includes the first micro-segment, so The second micro-segment segment identifier includes a second micro-segment; the second network device performs the processing action on the first data packet according to the first micro-segment and the second micro-segment.
  • the head node uses the above-mentioned destination micro-segment segment identifier and the head node's micro-segment segment identifier (which can be referred to as the source micro-segment segment identifier) as the matching condition for data message access policy control; or, the head node network device can also determine
  • the source micro-segment segment identifies the corresponding micro-segment (may be referred to as the source micro-segment) and the above-mentioned destination micro-segment, and then the source micro-segment and the destination micro-segment are used as the matching condition when controlling the access policy of the data message.
  • the processing action includes: forwarding, discarding, marking, redirection, or mirroring.
  • the solution of the present invention can match the requirements of multiple network services and meet more application scenarios.
  • the first micro-segmentation segment identifier includes a functional part, and the functional part is used to indicate: the second network device determines that the first data packet is processed according to the first micro-segmentation segment identifier. Processing actions.
  • the network configuration can be reduced.
  • the first network device further determines the second micro-segmentation segment identifier according to the received first data packet, and the second micro-segmentation segment identifier is used to identify the network device of the first network device.
  • a micro-segment; the first network device determines the processing action of the first data packet according to the first micro-segmentation identifier, including: the first network device determines the corresponding relationship between the processing action and the matching condition according to the matching condition , Determining a processing action for the first data packet, and the matching condition includes the first micro-segmentation identifier and the second micro-segmentation identifier.
  • the second network device when the processing action includes forwarding or marking, performs a processing action on the first data packet according to the first micro-segment segment identifier, including: 2.
  • a network device generates a second data message according to the first data message, the second data message includes a segment identifier list, and the segment identifier list includes the first micro-segment segment identifier; the second network device Sending the second data packet to the first network device.
  • the second data message generated by the second network device carries the first micro-segment segment identifier. It only needs to be in the second network device, such as: a segment routing network
  • the head node that forwards the first data message carries the first micro-segment segment identifier in subsequent data messages, without the need for other network devices to determine the manner in which the first endpoint group segment is represented again, which reduces the overall network device overhead.
  • the segment identifier list further includes the second micro-segment segment identifier, or the second data message further includes metadata, and the metadata includes the second micro-segment segment identifier.
  • the second micro-segmentation segment identifier is carried in the source and destination address of the header of the second data packet.
  • the second micro-segmentation segment identifier By carrying the second micro-segmentation segment identifier in the segment identifier list or metadata, it is similar to directly carrying the micro-segmentation feature of the data message in the message, which is beneficial to other devices in the routing network of this segment to obtain the first Two micro-segment segment identifications do not require multiple comparison calculations, which is beneficial to reduce the overall segment routing network equipment overhead.
  • the segment identifier list is carried in the segment routing header of the second data packet or the multi-protocol label switching MPLS label stack.
  • the segment routing header of the second data message further includes a carrying flag, and the carrying flag identifies a carrying manner of the second micro-segment segment identifier.
  • the network device receiving the second data message can use the indication of the carrying flag to obtain information from the carrying flag.
  • the location directly obtains the second micro-segment segment identifier.
  • the second network device also obtains the micro-segmentation node segment identifier of the third network device, and the micro-segmentation node segment identifier is used to instruct the third network device according to the first micro-segmentation segment.
  • the identifier processes the first data message; the segment identifier list also includes the micro-segment node segment identifier.
  • the second network device By obtaining the third network device from the second network device, such as the micro-segment node segment identifier of the intermediate node that forwards the first data packet in the segment routing network, the second network device is able to generate data based on the first data packet.
  • the micro-segment node segment identifier can be carried in the second data message, so that the intermediate network node that publishes the micro-segment node segment identifier can also compare the datagram according to the carried first micro-segment segment identifier.
  • the text executes processing actions.
  • the second network device receives a configuration instruction, and obtains the second micro-segment segment identifier from the configuration instruction; or the second network device generates the second micro-segment node segment identifier.
  • the second network device sends a notification message, the notification message carrying the second micro-segment segment identifier; or the second network device sends a border network protocol link state message,
  • the link state message carries the second micro-segment segment identifier; or the second network device sends a path calculation unit communication protocol message, and the path calculation unit communication protocol message carries the second micro-segment segment identifier.
  • the second network device can also issue the micro-segment segment identifier that identifies its own micro-segment, so that other network devices in the routing network at this end can also obtain the micro-segment identification information of the second network device, and route the micro-segment identification information of the second network device to this segment.
  • the other network device notifies the second network device that it has the ability to process data packets according to the micro-segment identifier, and the corresponding routing information.
  • the second micro-segmentation segment identifier includes a functional part, and the functional part is used to indicate: the first network device determines that the first data packet is processed according to the second micro-segmentation segment identifier. Processing actions.
  • the network configuration can be reduced.
  • the second network device determining the second micro-segment segment identifier according to the received first data packet includes: the second network device according to the source of the first data packet The address determines the second micro-segment segment identifier, or the second network device determines the second micro-segment segment identifier according to the interface through which the first data message is received.
  • the network device can determine the second micro-segment segment identifier corresponding to the first data packet in multiple ways, and it is not limited to only one solution, and the solution application scenarios are more abundant.
  • the second network device determining the first micro-segment segment identifier according to the first data packet includes: the second network device determines the first micro-segment segment identifier according to the destination address or distinction of the first data packet The service code point determines the first micro-segment segment identifier.
  • the method of determining the first micro-segment segment identifier according to the destination address of the first data message or the differentiated services code point does not need to add additional feature information to the solution to determine the first micro-segment segment identifier, and the solution has a wider application range.
  • the second network device receives a notification message sent by the second network device, and obtains the first micro-segment segment identifier through the notification message; or the second network device receives The controller or the path calculation unit sends the first micro-segment segment identifier.
  • the network device receives the micro-segment segment identifiers issued by other network devices in the segment routing network in a variety of ways, so that the present invention can be used in multiple segment routing network scenarios.
  • a first network device is provided.
  • the first network device is applied to a segment routing network and includes: a receiving unit configured to receive a first data packet, the first data packet including a first data packet A micro-segment segment identifier, the first micro-segment segment identifier is used to identify a micro-segment of a second network device in the segment routing network, and the first data packet is a data packet sent to the second network device
  • the processing unit is configured to determine a processing action on the first data packet according to the first micro-segmentation segment identifier; the processing unit is configured to perform the processing action on the first data packet.
  • the processing unit is configured to determine a processing action for the first data packet according to the first micro-segmentation identifier, specifically: the processing unit is configured to determine the processing action of the first data packet according to the first micro-segmentation identifier.
  • the corresponding relationship between a micro-segmentation identifier and the processing action determines the processing action for the first data packet.
  • the first network device and the second network device are the same network device
  • the first micro-segment identifier includes a functional part
  • the processing unit is configured to perform according to the first differential
  • the processing unit is further specifically configured to: determine that the functional part is used to indicate that the processing unit determines the processing action for the first micro-segment segment identifier according to the first micro-segment segment identifier. The processing action of the first data message.
  • the first data message further includes a second micro-segment segment identifier
  • the second micro-segment segment identifier is used to identify a micro-segment of a third network device in the segment routing network
  • the processing unit is configured to perform a processing action on the first data message according to the first micro-segmentation identifier, specifically: the processing unit is configured to perform a processing action on the first data message according to the first micro-segmentation identifier and the second micro-segmentation identifier Identifies the execution of a processing action on the first data message.
  • the segment identifier list of the first data packet includes the first micro-segment segment identifier.
  • the segment identifier list further includes the second micro-segment segment identifier, or the first data message further includes metadata, and the metadata includes the second micro-segment segment identifier.
  • the segment identifier list is carried in the segment routing header or the multi-protocol label switching label stack of the second data packet.
  • the segment routing header of the first data message further includes a carrying flag, and the carrying flag identifies a carrying manner of the second micro-segment segment identifier.
  • the first network device further includes a sending unit, and the processing action includes: forwarding, discarding, marking, redirection, or mirroring.
  • the second network device and the first network device are the same device.
  • the sending unit is configured to send a notification message, the notification message carrying the first micro-segment segment identifier; or the sending unit is configured to send a border network protocol link status report
  • the link state message carries the first micro-segment segment identifier; or the sending unit is configured to send a path calculation unit communication protocol message, and the path calculation unit communication protocol message carries the first differential Segment identifier.
  • the first network device further includes a sending unit, and when the processing action includes forwarding or marking, the processing unit performs the processing action on the first data packet, specifically :
  • the processing unit generates a second data packet, and the second data packet does not include the first micro-segment segment identifier; the sending unit is configured to send the second data packet.
  • the processing unit when the processing action includes forwarding or marking, is configured to perform a processing action on the first data packet according to the first micro-segmentation identifier, specifically: The processing unit is configured to strip the list of segment identifiers in the first data message to obtain a second data message; when the second micro-segment segment identifier is carried in the metadata, the processing unit further Used to strip the metadata in the first data message to obtain the second data message; the first network device sends the second data message.
  • the second network device and the first network device are different devices.
  • the first data message further includes a micro-segment node segment identifier
  • the micro-segment node segment identifier is the segment identifier of the first network device
  • the micro-segment node segment identifier is used for Instruct the first network device to process the first data packet according to the first micro-segmentation identifier.
  • the first network device and the second network device are different devices
  • the first data message further includes a micro-segment node segment identifier
  • the micro-segment node segment identifier is The segment identifier of the first network device
  • the micro-segment node segment identifier includes a functional part
  • the functional part is used to instruct: the processing unit determines, according to the first micro-segment segment identifier, the information on the first data packet Processing actions.
  • the sending unit is configured to: send a notification message, the notification message carrying the micro-segment node segment identifier; or send a border network protocol link state message, the link
  • the status message publishes the micro-segment node segment identifier; or sends a path calculation unit communication protocol message, and the path calculation unit communication protocol message carries the micro-segment node segment identifier.
  • a second network device which is applied to a segment routing network, including:
  • the receiving unit is configured to receive a first data message; the processing unit is configured to determine a first micro-segment segment identifier according to the first data message, and the first micro-segment segment identifier is used to identify the first micro-segment segment identifier in the segment routing network 2.
  • a micro-segment of a network device the first data message does not include the first micro-segmentation identifier, and the first data message is a data message sent to the second network device; the processing unit And is further configured to determine a processing action on the first data packet according to the first micro-segmentation segment identifier; the processing unit is further configured to perform the processing action on the first data packet.
  • the processing unit is further configured to determine a processing action on the first data packet according to the first micro-segmentation identifier, specifically: the processing unit is configured to perform processing according to the first micro-segmentation identifier.
  • the corresponding relationship between a micro-segmentation identifier and the processing action determines the processing action for the first data packet.
  • the first micro-segmentation segment identifier includes a functional part, and the functional part is used to indicate: the second network device determines that the first data packet is processed according to the first micro-segmentation segment identifier. Processing actions.
  • the processing unit is configured to perform a processing action on the first data message according to the first micro-segmentation identifier, specifically: the processing unit is configured to perform a processing action according to the first micro-segmentation segment An identifier and a second micro-segment identifier to execute the processing action, the second micro-segment identifier is used to identify a micro-segment of the second network device; the processing unit is further used to: receive the first datagram according to the The text determines the identifier of the second micro-segmentation segment.
  • the processing action includes: forwarding, discarding, marking, redirection, or mirroring.
  • the second network device further includes a sending unit, and when the processing action includes forwarding or marking, the processing unit is further configured to perform the processing action on the first data packet , Specifically: the processing unit is configured to generate a second data message according to the first data message, the second data message includes the first micro-segment segment identifier; the sending unit is configured to The second network device sends the second data packet.
  • the second micro-segmentation segment identifier includes a functional part, and the functional part is used to indicate: the first network device determines that the first data packet is processed according to the second micro-segmentation segment identifier. Processing actions.
  • the processing unit further includes a sending unit, and when the processing action includes forwarding or marking, the processing unit performs processing on the first data packet according to the first micro-segmentation identifier
  • the action is specifically: the processing unit is configured to generate a second data message according to the first data message, the second data message includes a segment identifier list, and the segment identifier list includes the first differential Segment identifier; the sending unit is configured to send the second data message to the first network device.
  • the segment identifier list further includes the second micro-segment segment identifier, or the second data message further includes metadata, and the metadata includes the second micro-segment segment identifier.
  • the receiving unit is further configured to receive a micro-segmentation node segment identifier of a third network device, and the micro-segmentation node segment identifier is used to instruct the third network device according to the first micro-segmentation segment
  • the identifier processes the first data message; the segment identifier list also includes the micro-segment node segment identifier.
  • the segment identifier list is carried in the segment routing header of the second data packet or the multi-protocol label switching MPLS label stack.
  • the segment routing header of the second data message further includes a carrying flag, and the carrying flag identifies a carrying manner of the second micro-segment segment identifier.
  • the receiving unit is further configured to receive a configuration instruction, and obtain the second micro-segment segment identifier from the configuration instruction; or the processing unit is further configured to generate the second micro-segment node Segment ID.
  • the sending unit is configured to send a notification message, the notification message carrying the second micro-segment identifier; or the sending unit is configured to send a border network protocol link status report
  • the link state message carries the second micro-segment segment identifier; or the sending unit is configured to send a path calculation unit communication protocol message, and the path calculation unit communication protocol message carries the second differential Segment identifier.
  • the processing unit is further configured to determine the second micro-segmentation identifier according to the received first data packet, specifically: the processing unit is configured to determine the second micro-segmentation segment identifier according to the first data packet The source address of the message determines the second micro-segmentation identifier, or the processing unit is configured to determine the second micro-segmentation identifier according to the interface through which the first data message is received.
  • the processing unit is configured to determine the first micro-segment segment identifier according to the first data packet, specifically: the processing unit is configured to determine the first micro-segment segment identifier according to the destination address of the first data packet Or a differentiated service code point determines the first micro-segment segment identifier.
  • the receiving unit is further configured to receive the first micro-segment segment identifier in the notification message sent by the second network device; or the receiving unit is further configured to receive the controller Or the first micro-segment segment identifier sent by the path calculation unit.
  • a first network device which is applied to a segment routing network, and includes: a communication interface, a memory, and a processor; the communication interface is configured to receive a first data packet, and the first data packet
  • the message includes a first micro-segment segment identifier, the first micro-segment segment identifier is used to identify a micro-segment of a second network device in the segment routing network, and the first data message is sent to the second network device
  • the data message; the processor is configured to determine a processing action on the first data message according to the first micro-segmentation segment identifier; the processor performs the processing action on the first data message .
  • the processor determining the processing action of the first data packet according to the first micro-segment identifier includes: the processor according to the first micro-segment identifier and the The corresponding relationship of the processing actions determines the processing action for the first data packet.
  • the first network device and the second network device are the same network device
  • the first micro-segmentation identifier includes a functional part
  • the processor is configured according to the first micro-segmentation identifier
  • the processor is further configured to: determine that the functional part is used to instruct: the first network device determines to perform the processing of the first data packet according to the first micro-segmentation identifier A processing action of a data message.
  • the first data message further includes a second micro-segment segment identifier
  • the second micro-segment segment identifier is used to identify a micro-segment of a third network device in the segment routing network
  • the processor is configured to perform a processing action on the first data message according to the first micro-segmentation identifier, specifically: the processor is further configured to perform a processing action on the first data message according to the first micro-segmentation identifier and the second micro-segmentation identifier Identifies the execution of a processing action on the first data message.
  • the segment identifier list of the first data packet includes the first micro-segment segment identifier.
  • the segment identifier list further includes the second micro-segment segment identifier, or the first data message further includes metadata, and the metadata includes the second micro-segment segment identifier.
  • the segment identifier list is carried in the segment routing header of the second data packet or the multi-protocol label switching MPLS label stack.
  • the segment routing header of the first data message further includes a carrying flag, and the carrying flag identifies a carrying manner of the second micro-segment segment identifier.
  • the processing action includes: forwarding, discarding, marking, redirection, or mirroring.
  • the second network device and the first network device are the same device.
  • the communication interface is also used to send a notification message, the notification message carrying the first micro-segment identifier; or the communication interface is also used to send a border network protocol link Status message, the link status message carries the first micro-segment identifier; or the communication interface is also used to send a path calculation unit communication protocol message, the path calculation unit communication protocol message carries the The first micro-segment segment identifier.
  • the processor when the processing action includes forwarding or marking, is configured to perform a processing action on the first data packet according to the first micro-segmentation segment identifier, specifically: The processor is configured to strip the list of segment identifiers in the first data message to obtain a second data message; when the processor determines that the second micro-segment segment identifier is carried in the metadata, The processor is further configured to strip the metadata in the first data message to obtain the second data message; the communication interface is also configured to send the second data message.
  • the second network device and the first network device are different devices.
  • the first data message further includes a micro-segment node segment identifier
  • the micro-segment node segment identifier is the segment identifier of the first network device
  • the micro-segment node segment identifier is used for Instruct the first network device to process the first data packet according to the first micro-segmentation identifier.
  • the communication interface is also used to send a notification message, the notification message carrying the micro-segment node segment identifier; or the communication interface is also used to send a border network protocol link Status message, the link status message advertises the micro-segment node segment identifier; or the communication interface is also used to send a path calculation unit communication protocol message, the path calculation unit communication protocol message carries the Micro-segment node segment identifier.
  • a second network device is provided.
  • the second network device is applied to a segment routing network and includes: a communication interface, a memory, and a processor; the communication interface is used to receive a first data packet;
  • the processor is configured to determine a first micro-segment segment identifier according to the first data message, and the first micro-segment segment identifier is used to identify a micro-segment of a second network device in the segment routing network, and the first data
  • the message does not include the first micro-segmentation segment identifier, and the first data message is a data message sent to the second network device; the processor is further configured to determine a pair according to the first micro-segmentation segment identifier. Processing action of the first data packet; the processor is further configured to perform the processing action on the first data packet.
  • the processor is configured to determine a processing action on the first data packet according to the first micro-segmentation identifier, specifically: the processor is configured to determine the processing action of the first data packet according to the first micro-segmentation identifier and The corresponding relationship between the processing actions determines the processing action on the first data packet.
  • the processor is configured to perform a processing action on the first data message according to the first micro-segment identifier, specifically: the processor is configured to perform a processing action on the first data message according to the first micro-segment identifier and the first micro-segment identifier.
  • the second micro-segment segment identifier executes the processing action, and the second micro-segment segment identifier is used to identify a micro-segment of the second network device; the processor is further specifically configured to: determine according to the received first data packet The second micro-segmentation segment identifier.
  • the communication interface is further configured to receive a notification message sent by the second network device, and the processor is further configured to obtain the first differential from the notification message.
  • Segment identifier or the communication interface is further configured to receive a control message sent by a controller or a path calculation unit, and the processor is further configured to obtain the first micro-segment segment identifier from the control message.
  • the processing action includes: forwarding, discarding, marking, redirection, or mirroring.
  • the processor when the processing action includes forwarding or marking, is configured to perform a processing action on the first data packet according to the first micro-segmentation segment identifier, specifically: The processor is configured to generate a second data message according to the first data message, the second data message including a segment identifier list, and the segment identifier list includes the first micro-segment segment identifier; the communication The interface is used to send the second data packet to the first network device.
  • the segment identifier list further includes the second micro-segment segment identifier, or the second data message further includes metadata, and the metadata includes the second micro-segment segment identifier.
  • the segment identifier list is carried in the segment routing header of the second data packet or the multi-protocol label switching MPLS label stack.
  • the segment routing header of the second data message further includes a carrying flag, and the carrying flag identifies a carrying manner of the second micro-segment segment identifier.
  • the processor is further configured to obtain a micro-segment node segment identifier of a third network device, and the micro-segment node segment identifier is used to instruct the third network device to perform the identification according to the first differential
  • the segment identifier processes the first data message; the segment identifier list also includes the micro-segment node segment identifier.
  • the communication interface is configured to receive a configuration instruction
  • the processor is configured to obtain the second micro-segment segment identifier from the configuration instruction; or the processor is configured to generate the The second micro-segment node segment identifier.
  • the sending unit is configured to send a notification message, the notification message carrying the second micro-segment identifier; or the sending unit is configured to send a border network protocol link status report
  • the link state message carries the second micro-segment segment identifier; or the sending unit is configured to send a path calculation unit communication protocol message, and the path calculation unit communication protocol message carries the second differential Segment identifier.
  • a network device in a seventh aspect, includes a main control board and an interface board, and further, may also include a switching network board.
  • the network device is used to execute the first aspect or the method in any possible implementation manner of the first aspect.
  • the network device includes a module for executing the method in the first aspect or any possible implementation of the first aspect.
  • a network device in an eighth aspect, includes a main control board and an interface board, and further, may also include a switching network board.
  • the network device is used to execute the second aspect or the method in any possible implementation manner of the second aspect.
  • the network device includes a module for executing the second aspect or the method in any possible implementation manner of the second aspect.
  • a network system in a ninth aspect, includes a first network device and a second network device.
  • the first network device is provided by any one of the optional methods of the third aspect or the fifth aspect.
  • a computer-readable storage medium is provided, and at least one instruction is stored in the storage medium.
  • the instruction is loaded and executed by a processor as described in the first aspect and any one of the optional manners of the first aspect.
  • a computer program includes a method for executing the foregoing first aspect or any one of the optional manners of the first aspect.
  • a computer program includes a method for executing the above-mentioned second aspect or any one of the optional manners of the second aspect.
  • FIG. 1 is a schematic diagram of an application scenario of a network system in an embodiment of the application
  • Figure 2 is a schematic diagram of an application scenario in an embodiment of the application
  • FIG. 3a is a flowchart of a data packet processing method provided by an embodiment of the application.
  • FIG. 3b is a flowchart of a data packet processing method provided by an embodiment of the application.
  • FIG. 4a is a flowchart of a method for processing a data message provided by an embodiment of the application
  • 4b is a flowchart of a method for processing a data message provided by an embodiment of the application.
  • FIG. 5 is a schematic diagram of a first type length value TLV provided by an embodiment of this application.
  • FIG. 6 is a schematic diagram of the composition of a micro-segment segment identifier provided by an embodiment of this application.
  • FIG. 7 is a schematic diagram of a segment routing header provided by an embodiment of the application.
  • FIG. 8 is a schematic diagram of a metadata TLV provided by an embodiment of this application.
  • FIG. 9 is a schematic diagram of a flag bit in a segment routing header provided by an embodiment of the application.
  • FIG. 10 is a schematic diagram of a second type length value TLV provided by an embodiment of this application.
  • FIG. 11 is a schematic structural diagram of a second network device provided by an embodiment of this application.
  • FIG. 12 is a schematic structural diagram of a first network device provided by an embodiment of this application.
  • FIG. 13 is a schematic structural diagram of a network device provided by an embodiment of this application.
  • FIG. 14 is a schematic structural diagram of a network device provided by an embodiment of this application.
  • FIG. 15 is a schematic diagram of a network system provided by an embodiment of this application.
  • Segment routing header (segment routing header, SRH): IPv6 packets are composed of IPv6 standard header + extended header (0...n) + payload (Payload).
  • SRH extension header a new IPv6 extension header is added, called the SRH extension header.
  • the extension header specifies an explicit IPv6 path and stores IPv6 Segment List information. Its function is the same as the Segment in SR MPLS. Same as List.
  • the head node adds an SRH extension header to the IPv6 message, and the intermediate node can forward the IPv6 message according to the path information contained in the SRH extension header.
  • a network device that supports SRv6 will query the local segment identification table (local SID table) according to the destination address ((Destination Address, DA) in the data packet.
  • the destination address of the data packet is When any SID in the local segment identification table matches, the operation corresponding to the strategy is executed according to the SID-related strategy in the local segment identification table.
  • the operation corresponding to the strategy can export data packets from the SID specified Interface forwarding); if the destination address of the data message does not match each SID in the local segment identification table, the IPv6 routing and forwarding table is checked again, and the longest matching forwarding is performed according to the IPv6 routing and forwarding table.
  • Head Node The start node of the SR forwarding path, responsible for the encapsulation segment identification.
  • Micro-segment segment identifier a segment identifier used to identify the micro-segment of the network device in the segment routing network, corresponding to an endpoint group.
  • the micro-segment identifier instructs the network device issuing the micro-segment identifier to perform the operation of processing the message according to the micro-segment identifier or the micro-segment.
  • Micro-segment node segment identifier a segment identifier used to identify network devices in a segment routing network.
  • the micro-segment node segment identifier instructs the network device issuing the micro-segment node segment identifier to perform the operation of processing the message according to the micro-segment identifier or the micro-segment.
  • a network includes network device 1 and network device 2, network device 1 is connected to VM1, network device 2 is connected to VM2, and the network between network device 1 and network device 2 is an SR network.
  • network device 1 When VM1 sends data message A to VM2, network device 1 receives the data message A, and network device 1 first needs to look up the table according to the destination address in data message A (that is, the address of VM2) to obtain the address corresponding to VM2 Micro-segmentation, and then look up the table according to the micro-segmentation to obtain the corresponding processing actions (such as modifying the priority), and then forward the marked data message A to the network device 2, and the network device 2 should also perform similar to the network device 1. action. Sometimes the intermediate device between the network device 1 and the network device 2 also needs to execute a similar strategy according to the micro-segmentation, which will result in the configuration of many devices.
  • VM IP address is a private network segment IP address
  • routing network address in the segment routing network is a public network IP address
  • it cannot be The corresponding relationship between micro-segmentation and IP address is configured on the network device in the segment routing network, and the data message cannot be processed according to the micro-segmentation.
  • FIG. 1 is a schematic diagram of an application scenario of a network system according to an embodiment of the application.
  • the network device 101, the network device 102, the network device 103, and the network device 104 belong to the same SR network.
  • the network device 101, the network device 102, the network device 103, and the network device 104 may be routers.
  • the device may also be a switch or any other device with SR routing function.
  • the form of the device may be a physical device device or a virtualized device with SR routing function, which is not specifically limited in this application.
  • the number of network devices in this application scenario may be more or less.
  • the number of the above-mentioned network devices may be dozens or hundreds, or more.
  • the embodiments of this application do not limit the number and device types of network devices.
  • the network device 101 is connected to virtual machines (VM) 1, VM2, VM3, and VM4.
  • the network device 101 is also connected to the network device 102 and the network device 104;
  • the network device 102 is connected to Network device 101 is connected to network device 103;
  • network device 104 is connected to network device 101 and network device 103;
  • network device 103 is connected to VM5, VM6, VM7, and VM8, while network device 103 is also connected to network device 102 and network device 104 .
  • VM1 and VM2 belong to the same EPG: EPG1, VM3 and VM4 belong to the same EPG: EPG2, VM5 and VM6 belong to the same EPG: EPG3, VM7 and VM8 belong to the same EPG: EPG4.
  • the network runs with the SR protocol: the network can be either an SR-MPLS network or an SRv6 network.
  • the network device 101 and the network device 103 support SR
  • the network device 102 and the network device 104 may or may not support SR.
  • the application scenario may also include a controller or a path calculation unit.
  • the controller or path calculation unit may be connected to each network device through a wireless network or a wired network.
  • the controller or path calculation unit may be used for The data packets that need to be forwarded in this segment of the routing network determine the corresponding forwarding path.
  • the controller or path calculation unit may be at least one of a server, multiple servers, a cloud computing platform, and a virtualization center. When there are multiple controllers, there may be at least two controllers used to provide different services, and/or there may be at least two controllers used to provide the same service, for example, to provide the same service in a load balancing manner. This is not specifically limited.
  • the scenario shown in FIG. 1 does not limit the specific connection mode between the network device 101 and the network device 103 and their corresponding VMs. They can be directly connected or through other network devices, such as switches and firewalls. When the device is connected to the corresponding VM, these other network devices do not belong to the SR network, that is, do not run the corresponding SR function.
  • the network device 101 is connected to VM1 and VM3 through the network device 201, and the network device 101 is connected to VM2 and VM4 through the network device 202.
  • the network device 103 is connected to VM5 and VM6 through the network device 203, and the network device 103 is connected to VM7 and VM8 through the network device 204.
  • the way it divides the corresponding micro-segmentation for the endpoint group is not limited to the specific connection mode, that is, not only can the micro-segmentation be divided according to their own physical or virtual interfaces, but also The micro-segmentation is divided based on the characteristics of the final endpoint group, such as IP address, or differentiated services code point (DSCP), or a combination of the two or more features.
  • IP address IP address
  • DSCP differentiated services code point
  • FIG. 3a is a flowchart of a data packet processing method provided by an embodiment of the application.
  • the interaction of this method mainly includes a first network device and a second network device.
  • the second network device may be the head node of the forwarding path of the data packet in the segment routing network
  • the first network device may be the tail node of the forwarding path.
  • the network device 101 and the network device 103 may be the second network device and the first network device, respectively.
  • the network device 101 is used as the second network device and the network device 103 is used as the first network device.
  • the network device 101 is used as the second network device and the network device 103 is used as the first network device.
  • the method mainly includes the following steps:
  • the network device 103 issues the first micro-segmentation segment identifier.
  • the micro-segment segment identifies a micro-segment corresponding to the network device, which can be expressed as End.XTEpg SID, End stands for endpoint, which means endpoint; X stands for crossing, which means three-layer cross connection; T stands for table lookup, which means table lookup; Epg stands for endpoint group, which means endpoint group; SID means segment identifier.
  • the micro-segment identifier can meet the format of the IPv6 address or the MPLS label.
  • the first micro-segment identifier corresponds to a micro-segment of the network device 103.
  • the micro-segment is EPG3, and the corresponding micro-segment identifier may be a value in an IPv6 address format.
  • the endpoint group corresponding to the micro-segment includes VM5. And VM6.
  • the endpoint groups corresponding to the micro-segment EPG3 may also be VM5 and VM7.
  • the division of micro-segmentation can be based on specific IP addresses, IP prefixes, and specific requirements of applications or services, which are not specifically limited in this application. It should be understood that, in some cases, the first micro-segment segment identifier may also correspond to multiple micro-segments of the network device 103.
  • the manner in which the network device 103 publishes the first micro-segment segment identifier includes the following three or more publishing methods:
  • Manner 1 The network device 103 sends a notification message, which carries the first micro-segment segment identifier.
  • the notification message can be a Border Gateway Protocol (Border Gateway Protocol, BGP) message, or a Border Gateway Protocol Ethernet Virtual Private Network (Border Gateway Protocol Ethernet Virtual Private Network, BGP EVPN) message, or it can be an internal gateway.
  • Border Gateway Protocol BGP
  • Border Gateway Protocol Ethernet Virtual Private Network BGP EVPN
  • IGP Interior Gateway Protocol
  • the first micro-segmentation segment identifier in the notification message is carried in its first type length value (TLV).
  • TLV is an encoding format, mainly by type (type) and length (length). And value (value) these three kinds of information to define.
  • the format of the first TLV is shown in FIG. 5.
  • the type field identifier in the figure indicates the type of the first TLV, the value of the type field can identify that the first TLV is a TLV used to publish End.XTEpg SID, and the value of the type field can be for publishing micro-segment segments. Identifies the type of new application, for example, it can be 90.
  • the value of the length field identifies the length of the first TLV.
  • the reserved field is reserved for subsequent expansion, for example, it can be used to identify the forwarding path.
  • the micro-segment segment identifier field is used to carry the micro-segment segment identifier.
  • the network device 103 may issue the first micro-segment segment identifier through the BGP link state protocol (Border Gateway Protocol-link state, BGP-LS).
  • BGP link state protocol Border Gateway Protocol-link state, BGP-LS.
  • the network device 103 may send the first micro-segment identifier to the controller through BGP-LS, and the controller may receive the first micro-segment identifier sent by the network device 103 and send the first micro-segment identifier through BGP-LS To the network device 101.
  • the network device 103 may issue the first micro-segment segment identifier through the Path Computation Element Communication Protocol (PCEP).
  • PCEP Path Computation Element Communication Protocol
  • the network device 103 may send the first micro-segment segment identifier to the controller or path calculation element (PCE) through the PCEP, and the controller or PCE may receive the first micro-segment segment sent by the network device 103 through the PCEP.
  • Identification sending the first micro-segment segment identification to the network device 101.
  • the network device 103 Before the network device 103 releases the first micro-segment segment identifier, the network device 103 needs to obtain the first micro-segment segment identifier. Regarding how the network device 103 obtains the micro-segment segment identifier, in some possible embodiments, the network device 103 may automatically assign at least one micro-segment segment identifier, or manually configure at least one micro-segment segment identifier. Specifically, the manner of obtaining the micro-segment segment identifier may include any one or more of the following manner 1 or manner 2.
  • Manner 1 The network device 103 allocates a micro-segment segment identifier to the corresponding micro-segment or endpoint group.
  • the network device 103 may assign a micro-segment segment identifier to each micro-segment or each endpoint group.
  • the micro-segment identifiers assigned to different endpoint groups/micro-segments are different, so that each micro-segment identifier assigned corresponds to one micro-segment identifier. Micro-segmentation or a group of endpoints.
  • the network device 103 may also allocate the same micro-segment segment identifier to multiple micro-segments or multiple endpoint groups, so that the assigned micro-segment identifier corresponds to multiple micro-segments or multiple endpoint groups.
  • the network device 103 may store a segment identification space, and can select an unoccupied micro-segment segment identifier from the segment identification space, and assign the micro-segment segment identifier to the micro-segment or endpoint group.
  • the network device 103 receives the configuration instruction, and the network device 103 obtains the corresponding relationship between the micro-segment segment identifier and one or more micro-segments or endpoint groups from the configuration instruction.
  • the configuration instruction may be triggered by a user's configuration operation on the network device 103, and the configuration instruction may also be triggered by a network manager or a controller.
  • the corresponding relationship between the micro-segmentation identifier and the micro-segmentation obtained by the network device 103 may be as shown in Table 1 below.
  • the endpoint group can use the IP address of the endpoint device, the endpoint group device
  • the interface, MAC address, and other information connected to the network device 103 are defined.
  • the following uses the IP address of the endpoint device to represent the endpoint group as an example: For example, VM5 and VM6 can be represented by the same IP address prefix A1::3:1/80, and VM7 and VM8 can be represented by the same IP address prefix A1::3: 2/80 means it can be shown in Table 2 below.
  • Table 1 and Table 2 only represent the concept of logic, and Table 1 and Table 2 can be combined into one table in implementation.
  • the corresponding relationship between the micro-segmentation identifier obtained by the network device 103 and the endpoint group can be shown in Table 3 below.
  • the endpoint group passes through the endpoint group device
  • the interface connected to the network device 103 is defined, and the interface may be a virtual sub-interface or a physical interface.
  • End.XTEpg SID3 corresponds to the endpoint group EPG3, and the interface between the network device 103 and the endpoint group EPG3 is virtual interface 1, and its name is vInf103-1;
  • End.XTEpg SID4 corresponds to the endpoint group EPG4, the port that the network device 103 connects to the endpoint group EPG4 is its virtual interface 2, and its name is vInf103-2.
  • micro-segment segment identifier can also be used as a micro-segment identifier to indicate a micro-segment.
  • the above is only an example of the corresponding relationship between the micro-segment segment identifier and the micro-segment or endpoint group.
  • it can be based on the above methods, such as according to the IP prefix, or the combination of the specific IP address, or the endpoint and the endpoint group.
  • Information such as the interface to which the network device is connected obtains the corresponding relationship between the micro-segment segment identifier and the micro-segment or endpoint group.
  • SRv6 SID is the form of IPv6 address
  • SRv6 SID can be composed of two parts: location information and function
  • the format is: location information: function. Among them, the location information occupies the high bits of the IPv6 address, and the function occupies the low bits of the IPv6 address. Among them, the location information can have a positioning function and can be unique in the SR domain.
  • the function represents the instructions of the device. These instructions are preset by the device.
  • the function part is used to instruct the SRv6 SID generating device to perform corresponding functional operations.
  • Figure 6 shows an example of another SRv6 micro-segment segment identifier.
  • the micro-segment segment identifier has a total of 128 bits and is divided into 3 parts.
  • the parameter segment part can define information such as the flow and service of some messages.
  • the network device 101 obtains the first micro-segmentation segment identifier.
  • the manner in which the network device 101 obtains the first micro-segment segment identifier may be the following two optional methods:
  • Manner 1 The network device 101 receives a notification message sent by the network device 103, and the message carries the first micro-segment identifier.
  • the network device 101 when the network device 103 sends the first micro-segment segment identifier through a BGP message, the network device 101 receives the BGP message sent by the network device 103, and obtains the first micro-segment segment identifier from the message; The device 103 sends the first micro-segment identifier through the IGP message, and the network device 101 receives the IGP message sent by the network device 103 and obtains the first micro-segment identifier from the message.
  • the network device 101 obtains the first micro-segmentation segment identifier from the first TLV of the BGP message or IGP message .
  • Manner 2 The network device 101 receives the first micro-segment segment identifier sent from the controller or the path calculation unit.
  • the controller can receive the first micro-segment segment identifier sent by the network device 103 through the BGP-LS protocol, and add the first micro-segment segment identifier to the first micro-segment segment.
  • the identification is sent to the network device 101.
  • the controller or PCE can receive the first micro-segment segment identifier sent by the network device 103, and send the first micro-segment segment identifier to the network Equipment 101.
  • the time when the controller or PCE executes sending the first micro-segment identifier to the network device 101 may be sent after receiving the first micro-segment identifier, or it may be within a period of time, or when the network device 101 requests the controller or PCE When there is a forwarding path, it is sent to the network device 101.
  • the network device 101 receives the first data packet, and determines the first micro-segment segment identifier according to the first data packet, and the first data packet does not include the first micro-segment segment identifier.
  • VM1 when communication between VM1 and VM5 is required, VM1 will send a data message (that is, the first data message) to VM5. After receiving the first data packet sent by VM1, the network device 101 may determine the first micro-segmentation segment identifier according to the first data packet.
  • the manner in which the network device 101 determines the first micro-segment segment identifier according to the first data packet includes:
  • the network device 101 determines the first micro-segment segment identifier according to the destination IP address of the first data packet. For example, there may be a corresponding relationship shown in Table 4 below on the network device 101, and when the destination IP address of the first data packet is A1::3:1/80, the network device 101 follows the matching principle (for example, Longest matching principle), the first micro-segment segment identifier is obtained as End.XTEpg SID3.
  • the corresponding relationship may be calculated by the network device 101 iteratively based on information such as the route announcement message issued by the network device 103, or it may be the network device 101 receiving the forwarding path issued by the controller or the path calculation unit. Planning information.
  • the network device 101 After receiving the first data message, the network device 101 requests a forwarding path to the destination IP of the data message from the controller or the path calculation unit. After receiving the request, the controller or the path calculation unit calculates a forwarding path according to the obtained network topology or other information and sends it to the network device 101.
  • the forwarding path from VM1 to VM5 calculated by the controller or path calculation unit for the network device 101 is network device 102->network device 103, and the specific segment identifier list may be: End.SID102, End.XTEpg SID3.
  • End.SID102 is the segment identifier of the network device 102
  • End.XTEpg SID3 is the micro-segment segment identifier of the network device 103.
  • the network device 101 determines that the first micro-segment segment identifier is End.XTEpg SID3 according to the forwarding path.
  • Manner 3 The network device 101 determines the first micro-segmentation segment identifier according to the differentiated services code point of the first data packet.
  • the network device 101 determines a processing action on the first data packet according to the first micro-segmentation segment identifier.
  • the network device 101 can be configured to determine whether it needs to find or execute a processing strategy.
  • the processing strategy here can also be considered as a correspondence.
  • the processing action is forwarding the first data packet, and the network device 101 determines that the processing action on the first data packet is forwarding according to the configuration.
  • the network device 101 may be configured to search for a processing strategy for the first data packet and process it according to the processing strategy. Therefore, in a possible implementation manner, the network device 101 is configured according to the first data packet. Before a micro-segment identifier determines a processing action on the first data packet, the network device 101 also needs to obtain a processing strategy.
  • the processing strategy includes matching conditions and processing actions.
  • the processing strategy It is stored in a group-based access policy entry (GBP) of the network device 101.
  • GBP group-based access policy entry
  • the matching condition may include the first micro-segment segment identifier, that is, the network device determines the first micro-segment segment identifier according to the received data message, the first micro-segment identifier End.XTEpg SID3 as described above.
  • the processing actions in the processing strategy include one or more of the following: forwarding, discarding, marking, redirection, and mirroring.
  • marking is a special kind of forwarding, that is, the network device first marks the data message before forwarding the data message.
  • the marking actions that a network device can perform on a data message may include, for example, remarking the DSCP of the data message, or modifying the priority of the data message.
  • the network equipment acquisition processing strategy includes the following methods:
  • the network device 101 receives a processing strategy instruction.
  • the instruction may be an instruction manually configured to the network device by a network management system, network application, or operation and maintenance personnel.
  • the network device 101 saves the processing strategy according to the processing strategy instruction. Including the first micro-segment segment identifier.
  • Method 2 The network device can also obtain the processing strategy by presetting the processing strategy during production instead of receiving the processing strategy instruction.
  • the processing strategy obtained by the network device 101 is shown in Table 5.
  • the network device 101 uses the first micro-segment identifier as the matching condition.
  • the processing action of "marking” is executed, and when the first micro-segment segment identifier corresponding to the data message received by the network device is End.
  • XTEpg SID4 the processing action of "discarding" is executed.
  • the processing actions shown in Table 5 are only examples.
  • the content corresponding to the processing action can be a processing action identifier, so that the network device can further obtain the corresponding specific processing action based on the processing action identifier, and the content corresponding to the processing action is also It can be a specific processing action, such as remark dscp 40, which means that the DSCP of the data packet that meets the condition is changed to 40.
  • the first micro-segment segment identifier may also be recorded as the target micro-segment segment identifier.
  • the processing strategy obtained by the network device 101 is as shown in Table 6.
  • the network device 101 obtains the corresponding micro-segment according to the first micro-segment identifier, for example, obtains the micro-segment from the 64th to 80th bits of the micro-segment identifier. Micro-segmentation, and use the micro-segment as the matching condition.
  • the first micro-segment identifier corresponding to the data message received by the network device 101 is End.XTEpg SID3
  • the first micro-segment is obtained as EPG3 according to the micro-segment identifier, and execute The processing action of "marking".
  • the first micro-segment identifier corresponding to the data packet received by the network device is End.XTEpg SID4
  • the first micro-segment is obtained as EPG4 according to the micro-segment identifier, and the processing action of "discarding" is performed .
  • the first micro-segment can also be recorded as a destination micro-segment or a destination endpoint group.
  • the network device 101 further determines a processing strategy for the first data packet according to the second micro-segmentation segment identifier.
  • the second micro-segment segment identifier indicates a micro-segment of the network device 101.
  • the network device 101 needs to obtain the second micro-segmentation identifier.
  • the network device 101 may automatically assign the second micro-segment identifier, or it may be manually configured.
  • the second micro-segment segment identifier For the specific obtaining method, refer to the above-mentioned mode 1 and mode 2 for the network device 103 to obtain the micro-segment segment identification part, which will not be repeated here.
  • the corresponding relationship between the micro-segmentation identifier and the micro-segmentation obtained by the network device 101 may be as shown in Table 7 below.
  • Micro-segment identification Micro-segment identification End.XTEpg SID1 EPG1 End.XTEpg SID2 EPG2
  • the endpoint group can use the IP address of the endpoint device, the endpoint group device
  • the interface, MAC address, and other information connected to the network device 101 are defined.
  • the following uses the IP address of the endpoint device to represent the endpoint group as an example: For example, VM1 and VM2 can be represented by the same IP address prefix A1::1:1/80, and VM3 and VM4 can be represented by the same IP address prefix A1::1: 2/80 means it can be shown in Table 7 below.
  • the corresponding relationship between the micro-segmentation identifier obtained by the network device 101 and the endpoint group can be shown in Table 9 below.
  • the endpoint group passes through the endpoint group device
  • the interface connected to the network device 101 is defined, and the interface may be a virtual sub-interface or a physical interface.
  • End.XTEpg SID1 corresponds to the endpoint group EPG1, and the interface between the network device 101 and the endpoint group EPG1 is virtual interface 1, and its name is vInf101-1;
  • End.XTEpg SID2 corresponds to the endpoint group EPG2, the port that the network device 101 connects to the endpoint group EPG2 is its virtual interface 2, and its name is vInf101-2.
  • micro-segment segment identifier can also be used as a micro-segment identifier to indicate a micro-segment.
  • the above is only an example of the corresponding relationship between the micro-segment segment identifier and the micro-segment or endpoint group.
  • it can be based on the above methods, such as according to the IP prefix, or the combination of the specific IP address, or the endpoint and the endpoint group.
  • Information such as the interface to which the network device is connected obtains the corresponding relationship between the micro-segment segment identifier and the micro-segment or endpoint group.
  • the network device 101 After receiving the first data packet, the network device 101 determines the second micro-segmentation segment identifier according to the received first data packet. Corresponding to the correspondence information between the micro-segmentation segment identifier and the endpoint group on the network device 101, the network device 101 determines the second micro-segmentation segment identifier according to the "receiving the first data packet" including one or more of the following methods:
  • the network device 101 determines the second micro-segment identifier according to the source IP address of the first data packet. For example, when the first data message is the first data message sent by VM1, and its source IP address is A1::1:1, the network device 101 confirms according to the endpoint group information in the correspondence relationship shown in Table 7. VM1 belongs to the endpoint group EPG1, and further determines the micro-segment identifier corresponding to the endpoint group as End.XTEpg SID1 according to the corresponding relationship shown in Table 6.
  • the network device 101 determines the second micro-segment identifier according to the interface through which the first data packet is received. For example, when the network device 101 is the first data packet received from vInf101-1, as shown in Table 9, the network device 101 determines that the second micro-segment segment identifier corresponding to the first data packet is End.XTEpg SID1 .
  • the network device 101 Before the network device 101 determines the processing strategy for the first data packet according to the second micro-segmentation identifier, the network device 101 also obtains the processing strategy that includes the second micro-segmentation identifier.
  • the manner in which the network device 101 obtains the processing strategy including the second micro-segment segment identifier is the same as the manner in which the network device 101 obtains the processing strategy including the first micro-segment segment identifier, and will not be repeated here.
  • the processing strategy obtained by the network device 101 is shown in Table 10.
  • the matching condition of the processing strategy includes the second micro-segment segment identifier and the first micro-segment segment identifier, which can also be recorded as: source micro-segment segment identifier and destination micro-segment segment identifier Logo.
  • Table 10 shows two processing strategies.
  • the first processing strategy indicates that when the second micro-segment identifier and the first micro-segment identifier determined by the data message received by the network device 101 meet the matching condition: the second micro-segment identifier is When End.XTEpg SID1, the first micro-segment segment identifier is End.XTEpg SID3, the network device 101 performs a processing action on the data packet: marking.
  • the second processing strategy indicates that when the second micro-segment segment identifier and the first micro-segment segment identifier determined by the data message received by the network device 101 meet the matching condition: the second micro-segment segment identifier is End.XTEpg SID1, the first micro-segment segment identifier When it is End.XTEpg SID2, the network device 101 performs a processing action on the data message: discarding.
  • the second micro-segment identifier The first micro-segment identifier Processing action End.XTEpg SID1 End.XTEpg SID3 mark End.XTEpg SID1 End.XTEpg SID4 throw away
  • the processing strategy obtained by the network device 101 is shown in Table 11.
  • the matching condition of the processing strategy includes the second micro-segment and the first micro-segment, which can also be recorded as: the source micro-segment and the destination micro-segment, or They are: source endpoint group and destination endpoint group.
  • Table 11 shows two processing strategies.
  • the first processing strategy indicates that the second micro-segment and the first micro-segment meet the matching conditions: when the second micro-segment is EPG1 and the first micro-segment is EPG3, then the network device 101 pairs
  • the data message performs a processing action: marking.
  • the second processing strategy indicates that when the second micro-segment and the first micro-segment determined by the data message received by the network device 101 meet the matching condition: when the second micro-segment is EPG1 and the first micro-segment is EPG4, the network device 101 performs a processing action on the data message: discard.
  • the second micro-segment identifier determined by the data packet received by the network device 101 is End.XTEpg SID1
  • the second micro-segment identified by the network device 101 according to the second micro-segment identifier is EPG1.
  • the network device 101 receives When the first micro-segment identifier determined by the data packet is End.XTEpg SID3, the first micro-segment determined by the network device 101 according to the first micro-segment identifier is EPG3. Then, the processing action determined by the network device 101 according to the second micro-segment and the first micro-segment is a mark.
  • the network device 101 can perform a strict match or the longest match between the data message and the matching condition. Strict matching indicates that the processing action to be performed on the data message is determined only when the data message completely meets the matching condition. The longest match indicates that the processing action of the data packet is determined according to the matching condition of the longest match of the data packet. When there are multiple processing strategies with the same matching length, the first hit or the last hit can be executed. Or the processing strategy of the highest priority hit.
  • the method for the network device 101 to calculate the matching length may include multiple methods. For example, if one branch meets the matching condition, the length is one.
  • the matching condition shown in Table 10 above contains two branches, that is, matching the second micro-segment identifier and matching the first micro-segment identifier, the longest The matching length is 2.
  • the second method is to match the first micro-segment segment identifier, then match the second micro-segment segment identifier, and then match the conditions of other branches. For each matching item, the matching length is increased by 1.
  • the identifier of the second micro-segmentation segment and the identifier of the first micro-segmentation segment are (End.XTEpg SID1, End.XTEpg SID3) or
  • End.XTEpg SID1, End.XTEpg SID4 that is, when the matching condition of the first processing strategy is fully satisfied or the matching condition of the second processing strategy is fully satisfied, the processing action for the data packet is determined. If it only matches, for example, the first micro-segment segment identifier is End.XTEpg SID3, the network device 101 considers that there is no processing action on the data packet, and the network device 101 executes a default processing action, such as forwarding or discarding.
  • the default processing action may be a default processing strategy configured on the network device, or it may be the default processing strategy of all devices in the segment of the routing network.
  • the first processing strategy is to confirm that the processing action for the data message is marked, but when the network device 101 only determines that the first micro-segment segment identifier is End.XTEpg SID3 according to the received data message, it does not obtain the second differential When the segment identifier or the obtained second micro-segment segment identifier is not End.XTEpg SID1, the network device 101 can still determine that the data packet matches the first processing strategy, thereby determining that the processing action for the data packet is a mark.
  • the processing strategy obtained by the network device also includes the sending direction of the data packet. If the sending direction of the data packet is inflow (in), it indicates that the processing strategy is for the processing of the data packet received by the network device. Strategy; if the sending direction of the data message is out, it indicates that the processing strategy is a processing strategy for the data message sent by the network device.
  • the network device 101 may determine the processing action for the first data packet only according to the second micro-segment segment identifier.
  • the method and optional manner for the network device 101 to determine the processing action on the first data packet according to the second micro-segmentation identifier are the same as the method and the optional manner for the network device 101 to determine the processing action for the first data packet based on the first micro-segmentation identifier only.
  • the selection method is the same, so I won't repeat it here.
  • S308 The network device 101 performs a determined processing action on the first data packet.
  • S307 when the network device 101 determines that the processing action on the first data packet is forwarding according to the configuration to not search or execute the processing policy, S309 is executed.
  • the network device 101 searches for the processing strategy of the first data packet according to the configuration and processes it according to the processing strategy, it performs one of the following steps according to the determined processing action:
  • the network device 101 When the processing action for the first data packet determined by the network device 101 is discard, the network device 101 discards the first data packet and ends the process.
  • the network device 101 determines that the processing action on the first data packet is mirroring, the network device 101 mirrors the first data packet to the designated address, and the process ends.
  • the network device 101 determines that the processing action for the first data packet is redirection, the network device 101 changes the forwarding destination address of the first data packet, and ends the process.
  • the network device 101 generates a second data packet according to the first data packet.
  • the network device 101 generates a second data packet according to the obtained segment routing network forwarding path for the first data packet and the first data packet.
  • the manner in which the network device 101 obtains the segment of the routing network forwarding path may include: 1.
  • the network device 101 itself has the ability to calculate the segment of the routing network forwarding path, and the network device 101 determines the segment of the routing network forwarding path. 2.
  • the network device 101 obtains the segment of the routing network forwarding path from the controller or the path calculation unit.
  • the segment routing network forwarding path of the data message from VM1 to VM5 obtained by the network device 101 is: End.XTEpg SID3.
  • the segment routing network forwarding path for the data packets from VM1 to VM5 obtained by the network device 101 can correspond to a segment identification list, and the segment identification list can include 1 or Multiple segment identifiers.
  • the list of segment identifiers is End.SID102, End.XTEpg SID3, where End.SID102 is the segment identifier of the network device 102, and End.XTEpg SID3 is a micro-segment segment identifier of the network device 101.
  • the network device 101 generates a second data packet according to the forwarding path and the first data packet.
  • SRv6 is taken as an example, and the SR-MPLS solution is similar to this, so I will not repeat it here.
  • the network device 101 generates a second data packet, the second data packet includes an SRH, the SRH includes a segment identifier list, and the segment identifier list includes a first micro-segment segment identifier, such as End.XTEpg SID3.
  • the list of segment identifiers also includes segment identifiers of intermediate network devices, such as segment identifiers of network device 102.
  • the second data message further includes a second micro-segment segment identifier.
  • This embodiment of the present application provides a variety of methods for carrying the second micro-segment segment identifier in a data message, including:
  • Manner 1 The list of segment identifiers also includes a second micro-segment segment identifier, such as the source micro-segment segment identifier in the example, End.XTEpg SID1.
  • the second micro-segment segment identifier is carried at the position of Segment List[0] of the SRH, and the first micro-segment segment The identifier is carried in the position of the Segment List[1] of the SRH, that is, the value of the remaining nodes (segments left) in the SRH is at least 1.
  • the second data message further includes metadata, and the metadata carries the second micro-segmentation segment identifier.
  • a new kind of metadata may be defined.
  • the first micro-segment segment identifier can also be carried in the metadata. In this way, all network devices in the segment routing network that need to process data packets according to the micro-segment segment identifier can obtain the first micro-segment segment identifier only through the metadata.
  • micro-segment segment identifier and the second micro-segment segment identifier do not need to obtain the first micro-segment segment identifier and the second micro-segment segment identifier from the SRH of the data message.
  • This metadata can be carried through the TLV as shown in FIG. 8.
  • the type field indicates that it is metadata that carries the micro-segment segment identifier, and the value of the type field can be a specific value applied for carrying the endpoint group end identifier, such as 91.
  • the length field indicates the overall length of the metadata.
  • the reserved field can be reserved for special processing. There is currently no specific definition.
  • the second micro-segment segment identifier field carries the second micro-segment segment identifier, such as End.XTEpg SID2.
  • the TLV also includes a first micro-segment segment identifier field, and the first micro-segment segment identifier field carries the first micro-segment segment identifier. , Such as: End.XTEgp SID1.
  • Manner 3 The network device 101 copies the IPv6 header of the first data message and carries it in the payload of the second data message, and generates a new IPv6 header for the second data message.
  • the IPv6 header The source address in is the second micro-segment segment identifier.
  • the operation and maintenance personnel can configure in advance on the network device whether the second micro-segmentation identifier needs to be carried when generating the second data message, and which of the above three methods is used to carry the second micro-segmentation identifier. Or, by default, the network device adopts a consistent manner to carry the second micro-segment segment identifier.
  • the network device 101 When the operation and maintenance personnel configure the network device to carry the second micro-segment identifier when generating the second data packet and determine the manner in which the network device 101 carries the second micro-segment identifier, in order to make the network device 101 generate the second data
  • the message can be correctly processed during the forwarding process without affecting the forwarding of the data message.
  • the network device 101 When the network device 101 generates the SRH of the second data message, it can identify the carrying of the second micro-segment segment identifier in the SRH. In this way, the network device in the routing network that is equipped with the micro-segment segment identifier to process the data message can determine the location to obtain the second endpoint group end identifier during the message forwarding process.
  • the flag bit (Flags) of the SRH occupies 8 bits, among which U is currently not used, and the P flag occupies 1 bit, which is a protection flag. .
  • the O sign which occupies 1 bit, is an operation, administration and maintenance (operation, administration and maintenance, OAM) sign.
  • the A flag, which occupies 1 bit, is an alarm flag. If it exists, it means that there is an important TLV.
  • the H symbol which occupies 1 bit, is a hash-based message authentication code (HMAC) symbol. If it exists, it means that there is a HMAC TLV.
  • the network device 101 can use the low bit of the U flag in the Flags field of the SRH to identify the position carried by the second endpoint group. For example, when the eighth bit of Flags is 1, it indicates that the second micro-segment segment identifier is carried in a manner In the above manner 1, it is carried in the segment[0] of the segment identifier list of the SRH. When the 7th bit of the Flags field is 1, it indicates that the two micro-segment segment identifiers are carried in the above-mentioned manner two, and are carried in the metadata of the SRH. When the 6th bit of the Flags field is 1, it indicates that the two micro-segment segment identifier is carried in the above-mentioned way 3, which is carried in the source IP address of the IPv6 header of the second message.
  • the network device 101 sends a second data packet to the network device 103.
  • the network device 101 sends a second data packet to the network device 103 according to the routing and forwarding information, and the second data packet carries the first micro-segment identifier.
  • the second data message also carries a second micro-segmentation identifier.
  • the network device 103 After receiving the second data packet sent by the network device 101, the network device 103 obtains the first micro-segmentation segment identifier from the second data packet.
  • the network device 103 obtains the first micro-segment segment identifier from the second data packet as: End.XTEpg SID3.
  • the network device 103 Before the network device 103 determines a processing action on the data message according to the first micro-segmentation identifier, the network device 103 also needs to obtain a processing strategy, which includes matching conditions and processing actions.
  • the processing actions in the processing strategy include one or more of the following: forwarding, discarding, marking, redirection, and mirroring.
  • marking is a special kind of forwarding, that is, the network device first marks the data message before forwarding the data message.
  • the marking actions that a network device can perform on a data message may include, for example, remarking the DSCP of the data message, or modifying the priority of the data message.
  • the way that the network device 103 obtains the processing strategy and the content of the processing strategy are consistent with the way that the network device 101 obtains the processing strategy and the content of the processing strategy.
  • the processing strategy obtained by the network device 101 please refer to the detailed description of the processing strategy obtained by the network device 101, which will not be repeated in this application. .
  • the network device 103 determines a processing action on the second data packet according to the first micro-segmentation identifier.
  • the manner in which the network device 103 determines the processing action on the second data packet according to the first micro-segment segment identifier is consistent with the manner in which the network device 101 determines the processing action on the first data packet according to the first micro-segment segment identifier.
  • the network device 101 determines the processing action on the first data packet according to the first micro-segment segment identifier.
  • Network Equipment The detailed description of the processing action of the first data packet determined by 101 according to the first micro-segmentation segment identifier will not be repeated in this application.
  • the network device 103 also determines a processing action on the second data packet according to the second micro-segmentation segment identifier.
  • the network device 103 When the second data message also carries the second micro-segmentation identifier, the network device 103 also obtains the second micro-segmentation identifier, and performs execution on the second data message according to the first micro-segmentation identifier and the second micro-segmentation identifier. Processing actions.
  • the network device 103 obtains the first data packet from the corresponding position of the second data packet according to the indication of the identification.
  • Two micro-segment segment identification For example, when the eighth bit of the Flags field of the SRH of the second data message is 1, the network device 103 obtains the second micro-segment segment identifier from the segment[0] of the SRH segment identifier list of the second data message . When the 7th bit of the Flags field is 1, the network device 103 obtains the second micro-segmentation segment identifier from the metadata of the SRH of the second data packet. When the sixth bit of the Flags field is 1, the network device 103 obtains the second micro-segmentation segment identifier from the source IP address of the IPv6 header of the second data packet.
  • the network device directly follows the default rule, for example, obtaining the second micro-segment segment identifier from the metadata.
  • the network device 103 determines the processing action for the second data packet according to the first micro-segment identifier and the second micro-segment identifier, and the network device 101 determines the processing action for the first data packet according to the first micro-segment identifier and the second micro-segment identifier.
  • the processing actions are the same.
  • the network device 103 may determine the second data packet's identification based on the second micro-segmentation identifier only. Processing actions.
  • the method and optional manner for the network device 103 to determine the processing action on the second data packet according to the second micro-segmentation identifier are the same as the method and optional manner for the network device 101 to determine the processing action for the first data packet based on the first micro-segmentation identifier only The method is the same, so I won't repeat it here.
  • S325 The network device 103 performs a determined processing action on the second data packet.
  • the network device 103 discards the second data packet.
  • the network device 103 When the processing action on the second data packet determined by the network device 103 is mirroring, the network device 103 mirrors the first data packet to the designated address.
  • the network device 103 determines that the processing action on the second data packet is redirection, the network device 103 changes the forwarding destination address of the first data packet.
  • the network device 103 Corresponding to the three ways that the network device 101 carries the second micro-segmentation identifier, and the identification of the carrying method in the second data packet: the network device 103 generates a third datagram according to the second data packet according to the indication of the identification Text.
  • the 8th bit of the Flags field of the SRH of the second data message is 1
  • the network device when the network device generates the third message according to the second message, it strips the SRH of the second data message to generate the third data Message.
  • the 7th bit of the Flags field is 1, the network device 103 strips the SRH and metadata of the second data packet to generate a third data packet.
  • the network device 103 replaces the IPv6 header of the second data packet with the copied IPv6 header (that is, the IPv6 header of the first packet), and sets The SRH of the second data message is stripped to generate a third data message, and the IPv6 header of the third data message is the IPv6 header of the first message.
  • the network device according to the default rule, such as stripping the SRH of the second data message to obtain the third data message.
  • S329 The network device 103 sends a third data packet.
  • the network device sends the third data message to the endpoint VM5 in the corresponding endpoint group according to the micro-segment EPG3 identified by the first micro-segment segment identifier.
  • the network device 103 sends the third data packet to the destination IP address of the third data packet (that is, the IP address of VM5).
  • the foregoing is a method embodiment provided by an embodiment of the present application.
  • the method embodiment provides a method for processing data packets based on micro-segment segment identifiers that act on the head node and the tail node in a segment routing network.
  • the method embodiment shown in FIG. 3b provides a flow chart of a method for processing data packets.
  • the main difference between the flow chart and the method embodiment shown in FIG. 3a is that the first network device and the second network device are A micro-segment segment identifier and a second micro-segment segment identifier are used for message processing.
  • This embodiment is a detailed representation of the method embodiment in FIG. 3a.
  • the detailed steps of the embodiment in FIG. 3b will be repeated here.
  • the method embodiment provides a method for processing data packets based on the micro-segment segment identifier that acts on the head node, the intermediate node, and the tail node in the segment routing network.
  • the method of processing data packets according to the micro-segment segment identifier performed by the head node and the tail node is similar to the method in the previous method embodiment.
  • the embodiments of the present application will focus on the detailed explanation of the differences in the previous method embodiment.
  • the network device 101 is used as the third network device
  • the network device 102 is used as the second network device
  • the network device 103 is used as the second network device.
  • a network device is used as an example to exemplarily explain the embodiment of the method. It should be understood that this is only an example, and those skilled in the art can also refer to this embodiment to make similar substitutions and applications, and this application will not give examples one by one.
  • the network device 103 issues a first micro-segmentation segment identifier.
  • the method and optional manner for the network device 103 to issue the first micro-segment identification, and the method and optional manner for the network device 103 to obtain the first micro-segment identification are consistent with the method and optional manner in the embodiment shown in FIG. 3a, For details, please refer to the related content and optional methods of step S301 in the embodiment of FIG. 3a, which will not be repeated here.
  • the network device 102 issues the micro-segment node segment identifier.
  • the network device 102 is an intermediate forwarding node on the forwarding path of the first data packet in the segment routing network shown in FIG. 1, in order to make the network device 102 also have the function of performing processing actions on the data packet according to the micro-segment segment identifier, A manner of defining and publishing a segment identifier with a specific function for the network device 102 may be adopted.
  • the segment identifier with a specific function is the micro-segment node segment identifier, so that the network device 102 has the function.
  • the micro-segment node segment identifier corresponds to a network device, which can be expressed as End.TEpg SID, End means endpoint, which means endpoint; T means table lookup, means lookup table; Epg means endpoint group, means endpoint group; SID means segment Logo.
  • Endpoint group segment node identifier can meet the format of the IPv6 address or the MPLS label.
  • the manner in which the network device 102 publishes the micro-segment node segment identifier includes the following three or more publishing methods:
  • Manner 1 The network device 102 sends a notification message, which carries the micro-segment node segment identifier.
  • the notification message may be a Border Gateway Protocol (BGP) message or an Interior Gateway Protocol (Interior Gateway Protocol, IGP) message, which is not specifically limited in this application.
  • Border Gateway Protocol BGP
  • IGP Interior Gateway Protocol
  • the micro-segment node segment identifier in the notification message is carried in its second type length value (TLV).
  • TLV second type length value
  • the format of the second TLV is shown in FIG. 10.
  • the type field identifier in the figure indicates the type of the second TLV, the value of the type field can identify that the second TLV is a TLV used to publish End.TEpg SID, and the value of the type field can be for publishing micro-segments
  • the node segment identifies the type of the new application, for example, it can be 92.
  • the value of the length field identifies the length of the second TLV.
  • the value of the flag field can be 0 or 1, for example, when the value is 0, it means that it is a TLV of the endpoint group type.
  • the reserved fields are reserved for subsequent extensions, such as those that can be used to identify the forwarding path.
  • the micro-segment node segment identifier field is used to carry the micro-segment node
  • the network device 102 may issue the micro-segment node segment identifier through the BGP link state protocol (Border Gateway Protocol-link state, BGP-LS).
  • BGP link state protocol Border Gateway Protocol-link state, BGP-LS.
  • the network device 102 can send the micro-segment node segment identifier to the controller through BGP-LS, and the controller can receive the micro-segment node segment identifier sent by the network device 102 through BGP-LS, and send the micro-segment segment identifier to Network equipment 101.
  • the network device 102 may issue the micro-segment node segment identifier through the Path Computation Element Communication Protocol (PCEP).
  • PCEP Path Computation Element Communication Protocol
  • the network device 102 may send the micro-segment node segment identifier to the controller or path calculation element (PCE) through the PCEP, and the controller may receive the micro-segment node segment identifier sent by the network device 102 through the PCEP.
  • the micro-segment node segment identifier is sent to the network device 101.
  • the network device 102 before the network device 102 issues the micro-segment node segment identifier, the network device 102 needs to obtain the micro-segment node segment identifier first. Regarding how the network device 102 obtains the micro-segment node segment identifier, in some possible embodiments, the network device 102 may automatically assign the micro-segment node segment identifier, or manually configure at least the micro-segment node segment identifier. Specifically, the manner of obtaining the micro-segment node segment identifier may include any one or more of the following manner 1 or manner 2.
  • Manner 1 The network device 102 assigns itself a micro-segment node segment identifier.
  • the network device 102 can allocate one or more micro-segment node segment identifiers by itself.
  • the segment identifier can be a segment identifier indicating a node type or an adjacent segment identifier.
  • the network device 102 may store a segment In the identification space, an unoccupied micro-segment node segment identifier can be selected from the segment identification space, and the micro-segment node segment identifier can be assigned to itself.
  • the network device 102 receives the configuration instruction, the network device 102 obtains the micro-segment node segment identifier from the configuration instruction, and the network device 102 may also obtain the corresponding relationship between the micro-segment node segment identifier and the forwarding path from the configuration instruction.
  • the configuration instruction may be triggered by a user's configuration operation on the network device 102, and the configuration instruction may also be triggered by a network management or a controller.
  • SRv6 SID is in the form of an IPv6 address
  • SRv6 SID can consist of two parts: location information and function.
  • the function represents the instructions of the device. These instructions are preset by the device.
  • the function part is used to instruct the SRv6 SID generating device to perform corresponding functional operations.
  • the micro-segment node segment identifier obtained by the network device 102 includes a location and a function part, and the function part is used to instruct the network device 102 to perform a predefined operation on the data packet according to the micro-segment segment identifier.
  • the network device 101 and the network device 103 also issue the micro-segment node segment identifier, and the manner in which the network device 101 and the network device 103 obtain and issue the micro-segment node segment identifier is the same as that of the network device 102, and will not be repeated here.
  • the network device 101 obtains the first micro-segmentation identifier.
  • the method and optional manner for the network device 101 to obtain the first endpoint group are consistent with the method and optional manner in the embodiment shown in FIG. 3a.
  • the network device 101 obtains the micro-segment node segment identifier.
  • the manner in which the network device 102 issues the micro-segment node segment identifier may be the following two methods.
  • Manner 1 The network device 101 receives a notification message sent by the network device 102, and the message carries the micro-segment node segment identifier.
  • the network device 101 when the network device 102 sends the micro-segment node segment identifier through a BGP message, the network device 101 receives the BGP message sent by the network device 103, and obtains the micro-segment node segment identifier from the message; The device 102 sends the micro-segment node segment identifier through the IGP message, and the network device 101 receives the IGP message sent by the network device 102 and obtains the micro-segment node segment identifier from the message.
  • the network device 101 obtains the micro-segment node segment identifier from the second TLV of the BGP message or IGP message .
  • Manner 2 The network device 101 receives the micro-segment node segment identifier sent from the controller or the path calculation unit.
  • the controller can receive the micro-segment node segment identifier sent by the network device 102 through the BGP-LS protocol, and send the micro-segment node segment identifier The identification is sent to the network device 101.
  • the controller or PCE can receive the micro-segment node segment identifier sent by the network device 102, and send the micro-segment node segment identifier to the network Equipment 101.
  • the time when the controller or PCE executes sending the micro-segment node segment identifier to the network device 101 can be sent after receiving the micro-segment node segment identifier, or it can be within a period of time, or when the network device 101 requests the controller or PCE When there is a forwarding path, it is sent to the network device 101.
  • the network device 101 receives the first data packet, and determines the first micro-segment segment identifier according to the first data packet, and the first data packet does not include the first micro-segment segment identifier.
  • the method and optional manner for the network device 101 to determine the first micro-segment identifier according to the first data packet are the same as the method and optional manner in the embodiment shown in FIG. 3a.
  • step S305 in the embodiment in FIG. 3a please refer to step S305 in the embodiment in FIG. 3a.
  • the related content and optional methods will not be repeated here.
  • the network device 101 determines a processing action on the first data packet according to the first micro-segmentation identifier.
  • the method and optional manner for the network device 101 to determine the processing action of the first data packet according to the first micro-segmentation segment identifier are consistent with the method and optional manner in the embodiment shown in FIG. 3a. For details, please refer to the embodiment in FIG. 3a. The content and optional manners related to step S307 in step S307 will not be repeated here.
  • S408 The network device 101 performs a determined processing action on the first data packet.
  • step S308 in step S308 will not be repeated here.
  • the network device 101 generates a second data packet according to the obtained segment routing network forwarding path for the first data packet and the first data packet.
  • the manner in which the network device 101 obtains the segment of the routing network forwarding path may include: 1.
  • the network device 101 itself has the ability to calculate the segment of the routing network forwarding path, and the network device 101 determines the segment of the routing network forwarding path. 2.
  • the network device 101 obtains the segment of the routing network forwarding path from the controller or the path calculation unit.
  • the segment identifier list corresponding to the forwarding path obtained by the network device 101 is: End.TEpg SID 1021, End.XTEpg SID3.
  • the network device 101 generates a second data packet according to the forwarding path and the first data packet.
  • SRv6 is taken as an example, and the SR-MPLS solution is similar to this, so I will not repeat it here.
  • the network device 101 generates a second data packet, the second data packet includes SRH, the SRH includes a segment identifier list, and the segment identifier list includes a first micro-segment segment identifier and a micro-segment node segment identifier, such as End.TEpg SID1021,
  • the segment identifier list does not include the second micro-segment segment identifier
  • the first micro-segment segment identifier is carried at the position of Segment List[0] of SRH
  • the micro-segment node segment identifier is carried at the position of Segment List[n] of SRH, Where n>0, n is the number of intermediate nodes on the specified path.
  • the second data message further includes a second micro-segment segment identifier.
  • the segment identifier list includes the second micro-segment segment identifier
  • the first micro-segment segment identifier is carried at the position of Segment List[1] of SRH
  • the second micro-segment segment identifier is carried at the position of Segment List[0] of SRH.
  • the micro-segment node segment identifier is carried in the Segment List[n+1] position of the SRH, where n>1.
  • the method and optional manner in which the network device 101 generates the second micro-segment segment identifier in the second data packet described in this method embodiment are the same as those in the second packet in the embodiment shown in FIG. 3a.
  • the method for identifying the micro-segment segment is the same as the optional method.
  • the network device 101 sends a second data packet to the network device 102.
  • the network device 101 sends a second data packet to the network device 102 according to the routing and forwarding information, and the second data packet carries the first micro-segment segment identifier and the micro-segment node segment identifier.
  • the second data message also carries a second micro-segmentation identifier.
  • the network device 102 After receiving the second data packet sent by the network device 101, the network device 102 obtains the first micro-segmentation segment identifier from the second data packet.
  • the network device 102 receives the second data packet sent by the network device 101, and the destination address in the SRH of the data packet is the micro-segment node segment identifier issued by the network device 102, such as End.TEpg SID 1021.
  • the network device 102 executes the function indicated by the micro-segment node segment identifier, that is, performs processing actions on the data packet according to the micro-segment segment identifier.
  • the network device 102 obtains the first micro-segment segment identifier from the second data message, such as End.XTEpg SID3.
  • the network device 102 performs the function indicated by End.TEpg SID 1021, that is, performs processing actions on the data packet according to End.XTEpg SID3.
  • the network device 102 Before the network device 102 determines a processing action on the data packet according to the first micro-segmentation identifier, the network device 102 also needs to obtain a processing strategy, and the processing strategy includes a matching condition and a processing action.
  • the processing actions in the processing strategy include one or more of the following: forwarding, discarding, marking, redirection, and mirroring.
  • marking is a special kind of forwarding, that is, the network device first marks the data message before forwarding the data message.
  • the marking actions that a network device can perform on a data message may include, for example, remarking the DSCP of the data message, or modifying the priority of the data message.
  • Step S307 obtains a detailed description of the processing strategy, which will not be repeated in this application.
  • S415 The network device 102 determines a processing action on the second data packet according to the first micro-segmentation identifier.
  • the manner in which the network device 102 determines the processing action of the second data packet according to the first micro-segmentation identifier is the same as the method in which the network device 103 in the method embodiment shown in FIG. 3a determines the processing of the first data packet according to the first micro-segmentation identifier
  • the actions are the same.
  • S416 The network device 102 performs a determined processing action on the second data packet.
  • the network device 102 When the processing action for the second data packet determined by the network device 102 is discard, the network device 102 discards the second data packet and ends the process.
  • the network device 102 When the processing action on the second data packet determined by the network device 102 is mirroring, the network device 102 mirrors the first data packet to the designated address, and the process ends.
  • the network device 102 When the processing action for the second data packet determined by the network device 102 is redirection, the network device 102 changes the forwarding destination address of the first data packet, and ends the process.
  • S417 The network device 102 generates a third data packet according to the second data packet.
  • the network device 102 modifies the second data message to obtain the third data message, including: 1.
  • the network device 102 modifies the destination address of the IPv6 header in the second data message to Segmentlist[SL].
  • the network device 102 sets the value of the SL field of the SRH to 0, and modifies the destination address in the IPv6 header to: End.XTEpg SID3.
  • S419 The network device 102 sends a third data packet.
  • the network device 102 searches for the forwarding entry according to the IPv6 destination address and sends the third data packet.
  • the network device 102 sends a third data packet to the network device 103.
  • the network device 103 After receiving the third data packet sent by the network device 102, the network device 103 obtains the first micro-segmentation segment identifier from the third data packet.
  • the method and optional manner in which the network device 103 obtains the first micro-segment segment identifier from the third data packet are the same as the method and optional manner in which the network device 103 obtains the first micro-segment segment identifier in the method embodiment shown in FIG. 3a.
  • the network device 103 obtains the first micro-segment segment identifier in the method embodiment shown in FIG. 3a please refer to the detailed description at S321 in the method embodiment shown in FIG. 3a, which is not repeated in this application.
  • the network device 103 determines a processing action on the third data packet according to the first micro-segmentation identifier.
  • the method and optional manner for the network device 103 to determine the processing action of the third data packet according to the first micro-segment segment identifier are the same as those of the network device 103 in the method embodiment shown in FIG. 3a.
  • the processing actions of the data packets are in the same manner. For details, please refer to the detailed description at S323 in the method embodiment shown in FIG. 3a, which will not be repeated in this application.
  • S425 The network device 103 performs a determined processing action on the third data packet.
  • the method and optional manner for the network device 103 to perform the determined processing action on the third data packet are consistent with the manner in which the network device 103 performs the determined processing action on the second data packet in the method embodiment shown in FIG. 3a.
  • the network device 103 performs the determined processing action on the second data packet in the method embodiment shown in FIG. 3a.
  • the method and optional manner for the network device 103 to generate a fourth data packet according to the third data packet are the same as the processing action of the network device 103 in the method embodiment shown in FIG. 3a to generate a third data packet according to the second data packet
  • the manners are the same.
  • S429 The network device 103 sends a fourth data packet.
  • the method and optional method for the network device 103 to send the fourth data packet are the same as the method for the network device 103 to send the third data packet in the method embodiment shown in FIG. 3a.
  • the detailed description at S329 in the example will not be repeated here in this application.
  • the method embodiment shown in FIG. 4b provides a flow chart of a method for processing data packets.
  • the main difference between the flow chart and the method embodiment shown in FIG. 4a is that the first network device, the second network device, and the first network device Third, the network device processes the message according to the first micro-segment segment identifier and the second micro-segment segment identifier.
  • This embodiment is a detailed representation of the method embodiment of FIG. 4a.
  • the detailed steps of the embodiment in FIG. 4b will be repeated here.
  • FIG. 11 is a schematic structural diagram of a second network device provided by an embodiment of the present application.
  • the network device 1100 can execute the second network device (network device 101) shown in FIG. 3a and the second network device (network device 101) shown in FIG. 4a. The method performed by the device 101).
  • the network device 1100 includes a receiving unit 1101, a processing unit 1102, and a sending unit 1103.
  • the receiving unit 1101 can be used to perform, for example, the related methods of receiving the first data message in steps S303 and S305 in the embodiment of FIG. 3a, and can also be used to perform, for example, the receiving in steps S403, S404, and S405 in the embodiment of FIG. 4a.
  • the related method of the first data message can be used to perform, for example, the related methods of receiving the first data message in steps S303 and S305 in the embodiment of FIG. 3a.
  • the receiving in steps S403, S404, and S405 in the embodiment of FIG. 4a.
  • the processing unit 1102 can be used to perform, for example, steps S307, S308, S309, and S305 in the embodiment of FIG.
  • the related methods for determining the first micro-segment identifier in S409 and S405; the sending unit 1103 may be used to perform, for example, step S311 in the embodiment of FIG. 3a, and may also be used to perform, for example, step S411 in the embodiment of FIG. 4a.
  • the second network device provided in the embodiment of FIG. 11 performs the above-mentioned data message processing
  • only the division of the above-mentioned functional units is used as an example for illustration.
  • the The above function allocation is completed by different functional units, that is, the internal structure of the second network device is divided into different functional units to complete all or part of the functions described above; or a single functional unit is used to complete the functions of the above multiple units.
  • the second network device provided in the foregoing embodiment belongs to the same concept as the foregoing embodiment of the method for determining a forwarding path.
  • only the steps performed by each unit of the second network device are described as examples, but it does not represent it.
  • Other steps or optional methods in the foregoing embodiments are not executed, and the specific implementation process is detailed in the method embodiments, which will not be repeated here.
  • Fig. 12 is a schematic structural diagram of a first network device provided by an embodiment of the present application.
  • the network device 1200 can execute the first network device (network device 103) shown in Fig. 3a and the first network device (network device 103) shown in Fig. 4a.
  • the network device 1200 includes a receiving unit 1201, a processing unit 1202, and a sending unit 1203.
  • the receiving unit 1201 may be used to execute, for example, the related method of receiving the second data packet in step S321 in the embodiment shown in FIG. 3a.
  • the processing unit 1202 may be used to execute, for example, the method of obtaining the first micro-segment segment identifier in steps S323, S325, S337, and S321 in the embodiment shown in FIG. 3a.
  • the sending unit 1203 may be used to perform steps S301 and S319 in the embodiment shown in FIG. 3a, for example.
  • the receiving unit 1201 may be used to execute, for example, the related method of receiving the second data packet in step S413 and the related method of receiving the third data packet in S421 in the embodiment shown in FIG. 4a.
  • the processing unit 1202 may be used to perform, for example, the related method for obtaining the first micro-segmentation identifier in steps S415, S416, S417, S423, S425, S427, and S413 in the embodiment shown in FIG. 4a and the obtaining of the first micro-segmentation segment in S421.
  • the sending unit 1203 may be used to execute steps S401, S402, S419, and S429 in the embodiment shown in FIG. 4a, for example.
  • the first network device provided in the embodiment of FIG. 12 performs the above-mentioned data message processing
  • only the division of the above-mentioned functional units is used as an example for illustration.
  • the The above-mentioned function allocation is completed by different functional units, that is, the internal structure of the first network device is divided into different functional units to complete all or part of the functions described above; or a single functional unit is used to complete the functions of the above-mentioned multiple units.
  • the first network device provided in the foregoing embodiment and the foregoing data packet processing method embodiment belong to the same concept.
  • only the steps performed by each unit of the first network device are described as examples, but they do not represent It does not execute other steps or optional methods in the above-mentioned embodiment, and its specific implementation process is detailed in the method embodiment, which will not be repeated here.
  • first network device and the second network device of the embodiments of the present application describes possible product forms of the first network device and the second network device. It should be understood that all products in any form that have the characteristics of the second network device in FIG. 11, and all products in any form that have the characteristics of the first network device in FIG. 12, fall within the scope of protection of this application . It should also be understood that the following introduction is only an example, and does not limit the product forms of the first network device and the second network device in the embodiments of the present application.
  • FIG. 13 is a schematic structural diagram of a device 1300 provided by an embodiment of the present application.
  • the first network device or the second network device shown in the embodiment of FIG. 3a, or the first network device, the second network device or the third network device shown in the embodiment of FIG. achieve. See the schematic diagram of the device structure shown in Figure 13.
  • the device 1300 includes a main control board and one or more interface boards, and the main control board is in communication connection with the interface board.
  • the main control board is also called the main processing unit (MPU) or route processor card (route processor card).
  • the main control board is responsible for the control and management of each component in the device 1300, including routing calculation, device management and maintenance functions .
  • the interface board is also called a line processing unit (LPU) or a line card (line card), and is used to forward data.
  • the device 1300 may also include a switching network board.
  • the switching network board is in communication connection with the main control board and the interface board.
  • the switching network board is used to forward data between the interface boards.
  • the switching network board may also be called a switching network. Board unit (switch fabric unit, SFU).
  • the interface board includes a central processing unit, a memory, a forwarding chip, and a physical interface card (PIC).
  • the central processing unit is respectively communicatively connected with the memory, the network processor and the physical interface card.
  • the memory is used to store the forwarding table.
  • the forwarding chip is used to forward the received data message based on the forwarding table stored in the memory. If the destination address of the data message is the address of the device 1300, the data message is sent to the central processing unit (CPU). ), such as processing by the central processing unit 1331; if the destination address of the data message is not the address of the device 1300, the next hop and outbound interface corresponding to the destination address are found from the forwarding table according to the destination address, and the data message is Forward to the outgoing interface corresponding to the destination address.
  • the forwarding chip may be a network processor (NP).
  • the PIC is also called a daughter card, which can be installed on the interface board and is responsible for converting the photoelectric signal into a data message, and then forwarding the data message to the forwarding chip for processing after checking the legality of the data message.
  • the central processing unit can also perform the function of a forwarding chip, such as realizing software forwarding based on a general-purpose CPU, so that no forwarding chip is required in the interface board.
  • the communication connection between the main control board, the interface board, and the switching network board can be realized through a bus.
  • the forwarding chip may be implemented by an application-specific integrated circuit (ASIC) or a field programmable gate array (FPGA).
  • the device 1300 includes a control plane and a forwarding plane.
  • the control plane includes a main control board and a central processing unit.
  • the forwarding plane includes various components that perform forwarding, such as memory, PIC, and NP.
  • the control plane performs functions such as routers, generation of forwarding tables, processing of signaling and protocol messages, configuration and maintenance of the status of the equipment, and the control plane sends the generated forwarding tables to the forwarding plane.
  • the NP is based on the control plane’s
  • the forwarding table looks up and forwards the message received by the PIC of the device 1300.
  • the forwarding table issued by the control plane can be stored in the memory.
  • the control plane and the forwarding plane may be completely separated and not on the same device. The above process will be briefly described below in conjunction with the embodiment of FIG. 3a and FIG. 4a.
  • the second network device in the segmented routing network can receive the first data packet through the physical interface card 1333, and determine when the destination IP address of the first data packet is the network The address of the device 1300, the data message is sent to the CPU 1331 for processing.
  • the CPU 1331 can determine the first micro-segment identifier according to the first data packet.
  • the CPU 1331 is further configured to determine the second micro-segmentation segment identifier according to the first data packet.
  • the CPU 1331 is also used to perform corresponding processing actions on the first data message and generate a second data message according to the first micro-segmentation identifier; or execute the first data message according to the first micro-segment identifier and the second micro-segment identifier Corresponding processing actions and generating a second data message.
  • the CPU 1311 may be configured to receive configuration instructions sent by the controller or the computing unit.
  • the physical interface card 1333 can be used to send a second data packet to the first network device.
  • the second network device or the first network device in the segmented routing network can use the first data packet of the physical interface card 1333 to determine when the purpose of the first data packet is If the IP address is the address of the network device 1300, the data message is sent to the CPU 1331 for processing.
  • the first data message carries the first micro-segment identifier.
  • the first data message also carries The second micro-segment segment identifier.
  • the CPU 1331 is configured to perform corresponding processing actions on the first data message and generate a second data message according to the first micro-segmentation identifier; or perform corresponding processing to the first data message according to the first micro-segment identifier and the second micro-segment identifier The processing action and the generation of the second data message.
  • the CPU 1311 may be configured to receive configuration instructions sent by the controller or the computing unit.
  • the physical interface card 1333 can be used to send a second data packet to the first network device.
  • the network device provided by the embodiment of the present invention may correspond to the first network device, the second network device, or the third network device in the method embodiment described in FIG. 3a or FIG. 4a, and can implement the first network device in each method embodiment described above. Functions and/or various steps and methods implemented by the network device, the second network device, or the third network device.
  • the above is only a brief exemplary description, and for the sake of brevity, it will not be repeated here.
  • main control boards there may be one or more main control boards, and when there are more than one, it may include the main main control board and the standby main control board.
  • the switching network board may not exist, or there may be one or more. When there are more than one, the load sharing and redundant backup can be realized together. Under the centralized forwarding architecture, the network equipment does not need to switch the network board, and the interface board undertakes the processing function of the business data of the entire system.
  • the network device can have at least one switching network board, and data exchange between multiple interface boards is realized through the switching network board, providing large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of network equipment with a distributed architecture are greater than those with a centralized architecture.
  • the form of the network device may also have only one board, that is, there is no switching network board, and the functions of the interface board and the main control board are integrated on the one board.
  • the central processing unit and the main control board on the interface board The central processing unit on the board can be combined into a central processing unit on this board, and perform the functions of the superposition of the two.
  • the data exchange and processing capacity of this form of equipment is low (for example, low-end switches or routers and other networks) equipment).
  • the specific architecture used depends on the specific networking deployment scenario, and there is no restriction here.
  • FIG. 14 is a schematic structural diagram of a device 1400 provided by an embodiment of the present application.
  • the first network device or the second network device shown in the embodiment of FIG. 3a, or the first network device, the second network device or the third network device shown in the embodiment of FIG. achieve.
  • the device 1400 includes at least one processor 1401, a communication bus 1402, and at least one communication interface 1404.
  • the device 1400 may further include a memory 1403.
  • the processor 1401 may be a general-purpose central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling program execution of the solution of this application.
  • the processor may be used to process the received message, so as to implement the message processing method provided in the embodiment of the present application.
  • the processor may be used to add the first micro-segment identifier and the second differential in the received message. SRH of the segment identifier, so that other network devices in the subsequent segment routing network can process the data message according to the first micro-segment segment identifier and the second micro-segment segment identifier.
  • the method shown in Figure 3a or Figure 4a This example corresponds to the processing part of the second network device.
  • the first network device in FIG. 3a or FIG. 4a, or the second network device in FIG. 4a is implemented by the network device shown in FIG.
  • first micro-segment segment identifier and the second micro-segment segment identifier in the process, and process the data message according to the first micro-segment segment identifier and the second micro-segment segment identifier.
  • first micro-segment segment identifier and the second micro-segment segment identifier for specific function implementation, please refer to the second network device and the first The processing part of the network equipment.
  • the communication bus 1402 is used to transfer information between the processor 1401, the communication interface 1404, and the memory 1403.
  • the memory 1403 can be a read-only memory (ROM), such as: electrically erasable programmable read-only memory (electrically erasable programmable read-only memory, EEPROM), compact disc read-only memory, CD -ROM) or other optical discs, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.). Or the memory 1403 may also be a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions.
  • ROM read-only memory
  • EEPROM electrically erasable programmable read-only memory
  • CD -ROM compact disc read-only memory
  • optical disc storage including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.
  • RAM random access memory
  • the memory 1403 may exist independently, and is connected to the processor 1401 through a communication bus 1402.
  • the memory 1403 may also be integrated with the processor 1401.
  • the memory 1403 is used to store program codes or instructions for executing the solutions of the present application, and the processor 1401 controls the execution.
  • the processor 1401 is configured to execute program codes stored in the memory 1403.
  • One or more software modules can be included in the program code.
  • the processor 1401 itself may also store program codes or instructions for executing the solutions of the present application.
  • the communication interface 1404 uses any device such as a transceiver to communicate with other devices or communication networks.
  • the communication network may be Ethernet, wireless access network (RAN), or wireless local area networks (WLAN), etc.
  • the communication interface 1404 may be used to receive packets sent by other network devices in the segment routing network, and may also send packets to other network devices in the segment routing network.
  • the communication interface 1404 may be an Ethernet interface (Ethernet) interface, a Fast Ethernet (FE) interface, or a Gigabit Ethernet (GE) interface.
  • the device 1400 may include multiple processors, such as the processor 1401 and the processor 1405 shown in FIG. 14. Each of these processors can be a single-CPU (single-CPU) processor or a multi-core (multi-CPU) processor.
  • the processor here may refer to one or more devices, circuits, and/or processing cores for processing data (for example, computer program instructions).
  • FIG. 15 is a schematic diagram of a network system 1500 according to an embodiment of this application.
  • the network system provided by the embodiment of the present application may include a first network device 1510 and a second network device 1520, and communication is performed between the first network device 1510 and the second network device 1520.
  • the second network device 1520 may execute the method steps and related optional manners executed by the network device 101 in the embodiment shown in FIG. 3a and FIG. 3b
  • the first network device 1510 may execute The method steps and related optional manners performed by the network device 102 in the embodiment shown in FIG. 4a or FIG. 4b are described above.
  • the first network device 1510 and the second network device 1520 communicate with each other, and the second network device 1520 can perform the execution of the network device 101 in the embodiment shown in FIG. 3a and FIG. 3b.
  • the first network device 1510 can execute the method steps and related optional manners executed by the network device 103 in the embodiment shown in FIG. 4a or FIG. 4b.
  • the network system also includes a third network device 1530, and the first network device 1510, the second network device 1520, and the third network device communicate with each other, and the second network device 1520 can perform as described above
  • the first network device 1510 can execute the network device 102 in the embodiment shown in FIG. 4a or FIG.
  • the first network device 1530 may execute the method steps and related optional manners executed by the network device 103 in the embodiment shown in FIG. 4a or FIG. 4b.
  • the specific product forms of the network device 101, the network device 102, and the network device 103 are as described above, and will not be repeated here.
  • the disclosed device and method can be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the unit is only a logical function division.
  • there may be other division methods for example, multiple units or components may be combined or may be Integrate into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may also be electrical or other forms of connection.
  • the unit described as a separate component may or may not be physically separated, and the component displayed as a unit may or may not be a physical unit, that is, it may be located in one place, or may also be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments of the present application.
  • processing units in each embodiment of the present application can be dispersed into multiple functional units, can also be integrated in one processing unit, or each unit can exist alone physically, or two or more units can be integrated. In one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
  • the above-mentioned embodiments it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof.
  • software, firmware, or a combination thereof it may be implemented in the form of a computer program product in whole or in part.
  • the computer program product includes one or more computer program instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium.
  • the computer program instructions may be transmitted from a website, computer, server, or data.
  • the center transmits to another website site, computer, server or data center through wired or wireless means.
  • the computer-readable storage medium may be any medium that can be accessed by a computer or a data storage device such as a server or a data center integrated with one or more media.
  • the medium may be a magnetic medium (for example, a floppy disk, a hard disk, and a magnetic tape), an optical medium (for example, an optical disk), or a semiconductor medium (for example, a solid-state hard disk).

Abstract

The present application provides a data packet processing method and device, and a storage medium and a system. A micro segmentation segment ID identifying a micro segmentation of a network device is applied to a segment routing network, so that when a second network device in the segment routing network receives a data packet forwarded in the segment routing network, a micro segmentation segment ID of a micro segmentation of a corresponding first network device is determined according to the data packet, and the micro segmentation segment ID is carried in the process of forwarding the data packet. When the data packet is forwarded in the segment routing network, a network device in the segment routing network can process the data packet based on the micro segmentation segment ID, to realize access control of the data packet based on the micro segmentation. According to the method, the configuration complexity of the network can be reduced.

Description

一种数据报文的处理方法、设备、存储介质及系统Method, equipment, storage medium and system for processing data message
本申请要求在2019年11月15日提交中华人民共和国知识产权局、申请号为201911122088.3、申请名称为“一种数据报文的处理方法、设备、存储介质及系统”的中国专利申请的优先权,这篇中国专利申请的全部内容通过引用结合在本申请中。This application requires the priority of a Chinese patent application filed with the Intellectual Property Office of the People's Republic of China, the application number is 201911122088.3, and the application name is "a data message processing method, equipment, storage medium and system" on November 15, 2019 , The entire content of this Chinese patent application is incorporated into this application by reference.
技术领域Technical field
本申请涉及通信领域,一种数据报文的处理方法、设备、存储介质及系统。This application relates to the field of communications, a method, equipment, storage medium and system for processing data messages.
背景技术Background technique
微分段(micro segmentation,MS):是一种可以基于(Internet Protocol,IP)地址、IP网段、媒体访问控制(Media Access Control,MAC)地址、虚拟机(virtual machine,VM)名称、容器、操作系统等来实现子网划分的虚拟网络划分方式,可以支持细粒度的网络隔离,例如属于相同虚拟局域网(virtual local network,VLAN)的不同设备之间也能实现相互隔离。通常,一个微分段对应一个端点组。Micro segmentation (MS): It is a type that can be based on (Internet Protocol, IP) address, IP network segment, Media Access Control (MAC) address, virtual machine (VM) name, container, The virtual network division method that the operating system implements the subnet division can support fine-grained network isolation. For example, different devices belonging to the same virtual local network (virtual local network, VLAN) can also be isolated from each other. Generally, a micro-segment corresponds to an endpoint group.
端点组(end point group,EPG)是一组具有相同特征的端点的集合,端点提供应用或服务,例如端点可以是虚拟机。端点组表示一组应用或服务,这些应用或服务被分组到一个微分段中,可以具有相同的安全策略等级。An endpoint group (EPG) is a set of endpoints with the same characteristics. The endpoints provide applications or services. For example, the endpoints can be virtual machines. An endpoint group represents a group of applications or services. These applications or services are grouped into a micro-segment and can have the same security policy level.
分段路由(segment routing,SR)是基于源路由的理念而设计的在网络中转发数据报文的一种协议。在SR网络中,通过头节点往数据报文中插入一组有序的段标识来显示地指定数据报文的转发路径。当SR应用于多协议标签交换(multi-protocol label Switching,MPLS)数据平面时,则称为基于MPLS的分段路由(MPLS-SR或SR-MPLS),当SR应用于互联网协议第6版(Internet Protocol Version 6,IPv6)数据平面时,则称为基于IPv6的分段路由(SRv6)。Segment routing (SR) is a protocol designed to forward data messages in a network based on the concept of source routing. In the SR network, the head node inserts a set of ordered segment identifiers into the data message to explicitly specify the forwarding path of the data message. When SR is applied to the multi-protocol label switching (MPLS) data plane, it is called MPLS-based segment routing (MPLS-SR or SR-MPLS). When SR is applied to Internet Protocol version 6 ( Internet Protocol Version 6, IPv6) data plane, it is called segment routing based on IPv6 (SRv6).
段标识(segment ID,SID),代表一个节点或者一条链路。在SRv6中,SID表现为一个128比特的值;在SR-MPLS中,SID表现为一个标签值,一个SRv6的段标识中可以包括功能部分,该功能部分指示发布该段标识的网络设备需要执行对应的动作。Segment ID (Segment ID, SID) represents a node or a link. In SRv6, the SID is represented as a 128-bit value; in SR-MPLS, the SID is represented as a label value. An SRv6 segment identifier can include a functional part, which indicates that the network device that issues the segment identifier needs to execute The corresponding action.
段标识列表(segment ID List,SID List):包含了一组段标识的列表,段路由网络中的头节点在接收到数据报文后,在数据报文中插入1个SID List可以显示地指示一条转发路径。Segment ID List (SID List, SID List): A list containing a group of segment IDs. After receiving the data message, the head node in the segment routing network inserts 1 SID into the data message. The List can display the indication One forwarding path.
在现有技术中,当不同的微分段之间需要互相访问或进行安全策略控制,且这些访问和安全策略需要作用于段路由网络时,需要进行大量的配置,如在每台设备上配置全网所有相关IP地址与微分段的对应关系,配置复杂,某种意义上来说,基本不具备可实行性。In the prior art, when different micro-segments need to access each other or perform security policy control, and these access and security policies need to be applied to the segment routing network, a large number of configurations are required, such as configuring all devices on each device. The corresponding relationship between all relevant IP addresses and micro-segmentation on the Internet is complicated to configure, and in a sense, it is basically not feasible.
发明内容Summary of the invention
本申请提供了一种数据报文处理方法及装置,用于根据微分段信息在段路由网络中实现数据报文的访问控制,降低配置复杂度。This application provides a data message processing method and device, which are used to implement data message access control in a segment routing network according to micro-segmentation information, and reduce configuration complexity.
第一方面,提供了一种数据报文的处理方法,包括:段路由网络中的第一网络设备接 收第一数据报文,所述第一数据报文包括第一微分段段标识,所述第一微分段段标识用于标识所述段路由网络中的第二网络设备的一个微分段,所述第一数据报文是发送向所述第二网络设备的数据报文;所述第一网络设备根据所述第一微分段段标识确定对所述第一数据报文的处理动作;所述第一网络设备对所述第一数据报文执行所述处理动作。In a first aspect, a data packet processing method is provided, including: a first network device in a segment routing network receives a first data packet, the first data packet includes a first micro-segment segment identifier, and the first network device in the segment routing network A micro-segment segment identifier is used to identify a micro-segment of a second network device in the segment routing network, the first data packet is a data packet sent to the second network device; the first network device Determine a processing action on the first data packet according to the first micro-segmentation segment identifier; the first network device performs the processing action on the first data packet.
SR网络中的网络设备通过从接收的数据报文中直接获取微分段段标识,然后该网络设备根据该微分段段标识对数据报文执行相应的处理动作,可以降低网络配置的复杂度,并进一步减少网络设备根据微分段实现数据报文的访问控制时的查表的次数。The network device in the SR network directly obtains the micro-segment segment identifier from the received data message, and then the network device performs corresponding processing actions on the data message according to the micro-segment segment identifier, which can reduce the complexity of network configuration and further reduce The number of table lookups when the network device implements access control of the data message according to the micro-segmentation.
在一种可能的方式中,所述第一网络设备根据所述第一微分段段标识确定对所述第一数据报文的处理动作,包括:所述第一网络设备根据所述第一微分段段标识和所述处理动作的对应关系,确定对所述第一数据报文的处理动作。In a possible manner, the determining, by the first network device, a processing action on the first data packet according to the first micro-segmentation identifier, includes: the first network device according to the first micro-segmentation segment The corresponding relationship between the identifier and the processing action is determined, and the processing action on the first data packet is determined.
SR网络中的网络设备通过直接根据微分段段标识和处理动作的对应关系确定处理动作,减少网络设备根据微分段实现数据报文的访问控制时的查表的次数。The network device in the SR network directly determines the processing action according to the corresponding relationship between the micro-segmentation segment identifier and the processing action, thereby reducing the number of table lookups when the network device implements the access control of the data message according to the micro-segmentation.
在一种可能的方式中,所述第一网络设备根据所述第一微分段段标识对所述第一数据报文执行处理动作,包括:所述第一网络设备从所述第一微分段段标识中直接获得第一微分段;所述第一网络设备根据所述第一微分段对所述第一数据报文执行所述处理动作。In a possible manner, the first network device performs a processing action on the first data packet according to the first micro-segment identification, including: the first network device identifies from the first micro-segment identification Obtain the first micro-segment directly in the middle; the first network device performs the processing action on the first data packet according to the first micro-segment.
SR网络中的网络设备通过从接收的数据报文中直接获取微分段段标识,并从该微分段段标识中,直接获得微分段,然后该网络设备根据该微分段对数据报文执行相应的处理动作,可以降低网络配置的复杂度,并进一步减少网络设备根据微分段实现数据报文的访问控制时的查表的次数。The network device in the SR network directly obtains the micro-segment segment identifier from the received data message, and directly obtains the micro-segment from the micro-segment identifier, and then the network device performs corresponding processing actions on the data message according to the micro-segment , Can reduce the complexity of network configuration, and further reduce the number of table lookups when the network device implements data message access control according to micro-segmentation.
在一种可能的方式中,所述第一网络设备和所述第二网络设备为同一网络设备,所述第一微分段段标识包括功能部分,在所述第一网络设备根据所述第一微分段段标识确定对所述第一数据报文的处理动作之前,所述方法还包括:所述第一网络设备确定所述功能部分用于指示:所述第一网络设备根据所述第一微分段段标识确定对所述第一数据报文的处理动作。In a possible manner, the first network device and the second network device are the same network device, the first micro-segment segment identifier includes a functional part, and the first network device is based on the first differential Before the segment identifier determines the processing action on the first data message, the method further includes: the first network device determines that the functional part is used to indicate: the first network device according to the first micro-segment segment The identifier determines the processing action for the first data packet.
通过在该段标识的功能部分直接指示网络设备执行确定动作,可以减少网络的配置。By directly instructing the network device to perform a certain action in the functional part identified in this segment, the network configuration can be reduced.
在一种可能的方式中,所述第一数据报文还包括第二微分段段标识,所述第二微分段段标识用于标识所述段路由网络中的第三网络设备的一个微分段,所述第一网络设备根据所述第一微分段段标识对所述第一数据报文执行处理动作,包括:所述第一网络设备根据所述第一微分段段标识和所述第二微分段段标识对所述第一数据报文执行处理动作。In a possible manner, the first data message further includes a second micro-segment segment identifier, and the second micro-segment segment identifier is used to identify a micro-segment of a third network device in the segment routing network, so The first network device performing a processing action on the first data packet according to the first micro-segmentation identifier includes: the first network device performs a processing action on the first data packet according to the first micro-segmentation identifier and the second micro-segmentation identifier pair The first data message performs a processing action.
在一种可能的方式中,所述第一网络设备根据所述第一微分段段标识和第二微分段段标识执行所述处理动作,包括:所述第一微分段段标识包括第一微分段,所述第二微分段段标识包括第二微分段;所述第一网络设备根据所述第一微分段和所述第二微分段对所述第一数据报文执行所述处理动作。In a possible manner, the first network device executes the processing action according to the first micro-segment segment identifier and the second micro-segment segment identifier, including: the first micro-segment segment identifier includes the first micro-segment, so The second micro-segment segment identifier includes a second micro-segment; the first network device performs the processing action on the first data packet according to the first micro-segment and the second micro-segment.
在一种可能的方式中,所述第一数据报文还包括第二微分段段标识,所述第二微分段段标识用于标识所述段路由网络中的第三网络设备的一个微分段,所述第一微分段段标识和所述第二微分段段标识为由所述第三网络设备添加到所述第一数据报文中,所述第一网络设备根据所述第一微分段段标识确定对所述第一数据报文的处理动作,包括:所述第一网络设备根据匹配条件和所述处理动作的对应关系,确定对所述第一数据报文的处理动作,所述匹配条件包括所述第一微分段段标识和所述第二微分段段标识。In a possible manner, the first data message further includes a second micro-segment segment identifier, and the second micro-segment segment identifier is used to identify a micro-segment of a third network device in the segment routing network, so The first micro-segmentation segment identifier and the second micro-segmentation segment identifier are added to the first data packet by the third network device, and the first network device determines the corresponding The processing action of the first data packet includes: the first network device determines a processing action on the first data packet according to the correspondence between a matching condition and the processing action, and the matching condition includes the The first micro-segmentation segment identifier and the second micro-segmentation segment identifier.
通过同时在数据报文中携带第一微分段段标识和第二微分段段标识,或第一微分段和第二微分段作为数据报文的访问策略控制时的匹配条件,可以进行更精细化的访问策略配置,并进一步减少配置工作量。By carrying the first micro-segment segment identifier and the second micro-segment segment identifier in the data message at the same time, or the first micro-segmentation and the second micro-segmentation are used as the matching conditions for the access policy control of the data message, more refined access can be performed Strategy configuration, and further reduce the configuration workload.
在一种可能的方式中,所述第一数据报文的段标识列表中包括所述第一微分段段标识。In a possible manner, the segment identifier list of the first data packet includes the first micro-segment segment identifier.
在一种可能的方式中,所述段标识列表中还包括所述第二微分段段标识,或所述第一数据报文还包括元数据,所述元数据包括所述第二微分段段标识。In a possible manner, the segment identifier list further includes the second micro-segment segment identifier, or the first data message further includes metadata, and the metadata includes the second micro-segment segment identifier.
在一种可能的方式中,所述第二微分段段标识携带在所述第一数据报文的报文头的源目的地址中。In a possible manner, the second micro-segmentation segment identifier is carried in the source and destination address of the header of the first data message.
在一种可能的方式中,所述段标识列表携带在第一数据报文的段路由头或多协议标签交换标签栈中。In a possible manner, the segment identification list is carried in the segment routing header or the multi-protocol label switching label stack of the first data packet.
网络设备通过将第一微分段段标识携带在段标识列表中,而将该段标识列表携带在第二数报文的段路由头或多协议标签交换标签栈中的方式,有利于沿用段路由网络的控制、转发机制,降低本发明方案实施的复杂度。The network device carries the first micro-segment segment identifier in the segment identifier list, and the segment identifier list is carried in the segment routing header of the second number message or the multi-protocol label switching label stack, which is conducive to the use of segment routing networks. The control and forwarding mechanism of the invention reduces the complexity of the implementation of the solution of the present invention.
网络设备通过在段标识列表或元数据中携带第二微分段段标识的方式,类似于将该数据报文的微分段特征直接携带在报文中,有利于该段路由网络中的其他设备之间获得第二微分段段标识,而不需要复杂的配置和多次查表,有利于降低整体段路由网络设备的开销。The network device carries the second micro-segment segment identifier in the segment identifier list or metadata, which is similar to directly carrying the micro-segment feature of the data message in the message, which is beneficial for routing between other devices in the segment of the network. Obtaining the second micro-segment segment identifier without complicated configuration and multiple table lookups is beneficial to reduce the overall segment routing network equipment overhead.
在一种可能的方式中,所述第一数据报文的段路由头还包括携带标志,所述携带标志标识所述第二微分段段标识的携带方式。In a possible manner, the segment routing header of the first data message further includes a carrying flag, and the carrying flag identifies a carrying manner of the second micro-segment segment identifier.
网络设备通过在第一数据报文的段路由头中携带标识第二微分段段标识携带方式的携带标志,使得所述第一网络设备可以通过所述携带标志的指示,从该携带标志指示的位置直接获取第二微分段段标识。The network device carries a carrying flag that identifies the second micro-segment segment identifier carrying mode in the segment routing header of the first data packet, so that the first network device can use the indication of the carrying flag to obtain information from the position indicated by the carrying flag. Obtain the second micro-segmentation segment identifier directly.
在一种可能的方式中,所述处理动作包括:转发、丢弃、标记、重定向或镜像。In a possible manner, the processing action includes: forwarding, discarding, marking, redirection, or mirroring.
通过对多种处理动作的支持,可以使得本发明方案匹配多种网络业务的需求,满足更多的应用场景。By supporting multiple processing actions, the solution of the present invention can match the requirements of multiple network services and meet more application scenarios.
在一种可能的方式中,所述第二网络设备和所述第一网络设备为同一台设备。In a possible manner, the second network device and the first network device are the same device.
在一种可能的方式中,所述第一网络设备发送通告报文,所述通告报文携带所述第一微分段段标识;或所述第一网络设备发送边界网络协议链路状态报文,所述链路状态报文携带所述第一微分段段标识;或所述第一网络设备发送路径计算单元通信协议报文,所述路径计算单元通信协议报文携带所述第一微分段段标识。In a possible manner, the first network device sends a notification message, the notification message carrying the first micro-segment segment identifier; or the first network device sends a border network protocol link state message, The link state message carries the first micro-segment segment identifier; or the first network device sends a path calculation unit communication protocol message, and the path calculation unit communication protocol message carries the first micro-segment segment identifier.
通过以上方式,第一网络设备可以发布标识其自身微分段的微分段段标识,便于该段路由网络中的其他网络设备获得第一网络设备的微分段段标识信息,向该段路由网络中的其他网络设备通告第一网络设备具备根据微分段段标识进行数据报文处理的能力,以及对应的路由信息等。Through the above method, the first network device can issue a micro-segment segment identifier that identifies its own micro-segment, so that other network devices in this segment of the routing network can obtain the micro-segment identification information of the first network device, and route to other networks in the segment. The device notifies the first network device that it has the ability to process data packets according to the micro-segmentation identifier, and the corresponding routing information.
在一种可能的方式中,当所述处理动作包括转发或标记时,所述第一网络设备对所述第一数据报文执行所述处理动作,包括:所述第一网络设备生成第二数据报文,所述第二数据报文不包括所述第一微分段段标识;所述第一网络设备发送所述第二数据报文。In a possible manner, when the processing action includes forwarding or marking, the first network device performing the processing action on the first data packet includes: the first network device generates a second A data message, the second data message does not include the first micro-segmentation segment identifier; the first network device sends the second data message.
在一种可能的方式中,当所述处理动作包括转发或标记时,所述第一网络设备根据所述第一微分段段标识对所述第一数据报文执行处理动作,包括:所述第一网络设备剥离所述第一数据报文中的段标识列表,得到第二数据报文;当所述第二微分段段标识携带在所 述元数据中时,所述第一网络设备还剥离所述第一数据报文中的所述元数据,得到所述第二数据报文;所述第一网络设备发送所述第二数据报文。In a possible manner, when the processing action includes forwarding or marking, the first network device performs a processing action on the first data packet according to the first micro-segmentation segment identifier, including: A network device strips the list of segment identifiers in the first data message to obtain a second data message; when the second micro-segment segment identifier is carried in the metadata, the first network device also strips all The metadata in the first data message is used to obtain the second data message; the first network device sends the second data message.
通过第一网络设备(尾节点)在接收到第二数据报文之后,将该数据报文中的SRH剥离,以及当第二微分段段标识携带在元数据中时,还将元数据进行剥离的方式,将段路由网络中的相关信息剥离的方式,类似于还原转发的数据报文,避免对该数据报文随后的转发造成影响。After receiving the second data message through the first network device (tail node), the SRH in the data message is stripped, and when the second micro-segment segment identifier is carried in the metadata, the metadata is also stripped Method, the method of stripping the relevant information in the segment routing network is similar to restoring the forwarded data message, so as to avoid affecting the subsequent forwarding of the data message.
在一种可能的方式中,所述第二网络设备和所述第一网络设备为不同的设备。In a possible manner, the second network device and the first network device are different devices.
在一种可能的方式中,所述第一数据报文还包括微分段节点段标识,所述微分段节点段标识为所述第一网络设备的段标识,所述微分段节点段标识用于指示所述第一网络设备根据所述第一微分段段标识对所述第一数据报文进行处理。In a possible manner, the first data message further includes a micro-segment node segment identifier, the micro-segment node segment identifier is the segment identifier of the first network device, and the micro-segment node segment identifier is used for Instruct the first network device to process the first data packet according to the first micro-segmentation identifier.
在一种可能的方式中,所述第一网络设备发送通告报文,所述通告报文携带所述微分段节点段标识;或所述第一网络设备发送边界网络协议链路状态报文,所述链路状态报文发布所述微分段节点段标识;或所述第一网络设备发送路径计算单元通信协议报文,所述路径计算单元通信协议报文携带所述微分段节点段标识。In a possible manner, the first network device sends a notification message, the notification message carrying the micro-segment node segment identifier; or the first network device sends a border network protocol link state message, The link state message publishes the micro-segment node segment identifier; or the first network device sends a path calculation unit communication protocol message, and the path calculation unit communication protocol message carries the micro-segment node segment identifier.
通过以上可选方式,该段路由网络中的中间节点发布其微分段节点段标识,使得该第一网络设备在根据第一数据报文生成第二数据报文时,即能将该微分段节点段标识携带在第二数据报文中,使得该中间节点也可以根据携带的第一、第二微分段段标识对数据报文执行处理动作。Through the above optional methods, the intermediate node in the segment of the routing network issues its micro-segment node segment identifier, so that the first network device can generate the micro-segment node when the second data packet is generated according to the first data packet. The segment identifier is carried in the second data message, so that the intermediate node can also perform processing actions on the data message according to the carried first and second micro-segment segment identifiers.
第二方面,提供了一种数据报文的处理方法,包括:段路由网络中的第一网络设备接收第一数据报文;所述第一网络设备根据所述第一数据报文确定第一微分段段标识,所述第一微分段段标识用于标识所述段路由网络中的第二网络设备的一个微分段,所述第一数据报文不包括所述第一微分段段标识,所述第一数据报文为发送向所述第二网络设备的数据报文;所述第一网络设备根据所述第一微分段段标识确定对所述第一数据报文的处理动作;所述第一网络设备对所述第一数据报文执行所述处理动作。In a second aspect, a data packet processing method is provided, including: a first network device in a segment routing network receives a first data packet; the first network device determines a first data packet according to the first data packet A micro-segment segment identifier, the first micro-segment segment identifier is used to identify a micro-segment of a second network device in the segment routing network, the first data message does not include the first micro-segment segment identifier, and the first micro-segment segment identifier A data message is a data message sent to the second network device; the first network device determines a processing action on the first data message according to the first micro-segmentation identifier; the first network The device performs the processing action on the first data packet.
SR网络中的头节点可以通过根据接收的数据报文根据段标识表根据最长匹配原则,确定该数据报文对应的要发往的尾节点的微分段段标识(可称为目的微分段段标识),而不需要在头节点上配置全网所有设备的IP地址与微分段的关系,可以减少网络配置的复杂度。The head node in the SR network can determine the micro-segment segment identifier of the tail node to be sent to the data message corresponding to the received data message according to the segment identifier table according to the longest matching principle (it can be called the destination micro-segment segment identifier) , Without the need to configure the relationship between the IP addresses of all devices in the entire network and micro-segmentation on the head node, which can reduce the complexity of network configuration.
在一种可能的方式中,所述第一网络设备根据所述第一微分段段标识确定对所述第一数据报文的处理动作,包括:In a possible manner, determining, by the first network device, a processing action on the first data packet according to the first micro-segmentation segment identifier includes:
所述第一网络设备根据所述第一微分段段标识和所述处理动作的对应关系,确定对所述第一数据报文的处理动作。The first network device determines a processing action on the first data packet according to the correspondence between the first micro-segmentation segment identifier and the processing action.
在一种可能的方式中,所述第二网络设备在根据所述第一微分段段标识对所述第一数据报文执行处理动作之前,所述方法还包括:所述第二网络设备获得对应关系,所述对应关系包括所述第一微分段段标识和所述处理动作的映射关系。In a possible manner, before the second network device performs a processing action on the first data packet according to the first micro-segmentation identifier, the method further includes: the second network device obtains the corresponding A relationship, the corresponding relationship includes a mapping relationship between the first micro-segmentation segment identifier and the processing action.
在一种可能的方式中,所述第二网络设备根据所述第一微分段段标识对所述第一数据报文执行处理动作,包括:所述第二网络设备根据所述第一微分段段标识和第二微分段段标识执行所述处理动作,所述第二微分段段标识用于标识所述第二网络设备的一个微分段;所述方法还包括:所述第二网络设备根据所述接收第一数据报文确定所述第二微分段段标识。In a possible manner, the second network device performing a processing action on the first data packet according to the first micro-segment identifier includes: the second network device performs a processing action on the first data packet according to the first micro-segment identifier And a second micro-segment segment identifier to execute the processing action, where the second micro-segment segment identifier is used to identify a micro-segment of the second network device; the method further includes: the second network device according to the received first A data message determines the second micro-segmentation segment identifier.
在一种可能的方式中,所述第二网络设备根据所述第一微分段段标识和第二微分段段标识执行所述处理动作,包括:所述第一微分段段标识包括第一微分段,所述第二微分段段标识包括第二微分段;所述第二网络设备根据所述第一微分段和所述第二微分段对所述第一数据报文执行所述处理动作。In a possible manner, the second network device executes the processing action according to the first micro-segment segment identifier and the second micro-segment segment identifier, including: the first micro-segment segment identifier includes the first micro-segment, so The second micro-segment segment identifier includes a second micro-segment; the second network device performs the processing action on the first data packet according to the first micro-segment and the second micro-segment.
这样,头节点通过采用上述目的微分段段标识和头节点的微分段段标识(可称为源微分段段标识)来作为数据报文的访问策略控制时的匹配条件;或者,头节点网络设备也可以确定出源微分段段标识对应的微分段(可称为源微分段),以及上述目的微分段,然后采用源微分段和目的微分段来作为作为数据报文的访问策略控制时的匹配条件。这样,可以进行更精细化的访问策略控制。在一种可能的方式中,所述处理动作包括:转发、丢弃、标记、重定向或镜像。In this way, the head node uses the above-mentioned destination micro-segment segment identifier and the head node's micro-segment segment identifier (which can be referred to as the source micro-segment segment identifier) as the matching condition for data message access policy control; or, the head node network device can also determine The source micro-segment segment identifies the corresponding micro-segment (may be referred to as the source micro-segment) and the above-mentioned destination micro-segment, and then the source micro-segment and the destination micro-segment are used as the matching condition when controlling the access policy of the data message. In this way, more refined access policy control can be performed. In a possible manner, the processing action includes: forwarding, discarding, marking, redirection, or mirroring.
通过对多种处理动作的支持,可以使得本发明方案匹配多种网络业务的需求,满足更多的应用场景。By supporting multiple processing actions, the solution of the present invention can match the requirements of multiple network services and meet more application scenarios.
在一种可能的方式中,所述第一微分段段标识包括功能部分,所述功能部分用于指示:所述第二网络设备根据所述第一微分段段标识确定对所述第一数据报文的处理动作。In a possible manner, the first micro-segmentation segment identifier includes a functional part, and the functional part is used to indicate: the second network device determines that the first data packet is processed according to the first micro-segmentation segment identifier. Processing actions.
通过在该段标识的功能部分直接指示网络设备执行确定动作,可以减少网络的配置。By directly instructing the network device to perform a certain action in the functional part identified in this segment, the network configuration can be reduced.
在一种可能的方式中,所述第一网络设备还根据所述接收第一数据报文确定所述第二微分段段标识,所述第二微分段段标识用于标识所述第一网络设备的一个微分段;所述第一网络设备根据所述第一微分段段标识确定对所述第一数据报文的处理动作,包括:所述第一网络设备根据匹配条件和所述处理动作的对应关系,确定对所述第一数据报文的处理动作,所述匹配条件包括所述第一微分段段标识和所述第二微分段段标识。In a possible manner, the first network device further determines the second micro-segmentation segment identifier according to the received first data packet, and the second micro-segmentation segment identifier is used to identify the network device of the first network device. A micro-segment; the first network device determines the processing action of the first data packet according to the first micro-segmentation identifier, including: the first network device determines the corresponding relationship between the processing action and the matching condition according to the matching condition , Determining a processing action for the first data packet, and the matching condition includes the first micro-segmentation identifier and the second micro-segmentation identifier.
通过以第一微分段段标识和第二微分段段标识作为匹配条件,可以更精细的对数据报文采取进行更精细的访问策略控制。By using the first micro-segmentation segment identifier and the second micro-segmentation segment identifier as the matching condition, a more precise access policy control can be adopted for the data message.
在一种可能的方式中,当所述处理动作包括转发或标记时,所述第二网络设备根据所述第一微分段段标识对所述第一数据报文执行处理动作,包括:所述第二网络设备根据所述第一数据报文生成第二数据报文,所述第二数据报文包括段标识列表,所述段标识列表包括所述第一微分段段标识;所述第二网络设备向所述第一网络设备发送所述第二数据报文。In a possible manner, when the processing action includes forwarding or marking, the second network device performs a processing action on the first data packet according to the first micro-segment segment identifier, including: 2. A network device generates a second data message according to the first data message, the second data message includes a segment identifier list, and the segment identifier list includes the first micro-segment segment identifier; the second network device Sending the second data packet to the first network device.
通过第二网络设备根据数据报文确定第一微分段段标识之后,在其生成的第二数据报文中携带第一微分段段标识的方式,仅需要在第二网络设备,如:段路由网络中转发该第一数据报文的头节点处将第一微分段段标识携带在后续的数据报文中,无须其他网络设备再次确定第一端点组段表示的方式,降低了整体网络设备的开销。After the second network device determines the first micro-segment segment identifier according to the data message, the second data message generated by the second network device carries the first micro-segment segment identifier. It only needs to be in the second network device, such as: a segment routing network The head node that forwards the first data message carries the first micro-segment segment identifier in subsequent data messages, without the need for other network devices to determine the manner in which the first endpoint group segment is represented again, which reduces the overall network device overhead.
在一种可能的方式中,所述段标识列表还包括所述第二微分段段标识,或所述第二数据报文还包括元数据,所述元数据包括所述第二微分段段标识。In a possible manner, the segment identifier list further includes the second micro-segment segment identifier, or the second data message further includes metadata, and the metadata includes the second micro-segment segment identifier.
在一种可能的方式中,所述第二微分段段标识携带在所述第二数据报文的报文头的源目的地址中。In a possible manner, the second micro-segmentation segment identifier is carried in the source and destination address of the header of the second data packet.
通过在段标识列表或元数据中携带第二微分段段标识的方式,类似于将该数据报文的微分段特征直接携带在报文中,有利于该段路由网络中的其他设备之间获得第二微分段段标识,而不需要多次比对计算,有利于降低整体段路由网络设备的开销。By carrying the second micro-segmentation segment identifier in the segment identifier list or metadata, it is similar to directly carrying the micro-segmentation feature of the data message in the message, which is beneficial to other devices in the routing network of this segment to obtain the first Two micro-segment segment identifications do not require multiple comparison calculations, which is beneficial to reduce the overall segment routing network equipment overhead.
在一种可能的方式中,所述段标识列表携带在第二数据报文的段路由头或多协议标签 交换MPLS标签栈中。In a possible manner, the segment identifier list is carried in the segment routing header of the second data packet or the multi-protocol label switching MPLS label stack.
通过将第一微分段段标识携带在段标识列表中,而将该段标识列表携带在第二数报文的段路由头或MPLS标签栈中的方式,有利于沿用段路由网络的控制、转发机制,降低本发明方案实施的复杂度。By carrying the first micro-segment segment identifier in the segment identifier list, and carrying the segment identifier list in the segment routing header or MPLS label stack of the second number packet, it is beneficial to follow the control and forwarding mechanism of the segment routing network. , Reduce the complexity of the implementation of the present invention.
在一种可能的方式中,所述第二数据报文的段路由头还包括携带标志,所述携带标志标识所述第二微分段段标识的携带方式。In a possible manner, the segment routing header of the second data message further includes a carrying flag, and the carrying flag identifies a carrying manner of the second micro-segment segment identifier.
通过在第二数据报文的段路由头中携带标识第二微分段段标识携带方式的携带标志,使得接收第二数据报文的网络设备可以通过所述携带标志的指示,从该携带标志指示的位置直接获取第二微分段段标识。By carrying a carrying flag that identifies the carrying mode of the second micro-segment segment identifier in the segment routing header of the second data message, the network device receiving the second data message can use the indication of the carrying flag to obtain information from the carrying flag. The location directly obtains the second micro-segment segment identifier.
在一种可能的方式中,所述第二网络设备还获得第三网络设备的微分段节点段标识,所述微分段节点段标识用于指示所述第三网络设备根据所述第一微分段段标识对所述第一数据报文进行处理;所述段标识列表中还包括所述微分段节点段标识。In a possible manner, the second network device also obtains the micro-segmentation node segment identifier of the third network device, and the micro-segmentation node segment identifier is used to instruct the third network device according to the first micro-segmentation segment. The identifier processes the first data message; the segment identifier list also includes the micro-segment node segment identifier.
通过在第二网络设备处获得第三网络设备,如段路由网络中转发该第一数据报文的中间节点的微分段节点段标识的方式,使得第二网络设备在根据第一数据报文生成第二数据报文时,即能将该微分段节点段标识携带在第二数据报文中,使得发布该微分段节点段标识的中间网络节点也可以根据携带的第一微分段段标识对数据报文执行处理动作。By obtaining the third network device from the second network device, such as the micro-segment node segment identifier of the intermediate node that forwards the first data packet in the segment routing network, the second network device is able to generate data based on the first data packet. In the case of the second data message, the micro-segment node segment identifier can be carried in the second data message, so that the intermediate network node that publishes the micro-segment node segment identifier can also compare the datagram according to the carried first micro-segment segment identifier. The text executes processing actions.
在一种可能的方式中,所述第二网络设备接收配置指令,从所述配置指令获得所述第二微分段段标识;或所述第二网络设备生成所述第二微分段节点段标识。In a possible manner, the second network device receives a configuration instruction, and obtains the second micro-segment segment identifier from the configuration instruction; or the second network device generates the second micro-segment node segment identifier.
在一种可能的方式中,所述第二网络设备发送通告报文,所述通告报文携带所述第二微分段段标识;或所述第二网络设备发送边界网络协议链路状态报文,所述链路状态报文携带所述第二微分段段标识;或所述第二网络设备发送路径计算单元通信协议报文,所述路径计算单元通信协议报文携带所述第二微分段段标识。In a possible manner, the second network device sends a notification message, the notification message carrying the second micro-segment segment identifier; or the second network device sends a border network protocol link state message, The link state message carries the second micro-segment segment identifier; or the second network device sends a path calculation unit communication protocol message, and the path calculation unit communication protocol message carries the second micro-segment segment identifier.
通过以上方式,第二网络设备也可以发布标识其自身微分段的微分段段标识,便于该端路由网络中的其他网络设备也获得第二网络设备的微分段段标识信息,向该段路由网络中的其他网络设备通告第二网络设备具备根据微分段段标识进行数据报文处理的能力,以及对应的路由信息等。Through the above method, the second network device can also issue the micro-segment segment identifier that identifies its own micro-segment, so that other network devices in the routing network at this end can also obtain the micro-segment identification information of the second network device, and route the micro-segment identification information of the second network device to this segment. The other network device notifies the second network device that it has the ability to process data packets according to the micro-segment identifier, and the corresponding routing information.
在一种可能的方式中,所述第二微分段段标识包括功能部分,所述功能部分用于指示:所述第一网络设备根据所述第二微分段段标识确定对所述第一数据报文的处理动作。In a possible manner, the second micro-segmentation segment identifier includes a functional part, and the functional part is used to indicate: the first network device determines that the first data packet is processed according to the second micro-segmentation segment identifier. Processing actions.
通过在该段标识的功能部分直接指示网络设备执行确定动作,可以减少网络的配置。By directly instructing the network device to perform a certain action in the functional part identified in this segment, the network configuration can be reduced.
在一种可能的方式中,所述第二网络设备根据所述接收第一数据报文确定所述第二微分段段标识,包括:所述第二网络设备根据所述第一数据报文的源地址确定所述第二微分段段标识,或所述第二网络设备根据接收所述第一数据报文的接口确定所述第二微分段段标识。In a possible manner, the second network device determining the second micro-segment segment identifier according to the received first data packet includes: the second network device according to the source of the first data packet The address determines the second micro-segment segment identifier, or the second network device determines the second micro-segment segment identifier according to the interface through which the first data message is received.
通过以上方式,网络设备可以通过多种方式确定第一数据报文对应的第二微分段段标识,不用仅仅限定在一种方案中,方案应用场景更丰富。In the above manner, the network device can determine the second micro-segment segment identifier corresponding to the first data packet in multiple ways, and it is not limited to only one solution, and the solution application scenarios are more abundant.
在一种可能的方式中,所述第二网络设备根据所述第一数据报文确定第一微分段段标识,包括:所述第二网络设备根据所述第一数据报文的目的地址或区分服务编码点确定所述第一微分段段标识。In a possible manner, the second network device determining the first micro-segment segment identifier according to the first data packet includes: the second network device determines the first micro-segment segment identifier according to the destination address or distinction of the first data packet The service code point determines the first micro-segment segment identifier.
根据第一数据报文的目的地址或区分服务编码点确定第一微分段段标识的方法,不需 要为本方案增加额外的特征信息来确定第一微分段段标识,方案使用范围更广。The method of determining the first micro-segment segment identifier according to the destination address of the first data message or the differentiated services code point does not need to add additional feature information to the solution to determine the first micro-segment segment identifier, and the solution has a wider application range.
在一种可能的方式中,所述第二网络设备接收所述第二网络设备发送的通告报文,通过所述通告报文获得所述第一微分段段标识;或所述第二网络设备接收控制器或路径计算单元发送所述第一微分段段标识。In a possible manner, the second network device receives a notification message sent by the second network device, and obtains the first micro-segment segment identifier through the notification message; or the second network device receives The controller or the path calculation unit sends the first micro-segment segment identifier.
通过以上可选方式,网络设备通过多种方式接收段路由网络中其他网络设备发布的微分段段标识,使得本发明可以在多种段路由网络场景中进行使用。Through the above optional methods, the network device receives the micro-segment segment identifiers issued by other network devices in the segment routing network in a variety of ways, so that the present invention can be used in multiple segment routing network scenarios.
第三方面,提供了一种第一网络设备,所述第一网络设备应用于段路由网络中,包括:接收单元,用于接收第一数据报文,所述第一数据报文包括第一微分段段标识,所述第一微分段段标识用于标识所述段路由网络中的第二网络设备的一个微分段,所述第一数据报文是发送向所述第二网络设备的数据报文;处理单元,用于根据所述第一微分段段标识确定对所述第一数据报文的处理动作;所述处理单元,用于对所述第一数据报文执行所述处理动作。In a third aspect, a first network device is provided. The first network device is applied to a segment routing network and includes: a receiving unit configured to receive a first data packet, the first data packet including a first data packet A micro-segment segment identifier, the first micro-segment segment identifier is used to identify a micro-segment of a second network device in the segment routing network, and the first data packet is a data packet sent to the second network device The processing unit is configured to determine a processing action on the first data packet according to the first micro-segmentation segment identifier; the processing unit is configured to perform the processing action on the first data packet.
在一种可能的方式中,所述处理单元,用于根据所述第一微分段段标识确定对所述第一数据报文的处理动作,具体为:所述处理单元,用于根据所述第一微分段段标识和所述处理动作的对应关系,确定对所述第一数据报文的处理动作。In a possible manner, the processing unit is configured to determine a processing action for the first data packet according to the first micro-segmentation identifier, specifically: the processing unit is configured to determine the processing action of the first data packet according to the first micro-segmentation identifier. The corresponding relationship between a micro-segmentation identifier and the processing action determines the processing action for the first data packet.
在一种可能的方式中,所述第一网络设备和所述第二网络设备为同一网络设备,所述第一微分段段标识包括功能部分,在所述处理单元用于根据所述第一微分段段标识确定对所述第一数据报文的处理动作之前,所述处理单元还具体用于:确定所述功能部分用于指示:所述处理单元根据所述第一微分段段标识确定对所述第一数据报文的处理动作。In a possible manner, the first network device and the second network device are the same network device, the first micro-segment identifier includes a functional part, and the processing unit is configured to perform according to the first differential Before the segment identifier determines the processing action on the first data message, the processing unit is further specifically configured to: determine that the functional part is used to indicate that the processing unit determines the processing action for the first micro-segment segment identifier according to the first micro-segment segment identifier. The processing action of the first data message.
在一种可能的方式中,所述第一数据报文还包括第二微分段段标识,所述第二微分段段标识用于标识所述段路由网络中的第三网络设备的一个微分段,所述处理单元用于根据所述第一微分段段标识对所述第一数据报文执行处理动作,具体为:所述处理单元,用于根据所述第一微分段段标识和所述第二微分段段标识对所述第一数据报文执行处理动作。In a possible manner, the first data message further includes a second micro-segment segment identifier, and the second micro-segment segment identifier is used to identify a micro-segment of a third network device in the segment routing network, so The processing unit is configured to perform a processing action on the first data message according to the first micro-segmentation identifier, specifically: the processing unit is configured to perform a processing action on the first data message according to the first micro-segmentation identifier and the second micro-segmentation identifier Identifies the execution of a processing action on the first data message.
在一种可能的方式中,所述第一数据报文的段标识列表中包括所述第一微分段段标识。In a possible manner, the segment identifier list of the first data packet includes the first micro-segment segment identifier.
在一种可能的方式中,所述段标识列表中还包括所述第二微分段段标识,或所述第一数据报文还包括元数据,所述元数据包括所述第二微分段段标识。In a possible manner, the segment identifier list further includes the second micro-segment segment identifier, or the first data message further includes metadata, and the metadata includes the second micro-segment segment identifier.
在一种可能的方式中,所述段标识列表携带在第二数据报文的段路由头或多协议标签交换标签栈中。In a possible manner, the segment identifier list is carried in the segment routing header or the multi-protocol label switching label stack of the second data packet.
在一种可能的方式中,所述第一数据报文的段路由头还包括携带标志,所述携带标志标识所述第二微分段段标识的携带方式。In a possible manner, the segment routing header of the first data message further includes a carrying flag, and the carrying flag identifies a carrying manner of the second micro-segment segment identifier.
在一种可能的方式中,所述第一网络设备还包括发送单元,所述处理动作包括:转发、丢弃、标记、重定向或镜像。In a possible manner, the first network device further includes a sending unit, and the processing action includes: forwarding, discarding, marking, redirection, or mirroring.
在一种可能的方式中,所述第二网络设备和所述第一网络设备为同一台设备。In a possible manner, the second network device and the first network device are the same device.
在一种可能的方式中,所述发送单元,用于发送通告报文,所述通告报文携带所述第一微分段段标识;或所述发送单元,用于发送边界网络协议链路状态报文,所述链路状态报文携带所述第一微分段段标识;或所述发送单元,用于发送路径计算单元通信协议报文,所述路径计算单元通信协议报文携带所述第一微分段段标识。In a possible manner, the sending unit is configured to send a notification message, the notification message carrying the first micro-segment segment identifier; or the sending unit is configured to send a border network protocol link status report The link state message carries the first micro-segment segment identifier; or the sending unit is configured to send a path calculation unit communication protocol message, and the path calculation unit communication protocol message carries the first differential Segment identifier.
在一种可能的方式中,所述第一网络设备还包括发送单元,当所述处理动作包括转发或标记时,所述处理单元对所述第一数据报文执行所述处理动作,具体为:所述处理单元 生成第二数据报文,所述第二数据报文不包括所述第一微分段段标识;所述发送单元,用于发送所述第二数据报文。In a possible manner, the first network device further includes a sending unit, and when the processing action includes forwarding or marking, the processing unit performs the processing action on the first data packet, specifically : The processing unit generates a second data packet, and the second data packet does not include the first micro-segment segment identifier; the sending unit is configured to send the second data packet.
在一种可能的方式中,当所述处理动作包括转发或标记时,所述处理单元,用于根据所述第一微分段段标识对所述第一数据报文执行处理动作,具体为:所述处理单元,用于剥离所述第一数据报文中的段标识列表,得到第二数据报文;当所述第二微分段段标识携带在所述元数据中时,所述处理单元,还用于剥离所述第一数据报文中的所述元数据,得到所述第二数据报文;所述第一网络设备发送所述第二数据报文。In a possible manner, when the processing action includes forwarding or marking, the processing unit is configured to perform a processing action on the first data packet according to the first micro-segmentation identifier, specifically: The processing unit is configured to strip the list of segment identifiers in the first data message to obtain a second data message; when the second micro-segment segment identifier is carried in the metadata, the processing unit further Used to strip the metadata in the first data message to obtain the second data message; the first network device sends the second data message.
在一种可能的方式中,所述第二网络设备和所述第一网络设备为不同的设备。In a possible manner, the second network device and the first network device are different devices.
在一种可能的方式中,所述第一数据报文还包括微分段节点段标识,所述微分段节点段标识为所述第一网络设备的段标识,所述微分段节点段标识用于指示所述第一网络设备根据所述第一微分段段标识对所述第一数据报文进行处理。In a possible manner, the first data message further includes a micro-segment node segment identifier, the micro-segment node segment identifier is the segment identifier of the first network device, and the micro-segment node segment identifier is used for Instruct the first network device to process the first data packet according to the first micro-segmentation identifier.
在一种可能的方式中,所述第一网络设备和所述第二网络设备为不同的设备,所述第一数据报文还包括微分段节点段标识,所述微分段节点段标识为所述第一网络设备的段标识,所述微分段节点段标识包括功能部分,所述功能部分用于指示:所述处理单元根据所述第一微分段段标识确定对所述第一数据报文的处理动作。In a possible manner, the first network device and the second network device are different devices, the first data message further includes a micro-segment node segment identifier, and the micro-segment node segment identifier is The segment identifier of the first network device, the micro-segment node segment identifier includes a functional part, and the functional part is used to instruct: the processing unit determines, according to the first micro-segment segment identifier, the information on the first data packet Processing actions.
在一种可能的方式中,所述发送单元,用于:发送通告报文,所述通告报文携带所述微分段节点段标识;或发送边界网络协议链路状态报文,所述链路状态报文发布所述微分段节点段标识;或发送路径计算单元通信协议报文,所述路径计算单元通信协议报文携带所述微分段节点段标识。In a possible manner, the sending unit is configured to: send a notification message, the notification message carrying the micro-segment node segment identifier; or send a border network protocol link state message, the link The status message publishes the micro-segment node segment identifier; or sends a path calculation unit communication protocol message, and the path calculation unit communication protocol message carries the micro-segment node segment identifier.
第四方面,提供了一种第二网络设备,应用于段路由网络中,包括:In a fourth aspect, a second network device is provided, which is applied to a segment routing network, including:
接收单元,用于接收第一数据报文;处理单元,用于根据所述第一数据报文确定第一微分段段标识,所述第一微分段段标识用于标识所述段路由网络中的第二网络设备的一个微分段,所述第一数据报文不包括所述第一微分段段标识,所述第一数据报文为发送向所述第二网络设备的数据报文;所述处理单元,还用于根据所述第一微分段段标识确定对所述第一数据报文的处理动作;所述处理单元,还用于对所述第一数据报文执行所述处理动作。The receiving unit is configured to receive a first data message; the processing unit is configured to determine a first micro-segment segment identifier according to the first data message, and the first micro-segment segment identifier is used to identify the first micro-segment segment identifier in the segment routing network 2. A micro-segment of a network device, the first data message does not include the first micro-segmentation identifier, and the first data message is a data message sent to the second network device; the processing unit And is further configured to determine a processing action on the first data packet according to the first micro-segmentation segment identifier; the processing unit is further configured to perform the processing action on the first data packet.
在一种可能的方式中,所述处理单元还用于根据所述第一微分段段标识确定对所述第一数据报文的处理动作,具体为:所述处理单元,用于根据所述第一微分段段标识和所述处理动作的对应关系,确定对所述第一数据报文的处理动作。In a possible manner, the processing unit is further configured to determine a processing action on the first data packet according to the first micro-segmentation identifier, specifically: the processing unit is configured to perform processing according to the first micro-segmentation identifier. The corresponding relationship between a micro-segmentation identifier and the processing action determines the processing action for the first data packet.
在一种可能的方式中,所述第一微分段段标识包括功能部分,所述功能部分用于指示:所述第二网络设备根据所述第一微分段段标识确定对所述第一数据报文的处理动作。In a possible manner, the first micro-segmentation segment identifier includes a functional part, and the functional part is used to indicate: the second network device determines that the first data packet is processed according to the first micro-segmentation segment identifier. Processing actions.
在一种可能的方式中,所述处理单元用于根据所述第一微分段段标识对所述第一数据报文执行处理动作,具体为:所述处理单元用于根据所述第一微分段段标识和第二微分段段标识执行所述处理动作,所述第二微分段段标识用于标识所述第二网络设备的一个微分段;所述处理单元还用于:根据所述接收第一数据报文确定所述第二微分段段标识。In a possible manner, the processing unit is configured to perform a processing action on the first data message according to the first micro-segmentation identifier, specifically: the processing unit is configured to perform a processing action according to the first micro-segmentation segment An identifier and a second micro-segment identifier to execute the processing action, the second micro-segment identifier is used to identify a micro-segment of the second network device; the processing unit is further used to: receive the first datagram according to the The text determines the identifier of the second micro-segmentation segment.
在一种可能的方式中,所述处理动作包括:转发、丢弃、标记、重定向或镜像。In a possible manner, the processing action includes: forwarding, discarding, marking, redirection, or mirroring.
在一种可能的方式中,所述第二网络设备还包括发送单元,当所述处理动作包括转发或标记时,所述处理单元还用于对所述第一数据报文执行所述处理动作,具体为:所述处理单元,用于根据所述第一数据报文生成第二数据报文,所述第二数据报文包括所述第一 微分段段标识;所述发送单元,用于向所述第二网络设备发送所述第二数据报文。In a possible manner, the second network device further includes a sending unit, and when the processing action includes forwarding or marking, the processing unit is further configured to perform the processing action on the first data packet , Specifically: the processing unit is configured to generate a second data message according to the first data message, the second data message includes the first micro-segment segment identifier; the sending unit is configured to The second network device sends the second data packet.
在一种可能的方式中,所述第二微分段段标识包括功能部分,所述功能部分用于指示:所述第一网络设备根据所述第二微分段段标识确定对所述第一数据报文的处理动作。In a possible manner, the second micro-segmentation segment identifier includes a functional part, and the functional part is used to indicate: the first network device determines that the first data packet is processed according to the second micro-segmentation segment identifier. Processing actions.
在一种可能的方式中,所述处理单元还包括发送单元,当所述处理动作包括转发或标记时,所述处理单元根据所述第一微分段段标识对所述第一数据报文执行处理动作,具体为:所述处理单元,用于根据所述第一数据报文生成第二数据报文,所述第二数据报文包括段标识列表,所述段标识列表包括所述第一微分段段标识;所述发送单元,用于向所述第一网络设备发送所述第二数据报文。In a possible manner, the processing unit further includes a sending unit, and when the processing action includes forwarding or marking, the processing unit performs processing on the first data packet according to the first micro-segmentation identifier The action is specifically: the processing unit is configured to generate a second data message according to the first data message, the second data message includes a segment identifier list, and the segment identifier list includes the first differential Segment identifier; the sending unit is configured to send the second data message to the first network device.
在一种可能的方式中,所述段标识列表还包括所述第二微分段段标识,或所述第二数据报文还包括元数据,所述元数据包括所述第二微分段段标识。In a possible manner, the segment identifier list further includes the second micro-segment segment identifier, or the second data message further includes metadata, and the metadata includes the second micro-segment segment identifier.
在一种可能的方式中,所述接收单元还用于接收第三网络设备的微分段节点段标识,所述微分段节点段标识用于指示所述第三网络设备根据所述第一微分段段标识对所述第一数据报文进行处理;所述段标识列表中还包括所述微分段节点段标识。In a possible manner, the receiving unit is further configured to receive a micro-segmentation node segment identifier of a third network device, and the micro-segmentation node segment identifier is used to instruct the third network device according to the first micro-segmentation segment The identifier processes the first data message; the segment identifier list also includes the micro-segment node segment identifier.
在一种可能的方式中,所述段标识列表携带在第二数据报文的段路由头或多协议标签交换MPLS标签栈中。In a possible manner, the segment identifier list is carried in the segment routing header of the second data packet or the multi-protocol label switching MPLS label stack.
在一种可能的方式中,所述第二数据报文的段路由头还包括携带标志,所述携带标志标识所述第二微分段段标识的携带方式。In a possible manner, the segment routing header of the second data message further includes a carrying flag, and the carrying flag identifies a carrying manner of the second micro-segment segment identifier.
在一种可能的方式中,所述接收单元还用于接收配置指令,从所述配置指令获得所述第二微分段段标识;或所述处理单元,还用于生成所述第二微分段节点段标识。In a possible manner, the receiving unit is further configured to receive a configuration instruction, and obtain the second micro-segment segment identifier from the configuration instruction; or the processing unit is further configured to generate the second micro-segment node Segment ID.
在一种可能的方式中,所述发送单元,用于发送通告报文,所述通告报文携带所述第二微分段段标识;或所述发送单元,用于发送边界网络协议链路状态报文,所述链路状态报文携带所述第二微分段段标识;或所述发送单元,用于发送路径计算单元通信协议报文,所述路径计算单元通信协议报文携带所述第二微分段段标识。In a possible manner, the sending unit is configured to send a notification message, the notification message carrying the second micro-segment identifier; or the sending unit is configured to send a border network protocol link status report The link state message carries the second micro-segment segment identifier; or the sending unit is configured to send a path calculation unit communication protocol message, and the path calculation unit communication protocol message carries the second differential Segment identifier.
在一种可能的方式中,所述处理单元还用于根据所述接收第一数据报文确定所述第二微分段段标识,具体为:所述处理单元,用于根据所述第一数据报文的源地址确定所述第二微分段段标识,或所述处理单元,用于根据接收所述第一数据报文的接口确定所述第二微分段段标识。In a possible manner, the processing unit is further configured to determine the second micro-segmentation identifier according to the received first data packet, specifically: the processing unit is configured to determine the second micro-segmentation segment identifier according to the first data packet The source address of the message determines the second micro-segmentation identifier, or the processing unit is configured to determine the second micro-segmentation identifier according to the interface through which the first data message is received.
在一种可能的方式中,所述处理单元用于根据所述第一数据报文确定第一微分段段标识,具体为:所述处理单元,用于根据所述第一数据报文的目的地址或区分服务编码点确定所述第一微分段段标识。In a possible manner, the processing unit is configured to determine the first micro-segment segment identifier according to the first data packet, specifically: the processing unit is configured to determine the first micro-segment segment identifier according to the destination address of the first data packet Or a differentiated service code point determines the first micro-segment segment identifier.
在一种可能的方式中,所述接收单元,还用于接收所述第二网络设备发送的通告报文中的所述第一微分段段标识;或所述接收单元,还用于接收控制器或路径计算单元发送的所述第一微分段段标识。In a possible manner, the receiving unit is further configured to receive the first micro-segment segment identifier in the notification message sent by the second network device; or the receiving unit is further configured to receive the controller Or the first micro-segment segment identifier sent by the path calculation unit.
第五方面,提供了一种第一网络设备,应用于段路由网络中,包括:通信接口、存储器和处理器;所述通信接口,用于接收第一数据报文,所述第一数据报文包括第一微分段段标识,所述第一微分段段标识用于标识所述段路由网络中的第二网络设备的一个微分段,所述第一数据报文是发送向所述第二网络设备的数据报文;所述处理器,用于根据所述第一微分段段标识确定对所述第一数据报文的处理动作;所述处理器对所述第一数据报文执行所述处理动作。In a fifth aspect, a first network device is provided, which is applied to a segment routing network, and includes: a communication interface, a memory, and a processor; the communication interface is configured to receive a first data packet, and the first data packet The message includes a first micro-segment segment identifier, the first micro-segment segment identifier is used to identify a micro-segment of a second network device in the segment routing network, and the first data message is sent to the second network device The data message; the processor is configured to determine a processing action on the first data message according to the first micro-segmentation segment identifier; the processor performs the processing action on the first data message .
在一种可能的方式中,所述处理器根据所述第一微分段段标识确定对所述第一数据报文的处理动作,包括:所述处理器根据所述第一微分段段标识和所述处理动作的对应关系,确定对所述第一数据报文的处理动作。In a possible manner, the processor determining the processing action of the first data packet according to the first micro-segment identifier includes: the processor according to the first micro-segment identifier and the The corresponding relationship of the processing actions determines the processing action for the first data packet.
在一种可能的方式中,所述第一网络设备和所述第二网络设备为同一网络设备,所述第一微分段段标识包括功能部分,在所述处理器根据所述第一微分段段标识确定对所述第一数据报文的处理动作之前,所述处理器还用于:确定所述功能部分用于指示:所述第一网络设备根据所述第一微分段段标识确定对所述第一数据报文的处理动作。In a possible manner, the first network device and the second network device are the same network device, the first micro-segmentation identifier includes a functional part, and the processor is configured according to the first micro-segmentation identifier Before determining the processing action for the first data packet, the processor is further configured to: determine that the functional part is used to instruct: the first network device determines to perform the processing of the first data packet according to the first micro-segmentation identifier A processing action of a data message.
在一种可能的方式中,所述第一数据报文还包括第二微分段段标识,所述第二微分段段标识用于标识所述段路由网络中的第三网络设备的一个微分段,所述处理器用于根据所述第一微分段段标识对所述第一数据报文执行处理动作,具体为:所述处理器,还用于根据所述第一微分段段标识和所述第二微分段段标识对所述第一数据报文执行处理动作。In a possible manner, the first data message further includes a second micro-segment segment identifier, and the second micro-segment segment identifier is used to identify a micro-segment of a third network device in the segment routing network, so The processor is configured to perform a processing action on the first data message according to the first micro-segmentation identifier, specifically: the processor is further configured to perform a processing action on the first data message according to the first micro-segmentation identifier and the second micro-segmentation identifier Identifies the execution of a processing action on the first data message.
在一种可能的方式中,所述第一数据报文的段标识列表中包括所述第一微分段段标识。In a possible manner, the segment identifier list of the first data packet includes the first micro-segment segment identifier.
在一种可能的方式中,所述段标识列表中还包括所述第二微分段段标识,或所述第一数据报文还包括元数据,所述元数据包括所述第二微分段段标识。In a possible manner, the segment identifier list further includes the second micro-segment segment identifier, or the first data message further includes metadata, and the metadata includes the second micro-segment segment identifier.
在一种可能的方式中,所述段标识列表携带在第二数据报文的段路由头或多协议标签交换MPLS标签栈中。In a possible manner, the segment identifier list is carried in the segment routing header of the second data packet or the multi-protocol label switching MPLS label stack.
在一种可能的方式中,所述第一数据报文的段路由头还包括携带标志,所述携带标志标识所述第二微分段段标识的携带方式。In a possible manner, the segment routing header of the first data message further includes a carrying flag, and the carrying flag identifies a carrying manner of the second micro-segment segment identifier.
在一种可能的方式中,所述处理动作包括:转发、丢弃、标记、重定向或镜像。In a possible manner, the processing action includes: forwarding, discarding, marking, redirection, or mirroring.
在一种可能的方式中,所述第二网络设备和所述第一网络设备为同一台设备。In a possible manner, the second network device and the first network device are the same device.
在一种可能的方式中,所述通信接口,还用于发送通告报文,所述通告报文携带所述第一微分段段标识;或所述通信接口,还用于发送边界网络协议链路状态报文,所述链路状态报文携带所述第一微分段段标识;或所述通信接口,还用于发送路径计算单元通信协议报文,所述路径计算单元通信协议报文携带所述第一微分段段标识。In a possible manner, the communication interface is also used to send a notification message, the notification message carrying the first micro-segment identifier; or the communication interface is also used to send a border network protocol link Status message, the link status message carries the first micro-segment identifier; or the communication interface is also used to send a path calculation unit communication protocol message, the path calculation unit communication protocol message carries the The first micro-segment segment identifier.
在一种可能的方式中,当所述处理动作包括转发或标记时,所述处理器,用于根据所述第一微分段段标识对所述第一数据报文执行处理动作,具体为:所述处理器,用于剥离所述第一数据报文中的段标识列表,得到第二数据报文;当所述处理器确定所述第二微分段段标识携带在所述元数据中时,所述处理器,还用于剥离所述第一数据报文中的所述元数据,得到所述第二数据报文;所述通信接口,还用于发送所述第二数据报文。In a possible manner, when the processing action includes forwarding or marking, the processor is configured to perform a processing action on the first data packet according to the first micro-segmentation segment identifier, specifically: The processor is configured to strip the list of segment identifiers in the first data message to obtain a second data message; when the processor determines that the second micro-segment segment identifier is carried in the metadata, The processor is further configured to strip the metadata in the first data message to obtain the second data message; the communication interface is also configured to send the second data message.
在一种可能的方式中,所述第二网络设备和所述第一网络设备为不同的设备。In a possible manner, the second network device and the first network device are different devices.
在一种可能的方式中,所述第一数据报文还包括微分段节点段标识,所述微分段节点段标识为所述第一网络设备的段标识,所述微分段节点段标识用于指示所述第一网络设备根据所述第一微分段段标识对所述第一数据报文进行处理。In a possible manner, the first data message further includes a micro-segment node segment identifier, the micro-segment node segment identifier is the segment identifier of the first network device, and the micro-segment node segment identifier is used for Instruct the first network device to process the first data packet according to the first micro-segmentation identifier.
在一种可能的方式中,所述通信接口,还用于发送通告报文,所述通告报文携带所述微分段节点段标识;或所述通信接口,还用于发送边界网络协议链路状态报文,所述链路状态报文发布所述微分段节点段标识;或所述通信接口,还用于发送路径计算单元通信协议报文,所述路径计算单元通信协议报文携带所述微分段节点段标识。In a possible manner, the communication interface is also used to send a notification message, the notification message carrying the micro-segment node segment identifier; or the communication interface is also used to send a border network protocol link Status message, the link status message advertises the micro-segment node segment identifier; or the communication interface is also used to send a path calculation unit communication protocol message, the path calculation unit communication protocol message carries the Micro-segment node segment identifier.
第六方面,提供了一种第二网络设备,所述第二网络设备应用于段路由网络中,包括: 通信接口、存储器、处理器;所述通信接口用于接收第一数据报文;所述处理器用于根据所述第一数据报文确定第一微分段段标识,所述第一微分段段标识用于标识所述段路由网络中的第二网络设备的一个微分段,所述第一数据报文不包括所述第一微分段段标识,所述第一数据报文为发送向所述第二网络设备的数据报文;所述处理器还用于根据所述第一微分段段标识确定对所述第一数据报文的处理动作;所述处理器还用于对所述第一数据报文执行所述处理动作。In a sixth aspect, a second network device is provided. The second network device is applied to a segment routing network and includes: a communication interface, a memory, and a processor; the communication interface is used to receive a first data packet; The processor is configured to determine a first micro-segment segment identifier according to the first data message, and the first micro-segment segment identifier is used to identify a micro-segment of a second network device in the segment routing network, and the first data The message does not include the first micro-segmentation segment identifier, and the first data message is a data message sent to the second network device; the processor is further configured to determine a pair according to the first micro-segmentation segment identifier. Processing action of the first data packet; the processor is further configured to perform the processing action on the first data packet.
在一种可能的方式中,所述处理器用于根据所述第一微分段段标识确定对所述第一数据报文的处理动作,具体为:所述处理器根据所述第一微分段段标识和所述处理动作的对应关系,确定对所述第一数据报文的处理动作。In a possible manner, the processor is configured to determine a processing action on the first data packet according to the first micro-segmentation identifier, specifically: the processor is configured to determine the processing action of the first data packet according to the first micro-segmentation identifier and The corresponding relationship between the processing actions determines the processing action on the first data packet.
在一种可能的方式中,所述处理器用于根据所述第一微分段段标识对所述第一数据报文执行处理动作,具体为:所述处理器根据所述第一微分段段标识和第二微分段段标识执行所述处理动作,所述第二微分段段标识用于标识所述第二网络设备的一个微分段;所述处理器还具体用于:根据所述接收第一数据报文确定所述第二微分段段标识。In a possible manner, the processor is configured to perform a processing action on the first data message according to the first micro-segment identifier, specifically: the processor is configured to perform a processing action on the first data message according to the first micro-segment identifier and the first micro-segment identifier. The second micro-segment segment identifier executes the processing action, and the second micro-segment segment identifier is used to identify a micro-segment of the second network device; the processor is further specifically configured to: determine according to the received first data packet The second micro-segmentation segment identifier.
在一种可能的方式中,所述通信接口,还用于接收所述第二网络设备发送的通告报文,所述处理器,还用于从所述通告报文中获得所述第一微分段段标识;或所述通信接口,还用于接收控制器或路径计算单元发送的控制报文,所述处理器,还用于从所述控制报文中获得所述第一微分段段标识。In a possible manner, the communication interface is further configured to receive a notification message sent by the second network device, and the processor is further configured to obtain the first differential from the notification message. Segment identifier; or the communication interface is further configured to receive a control message sent by a controller or a path calculation unit, and the processor is further configured to obtain the first micro-segment segment identifier from the control message.
在一种可能的方式中,所述处理动作包括:转发、丢弃、标记、重定向或镜像。In a possible manner, the processing action includes: forwarding, discarding, marking, redirection, or mirroring.
在一种可能的方式中,当所述处理动作包括转发或标记时,所述处理器,用于根据所述第一微分段段标识对所述第一数据报文执行处理动作,具体为:所述处理器,用于根据所述第一数据报文生成第二数据报文,所述第二数据报文包括段标识列表,所述段标识列表包括所述第一微分段段标识;所述通信接口,用于向所述第一网络设备发送所述第二数据报文。In a possible manner, when the processing action includes forwarding or marking, the processor is configured to perform a processing action on the first data packet according to the first micro-segmentation segment identifier, specifically: The processor is configured to generate a second data message according to the first data message, the second data message including a segment identifier list, and the segment identifier list includes the first micro-segment segment identifier; the communication The interface is used to send the second data packet to the first network device.
在一种可能的方式中,所述段标识列表还包括所述第二微分段段标识,或所述第二数据报文还包括元数据,所述元数据包括所述第二微分段段标识。In a possible manner, the segment identifier list further includes the second micro-segment segment identifier, or the second data message further includes metadata, and the metadata includes the second micro-segment segment identifier.
在一种可能的方式中,所述段标识列表携带在第二数据报文的段路由头或多协议标签交换MPLS标签栈中。In a possible manner, the segment identifier list is carried in the segment routing header of the second data packet or the multi-protocol label switching MPLS label stack.
在一种可能的方式中,所述第二数据报文的段路由头还包括携带标志,所述携带标志标识所述第二微分段段标识的携带方式。In a possible manner, the segment routing header of the second data message further includes a carrying flag, and the carrying flag identifies a carrying manner of the second micro-segment segment identifier.
在一种可能的方式中,所述处理器,还用于获得第三网络设备的微分段节点段标识,所述微分段节点段标识用于指示所述第三网络设备根据所述第一微分段段标识对所述第一数据报文进行处理;所述段标识列表中还包括所述微分段节点段标识。In a possible manner, the processor is further configured to obtain a micro-segment node segment identifier of a third network device, and the micro-segment node segment identifier is used to instruct the third network device to perform the identification according to the first differential The segment identifier processes the first data message; the segment identifier list also includes the micro-segment node segment identifier.
在一种可能的方式中,所述通信接口,用于接收配置指令,所述处理器,用于从所述配置指令获得所述第二微分段段标识;或所述处理器,用于生成所述第二微分段节点段标识。In a possible manner, the communication interface is configured to receive a configuration instruction, and the processor is configured to obtain the second micro-segment segment identifier from the configuration instruction; or the processor is configured to generate the The second micro-segment node segment identifier.
在一种可能的方式中,所述发送单元,用于发送通告报文,所述通告报文携带所述第二微分段段标识;或所述发送单元,用于发送边界网络协议链路状态报文,所述链路状态报文携带所述第二微分段段标识;或所述发送单元,用于发送路径计算单元通信协议报文, 所述路径计算单元通信协议报文携带所述第二微分段段标识。In a possible manner, the sending unit is configured to send a notification message, the notification message carrying the second micro-segment identifier; or the sending unit is configured to send a border network protocol link status report The link state message carries the second micro-segment segment identifier; or the sending unit is configured to send a path calculation unit communication protocol message, and the path calculation unit communication protocol message carries the second differential Segment identifier.
上述第六方面的各种可能的实现方式之间,以及第六方面的各种可能的实现方式和上述第六方面之间,可合理组合。The foregoing various possible implementation manners of the sixth aspect, and the various possible implementation manners of the sixth aspect and the foregoing sixth aspect may be reasonably combined.
第七方面,提供一种网络设备,所述网络设备包括:主控板和接口板,进一步,还可以包括交换网板。所述网络设备用于执行第一方面或第一方面的任意可能的实现方式中的方法。具体地,所述网络设备包括用于执行第一方面或第一方面的任意可能的实现方式中的方法的模块。In a seventh aspect, a network device is provided. The network device includes a main control board and an interface board, and further, may also include a switching network board. The network device is used to execute the first aspect or the method in any possible implementation manner of the first aspect. Specifically, the network device includes a module for executing the method in the first aspect or any possible implementation of the first aspect.
第八方面,提供一种网络设备,所述网络设备包括:主控板和接口板,进一步,还可以包括交换网板。所述网络设备用于执行第二方面或第二方面的任意可能的实现方式中的方法。具体地,所述网络设备包括用于执行第二方面或第二方面的任意可能的实现方式中的方法的模块。In an eighth aspect, a network device is provided. The network device includes a main control board and an interface board, and further, may also include a switching network board. The network device is used to execute the second aspect or the method in any possible implementation manner of the second aspect. Specifically, the network device includes a module for executing the second aspect or the method in any possible implementation manner of the second aspect.
第九方面,提供了一种网络系统,所述网络系统包括第一网络设备和第二网络设备,所述第一网络设备为上述第三方面或第五方面任一种可选方式所提供的第一网络设备,所述第一网络设备为上述第四方面或第六方面任一种可选方式所提供的第二网络设备。In a ninth aspect, a network system is provided. The network system includes a first network device and a second network device. The first network device is provided by any one of the optional methods of the third aspect or the fifth aspect. A first network device, where the first network device is a second network device provided in any optional manner of the fourth aspect or the sixth aspect.
第十方面,提供了一种计算机可读存储介质,所述存储介质中存储有至少一条指令,所述指令由处理器加载并执行如第一方面以及第一方面的任一种可选方式所提供的数据报文的处理方法,或如第二方面以及第二方面的任一种可选方式所提供的数据报文的处理方法。In a tenth aspect, a computer-readable storage medium is provided, and at least one instruction is stored in the storage medium. The instruction is loaded and executed by a processor as described in the first aspect and any one of the optional manners of the first aspect. The provided data packet processing method, or the data packet processing method provided in the second aspect and any one of the optional methods of the second aspect.
第十一方面,提供了一种计算机程序,所述计算机程序包括用于执行上述第一方面或第一方面任一种可选方式所述的方法。In an eleventh aspect, a computer program is provided, and the computer program includes a method for executing the foregoing first aspect or any one of the optional manners of the first aspect.
第十二方面,提供了一种计算机程序,所述计算机程序包括用于执行上述第二方面或第二方面任一种可选方式所述的方法。In a twelfth aspect, a computer program is provided, and the computer program includes a method for executing the above-mentioned second aspect or any one of the optional manners of the second aspect.
附图说明Description of the drawings
为了更清楚地说明本发明的技术方案,下面将对实施例中使用的附图作简单地介绍。显而易见地,下面附图只是本发明的一些实施例的附图,对于本领域普通技术人员来说,在不付出创造性劳动性的前提下,还可以根据这些附图获得同样能实现本发明的其他技术方案和附图。这些技术方案和附图也应该被认为是在本发明的范围之内。In order to explain the technical solution of the present invention more clearly, the drawings used in the embodiments will be briefly introduced below. Obviously, the following drawings are only drawings of some embodiments of the present invention. For those of ordinary skill in the art, without creative labor, other drawings that can also implement the present invention can also be obtained based on these drawings. Technical scheme and drawings. These technical solutions and drawings should also be considered within the scope of the present invention.
图1为本申请实施例中的一种网络系统的应用场景示意图;FIG. 1 is a schematic diagram of an application scenario of a network system in an embodiment of the application;
图2为本申请实施例中的一种应用场景的示意图;Figure 2 is a schematic diagram of an application scenario in an embodiment of the application;
图3a为本申请实施例提供的一种数据报文的处理方法流程图;FIG. 3a is a flowchart of a data packet processing method provided by an embodiment of the application;
图3b为本申请实施例提供的一种数据报文的处理方法流程图;FIG. 3b is a flowchart of a data packet processing method provided by an embodiment of the application;
图4a为本申请实施例提供的一种数据报文的处理方法流程图;FIG. 4a is a flowchart of a method for processing a data message provided by an embodiment of the application;
图4b为本申请实施例提供的一种数据报文的处理方法流程图;4b is a flowchart of a method for processing a data message provided by an embodiment of the application;
图5为本申请实施例提供的一种第一类型长度值TLV的示意图;FIG. 5 is a schematic diagram of a first type length value TLV provided by an embodiment of this application;
图6为本申请实施例提供的一种微分段段标识的组成示意图;FIG. 6 is a schematic diagram of the composition of a micro-segment segment identifier provided by an embodiment of this application;
图7为本申请实施例提供的一种段路由头的示意图;FIG. 7 is a schematic diagram of a segment routing header provided by an embodiment of the application;
图8为本申请实施例提供的一种元数据TLV的示意图;FIG. 8 is a schematic diagram of a metadata TLV provided by an embodiment of this application;
图9为本申请实施例提供的一种段路由头中的标志位示意图;FIG. 9 is a schematic diagram of a flag bit in a segment routing header provided by an embodiment of the application;
图10为本申请实施例提供的一种第二类型长度值TLV的示意图;FIG. 10 is a schematic diagram of a second type length value TLV provided by an embodiment of this application;
图11为本申请实施例提供的一种第二网络设备结构示意图;FIG. 11 is a schematic structural diagram of a second network device provided by an embodiment of this application;
图12为本申请实施例提供的一种第一网络设备结构示意图;FIG. 12 is a schematic structural diagram of a first network device provided by an embodiment of this application;
图13为本申请实施例提供的一种网络设备结构示意图;FIG. 13 is a schematic structural diagram of a network device provided by an embodiment of this application;
图14为本申请实施例提供的一种网络设备结构示意图;FIG. 14 is a schematic structural diagram of a network device provided by an embodiment of this application;
图15为本申请实施例提供的一种网络系统示意图。FIG. 15 is a schematic diagram of a network system provided by an embodiment of this application.
具体实施方式Detailed ways
为了使本技术领域的人员更好地理解本发明方案,下面结合附图和实施方式对本发明实施例作进一步的详细说明。In order to enable those skilled in the art to better understand the solution of the present invention, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings and implementation manners.
本申请中术语“第一”、“第二”、“第三”等字样用于对作用和功能基本相同的相同项或相似项进行区分,应理解,“第一”、“第二”、“第三”之间不具有逻辑或时序上的依赖关系,也不对数量和执行顺序进行限定。In this application, the terms "first", "second", "third" and other words are used to distinguish the same or similar items with basically the same function and function. It should be understood that "first", "second", There is no logical or timing dependency between the "third", nor does it limit the number and execution order.
以下,对本申请涉及的术语进行解释:The following explains the terms involved in this application:
段路由头(segment routing header,SRH):IPv6报文是由IPv6标准头+扩展头(0...n)+负载(Payload)组成。为了基于IPv6转发平面实现SRv6,新增加一种IPv6扩展头,称作SRH扩展头,该扩展头指定一个IPv6的显式路径,存储的是IPv6的Segment List信息,其作用与SR MPLS里的Segment List一样。头节点在IPv6报文增加一个SRH扩展头,中间节点就可以按照SRH扩展头里包含的路径信息转发该IPv6报文。例如,在转发IPv6报文时,支持SRv6的网络设备会按照数据报文中的目的地址((Destination Address,DA),查询本地段标识表(local SID table),当数据报文的目的地址与本地段标识表中的任一SID匹配时,则按照本地段标识表中的SID相关的策略,执行该策略对应的操作。例如,该策略对应的操作可以将数据报文从SID所指定的出接口转发出去);如果数据报文的目的地址与本地段标识表中的每个SID均不匹配,则再查IPv6的路由转发表,按照IPv6的路由转发表进行最长匹配转发。Segment routing header (segment routing header, SRH): IPv6 packets are composed of IPv6 standard header + extended header (0...n) + payload (Payload). In order to implement SRv6 based on the IPv6 forwarding plane, a new IPv6 extension header is added, called the SRH extension header. The extension header specifies an explicit IPv6 path and stores IPv6 Segment List information. Its function is the same as the Segment in SR MPLS. Same as List. The head node adds an SRH extension header to the IPv6 message, and the intermediate node can forward the IPv6 message according to the path information contained in the SRH extension header. For example, when forwarding IPv6 packets, a network device that supports SRv6 will query the local segment identification table (local SID table) according to the destination address ((Destination Address, DA) in the data packet. When the destination address of the data packet is When any SID in the local segment identification table matches, the operation corresponding to the strategy is executed according to the SID-related strategy in the local segment identification table. For example, the operation corresponding to the strategy can export data packets from the SID specified Interface forwarding); if the destination address of the data message does not match each SID in the local segment identification table, the IPv6 routing and forwarding table is checked again, and the longest matching forwarding is performed according to the IPv6 routing and forwarding table.
头节点(Head Node):SR转发路径的起始节点,负责封装段标识。Head Node: The start node of the SR forwarding path, responsible for the encapsulation segment identification.
微分段段标识:一种段标识,用于标识段路由网络中的网络设备的微分段,对应一个端点组。微分段段标识指示发布该微分段段标识的网络设备执行根据微分段段标识或微分段进行报文处理的操作。Micro-segment segment identifier: a segment identifier used to identify the micro-segment of the network device in the segment routing network, corresponding to an endpoint group. The micro-segment identifier instructs the network device issuing the micro-segment identifier to perform the operation of processing the message according to the micro-segment identifier or the micro-segment.
微分段节点段标识:一种段标识,用于标识段路由网络中的网络设备。微分段节点段标识指示发布该微分段节点段标识的网络设备执行根据微分段段标识或微分段进行报文处理的操作。Micro-segment node segment identifier: a segment identifier used to identify network devices in a segment routing network. The micro-segment node segment identifier instructs the network device issuing the micro-segment node segment identifier to perform the operation of processing the message according to the micro-segment identifier or the micro-segment.
在一种可能的方式中,若需要在段路由网络中根据微分段来对报文进行处理,需要在段路由网络中的每台设备上都配置IP地址与微分段的关系,以及配置微分段对应的处理动作。例如,一个网络中包括网络设备1和网络设备2,网络设备1连接VM1,网络设备2连接VM2,网络设备1和网络设备2之间的网络为SR网络。当VM1向VM2发送数据报文A时,网络设备1收到该数据报文A,网络设备1需要先根据数据报文A中的目的地址(即VM2的地址)查表获取VM2的地址对应的微分段,然后再根据该微分段查表获得相应的处理动作(如修改优先级),然后将转发标记后的数据报文A给网络设备2,网络设备2也要执行和网络设备1类似的动作。有时网络设备1和网络设备2之间的中间设备也需要根据微分段执行类似的策略,会导致对很多设备的配置工作。并且,当有大量的数据报文在网络设备1和网络设备2 之间传递时,可能会涉及很多设备(包括网络设备1,网络设备2和中间设备)多次查表才能获得对这些数据报文的处理策略。在一些特殊的场景下,当存在多个网段的IP地址转换时,如:VM的IP地址为私网网段IP地址,段路由网络中的路由网络地址为公网IP地址时,则无法在段路由网络中的网络设备上配置微分段与IP地址的对应关系,无法根据微分段对数据报文进行处理。In a possible way, if you need to process packets based on micro-segmentation in the segment routing network, you need to configure the relationship between the IP address and the micro-segmentation on each device in the segment routing network, and configure the micro-segmentation Corresponding processing actions. For example, a network includes network device 1 and network device 2, network device 1 is connected to VM1, network device 2 is connected to VM2, and the network between network device 1 and network device 2 is an SR network. When VM1 sends data message A to VM2, network device 1 receives the data message A, and network device 1 first needs to look up the table according to the destination address in data message A (that is, the address of VM2) to obtain the address corresponding to VM2 Micro-segmentation, and then look up the table according to the micro-segmentation to obtain the corresponding processing actions (such as modifying the priority), and then forward the marked data message A to the network device 2, and the network device 2 should also perform similar to the network device 1. action. Sometimes the intermediate device between the network device 1 and the network device 2 also needs to execute a similar strategy according to the micro-segmentation, which will result in the configuration of many devices. In addition, when a large number of data packets are transmitted between network device 1 and network device 2, it may involve many devices (including network device 1, network device 2 and intermediate devices). Text processing strategy. In some special scenarios, when there are multiple network segment IP address translations, such as: VM IP address is a private network segment IP address, and the routing network address in the segment routing network is a public network IP address, it cannot be The corresponding relationship between micro-segmentation and IP address is configured on the network device in the segment routing network, and the data message cannot be processed according to the micro-segmentation.
以下,示例性介绍本申请的应用场景。参见图1,该图为本申请实施例的一种网络系统的应用场景的示意图。在图1所示的场景中,网络设备101、网络设备102、网络设备103、网络设备104属于同一个SR网络,其中,网络设备101、网络设备102、网络设备103、网络设备104可以为路由器设备,也可以为交换机或其他任意具备SR路由功能的设备,该设备的形态可以是实体装置设备,也可以是虚拟化的具备SR路由功能的设备,本申请不做具体限定。Below, the application scenarios of this application are exemplarily introduced. Refer to FIG. 1, which is a schematic diagram of an application scenario of a network system according to an embodiment of the application. In the scenario shown in Figure 1, the network device 101, the network device 102, the network device 103, and the network device 104 belong to the same SR network. Among them, the network device 101, the network device 102, the network device 103, and the network device 104 may be routers. The device may also be a switch or any other device with SR routing function. The form of the device may be a physical device device or a virtualized device with SR routing function, which is not specifically limited in this application.
本领域技术人员可以知晓,该应用场景中的网络设备的数量可以更多或更少。比如上述网络设备可以为几十个或几百个,或者更多数量。本申请实施例对网络设备的数量和设备类型不加以限定。Those skilled in the art may know that the number of network devices in this application scenario may be more or less. For example, the number of the above-mentioned network devices may be dozens or hundreds, or more. The embodiments of this application do not limit the number and device types of network devices.
在图1所示的场景中,网络设备101与虚拟机(virtual machine,VM)1、VM2、VM3和VM4相连,同时,网络设备101还与网络设备102和网络设备104相连;网络设备102与网络设备101和网络设备103相连;网络设备104与网络设备101和网络设备103相连;网络设备103与VM5、VM6、VM7和VM8相连,同时,网络设备103还与网络设备102和网络设备104相连。其中,VM1和VM2属于同一个EPG:EPG1,VM3和VM4属于同一个EPG:EPG2,VM5和VM6属于同一个EPG:EPG3,VM7和VM8属于同一个EPG:EPG4。In the scenario shown in FIG. 1, the network device 101 is connected to virtual machines (VM) 1, VM2, VM3, and VM4. At the same time, the network device 101 is also connected to the network device 102 and the network device 104; the network device 102 is connected to Network device 101 is connected to network device 103; network device 104 is connected to network device 101 and network device 103; network device 103 is connected to VM5, VM6, VM7, and VM8, while network device 103 is also connected to network device 102 and network device 104 . Among them, VM1 and VM2 belong to the same EPG: EPG1, VM3 and VM4 belong to the same EPG: EPG2, VM5 and VM6 belong to the same EPG: EPG3, VM7 and VM8 belong to the same EPG: EPG4.
该网络运行有SR协议:该网络即可以是SR-MPLS网络,也可以是SRv6网络。在图1所示的场景中,网络设备101与网络设备103均支持SR,网络设备102和网络设备104可支持SR,也可以不支持SR。The network runs with the SR protocol: the network can be either an SR-MPLS network or an SRv6 network. In the scenario shown in FIG. 1, both the network device 101 and the network device 103 support SR, and the network device 102 and the network device 104 may or may not support SR.
可选地,该应用场景中还可以包括控制器或路径计算单元,该控制器或路径计算单元可通过无线网络或有线网络与每个网络设备相连,该控制器或路径计算单元可以用于为需要在该段路由网络中转发的数据报文确定对应的转发路径。该控制器或路径计算单元可以是一台服务器、多台服务器、云计算平台和虚拟化中心中的至少一种。当控制器是多台时,可以存在至少两台控制器用于提供不同的服务,和/或存在至少两台控制器用于提供相同的服务,比如以负载均衡方式提供同一种服务,本实施例对此不做具体限定。Optionally, the application scenario may also include a controller or a path calculation unit. The controller or path calculation unit may be connected to each network device through a wireless network or a wired network. The controller or path calculation unit may be used for The data packets that need to be forwarded in this segment of the routing network determine the corresponding forwarding path. The controller or path calculation unit may be at least one of a server, multiple servers, a cloud computing platform, and a virtualization center. When there are multiple controllers, there may be at least two controllers used to provide different services, and/or there may be at least two controllers used to provide the same service, for example, to provide the same service in a load balancing manner. This is not specifically limited.
本领域技术人员应理解,图1所示的场景并未限定网络设备101、网络设备103与其对应的VM的具体连接方式,他们可以是直接相连,也可以是通过其他网络设备,如交换机、防火墙等设备与对应的VM相连,这些其他网络设备不属于该SR网络,即不运行相应的SR功能。如图2所示,网络设备101通过网络设备201与VM1和VM3相连,网络设备101通过网络设备202与VM2和VM4相连。网络设备103通过网络设备203与VM5和VM6相连,网络设备103通过网络设备204与VM7和VM8相连。体现在网络设备101和网络设备103上,其为端点组划分对应的微分段的方式不限定于具体的连接方式,即不仅可以按照他们自身的物理或虚拟接口来进行微分段的划分,也可以基于最终端点组的特征,如IP地址,或区分服务编码点(differentiated services code point,DSCP),或两者的结合或更多的特征等来进行微分段的划分。Those skilled in the art should understand that the scenario shown in FIG. 1 does not limit the specific connection mode between the network device 101 and the network device 103 and their corresponding VMs. They can be directly connected or through other network devices, such as switches and firewalls. When the device is connected to the corresponding VM, these other network devices do not belong to the SR network, that is, do not run the corresponding SR function. As shown in FIG. 2, the network device 101 is connected to VM1 and VM3 through the network device 201, and the network device 101 is connected to VM2 and VM4 through the network device 202. The network device 103 is connected to VM5 and VM6 through the network device 203, and the network device 103 is connected to VM7 and VM8 through the network device 204. Reflected on the network device 101 and the network device 103, the way it divides the corresponding micro-segmentation for the endpoint group is not limited to the specific connection mode, that is, not only can the micro-segmentation be divided according to their own physical or virtual interfaces, but also The micro-segmentation is divided based on the characteristics of the final endpoint group, such as IP address, or differentiated services code point (DSCP), or a combination of the two or more features.
参见图3a,该图为本申请实施例提供的一种数据报文的处理方法流程图。如图3a所示,该方法的交互主要包括第一网络设备和第二网络设备。其中,第二网络设备可以为数据报文在该分段路由网络中的转发路径的头节点,第一网络设备可以是该转发路径中的尾节点。应用于图1所示的应用场景,网络设备101和网络设备103可分别为该第二网络设备和第一网络设备。Refer to FIG. 3a, which is a flowchart of a data packet processing method provided by an embodiment of the application. As shown in Figure 3a, the interaction of this method mainly includes a first network device and a second network device. The second network device may be the head node of the forwarding path of the data packet in the segment routing network, and the first network device may be the tail node of the forwarding path. Applied to the application scenario shown in FIG. 1, the network device 101 and the network device 103 may be the second network device and the first network device, respectively.
以下,结合图1和图3a对该方法主要包括的步骤和可选方式进行讲解,为便于理解,以网络设备101作为第二网络设备,网络设备103作为第一网络设备为示例对本方法实施例进行示例性讲解。应理解,这仅是一种示例,本领域的技术人员也可以参考本实施例,做类似的替换、应用,本申请不再一一举例。In the following, the main steps and optional methods included in the method are explained in conjunction with FIG. 1 and FIG. 3a. For ease of understanding, the network device 101 is used as the second network device and the network device 103 is used as the first network device. Give an exemplary explanation. It should be understood that this is only an example, and those skilled in the art can also refer to this embodiment to make similar substitutions and applications, and this application will not give examples one by one.
该方法主要包括如下步骤:The method mainly includes the following steps:
S301:网络设备103发布第一微分段段标识。S301: The network device 103 issues the first micro-segmentation segment identifier.
微分段段标识对应网络设备的一个微分段,可以表示为End.XTEpg SID,End表示endpoint,意为端点;X表示crossing,意为三层交叉连接;T表示table lookup,意为查表;Epg表示endpoint group,意为端点组;SID意为段标识。微分段段标识可以满足IPv6地址或MPLS标签的格式。The micro-segment segment identifies a micro-segment corresponding to the network device, which can be expressed as End.XTEpg SID, End stands for endpoint, which means endpoint; X stands for crossing, which means three-layer cross connection; T stands for table lookup, which means table lookup; Epg stands for endpoint group, which means endpoint group; SID means segment identifier. The micro-segment identifier can meet the format of the IPv6 address or the MPLS label.
该第一微分段段标识对应网络设备103的一个微分段,在一个示例中,该微分段为EPG3,其对应的微分段段标识可为一个IPv6地址格式的值,该微分段对应的端点组包括VM5和VM6。本领域技术人员应理解,在此仅为示例,微分段EPG3对应的端点组也可以为VM5和VM7。微分段的划分可以基于具体的IP地址,IP前缀,以及应用或服务的具体要求进行划分,本申请不做具体限定。应理解,在一些情况下,该第一微分段段标识也可以对应网络设备103的多个微分段。The first micro-segment identifier corresponds to a micro-segment of the network device 103. In an example, the micro-segment is EPG3, and the corresponding micro-segment identifier may be a value in an IPv6 address format. The endpoint group corresponding to the micro-segment includes VM5. And VM6. Those skilled in the art should understand that this is only an example, and the endpoint groups corresponding to the micro-segment EPG3 may also be VM5 and VM7. The division of micro-segmentation can be based on specific IP addresses, IP prefixes, and specific requirements of applications or services, which are not specifically limited in this application. It should be understood that, in some cases, the first micro-segment segment identifier may also correspond to multiple micro-segments of the network device 103.
网络设备103发布第一微分段段标识的方式包括以下三种或更多的发布方式:The manner in which the network device 103 publishes the first micro-segment segment identifier includes the following three or more publishing methods:
方式一、网络设备103发送通告报文,该报文中携带有该第一微分段段标识。Manner 1: The network device 103 sends a notification message, which carries the first micro-segment segment identifier.
该通告报文可以为边界网关协议(Border Gateway Protocol,BGP)报文,也可以是边界网关协议以太网虚拟私有网络(Border Gateway Protocol Ethernet Virtual Private Network,BGP EVPN)报文,也可以是内部网关协议(Interior Gateway Protocol,IGP)报文,本申请不做具体限定。The notification message can be a Border Gateway Protocol (Border Gateway Protocol, BGP) message, or a Border Gateway Protocol Ethernet Virtual Private Network (Border Gateway Protocol Ethernet Virtual Private Network, BGP EVPN) message, or it can be an internal gateway. Protocol (Interior Gateway Protocol, IGP) messages are not specifically limited in this application.
可选的,该通告报文中的第一微分段段标识携带在其第一类型长度值(type length value,TLV)中,TLV是一种编码格式,主要通过类型(type)、长度(length)和值(value)这三种信息进行定义。该第一TLV的格式示意如图5所示。该图中的类型字段标识表示该第一TLV的类型,该类型字段的取值可以标识该第一TLV是用于发布End.XTEpg SID的TLV,该类型字段的取值可以是为发布微分段段标识新申请的类型,例如可以是90。长度字段的取值标识该第一TLV的长度。保留字段保留用于后续扩展,如可用于标识转发路径等。微分段段标识字段用于承载微分段段标识。Optionally, the first micro-segmentation segment identifier in the notification message is carried in its first type length value (TLV). TLV is an encoding format, mainly by type (type) and length (length). And value (value) these three kinds of information to define. The format of the first TLV is shown in FIG. 5. The type field identifier in the figure indicates the type of the first TLV, the value of the type field can identify that the first TLV is a TLV used to publish End.XTEpg SID, and the value of the type field can be for publishing micro-segment segments. Identifies the type of new application, for example, it can be 90. The value of the length field identifies the length of the first TLV. The reserved field is reserved for subsequent expansion, for example, it can be used to identify the forwarding path. The micro-segment segment identifier field is used to carry the micro-segment segment identifier.
方式二、网络设备103可以通过BGP链路状态协议(Border Gateway Protocol-link state,BGP-LS),发布第一微分段段标识。Manner 2: The network device 103 may issue the first micro-segment segment identifier through the BGP link state protocol (Border Gateway Protocol-link state, BGP-LS).
具体来讲,网络设备103可以通过BGP-LS,向控制器发送第一微分段段标识,控制器可以通过BGP-LS,接收网络设备103发送的第一微分段段标识,将第一微分段段标识发送至网络设备101。Specifically, the network device 103 may send the first micro-segment identifier to the controller through BGP-LS, and the controller may receive the first micro-segment identifier sent by the network device 103 and send the first micro-segment identifier through BGP-LS To the network device 101.
方式三、网络设备103可以通过路径计算单元通信协议(Path Computation Element Communication Protocol,PCEP),发布第一微分段段标识。Manner 3: The network device 103 may issue the first micro-segment segment identifier through the Path Computation Element Communication Protocol (PCEP).
具体来讲,网络设备103可以通过PCEP,向控制器或路径计算单元(path computation element,PCE)发送第一微分段段标识,控制器或PCE可以通过PCEP,接收网络设备103发送的第一微分段段标识,将第一微分段段标识发送至网络设备101。Specifically, the network device 103 may send the first micro-segment segment identifier to the controller or path calculation element (PCE) through the PCEP, and the controller or PCE may receive the first micro-segment segment sent by the network device 103 through the PCEP. Identification, sending the first micro-segment segment identification to the network device 101.
在网络设备103发布第一微分段段标识之前,网络设备103需要先获得第一微分段段标识。关于网络设备103如何得到微分段段标识,在一些可能的实施例中,可以由网络设备103自动分配至少一个微分段段标识,也可以人工配置至少一个微分段段标识。具体地,得到微分段段标识的方式可以包括下述方式一或方式二中的任一项或多项。Before the network device 103 releases the first micro-segment segment identifier, the network device 103 needs to obtain the first micro-segment segment identifier. Regarding how the network device 103 obtains the micro-segment segment identifier, in some possible embodiments, the network device 103 may automatically assign at least one micro-segment segment identifier, or manually configure at least one micro-segment segment identifier. Specifically, the manner of obtaining the micro-segment segment identifier may include any one or more of the following manner 1 or manner 2.
方式一、网络设备103为对应的微分段或端点组分配微分段段标识。Manner 1: The network device 103 allocates a micro-segment segment identifier to the corresponding micro-segment or endpoint group.
在一个示例中,网络设备103可以为每个微分段或每个端点组分配一个微分段段标识,为不同的端点组/微分段分配的微分段段标识不同,使得分配的每一个微分段段标识对应一个微分段或一个端点组。在另一个示例中,网络设备103也可以为多个微分段或多个端点组分配分配同一个微分段段标识,使得分配的一个微分段段标识对应于多个微分段或多个端点组。其中,网络设备103可以存储有段标识空间,可以从段标识空间中选择未被占用的微分段段标识,将微分段段标识分配给微分段或端点组。In an example, the network device 103 may assign a micro-segment segment identifier to each micro-segment or each endpoint group. The micro-segment identifiers assigned to different endpoint groups/micro-segments are different, so that each micro-segment identifier assigned corresponds to one micro-segment identifier. Micro-segmentation or a group of endpoints. In another example, the network device 103 may also allocate the same micro-segment segment identifier to multiple micro-segments or multiple endpoint groups, so that the assigned micro-segment identifier corresponds to multiple micro-segments or multiple endpoint groups. Among them, the network device 103 may store a segment identification space, and can select an unoccupied micro-segment segment identifier from the segment identification space, and assign the micro-segment segment identifier to the micro-segment or endpoint group.
方式二、网络设备103接收配置指令,网络设备103从配置指令获取微分段段标识和1个或多个微分段或端点组的对应关系。其中,配置指令可以由用户在网络设备103上的配置操作触发,配置指令也可能由网管或者控制器(controller)触发。Manner 2: The network device 103 receives the configuration instruction, and the network device 103 obtains the corresponding relationship between the micro-segment segment identifier and one or more micro-segments or endpoint groups from the configuration instruction. Among them, the configuration instruction may be triggered by a user's configuration operation on the network device 103, and the configuration instruction may also be triggered by a network manager or a controller.
在一个示例中,应用于图1所示的场景,网络设备103得到的微分段段标识和微分段之间的对应关系可以如下表1所示。In an example, applied to the scenario shown in FIG. 1, the corresponding relationship between the micro-segmentation identifier and the micro-segmentation obtained by the network device 103 may be as shown in Table 1 below.
表1Table 1
微分段段标识Micro-segment identification 微分段标识Micro-segment identification
End.XTEpg SID3End.XTEpg SID3 EPG3EPG3
End.XTEpg SID4End.XTEpg SID4 EPG4EPG4
当网络设备103存在如表1所示的微分段段标识和微分段之间的对应关系时,则还存在微分段与端点组的对应关系,该端点组可以用端点设备的IP地址、端点组设备与网络设备103相连的接口、MAC地址等等信息进行定义。以下以采用端点设备的IP地址表示端点组进行示例:如VM5和VM6可以用同样的IP地址前缀A1::3:1/80表示,VM7和VM8可以用同样的IP地址前缀A1::3:2/80表示可以如下表2所示。When the network device 103 has the corresponding relationship between the micro-segment identification and the micro-segment as shown in Table 1, there is also a corresponding relationship between the micro-segment and the endpoint group. The endpoint group can use the IP address of the endpoint device, the endpoint group device The interface, MAC address, and other information connected to the network device 103 are defined. The following uses the IP address of the endpoint device to represent the endpoint group as an example: For example, VM5 and VM6 can be represented by the same IP address prefix A1::3:1/80, and VM7 and VM8 can be represented by the same IP address prefix A1::3: 2/80 means it can be shown in Table 2 below.
表2Table 2
微分段标识Micro-segment identification 端点组Endpoint group
EPG3EPG3 A1::3:1/80A1::3:1/80
EPG4EPG4 A1::3:2/80A1::3:2/80
上述表1和表2仅表示逻辑的概念,在实现时表1和表2可以合并为一张表。The above Table 1 and Table 2 only represent the concept of logic, and Table 1 and Table 2 can be combined into one table in implementation.
在另一个示例中,应用于图1所示的场景,网络设备103得到的微分段段标识和端点组之间的对应关系可以如下表3所示,在本示例中,该端点组通过端点组设备与网络设备103相连的接口进行定义,该接口可以为虚拟子接口,也可以为物理接口。以下以虚拟子 接口作为示例:End.XTEpg SID3对应于端点组EPG3,网络设备103与该端点组EPG3相连的接口为其虚接口1,其名称为vInf103-1;End.XTEpg SID4对应于端点组EPG4,网络设备103与该端点组EPG4相连的端口为其虚接口2,其名称为vInf103-2。In another example, applied to the scenario shown in FIG. 1, the corresponding relationship between the micro-segmentation identifier obtained by the network device 103 and the endpoint group can be shown in Table 3 below. In this example, the endpoint group passes through the endpoint group device The interface connected to the network device 103 is defined, and the interface may be a virtual sub-interface or a physical interface. The following takes the virtual sub-interface as an example: End.XTEpg SID3 corresponds to the endpoint group EPG3, and the interface between the network device 103 and the endpoint group EPG3 is virtual interface 1, and its name is vInf103-1; End.XTEpg SID4 corresponds to the endpoint group EPG4, the port that the network device 103 connects to the endpoint group EPG4 is its virtual interface 2, and its name is vInf103-2.
表3table 3
微分段段标识Micro-segment identification 端点组Endpoint group
End.XTEpg SID3End.XTEpg SID3 vInf103-1vInf103-1
End.XTEpg SID4End.XTEpg SID4 vInf103-2vInf103-2
在表3中,微分段段标识还可以作为一个微分段的标识,指示一个微分段。In Table 3, the micro-segment segment identifier can also be used as a micro-segment identifier to indicate a micro-segment.
应理解,以上仅为微分段段标识与微分段或者端点组的对应关系的示例,在具体实施过程中,可以基于以上多种方式,如根据IP前缀,或具体的IP地址的组合,或端点与网络设备相连的接口等等信息获得微分段段标识和微分段或端点组的对应关系。It should be understood that the above is only an example of the corresponding relationship between the micro-segment segment identifier and the micro-segment or endpoint group. In the specific implementation process, it can be based on the above methods, such as according to the IP prefix, or the combination of the specific IP address, or the endpoint and the endpoint group. Information such as the interface to which the network device is connected obtains the corresponding relationship between the micro-segment segment identifier and the micro-segment or endpoint group.
在一个SRv6的示例中,微分段段标识的具体取值包括以下两个部分:位置信息(Locator)以及功能(Function):SRv6 SID是IPv6地址的形式,SRv6 SID可以由位置信息和功能两部分组成,格式为:位置信息:功能。其中,位置信息占据IPv6地址的高比特位,功能占据IPv6地址的低比特位。其中,位置信息可以具有定位功能,可以在SR域唯一,功能代表设备的指令,这些指令由设备预先设定,功能部分用于指示SRv6 SID的生成设备执行相应的功能操作。In an SRv6 example, the specific value of the micro-segment identifier includes the following two parts: location information (Locator) and function (Function): SRv6 SID is the form of IPv6 address, SRv6 SID can be composed of two parts: location information and function , The format is: location information: function. Among them, the location information occupies the high bits of the IPv6 address, and the function occupies the low bits of the IPv6 address. Among them, the location information can have a positioning function and can be unique in the SR domain. The function represents the instructions of the device. These instructions are preset by the device. The function part is used to instruct the SRv6 SID generating device to perform corresponding functional operations.
图6示出了另一种SRv6微分段段标识的示例,在该示例中,该微分段段标识共为128比特,其分为3个部分,位置信息:功能:参数段,其中位置信息部分占据0-64高比特位,其功能部分占据中间比特位,指示该微分段段标识的生成设备如网络设备103执行对应的根据微分段段标识进行查表以确定该微分段段标识对应的报文的处理动作,并最终对该报文执行处理动作以及对应的段路由头的生成或其他相关操作,参数段部分可以定义一些报文的流和服务等信息。Figure 6 shows an example of another SRv6 micro-segment segment identifier. In this example, the micro-segment segment identifier has a total of 128 bits and is divided into 3 parts. Location information: function: parameter segment, where the location information part occupies 0 -64 high bits, the functional part occupies the middle bit, instructs the generating device of the micro-segment segment identifier, such as the network device 103, to perform corresponding processing actions of looking up the table according to the micro-segment segment identifier to determine the message corresponding to the micro-segment segment identifier, And finally perform processing actions on the message and the generation of the corresponding segment routing header or other related operations. The parameter segment part can define information such as the flow and service of some messages.
S303:网络设备101获得第一微分段段标识。S303: The network device 101 obtains the first micro-segmentation segment identifier.
对应于网络设备103发布第一微分段段标识的方式,网络设备101获得该第一微分段段标识的方式可以为以下两种可选方式:Corresponding to the manner in which the network device 103 issues the first micro-segment segment identifier, the manner in which the network device 101 obtains the first micro-segment segment identifier may be the following two optional methods:
方式一、网络设备101接收网络设备103发送的通告报文,该报文中携带有该第一微分段段标识。Manner 1: The network device 101 receives a notification message sent by the network device 103, and the message carries the first micro-segment identifier.
具体来说,当网络设备103通过BGP报文发送第一微分段段标识时,网络设备101接收到网络设备103发送的BGP报文,并从该报文中获得该第一微分段段标识;当网络设备103通过IGP报文发送第一微分段段标识,则网络设备101接收到网络设备103发送的IGP报文,并从该报文中获得该第一微分段段标识。Specifically, when the network device 103 sends the first micro-segment segment identifier through a BGP message, the network device 101 receives the BGP message sent by the network device 103, and obtains the first micro-segment segment identifier from the message; The device 103 sends the first micro-segment identifier through the IGP message, and the network device 101 receives the IGP message sent by the network device 103 and obtains the first micro-segment identifier from the message.
进一步来说,当该第一微分段段标识携带在BGP报文或IGP报文的第一TLV中时,网络设备101从该BGP报文或IGP报文的第一TLV中获得第一微分段段标识。Furthermore, when the first micro-segmentation segment identifier is carried in the first TLV of a BGP message or IGP message, the network device 101 obtains the first micro-segmentation segment identifier from the first TLV of the BGP message or IGP message .
方式二、网络设备101接收来自控制器或路径计算单元发送的第一微分段段标识。Manner 2: The network device 101 receives the first micro-segment segment identifier sent from the controller or the path calculation unit.
具体来讲,当网络设备103通过BGP-LS向控制器发送第一微分段段标识时,控制器可以通过BGP-LS协议,接收网络设备103发送的第一微分段段标识,并将第一微分段段标识发送至网络设备101。当网络设备103通过发送PCEP报文,向控制器或PCE发送第 一微分段段标识时,控制器或PCE可以接收网络设备103发送的第一微分段段标识,并将第一微分段段标识发送至网络设备101。上述控制器或PCE执行向网络设备101发送第一微分段段标识的时间可以是在接收到第一微分段段标识之后即发送,也可以是在一段时间,或当网络设备101向控制器或PCE请求一条转发路径的时候再发送给网络设备101。Specifically, when the network device 103 sends the first micro-segment segment identifier to the controller through BGP-LS, the controller can receive the first micro-segment segment identifier sent by the network device 103 through the BGP-LS protocol, and add the first micro-segment segment identifier to the first micro-segment segment. The identification is sent to the network device 101. When the network device 103 sends the first micro-segment segment identifier to the controller or PCE by sending a PCEP message, the controller or PCE can receive the first micro-segment segment identifier sent by the network device 103, and send the first micro-segment segment identifier to the network Equipment 101. The time when the controller or PCE executes sending the first micro-segment identifier to the network device 101 may be sent after receiving the first micro-segment identifier, or it may be within a period of time, or when the network device 101 requests the controller or PCE When there is a forwarding path, it is sent to the network device 101.
S305:网络设备101接收第一数据报文,并根据该第一数据报文确定第一微分段段标识,该第一数据报文中不包括第一微分段段标识。S305: The network device 101 receives the first data packet, and determines the first micro-segment segment identifier according to the first data packet, and the first data packet does not include the first micro-segment segment identifier.
在一个如图1所示的示例中,当VM1与VM5之间需要通信时,VM1会向VM5发送1个数据报文(即第一数据报文)。网络设备101接收到VM1发送的该第一数据报文后,可以根据该第一数据报文确定第一微分段段标识。In an example shown in FIG. 1, when communication between VM1 and VM5 is required, VM1 will send a data message (that is, the first data message) to VM5. After receiving the first data packet sent by VM1, the network device 101 may determine the first micro-segmentation segment identifier according to the first data packet.
网络设备101根据第一数据报文确定第一微分段段标识的方式包括:The manner in which the network device 101 determines the first micro-segment segment identifier according to the first data packet includes:
方式一、网络设备101根据第一数据报文的目的IP地址确定第一微分段段标识。如,网络设备101上可能存在如下表4所示的一个对应关系,则当该第一数据报文的目的IP地址为A1::3:1/80时,网络设备101根据匹配原则(例如是最长匹配原则),获得该第一微分段段标识为End.XTEpg SID3。Manner 1: The network device 101 determines the first micro-segment segment identifier according to the destination IP address of the first data packet. For example, there may be a corresponding relationship shown in Table 4 below on the network device 101, and when the destination IP address of the first data packet is A1::3:1/80, the network device 101 follows the matching principle (for example, Longest matching principle), the first micro-segment segment identifier is obtained as End.XTEpg SID3.
表4Table 4
目的IP前缀Destination IP prefix 微分段段标识Micro-segment identification
A1::3:1/80A1::3:1/80 End.XTEpg SID3End.XTEpg SID3
A1::3:2/80A1::3:2/80 End.XTEpg SID4End.XTEpg SID4
如表4所示的对应关系,可能是网络设备101根据获得的网络设备103发布的路由通告报文等信息迭代计算得到,也可能是网络设备101接收控制器或路径计算单元下发的转发路径规划信息而得到的。As shown in Table 4, the corresponding relationship may be calculated by the network device 101 iteratively based on information such as the route announcement message issued by the network device 103, or it may be the network device 101 receiving the forwarding path issued by the controller or the path calculation unit. Planning information.
方式二、网络设备101接收到该第一数据报文之后,向控制器或路径计算单元请求一条到达该数据报文的目的IP的转发路径。控制器或路径计算单元接收到该请求后,根据获得的网络拓扑或其他信息计算一条转发路径并下发给网络设备101。如,控制器或路径计算单元为网络设备101计算的VM1到VM5的转发路径为网络设备102->网络设备103,具体的段标识列表可为:End.SID102,End.XTEpg SID3。其中,End.SID102为网络设备102的段标识,End.XTEpg SID3为网络设备103的微分段段标识。网络设备101根据该转发路径确定第一微分段段标识为End.XTEpg SID3。Manner 2: After receiving the first data message, the network device 101 requests a forwarding path to the destination IP of the data message from the controller or the path calculation unit. After receiving the request, the controller or the path calculation unit calculates a forwarding path according to the obtained network topology or other information and sends it to the network device 101. For example, the forwarding path from VM1 to VM5 calculated by the controller or path calculation unit for the network device 101 is network device 102->network device 103, and the specific segment identifier list may be: End.SID102, End.XTEpg SID3. Among them, End.SID102 is the segment identifier of the network device 102, and End.XTEpg SID3 is the micro-segment segment identifier of the network device 103. The network device 101 determines that the first micro-segment segment identifier is End.XTEpg SID3 according to the forwarding path.
方式三、网络设备101根据该第一数据报文的区分服务编码点确定第一微分段段标识。Manner 3: The network device 101 determines the first micro-segmentation segment identifier according to the differentiated services code point of the first data packet.
S307:网络设备101根据第一微分段段标识确定对第一数据报文的处理动作。S307: The network device 101 determines a processing action on the first data packet according to the first micro-segmentation segment identifier.
在一种可能的方式中,该网络设备101可被配置为是否需要查找或执行处理策略,此处的处理策略也可以认为是一种对应关系,当该网络设备被配置为不需要查找或执行处理策略时,则该处理动作为转发第一数据报文,则网络设备101根据该配置,确定对第一数据报文的处理动作为转发。In a possible manner, the network device 101 can be configured to determine whether it needs to find or execute a processing strategy. The processing strategy here can also be considered as a correspondence. When the network device is configured to not need to find or execute In the processing strategy, the processing action is forwarding the first data packet, and the network device 101 determines that the processing action on the first data packet is forwarding according to the configuration.
在一种可能的方式中,该网络设备101可被配置为查找对第一数据报文的处理策略并根据处理策略来处理,因此在一种可能的实现方式中,该网络设备101在根据第一微分段段标识确定对第一数据报文的处理动作之前,所述网络设备101还需要获得处理策略,该处理策略中包括匹配条件和处理动作,在一种可能的实现方式中,该处理策略存储在网络 设备101的基于组的访问策略表项(group based policy,GBP)中。其中,匹配条件可以包括第一微分段段标识,即网络设备根据接收的数据报文确定第一微分段段标识,如上所述的第一微分段段标识End.XTEpg SID3。该处理策略中的处理动作包括以下一项或多项:转发、丢弃、标记、重定向和镜像。其中,标记为一种特殊的转发,即,网络设备在转发数据报文前,先对该数据报文进行标记。网络设备对数据报文可做的标记动作可包括,如重新标记该数据报文的DSCP,或修改该数据报文的优先级等。In a possible manner, the network device 101 may be configured to search for a processing strategy for the first data packet and process it according to the processing strategy. Therefore, in a possible implementation manner, the network device 101 is configured according to the first data packet. Before a micro-segment identifier determines a processing action on the first data packet, the network device 101 also needs to obtain a processing strategy. The processing strategy includes matching conditions and processing actions. In a possible implementation, the processing strategy It is stored in a group-based access policy entry (GBP) of the network device 101. Wherein, the matching condition may include the first micro-segment segment identifier, that is, the network device determines the first micro-segment segment identifier according to the received data message, the first micro-segment identifier End.XTEpg SID3 as described above. The processing actions in the processing strategy include one or more of the following: forwarding, discarding, marking, redirection, and mirroring. Wherein, marking is a special kind of forwarding, that is, the network device first marks the data message before forwarding the data message. The marking actions that a network device can perform on a data message may include, for example, remarking the DSCP of the data message, or modifying the priority of the data message.
网络设备获得处理策略包括如下方式:The network equipment acquisition processing strategy includes the following methods:
方式一、网络设备101接收处理策略指令,该指令可以是由网管系统、网络应用或是运维人员人工向网络设备配置的指令,网络设备101根据该处理策略指令保存该处理策略,该处理策略包括第一微分段段标识。Manner 1: The network device 101 receives a processing strategy instruction. The instruction may be an instruction manually configured to the network device by a network management system, network application, or operation and maintenance personnel. The network device 101 saves the processing strategy according to the processing strategy instruction. Including the first micro-segment segment identifier.
方式二、网络设备也可以不通过接收处理策略指令,而是在生产时即预置处理策略的方式,获得该处理策略。Method 2: The network device can also obtain the processing strategy by presetting the processing strategy during production instead of receiving the processing strategy instruction.
在一个示例中,网络设备101获得的处理策略如表5所示,网络设备101使用第一微分段段标识作为匹配条件,当网络设备101接收到的数据报文对应的第一微分段段标识为End.XTEpg SID3时,执行“标记”的处理动作,当网络设备接收到的数据报文对应的第一微分段段标识为End.XTEpg SID4时,执行“丢弃”的处理动作。在表5所示的处理动作仅为示例,处理动作对应的内容可以是一个处理动作标识,从而使得网络设备可以根据该处理动作标识进一步获取到对应的具体处理动作,该处理动作对应的内容也可以是一个具体的处理动作,如:remark dscp 40,表示,将符合条件的数据报文的DSCP修改为40。在一个示例中,该第一微分段段标识也可以被记为目的微分段段标识。In an example, the processing strategy obtained by the network device 101 is shown in Table 5. The network device 101 uses the first micro-segment identifier as the matching condition. When the first micro-segment identifier corresponding to the data packet received by the network device 101 is End When XTEpg SID3, the processing action of "marking" is executed, and when the first micro-segment segment identifier corresponding to the data message received by the network device is End.XTEpg SID4, the processing action of "discarding" is executed. The processing actions shown in Table 5 are only examples. The content corresponding to the processing action can be a processing action identifier, so that the network device can further obtain the corresponding specific processing action based on the processing action identifier, and the content corresponding to the processing action is also It can be a specific processing action, such as remark dscp 40, which means that the DSCP of the data packet that meets the condition is changed to 40. In an example, the first micro-segment segment identifier may also be recorded as the target micro-segment segment identifier.
表5table 5
微分段段标识Micro-segment identification 处理动作Processing action
End.XTEpg SID3End.XTEpg SID3 标记mark
End.XTEpg SID4End.XTEpg SID4 丢弃throw away
在一个示例中,网络设备101获得的处理策略如表6所示,网络设备101根据第一微分段段标识获得对应的微分段,如:从该微分段段标识的第64至第80比特位获得该微分段,并以该微分段作为匹配条件,当网络设备101接收到的数据报文对应的第一微分段段标识为End.XTEpg SID3时,根据该微分段段标识获得第一微分段为EPG3,执行“标记”的处理动作,当网络设备接收到的数据报文对应的第一微分段段标识为End.XTEpg SID4时,根据该微分段段标识获得第一微分段为EPG4,执行“丢弃”的处理动作。该第一微分段也可以被记为目的微分段或目的端点组。In an example, the processing strategy obtained by the network device 101 is as shown in Table 6. The network device 101 obtains the corresponding micro-segment according to the first micro-segment identifier, for example, obtains the micro-segment from the 64th to 80th bits of the micro-segment identifier. Micro-segmentation, and use the micro-segment as the matching condition. When the first micro-segment identifier corresponding to the data message received by the network device 101 is End.XTEpg SID3, the first micro-segment is obtained as EPG3 according to the micro-segment identifier, and execute The processing action of "marking". When the first micro-segment identifier corresponding to the data packet received by the network device is End.XTEpg SID4, the first micro-segment is obtained as EPG4 according to the micro-segment identifier, and the processing action of "discarding" is performed . The first micro-segment can also be recorded as a destination micro-segment or a destination endpoint group.
表6Table 6
Figure PCTCN2020105056-appb-000001
Figure PCTCN2020105056-appb-000001
Figure PCTCN2020105056-appb-000002
Figure PCTCN2020105056-appb-000002
可选的,该网络设备101还根据第二微分段段标识确定对该第一数据报文的处理策略。该第二微分段段标识指示网络设备101的一个微分段。在网络设备101还根据第二微分段段标识确定对第一数据报文的处理策略之前,该网络设备101需要先获得第二微分段段标识。关于网络设备101如何得到第二微分段段标识,与上述网络设备103获得微分段段标识的方式相似,在一些可能的实施例中,可以由网络设备101自动分配第二微分段段标识,也可以人工配置第二微分段段标识。具体地获得方式,参见上述网络设备103获得微分段段标识部分的方式一和方式二,在此不再赘述。Optionally, the network device 101 further determines a processing strategy for the first data packet according to the second micro-segmentation segment identifier. The second micro-segment segment identifier indicates a micro-segment of the network device 101. Before the network device 101 further determines the processing strategy for the first data packet according to the second micro-segmentation identifier, the network device 101 needs to obtain the second micro-segmentation identifier. Regarding how the network device 101 obtains the second micro-segment identifier, similar to the manner in which the network device 103 obtains the micro-segment identifier, in some possible embodiments, the network device 101 may automatically assign the second micro-segment identifier, or it may be manually configured. The second micro-segment segment identifier. For the specific obtaining method, refer to the above-mentioned mode 1 and mode 2 for the network device 103 to obtain the micro-segment segment identification part, which will not be repeated here.
在一个示例中,应用于图1所示的场景,网络设备101得到的微分段段标识和微分段之间的对应关系可以如下表7所示。In an example, applied to the scenario shown in FIG. 1, the corresponding relationship between the micro-segmentation identifier and the micro-segmentation obtained by the network device 101 may be as shown in Table 7 below.
表7Table 7
微分段段标识Micro-segment identification 微分段标识Micro-segment identification
End.XTEpg SID1End.XTEpg SID1 EPG1EPG1
End.XTEpg SID2End.XTEpg SID2 EPG2EPG2
当网络设备101存在如表1所示的微分段段标识和微分段之间的对应关系时,则还存在微分段与端点组的对应关系,该端点组可以用端点设备的IP地址、端点组设备与网络设备101相连的接口、MAC地址等等信息进行定义。以下以采用端点设备的IP地址表示端点组进行示例:如VM1和VM2可以用同样的IP地址前缀A1::1:1/80表示,VM3和VM4可以用同样的IP地址前缀A1::1:2/80表示可以如下表7所示。When the network device 101 has the corresponding relationship between the micro-segmentation identifier and the micro-segment as shown in Table 1, there is also a corresponding relationship between the micro-segment and the endpoint group. The endpoint group can use the IP address of the endpoint device, the endpoint group device The interface, MAC address, and other information connected to the network device 101 are defined. The following uses the IP address of the endpoint device to represent the endpoint group as an example: For example, VM1 and VM2 can be represented by the same IP address prefix A1::1:1/80, and VM3 and VM4 can be represented by the same IP address prefix A1::1: 2/80 means it can be shown in Table 7 below.
表8Table 8
微分段标识Micro-segment identification 端点组Endpoint group
EPG1EPG1 A1::1:1/80A1::1:1/80
EPG2EPG2 A1::1:2/80A1::1:2/80
在另一个示例中,应用于图1所示的场景,网络设备101得到的微分段段标识和端点组之间的对应关系可以如下表9所示,在本示例中,该端点组通过端点组设备与网络设备101相连的接口进行定义,该接口可以为虚拟子接口,也可以为物理接口。以下以虚拟子接口作为示例:End.XTEpg SID1对应于端点组EPG1,网络设备101与该端点组EPG1相连的接口为其虚接口1,其名称为vInf101-1;End.XTEpg SID2对应于端点组EPG2,网络设备101与该端点组EPG2相连的端口为其虚接口2,其名称为vInf101-2。In another example, applied to the scenario shown in FIG. 1, the corresponding relationship between the micro-segmentation identifier obtained by the network device 101 and the endpoint group can be shown in Table 9 below. In this example, the endpoint group passes through the endpoint group device The interface connected to the network device 101 is defined, and the interface may be a virtual sub-interface or a physical interface. The following takes the virtual sub-interface as an example: End.XTEpg SID1 corresponds to the endpoint group EPG1, and the interface between the network device 101 and the endpoint group EPG1 is virtual interface 1, and its name is vInf101-1; End.XTEpg SID2 corresponds to the endpoint group EPG2, the port that the network device 101 connects to the endpoint group EPG2 is its virtual interface 2, and its name is vInf101-2.
表9Table 9
微分段段标识Micro-segment identification 端点组Endpoint group
End.XTEpg SID1End.XTEpg SID1 vInf101-1vInf101-1
End.XTEpg SID2End.XTEpg SID2 vInf101-2vInf101-2
当微分段段标识和端点组的对应关系如表9所示时,微分段段标识还可以作为一个微分段的标识,指示一个微分段。When the corresponding relationship between the micro-segment segment identifier and the endpoint group is shown in Table 9, the micro-segment segment identifier can also be used as a micro-segment identifier to indicate a micro-segment.
应理解,以上仅为微分段段标识与微分段或者端点组的对应关系的示例,在具体实施过程中,可以基于以上多种方式,如根据IP前缀,或具体的IP地址的组合,或端点与网络设备相连的接口等等信息获得微分段段标识和微分段或端点组的对应关系。It should be understood that the above is only an example of the corresponding relationship between the micro-segment segment identifier and the micro-segment or endpoint group. In the specific implementation process, it can be based on the above methods, such as according to the IP prefix, or the combination of the specific IP address, or the endpoint and the endpoint group. Information such as the interface to which the network device is connected obtains the corresponding relationship between the micro-segment segment identifier and the micro-segment or endpoint group.
网络设备101接收到第一数据报文后,根据该接收到第一数据报文确定第二微分段段标识。对应于网络设备101上的微分段段标识与端点组的对应关系信息,网络设备101根据“接收到第一数据报文确定第二微分段段标识”包括以下一种或多种方式:After receiving the first data packet, the network device 101 determines the second micro-segmentation segment identifier according to the received first data packet. Corresponding to the correspondence information between the micro-segmentation segment identifier and the endpoint group on the network device 101, the network device 101 determines the second micro-segmentation segment identifier according to the "receiving the first data packet" including one or more of the following methods:
方式一、网络设备101根据该第一数据报文的源IP地址确定第二微分段段标识。如,当该第一数据报文为VM1发送的第一数据报文,且其源IP地址为A1::1:1时,则网络设备101根据表7所示对应关系中的端点组信息确认VM1属于端点组EPG1,并进一步根据表6所示的对应关系确定该端点组对应的微分段段标识为End.XTEpg SID1。Manner 1: The network device 101 determines the second micro-segment identifier according to the source IP address of the first data packet. For example, when the first data message is the first data message sent by VM1, and its source IP address is A1::1:1, the network device 101 confirms according to the endpoint group information in the correspondence relationship shown in Table 7. VM1 belongs to the endpoint group EPG1, and further determines the micro-segment identifier corresponding to the endpoint group as End.XTEpg SID1 according to the corresponding relationship shown in Table 6.
方式二、网络设备101根据接收该第一数据报文的接口确定第二微分段段标识。如,当网络设备101为从vInf101-1接收到的第一数据报文,如表9所示,则该网络设备101确定该第一数据报文对应的第二微分段段标识为End.XTEpg SID1。Manner 2: The network device 101 determines the second micro-segment identifier according to the interface through which the first data packet is received. For example, when the network device 101 is the first data packet received from vInf101-1, as shown in Table 9, the network device 101 determines that the second micro-segment segment identifier corresponding to the first data packet is End.XTEpg SID1 .
在网络设备101根据第二微分段段标识确定对该第一数据报文的处理策略之前,网络设备101还获得包括第二微分段段标识的处理策略。网络设备101获得包括第二微分段段标识的处理策略的方式与上述网络设备101获得包括第一微分段段标识的处理策略的方式相同,此处不再赘述。Before the network device 101 determines the processing strategy for the first data packet according to the second micro-segmentation identifier, the network device 101 also obtains the processing strategy that includes the second micro-segmentation identifier. The manner in which the network device 101 obtains the processing strategy including the second micro-segment segment identifier is the same as the manner in which the network device 101 obtains the processing strategy including the first micro-segment segment identifier, and will not be repeated here.
在一个示例中,网络设备101获得的处理策略如表10所示,该处理策略的匹配条件包括第二微分段段标识和第一微分段段标识,也可记为:源微分段段标识和目的微分段段标识。表10示出了2条处理策略,第一条处理策略表明,当网络设备101接收到的数据报文确定的第二微分段段标识和第一微分段段标识满足匹配条件:第二微分段段标识为End.XTEpg SID1、第一微分段段标识为End.XTEpg SID3时,则网络设备101对该数据报文执行处理动作:标记。第二条处理策略表明,当网络设备101接收到的数据报文确定的第二微分段段标识和第一微分段段标识满足匹配条件:第二微分段段标识为End.XTEpg SID1、第一微分段段标识为End.XTEpg SID2时,则网络设备101对该数据报文执行处理动作:丢弃。In an example, the processing strategy obtained by the network device 101 is shown in Table 10. The matching condition of the processing strategy includes the second micro-segment segment identifier and the first micro-segment segment identifier, which can also be recorded as: source micro-segment segment identifier and destination micro-segment segment identifier Logo. Table 10 shows two processing strategies. The first processing strategy indicates that when the second micro-segment identifier and the first micro-segment identifier determined by the data message received by the network device 101 meet the matching condition: the second micro-segment identifier is When End.XTEpg SID1, the first micro-segment segment identifier is End.XTEpg SID3, the network device 101 performs a processing action on the data packet: marking. The second processing strategy indicates that when the second micro-segment segment identifier and the first micro-segment segment identifier determined by the data message received by the network device 101 meet the matching condition: the second micro-segment segment identifier is End.XTEpg SID1, the first micro-segment segment identifier When it is End.XTEpg SID2, the network device 101 performs a processing action on the data message: discarding.
表10Table 10
第二微分段段标识The second micro-segment identifier 第一微分段段标识The first micro-segment identifier 处理动作Processing action
End.XTEpg SID1End.XTEpg SID1 End.XTEpg SID3End.XTEpg SID3 标记mark
End.XTEpg SID1End.XTEpg SID1 End.XTEpg SID4End.XTEpg SID4 丢弃throw away
在一个示例中,网络设备101获得的处理策略如表11所示,该处理策略的匹配条件包括第二微分段和第一微分段,也可记为:源微分段和目的微分段,或者记为:源端点组和目的端点组。表11示出了2条处理策略,第一条处理策略表明,第二微分段和第一微分段满足匹配条件:第二微分段为EPG1、第一微分段为EPG3时,则网络设备101对该数据报文执行处理动作:标记。第二条处理策略表明,当网络设备101接收到的数据报文确 定的第二微分段和第一微分段满足匹配条件:第二微分段为EPG1、第一微分段为EPG4时,则网络设备101对该数据报文执行处理动作:丢弃。In an example, the processing strategy obtained by the network device 101 is shown in Table 11. The matching condition of the processing strategy includes the second micro-segment and the first micro-segment, which can also be recorded as: the source micro-segment and the destination micro-segment, or They are: source endpoint group and destination endpoint group. Table 11 shows two processing strategies. The first processing strategy indicates that the second micro-segment and the first micro-segment meet the matching conditions: when the second micro-segment is EPG1 and the first micro-segment is EPG3, then the network device 101 pairs The data message performs a processing action: marking. The second processing strategy indicates that when the second micro-segment and the first micro-segment determined by the data message received by the network device 101 meet the matching condition: when the second micro-segment is EPG1 and the first micro-segment is EPG4, the network device 101 performs a processing action on the data message: discard.
当网络设备101接收到的数据报文确定的第二微分段段标识为End.XTEpg SID1时,网络设备101根据该第二微分段段标识确定的第二微分段为EPG1,当网络设备101接收到的数据报文确定的第一微分段段标识为End.XTEpg SID3时,网络设备101根据该第一微分段段标识确定的第一微分段为EPG3。则网络设备101根据该第二微分段和第一微分段确定的处理动作为标记。When the second micro-segment identifier determined by the data packet received by the network device 101 is End.XTEpg SID1, the second micro-segment identified by the network device 101 according to the second micro-segment identifier is EPG1. When the network device 101 receives When the first micro-segment identifier determined by the data packet is End.XTEpg SID3, the first micro-segment determined by the network device 101 according to the first micro-segment identifier is EPG3. Then, the processing action determined by the network device 101 according to the second micro-segment and the first micro-segment is a mark.
表11Table 11
第二微分段Second micro-segmentation 第一微分段First micro-segment 处理动作Processing action
EPG1EPG1 EPG3EPG3 标记mark
EPG1EPG1 EPG4EPG4 丢弃throw away
在网络设备101根据处理策略确定对数据报文的处理动作时,网络设备101可以对数据报文与匹配条件进行严格匹配或最长匹配。严格匹配表明,仅当数据报文完全满足该匹配条件时,才确定对该数据报文执行的处理动作。最长匹配表明,按照数据报文最长匹配的匹配条件,确定对该数据报文的处理动作,当存在多条匹配长度相等的处理策略时,可以执行第一条命中、或最后一条命中、或最高优先级命中的处理策略。When the network device 101 determines the processing action for the data message according to the processing strategy, the network device 101 can perform a strict match or the longest match between the data message and the matching condition. Strict matching indicates that the processing action to be performed on the data message is determined only when the data message completely meets the matching condition. The longest match indicates that the processing action of the data packet is determined according to the matching condition of the longest match of the data packet. When there are multiple processing strategies with the same matching length, the first hit or the last hit can be executed. Or the processing strategy of the highest priority hit.
网络设备101计算匹配长度的方法可以包括多个方式。如方式一、可以按照满足匹配条件的1个分支则为1个长度,如上表10所示的匹配条件含有2个分支,即匹配第二微分段段标识和匹配第一微分段段标识,则最长匹配长度为2。方式二、根据先匹配第一微分段段标识,再匹配第二微分段段标识,再匹配其他分支的条件进行匹配,每匹配一项,即匹配长度加1。The method for the network device 101 to calculate the matching length may include multiple methods. For example, if one branch meets the matching condition, the length is one. The matching condition shown in Table 10 above contains two branches, that is, matching the second micro-segment identifier and matching the first micro-segment identifier, the longest The matching length is 2. The second method is to match the first micro-segment segment identifier, then match the second micro-segment segment identifier, and then match the conditions of other branches. For each matching item, the matching length is increased by 1.
以下分别对严格匹配和最长匹配进行示例:如,当网络设备101中获得的处理策略如表10所示,当采用严格匹配时,则只有当网络设备101根据接收到的数据报文确定的第二微分段段标识以及第一微分段段标识为(End.XTEpg SID1,End.XTEpg SID3)或The following are examples of strict matching and longest matching: For example, when the processing strategy obtained in the network device 101 is as shown in Table 10, when strict matching is used, only when the network device 101 determines according to the received data packet The identifier of the second micro-segmentation segment and the identifier of the first micro-segmentation segment are (End.XTEpg SID1, End.XTEpg SID3) or
(End.XTEpg SID1,End.XTEpg SID4),即完全满足第一条处理策略的匹配条件或完全满足第二条处理策略的匹配条件时,才确定针对该数据报文的处理动作。如果仅匹配了如,第一微分段段标识为End.XTEpg SID3,则网络设备101认为不存在对该数据报文的处理动作,则网络设备101则执行默认的处理动作,如转发或丢弃。该默认的处理动作可以是在网络设备上配置的一条默认处理策略,也可以是该段路由网络中所有设备默认的处理策略。当采用最长匹配时,则当网络设备101根据接收到的数据报文确定的第二微分段段标识为End.XTEpg SID1和第一微分段段标识为End.XTEpg SID3时,则根据表9中的第一条处理策略,确认针对该数据报文的处理动作为标记,但是当网络设备101根据接收到的数据报文仅确定了第一微分段段标识为End.XTEpg SID3,而未获得第二微分段段标识,或获得的第二微分段段标识不为End.XTEpg SID1时,网络设备101仍可以确定对该数据报文匹配第一条处理策略,从而确定针对该数据报文的处理动作为标记。(End.XTEpg SID1, End.XTEpg SID4), that is, when the matching condition of the first processing strategy is fully satisfied or the matching condition of the second processing strategy is fully satisfied, the processing action for the data packet is determined. If it only matches, for example, the first micro-segment segment identifier is End.XTEpg SID3, the network device 101 considers that there is no processing action on the data packet, and the network device 101 executes a default processing action, such as forwarding or discarding. The default processing action may be a default processing strategy configured on the network device, or it may be the default processing strategy of all devices in the segment of the routing network. When the longest match is used, when the network device 101 determines the second micro-segmentation segment ID as End.XTEpg SID1 and the first micro-segmentation segment ID as End.XTEpg SID3 according to the received data message, according to the table 9 The first processing strategy is to confirm that the processing action for the data message is marked, but when the network device 101 only determines that the first micro-segment segment identifier is End.XTEpg SID3 according to the received data message, it does not obtain the second differential When the segment identifier or the obtained second micro-segment segment identifier is not End.XTEpg SID1, the network device 101 can still determine that the data packet matches the first processing strategy, thereby determining that the processing action for the data packet is a mark.
可选的,网络设备获得的处理策略还包括数据报文的发送方向,如数据报文的发送方向为流入(in),则表明该处理策略为针对该网络设备接收到的数据报文的处理策略;如数据报文的发送方向为流出(out),则表明该处理策略为针对该网络设备发送的数据报 文的处理策略。Optionally, the processing strategy obtained by the network device also includes the sending direction of the data packet. If the sending direction of the data packet is inflow (in), it indicates that the processing strategy is for the processing of the data packet received by the network device. Strategy; if the sending direction of the data message is out, it indicates that the processing strategy is a processing strategy for the data message sent by the network device.
在一种可能的方式中,当网络设备101还根据接收到的数据报文确定第二微分段段标识后,网络设备101可以仅根据第二微分段段标识确定对第一数据报文的处理动作。网络设备101根据第二微分段段标识确定对第一数据报文的处理动作的方法和可选方式与网络设备101仅根据第一微分段段标识确定对第一数据报文的处理动作的方法和可选方式相同,在此不再赘述。In a possible manner, after the network device 101 also determines the second micro-segment segment identifier according to the received data packet, the network device 101 may determine the processing action for the first data packet only according to the second micro-segment segment identifier. The method and optional manner for the network device 101 to determine the processing action on the first data packet according to the second micro-segmentation identifier are the same as the method and the optional manner for the network device 101 to determine the processing action for the first data packet based on the first micro-segmentation identifier only. The selection method is the same, so I won't repeat it here.
S308:网络设备101对第一数据报文执行确定的处理动作。S308: The network device 101 performs a determined processing action on the first data packet.
在S307中,当网络设备101根据该配置为不查找或执行处理策略,确定对第一数据报文的处理动作为转发时,执行S309。In S307, when the network device 101 determines that the processing action on the first data packet is forwarding according to the configuration to not search or execute the processing policy, S309 is executed.
在S307中,当网络设备101根据配置,查找第一数据报文的处理策略并根据处理策略来处理时,则根据确定的处理动作,执行以下步骤之一:In S307, when the network device 101 searches for the processing strategy of the first data packet according to the configuration and processes it according to the processing strategy, it performs one of the following steps according to the determined processing action:
当网络设备101确定的对第一数据报文的处理动作为丢弃时,网络设备101丢弃第一数据报文,结束流程。When the processing action for the first data packet determined by the network device 101 is discard, the network device 101 discards the first data packet and ends the process.
当网络设备101确定的对第一数据报文的处理动作为镜像时,网络设备101向指定的地址镜像该第一数据报文,结束流程。When the network device 101 determines that the processing action on the first data packet is mirroring, the network device 101 mirrors the first data packet to the designated address, and the process ends.
当网络设备101确定的对第一数据报文的处理动作为重定向时,网络设备101更改该第一数据报文的转发目的地址,结束流程。When the network device 101 determines that the processing action for the first data packet is redirection, the network device 101 changes the forwarding destination address of the first data packet, and ends the process.
当网络设备101确定的处理动作为转发或标记时,执行S309。When the processing action determined by the network device 101 is forwarding or marking, S309 is executed.
S309:网络设备101根据第一数据报文生成第二数据报文。S309: The network device 101 generates a second data packet according to the first data packet.
网络设备101根据获得的针对第一数据报文的段路由网络转发路径和第一数据报文,生成第二数据报文。网络设备101获得该段路由网络转发路径的方式可以包括:一、网络设备101自身具备计算段路由网络转发路径的能力,网络设备101确定该段路由网络转发路径。二、网络设备101从控制器或路径计算单元处获得该段路由网络转发路径。The network device 101 generates a second data packet according to the obtained segment routing network forwarding path for the first data packet and the first data packet. The manner in which the network device 101 obtains the segment of the routing network forwarding path may include: 1. The network device 101 itself has the ability to calculate the segment of the routing network forwarding path, and the network device 101 determines the segment of the routing network forwarding path. 2. The network device 101 obtains the segment of the routing network forwarding path from the controller or the path calculation unit.
在一个示例中,当中间网络设备不支持SR时,网络设备101获得的针对VM1到VM5的数据报文的段路由网络转发路径为:End.XTEpg SID3。当中间网络设备支持SR时,网络设备101获得的针对VM1到VM5的数据报文的段路由网络转发路径,该段路由网络转发路径可对应一个段标识列表,该段标识列表可以包括1个或多个段标识,如该段标识列表为:End.SID102,End.XTEpg SID3,其中,End.SID102为网络设备102的段标识,End.XTEpg SID3为网络设备101的1个微分段段标识。In an example, when the intermediate network device does not support SR, the segment routing network forwarding path of the data message from VM1 to VM5 obtained by the network device 101 is: End.XTEpg SID3. When the intermediate network device supports SR, the segment routing network forwarding path for the data packets from VM1 to VM5 obtained by the network device 101 can correspond to a segment identification list, and the segment identification list can include 1 or Multiple segment identifiers. For example, the list of segment identifiers is End.SID102, End.XTEpg SID3, where End.SID102 is the segment identifier of the network device 102, and End.XTEpg SID3 is a micro-segment segment identifier of the network device 101.
网络设备101根据该转发路径和第一数据报文生成第二数据报文。以下SRv6作为示例,SR-MPLS的方案也与此类似,在此不再赘述。The network device 101 generates a second data packet according to the forwarding path and the first data packet. The following SRv6 is taken as an example, and the SR-MPLS solution is similar to this, so I will not repeat it here.
网络设备101生成第二数据报文,该第二数据报文包括SRH,该SRH中包括段标识列表,该段标识列表包括第一微分段段标识,如End.XTEpg SID3。The network device 101 generates a second data packet, the second data packet includes an SRH, the SRH includes a segment identifier list, and the segment identifier list includes a first micro-segment segment identifier, such as End.XTEpg SID3.
可选的,该段标识列表还包括中间网络设备的段标识,如网络设备102的段标识。Optionally, the list of segment identifiers also includes segment identifiers of intermediate network devices, such as segment identifiers of network device 102.
可选的,该第二数据报文中还包括第二微分段段标识,本申请实施例提供多种数据报文中携带第二微分段段标识的方式,包括:Optionally, the second data message further includes a second micro-segment segment identifier. This embodiment of the present application provides a variety of methods for carrying the second micro-segment segment identifier in a data message, including:
方式一、该段标识列表中还包括第二微分段段标识,如示例中的源微分段段标识,End.XTEpg SID1。Manner 1: The list of segment identifiers also includes a second micro-segment segment identifier, such as the source micro-segment segment identifier in the example, End.XTEpg SID1.
在一个如图7所示的SRH的示例中,当该第二端点组端标识携带在SRH中时,该第二 微分段段标识携带在SRH的Segment List[0]的位置,该第一微分段段标识携带在SRH的Segment List[1]的位置,即该SRH中的剩余节点(segments left)的值至少为1。In an example of the SRH shown in FIG. 7, when the second endpoint group end identifier is carried in the SRH, the second micro-segment segment identifier is carried at the position of Segment List[0] of the SRH, and the first micro-segment segment The identifier is carried in the position of the Segment List[1] of the SRH, that is, the value of the remaining nodes (segments left) in the SRH is at least 1.
方式二、该第二数据报文中还包括元数据,该元数据中携带该第二微分段段标识。为了使得该第二数据报文中还可以携带第二微分段段标识,可以定义一种新的元数据。在该方式下,还可以在该元数据中携带第一微分段段标识,这样,所有段路由网络中需要根据微分段段标识进行数据报文的处理的网络设备都可以仅通过元数据即获得第一微分段段标识和第二微分段段标识,而不需要再从数据报文的SRH中获得第一微分段段标识和第二微分段段标识。Manner 2: The second data message further includes metadata, and the metadata carries the second micro-segmentation segment identifier. In order to enable the second data message to carry the second micro-segmentation segment identifier, a new kind of metadata may be defined. In this way, the first micro-segment segment identifier can also be carried in the metadata. In this way, all network devices in the segment routing network that need to process data packets according to the micro-segment segment identifier can obtain the first micro-segment segment identifier only through the metadata. The micro-segment segment identifier and the second micro-segment segment identifier do not need to obtain the first micro-segment segment identifier and the second micro-segment segment identifier from the SRH of the data message.
该元数据可以通过如图8所示的TLV进行携带。在该TLV中,类型字段表明其为携带微分段段标识的元数据,该类型字段的值可以为该携带端点组端标识申请的特定的值,如91。该长度字段表明该元数据的整体长度,保留字段可留作特殊处理使用,当前暂无特定定义。第二微分段段标识字段携带该第二微分段段标识,如:End.XTEpg SID2,可选的,该TLV中还包括第一微分段段标识字段,该第一微分段段标识字段携带第一微分段段标识,如:End.XTEgp SID1。This metadata can be carried through the TLV as shown in FIG. 8. In this TLV, the type field indicates that it is metadata that carries the micro-segment segment identifier, and the value of the type field can be a specific value applied for carrying the endpoint group end identifier, such as 91. The length field indicates the overall length of the metadata. The reserved field can be reserved for special processing. There is currently no specific definition. The second micro-segment segment identifier field carries the second micro-segment segment identifier, such as End.XTEpg SID2. Optionally, the TLV also includes a first micro-segment segment identifier field, and the first micro-segment segment identifier field carries the first micro-segment segment identifier. , Such as: End.XTEgp SID1.
方式三、网络设备101将第一数据报文的IPv6报文头复制携带在第二数据报文的载荷中,并为该第二数据报文生成新的IPv6报文头,该IPv6报文头中的源地址为该第二微分段段标识。Manner 3: The network device 101 copies the IPv6 header of the first data message and carries it in the payload of the second data message, and generates a new IPv6 header for the second data message. The IPv6 header The source address in is the second micro-segment segment identifier.
运维人员可以通过提前在网络设备上配置在生成第二数据报文的时候是否需要携带第二微分段段标识,以及采用以上三种方式中的哪种方式实现第二微分段段标识的携带。或者网络设备默认采用一致的方式来携带第二微分段段标识。The operation and maintenance personnel can configure in advance on the network device whether the second micro-segmentation identifier needs to be carried when generating the second data message, and which of the above three methods is used to carry the second micro-segmentation identifier. Or, by default, the network device adopts a consistent manner to carry the second micro-segment segment identifier.
当运维人员是通过配置使得网络设备在生成第二数据报文的时候携带第二微分段段标识且确定网络设备101携带第二微分段段标识的方式之后,为了使得网络设备101生成的第二数据报文在转发的过程中可以被正确的处理,而不影响数据报文的转发,网络设备101在生成第二数据报文的SRH时,可以通过在该SRH中标识第二微分段段标识的携带方式,以使得在该段路由网络中具备根据微分段段标识对数据报文进行处理的网络设备在报文转发的过程中可以确定获取第二端点组端标识的位置。When the operation and maintenance personnel configure the network device to carry the second micro-segment identifier when generating the second data packet and determine the manner in which the network device 101 carries the second micro-segment identifier, in order to make the network device 101 generate the second data The message can be correctly processed during the forwarding process without affecting the forwarding of the data message. When the network device 101 generates the SRH of the second data message, it can identify the carrying of the second micro-segment segment identifier in the SRH. In this way, the network device in the routing network that is equipped with the micro-segment segment identifier to process the data message can determine the location to obtain the second endpoint group end identifier during the message forwarding process.
如图9所示的第二数据报文的SRH的Flag标志位示意图所示,SRH的标志位(Flags)占8比特,其中U,当前暂未使用,P标志,占1比特,为保护标志。O标志,占1比特,为操作、管理和维护(operation,administration and maintenance,OAM)标志。A标志,占1比特,为告警标志,如果存在,则以为着存在重要的TLV。H标志,占1比特,为散列信息认证码(hash-based message authentication code,HMAC)标志,如果存在,说明存在HMAC TLV。网络设备101可以在SRH的Flags字段的U标志的低比特位,标识第二端点组携带的位置,如当Flags的第8比特位为1时,则表明该第二微分段段标识的携带方式采用了上述方式一,携带在SRH的段标识列表的segment[0]中。当Flags字段的第7比特位为1时,则表明该该二微分段段标识的携带方式采用了上述方式二,携带在该SRH的元数据中。当Flags字段的第6比特位为1时,则表明该该二微分段段标识的携带方式采用了上述方式三,携带在第二报文的IPv6报文头的源IP地址中。As shown in the schematic diagram of the Flag bit of the SRH of the second data message shown in FIG. 9, the flag bit (Flags) of the SRH occupies 8 bits, among which U is currently not used, and the P flag occupies 1 bit, which is a protection flag. . The O sign, which occupies 1 bit, is an operation, administration and maintenance (operation, administration and maintenance, OAM) sign. The A flag, which occupies 1 bit, is an alarm flag. If it exists, it means that there is an important TLV. The H symbol, which occupies 1 bit, is a hash-based message authentication code (HMAC) symbol. If it exists, it means that there is a HMAC TLV. The network device 101 can use the low bit of the U flag in the Flags field of the SRH to identify the position carried by the second endpoint group. For example, when the eighth bit of Flags is 1, it indicates that the second micro-segment segment identifier is carried in a manner In the above manner 1, it is carried in the segment[0] of the segment identifier list of the SRH. When the 7th bit of the Flags field is 1, it indicates that the two micro-segment segment identifiers are carried in the above-mentioned manner two, and are carried in the metadata of the SRH. When the 6th bit of the Flags field is 1, it indicates that the two micro-segment segment identifier is carried in the above-mentioned way 3, which is carried in the source IP address of the IPv6 header of the second message.
S311:网络设备101向网络设备103发送第二数据报文。S311: The network device 101 sends a second data packet to the network device 103.
网络设备101根据路由转发信息,向网络设备103发送第二数据报文,该第二数据报 文中携带有第一微分段段标识。The network device 101 sends a second data packet to the network device 103 according to the routing and forwarding information, and the second data packet carries the first micro-segment identifier.
可选的,该第二数据报文还携带有第二微分段段标识。Optionally, the second data message also carries a second micro-segmentation identifier.
S321:网络设备103接收到网络设备101发送的第二数据报文后,从第二数据报文中获得第一微分段段标识。S321: After receiving the second data packet sent by the network device 101, the network device 103 obtains the first micro-segmentation segment identifier from the second data packet.
如,网络设备103从第二数据报文中获得该第一微分段段标识为:End.XTEpg SID3。For example, the network device 103 obtains the first micro-segment segment identifier from the second data packet as: End.XTEpg SID3.
该网络设备103在根据第一微分段段标识确定对所述数据报文的处理动作之前,所述网络设备103还需要获得处理策略,该处理策略中包括匹配条件和处理动作。该处理策略中的处理动作包括以下一项或多项:转发、丢弃、标记、重定向和镜像。其中,标记为一种特殊的转发,即,网络设备在转发数据报文前,先对该数据报文进行标记。网络设备对数据报文可做的标记动作可包括,如重新标记该数据报文的DSCP,或修改该数据报文的优先级等。Before the network device 103 determines a processing action on the data message according to the first micro-segmentation identifier, the network device 103 also needs to obtain a processing strategy, which includes matching conditions and processing actions. The processing actions in the processing strategy include one or more of the following: forwarding, discarding, marking, redirection, and mirroring. Wherein, marking is a special kind of forwarding, that is, the network device first marks the data message before forwarding the data message. The marking actions that a network device can perform on a data message may include, for example, remarking the DSCP of the data message, or modifying the priority of the data message.
网络设备103获得处理策略的方式与处理策略的内容与网络设备101获得处理策略的方式与处理策略的内容一致,详情请参见网络设备101获得处理策略处的详细描述,本申请在此不再赘述。The way that the network device 103 obtains the processing strategy and the content of the processing strategy are consistent with the way that the network device 101 obtains the processing strategy and the content of the processing strategy. For details, please refer to the detailed description of the processing strategy obtained by the network device 101, which will not be repeated in this application. .
S323:网络设备103根据该第一微分段段标识确定对第二数据报文的处理动作。S323: The network device 103 determines a processing action on the second data packet according to the first micro-segmentation identifier.
网络设备103根据第一微分段段标识确定对第二数据报文的处理动作的方式与网络设备101根据第一微分段段标识确定对第一数据报文的处理动作的方式一致,详情请参见网络设备101根据第一微分段段标识确定对第一数据报文的处理动作处的详细描述,本申请在此不再赘述。The manner in which the network device 103 determines the processing action on the second data packet according to the first micro-segment segment identifier is consistent with the manner in which the network device 101 determines the processing action on the first data packet according to the first micro-segment segment identifier. For details, see Network Equipment The detailed description of the processing action of the first data packet determined by 101 according to the first micro-segmentation segment identifier will not be repeated in this application.
可选的,网络设备103还根据第二微分段段标识确定对第二数据报文的处理动作。Optionally, the network device 103 also determines a processing action on the second data packet according to the second micro-segmentation segment identifier.
当该第二数据报文中还携带有第二微分段段标识时,网络设备103还获得第二微分段段标识,并根据该第一微分段段标识和第二微分段段标识对第二数据报文执行处理动作。When the second data message also carries the second micro-segmentation identifier, the network device 103 also obtains the second micro-segmentation identifier, and performs execution on the second data message according to the first micro-segmentation identifier and the second micro-segmentation identifier. Processing actions.
对应于网络设备101携带第二微分段段标识的三种方式,以及第二数据报文中对该携带方式的标识:网络设备103根据该标识的指示,从第二数据报文的相应位置获得第二微分段段标识。如,当第二数据报文的SRH的Flags字段的第8比特位为1时,网络设备103从第二数据报文的SRH的段标识列表的segment[0]中获得该第二微分段段标识。当Flags字段的第7比特位为1时,则网络设备103从第二数据报文的SRH的元数据中获得该第二微分段段标识。当Flags字段的第6比特位为1时,则网络设备103从第二数据报文的IPv6报文头的源IP地址中获得该第二微分段段标识。Corresponding to the three ways that the network device 101 carries the second micro-segmentation identifier, and the identification of the carrying method in the second data packet: the network device 103 obtains the first data packet from the corresponding position of the second data packet according to the indication of the identification. Two micro-segment segment identification. For example, when the eighth bit of the Flags field of the SRH of the second data message is 1, the network device 103 obtains the second micro-segment segment identifier from the segment[0] of the SRH segment identifier list of the second data message . When the 7th bit of the Flags field is 1, the network device 103 obtains the second micro-segmentation segment identifier from the metadata of the SRH of the second data packet. When the sixth bit of the Flags field is 1, the network device 103 obtains the second micro-segmentation segment identifier from the source IP address of the IPv6 header of the second data packet.
在一种可能的实现方式中,网络设备直接按照默认的规则,例如如从元数据中获取第二微分段段标识。In a possible implementation manner, the network device directly follows the default rule, for example, obtaining the second micro-segment segment identifier from the metadata.
网络设备103根据第一微分段段标识和第二微分段段标识确定对第二数据报文的处理动作的方式与网络设备101根据第一微分段段标识和第二微分段段标识确定对第一数据报文的处理动作的方式一致,详情请参见网络设备101根据第一微分段段标识和第二微分段段标识确定对第一数据报文的处理动作处的详细描述,本申请在此不再赘述。The network device 103 determines the processing action for the second data packet according to the first micro-segment identifier and the second micro-segment identifier, and the network device 101 determines the processing action for the first data packet according to the first micro-segment identifier and the second micro-segment identifier. The processing actions are the same. For details, please refer to the detailed description of where the network device 101 determines the processing action of the first data packet according to the first micro-segment segment identifier and the second micro-segment segment identifier, which will not be repeated in this application.
在一种可能的方式中,当网络设备103接收到的第二数据报文中还携带有第二微分段段标识时,网络设备103可以仅根据第二微分段段标识确定对第二数据报文的处理动作。网络设备103根据第二微分段段标识确定对第二数据报文的处理动作的方法和可选方式与网络设备101仅根据第一微分段段标识确定对第一数据报文的处理的方法和可选方式 相同,在此不再赘述。In a possible manner, when the second data packet received by the network device 103 also carries the second micro-segmentation identifier, the network device 103 may determine the second data packet's identification based on the second micro-segmentation identifier only. Processing actions. The method and optional manner for the network device 103 to determine the processing action on the second data packet according to the second micro-segmentation identifier are the same as the method and optional manner for the network device 101 to determine the processing action for the first data packet based on the first micro-segmentation identifier only The method is the same, so I won't repeat it here.
S325:网络设备103对第二数据报文执行确定的处理动作。S325: The network device 103 performs a determined processing action on the second data packet.
当网络设备103确定的对第二数据报文的处理动作为丢弃时,网络设备103丢弃第二数据报文。When the processing action for the second data packet determined by the network device 103 is discard, the network device 103 discards the second data packet.
当网络设备103确定的对第二数据报文的处理动作为镜像时,网络设备103向指定的地址镜像该第一数据报文。When the processing action on the second data packet determined by the network device 103 is mirroring, the network device 103 mirrors the first data packet to the designated address.
当网络设备103确定的对第二数据报文的处理动作为重定向时,网络设备103更改该第一数据报文的转发目的地址。When the network device 103 determines that the processing action on the second data packet is redirection, the network device 103 changes the forwarding destination address of the first data packet.
S327:当网络设备103确定的处理动作为转发或标记时,网络设备103根据第二数据报文生成第三数据报文。S327: When the processing action determined by the network device 103 is forwarding or marking, the network device 103 generates a third data packet according to the second data packet.
对应于网络设备101携带第二微分段段标识的三种方式,以及第二数据报文中对该携带方式的标识:网络设备103根据该标识的指示,根据第二数据报文生成第三数据报文。当第二数据报文的SRH的Flags字段的第8比特位为1时,网络设备在根据第二报文生成第三报文时,则将第二数据报文的SRH剥离,生成第三数据报文。当Flags字段的第7比特位为1时,则网络设备103将第二数据报文的SRH和元数据剥离,生成第三数据报文。当Flags字段的第6比特位为1时,则网络设备103将第二数据报文的IPv6报文头替换为复制的IPv6报文头(即第一报文的IPv6报文头),并将第二数据报文的SRH进行剥离,生成第三数据报文,第三数据报文的IPv6报文头即第一报文的IPv6报文头。Corresponding to the three ways that the network device 101 carries the second micro-segmentation identifier, and the identification of the carrying method in the second data packet: the network device 103 generates a third datagram according to the second data packet according to the indication of the identification Text. When the 8th bit of the Flags field of the SRH of the second data message is 1, when the network device generates the third message according to the second message, it strips the SRH of the second data message to generate the third data Message. When the 7th bit of the Flags field is 1, the network device 103 strips the SRH and metadata of the second data packet to generate a third data packet. When the 6th bit of the Flags field is 1, the network device 103 replaces the IPv6 header of the second data packet with the copied IPv6 header (that is, the IPv6 header of the first packet), and sets The SRH of the second data message is stripped to generate a third data message, and the IPv6 header of the third data message is the IPv6 header of the first message.
或网络设备按照默认的规则,如将第二数据报文的SRH剥离,得到第三数据报文。Or the network device according to the default rule, such as stripping the SRH of the second data message to obtain the third data message.
S329:网络设备103发送第三数据报文。S329: The network device 103 sends a third data packet.
网络设备根据第一微分段段标识所标识的微分段EPG3,向其对应的端点组中的端点VM5发送该第三数据报文。如,网络设备103向第三数据报文的目的IP地址(即VM5的IP地址)发送第三数据报文。The network device sends the third data message to the endpoint VM5 in the corresponding endpoint group according to the micro-segment EPG3 identified by the first micro-segment segment identifier. For example, the network device 103 sends the third data packet to the destination IP address of the third data packet (that is, the IP address of VM5).
以上是本申请实施例提供的一种方法实施例,该方法实施例提供了一种作用于段路由网络中的头节点和尾节点的,根据微分段段标识进行数据报文处理的方法。The foregoing is a method embodiment provided by an embodiment of the present application. The method embodiment provides a method for processing data packets based on micro-segment segment identifiers that act on the head node and the tail node in a segment routing network.
如图3b所示的方法实施例,提供了一种数据报文的处理方法流程图,该流程图与图3a所示的方法实施例主要差别在于,第一网络设备和第二网络设备根据第一微分段段标识和第二微分段段标识进行报文处理。本实施例是对图3a方法实施例的一个细化表示,相关每个执行步骤的具体内容可具体参考图3a中的相同编号的步骤以及其可选方式的实现,为了简洁,不再在此处赘述图3b实施例的详细步骤。The method embodiment shown in FIG. 3b provides a flow chart of a method for processing data packets. The main difference between the flow chart and the method embodiment shown in FIG. 3a is that the first network device and the second network device are A micro-segment segment identifier and a second micro-segment segment identifier are used for message processing. This embodiment is a detailed representation of the method embodiment in FIG. 3a. For the specific content of each execution step, please refer to the steps with the same number in FIG. 3a and the implementation of their alternatives. For brevity, it will not be repeated here. The detailed steps of the embodiment in FIG. 3b will be repeated here.
以下介绍另一种方法实施例,该方法实施例提供了一种作用于段路由网络中的头节点、中间节点和尾节点的,根据微分段段标识进行数据报文处理的方法。在本申请实施例中,头节点和尾节点执行的根据微分段段标识进行数据报文处理的方法与上一个方法实施例中的方法类似。本申请实施例将重点针对于上一方法实施例差异的地方进行详细讲解。The following introduces another method embodiment. The method embodiment provides a method for processing data packets based on the micro-segment segment identifier that acts on the head node, the intermediate node, and the tail node in the segment routing network. In the embodiment of the present application, the method of processing data packets according to the micro-segment segment identifier performed by the head node and the tail node is similar to the method in the previous method embodiment. The embodiments of the present application will focus on the detailed explanation of the differences in the previous method embodiment.
以下,结合图1和图4a对该方法主要包括的步骤和可选方式进行讲解,为便于理解,以网络设备101作为第三网络设备,网络设备102作为第二网络设备,网络设备103作为第一网络设备为示例对本方法实施例进行示例性讲解。应理解,这仅是一种示例,本领域的技术人员也可以参考本实施例,做类似的替换、应用,本申请不再一一举例。Hereinafter, the main steps and optional methods of this method are explained in conjunction with FIG. 1 and FIG. 4a. For ease of understanding, the network device 101 is used as the third network device, the network device 102 is used as the second network device, and the network device 103 is used as the second network device. A network device is used as an example to exemplarily explain the embodiment of the method. It should be understood that this is only an example, and those skilled in the art can also refer to this embodiment to make similar substitutions and applications, and this application will not give examples one by one.
S401:网络设备103发布第一微分段段标识。S401: The network device 103 issues a first micro-segmentation segment identifier.
网络设备103发布第一微分段段标识的方法和可选方式,以及网络设备103获得第一微分段段标识的方法和可选方式,与图3a所示的实施例中的方法和可选方式一致,详情请见图3a实施例中的步骤S301相关的内容和可选方式,在此不再赘述。The method and optional manner for the network device 103 to issue the first micro-segment identification, and the method and optional manner for the network device 103 to obtain the first micro-segment identification are consistent with the method and optional manner in the embodiment shown in FIG. 3a, For details, please refer to the related content and optional methods of step S301 in the embodiment of FIG. 3a, which will not be repeated here.
S402:网络设备102发布微分段节点段标识。S402: The network device 102 issues the micro-segment node segment identifier.
由于网络设备102为第一数据报文在图1所示的段路由网络中的转发路径上的中间转发节点,为了使得网络设备102同样具备根据微分段段标识对数据报文执行处理动作的功能,可以采用为网络设备102定义和发布有特定功能的段标识的方式,所述有特定功能的段标识即为微分段节点段标识,使得网络设备102具备该功能。Since the network device 102 is an intermediate forwarding node on the forwarding path of the first data packet in the segment routing network shown in FIG. 1, in order to make the network device 102 also have the function of performing processing actions on the data packet according to the micro-segment segment identifier, A manner of defining and publishing a segment identifier with a specific function for the network device 102 may be adopted. The segment identifier with a specific function is the micro-segment node segment identifier, so that the network device 102 has the function.
微分段节点段标识对应一个网络设备,可以表示为End.TEpg SID,End表示endpoint,意为端点;T表示table lookup,意为查表;Epg表示endpoint group,意为端点组;SID意为段标识。端点组段节点标识可以可以满足IPv6地址或MPLS标签的格式。The micro-segment node segment identifier corresponds to a network device, which can be expressed as End.TEpg SID, End means endpoint, which means endpoint; T means table lookup, means lookup table; Epg means endpoint group, means endpoint group; SID means segment Logo. The endpoint group segment node identifier can meet the format of the IPv6 address or the MPLS label.
网络设备102发布微分段节点段标识的方式包括以下三种或更多的发布方式:The manner in which the network device 102 publishes the micro-segment node segment identifier includes the following three or more publishing methods:
方式一、网络设备102发送通告报文,该报文中携带有该微分段节点段标识。Manner 1: The network device 102 sends a notification message, which carries the micro-segment node segment identifier.
该通告报文可以为边界网关协议(Border Gateway Protocol,BGP)报文,也可以是内部网关协议(Interior Gateway Protocol,IGP)报文,本申请不做具体限定。The notification message may be a Border Gateway Protocol (BGP) message or an Interior Gateway Protocol (Interior Gateway Protocol, IGP) message, which is not specifically limited in this application.
可选的,该通告报文中的微分段节点段标识携带在其第二类型长度值(type length value,TLV)中。该第二TLV的格式示意如图10所示。该图中的类型字段标识表示该第二TLV的类型,该类型字段的取值可以标识该第二TLV是用于发布End.TEpg SID的TLV,该类型字段的取值可以是为发布微分段节点段标识新申请的类型,例如可以是92。长度字段的取值标识该第二TLV的长度。标志字段取值可以为O,也可以取值为1,如,当取值为0时,表示其为端点组类型的TLV。保留字段保留用于后续扩展,如可用于标识转发路径的。微分段节点段标识字段用于承载微分段节点段标识。Optionally, the micro-segment node segment identifier in the notification message is carried in its second type length value (TLV). The format of the second TLV is shown in FIG. 10. The type field identifier in the figure indicates the type of the second TLV, the value of the type field can identify that the second TLV is a TLV used to publish End.TEpg SID, and the value of the type field can be for publishing micro-segments The node segment identifies the type of the new application, for example, it can be 92. The value of the length field identifies the length of the second TLV. The value of the flag field can be 0 or 1, for example, when the value is 0, it means that it is a TLV of the endpoint group type. The reserved fields are reserved for subsequent extensions, such as those that can be used to identify the forwarding path. The micro-segment node segment identifier field is used to carry the micro-segment node segment identifier.
方式二、网络设备102可以通过BGP链路状态协议(Border Gateway Protocol-link state,BGP-LS),发布微分段节点段标识。Manner 2: The network device 102 may issue the micro-segment node segment identifier through the BGP link state protocol (Border Gateway Protocol-link state, BGP-LS).
具体来讲,网络设备102可以通过BGP-LS,向控制器发送微分段节点段标识,控制器可以通过BGP-LS,接收网络设备102发送的微分段节点段标识,并将微分段段标识发送至网络设备101。Specifically, the network device 102 can send the micro-segment node segment identifier to the controller through BGP-LS, and the controller can receive the micro-segment node segment identifier sent by the network device 102 through BGP-LS, and send the micro-segment segment identifier to Network equipment 101.
方式三、网络设备102可以通过路径计算通信协议(Path Computation Element Communication Protocol,PCEP),发布微分段节点段标识。Manner 3: The network device 102 may issue the micro-segment node segment identifier through the Path Computation Element Communication Protocol (PCEP).
具体来讲,网络设备102可以通过PCEP,向控制器或路径计算单元(path computation element,PCE)发送微分段节点段标识,控制器可以通过PCEP,接收网络设备102发送的微分段节点段标识,将微分段节点段标识发送至网络设备101。Specifically, the network device 102 may send the micro-segment node segment identifier to the controller or path calculation element (PCE) through the PCEP, and the controller may receive the micro-segment node segment identifier sent by the network device 102 through the PCEP. The micro-segment node segment identifier is sent to the network device 101.
在一种可能的设计中,在网络设备102发布微分段节点段标识之前,网络设备102需要先获得微分段节点段标识。关于网络设备102如何得到微分段节点段标识,在一些可能的实施例中,可以由网络设备102自动分配微分段节点段标识,也可以人工配置至少微分段节点段标识。具体地,得到微分段节点段标识的方式可以包括下述方式一或方式二中的任一项或多项。In a possible design, before the network device 102 issues the micro-segment node segment identifier, the network device 102 needs to obtain the micro-segment node segment identifier first. Regarding how the network device 102 obtains the micro-segment node segment identifier, in some possible embodiments, the network device 102 may automatically assign the micro-segment node segment identifier, or manually configure at least the micro-segment node segment identifier. Specifically, the manner of obtaining the micro-segment node segment identifier may include any one or more of the following manner 1 or manner 2.
方式一、网络设备102为自己分配微分段节点段标识。Manner 1: The network device 102 assigns itself a micro-segment node segment identifier.
在一个示例中,网络设备102可以自己分配一个或多个微分段节点段标识,如该段标 识可以为表示节点类型的段标识,也可以为表示邻接的段标识,网络设备102可以存储有段标识空间,可以从段标识空间中选择未被占用的微分段节点段标识,将微分段节点段标识分配给自身。In an example, the network device 102 can allocate one or more micro-segment node segment identifiers by itself. For example, the segment identifier can be a segment identifier indicating a node type or an adjacent segment identifier. The network device 102 may store a segment In the identification space, an unoccupied micro-segment node segment identifier can be selected from the segment identification space, and the micro-segment node segment identifier can be assigned to itself.
方式二、网络设备102接收配置指令,网络设备102从配置指令获取微分段节点段标识,网络设备102还可以从配置指令中获取微分段节点段标识和转发路径的对应关系。其中,配置指令可以由用户在网络设备102上的配置操作触发,配置指令也可能由网管或者控制器(controller)触发。Manner 2: The network device 102 receives the configuration instruction, the network device 102 obtains the micro-segment node segment identifier from the configuration instruction, and the network device 102 may also obtain the corresponding relationship between the micro-segment node segment identifier and the forwarding path from the configuration instruction. The configuration instruction may be triggered by a user's configuration operation on the network device 102, and the configuration instruction may also be triggered by a network management or a controller.
在一个SRv6的示例中,微分段节点段标识的具体取值包括以下两个部分:位置信息(Locator)以及功能(Function):SRv6 SID是IPv6地址的形式,SRv6 SID可以由位置信息和功能两部分组成,格式为:位置信息:功能。其中,位置信息占据IPv6地址的高比特位,功能占据IPv6地址的低比特位。其中,位置信息可以具有定位功能,可以在SR域唯一,功能代表设备的指令,这些指令由设备预先设定,功能部分用于指示SRv6 SID的生成设备执行相应的功能操作。在一个示例中,网络设备102获得的微分段节点段标识包括位置和function部分,功能部分用于指示网络设备102执行根据微分段段标识对数据报文执行预定义的操作。In an SRv6 example, the specific value of the micro-segment node segment identifier includes the following two parts: location information (Locator) and function (Function): SRv6 SID is in the form of an IPv6 address, SRv6 SID can consist of two parts: location information and function. Part of the composition, the format is: location information: function. Among them, the location information occupies the high bits of the IPv6 address, and the function occupies the low bits of the IPv6 address. Among them, the location information can have a positioning function and can be unique in the SR domain. The function represents the instructions of the device. These instructions are preset by the device. The function part is used to instruct the SRv6 SID generating device to perform corresponding functional operations. In an example, the micro-segment node segment identifier obtained by the network device 102 includes a location and a function part, and the function part is used to instruct the network device 102 to perform a predefined operation on the data packet according to the micro-segment segment identifier.
可选的:网络设备101和网络设备103也发布微分段节点段标识,网络设备101和网络设备103获得和发布微分段节点段标识的方式与网络设备102的方式一致,在此不再赘述。Optionally: the network device 101 and the network device 103 also issue the micro-segment node segment identifier, and the manner in which the network device 101 and the network device 103 obtain and issue the micro-segment node segment identifier is the same as that of the network device 102, and will not be repeated here.
S403:网络设备101获得第一微分段段标识。S403: The network device 101 obtains the first micro-segmentation identifier.
网络设备101获得第一端点组的方法和可选方式与图3a所示的实施例中的方法和可选方式一致,详情请见图3a实施例中的步骤S303相关的内容和可选方式,在此不再赘述。The method and optional manner for the network device 101 to obtain the first endpoint group are consistent with the method and optional manner in the embodiment shown in FIG. 3a. For details, please refer to the related content and optional manner of step S303 in the embodiment of FIG. 3a. , I won’t repeat it here.
S404:网络设备101获得微分段节点段标识。S404: The network device 101 obtains the micro-segment node segment identifier.
对应于网络设备102发布微分段节点段标识的方式,网络设备101获得该微分段节点段标识的方式可以为以下两种方式。Corresponding to the manner in which the network device 102 issues the micro-segment node segment identifier, the manner in which the network device 101 obtains the micro-segment node segment identifier may be the following two methods.
方式一、网络设备101接收网络设备102发送的通告报文,该报文中携带有该微分段节点段标识。Manner 1: The network device 101 receives a notification message sent by the network device 102, and the message carries the micro-segment node segment identifier.
具体来说,当网络设备102通过BGP报文发送微分段节点段标识时,网络设备101接收到网络设备103发送的BGP报文,并从该报文中获得该微分段节点段标识;当网络设备102通过IGP报文发送微分段节点段标识,则网络设备101接收到网络设备102发送的IGP报文,并从该报文中获得该微分段节点段标识。Specifically, when the network device 102 sends the micro-segment node segment identifier through a BGP message, the network device 101 receives the BGP message sent by the network device 103, and obtains the micro-segment node segment identifier from the message; The device 102 sends the micro-segment node segment identifier through the IGP message, and the network device 101 receives the IGP message sent by the network device 102 and obtains the micro-segment node segment identifier from the message.
进一步来说,当该微分段节点段标识携带在BGP报文或IGP报文的第二TLV中时,网络设备101从该BGP报文或IGP报文的第二TLV中获得微分段节点段标识。Furthermore, when the micro-segment node segment identifier is carried in the second TLV of the BGP message or IGP message, the network device 101 obtains the micro-segment node segment identifier from the second TLV of the BGP message or IGP message .
方式二、网络设备101接收来自控制器或路径计算单元发送的微分段节点段标识。Manner 2: The network device 101 receives the micro-segment node segment identifier sent from the controller or the path calculation unit.
具体来讲,当网络设备102通过BGP-LS向控制器发送微分段节点段标识时,控制器可以通过BGP-LS协议,接收网络设备102发送的微分段节点段标识,并将微分段节点段标识发送至网络设备101。当网络设备102通过发送PCEP报文,向控制器或PCE发送微分段节点段标识时,控制器或PCE可以接收网络设备102发送的微分段节点段标识,并将微分段节点段标识发送至网络设备101。上述控制器或PCE执行向网络设备101发送微分段节点段标识的时间可以是在接收到微分段节点段标识之后即发送,也可以是在一段时间, 或当网络设备101向控制器或PCE请求一条转发路径的时候再发送给网络设备101。Specifically, when the network device 102 sends the micro-segment node segment identifier to the controller through BGP-LS, the controller can receive the micro-segment node segment identifier sent by the network device 102 through the BGP-LS protocol, and send the micro-segment node segment identifier The identification is sent to the network device 101. When the network device 102 sends the micro-segment node segment identifier to the controller or PCE by sending a PCEP message, the controller or PCE can receive the micro-segment node segment identifier sent by the network device 102, and send the micro-segment node segment identifier to the network Equipment 101. The time when the controller or PCE executes sending the micro-segment node segment identifier to the network device 101 can be sent after receiving the micro-segment node segment identifier, or it can be within a period of time, or when the network device 101 requests the controller or PCE When there is a forwarding path, it is sent to the network device 101.
以上步骤S401和S402的执行没有先后顺序,S403和S404的执行步骤也没有先后顺序。The above steps S401 and S402 are executed in no order, and the execution steps of S403 and S404 are also in no order.
S405:网络设备101接收第一数据报文,并根据该第一数据报文确定第一微分段段标识,该第一数据报文中不包括第一微分段段标识。S405: The network device 101 receives the first data packet, and determines the first micro-segment segment identifier according to the first data packet, and the first data packet does not include the first micro-segment segment identifier.
网络设备101根据该第一数据报文确定第一微分段段标识的方法和可选方式与图3a所示的实施例中的方法和可选方式一致,详情请见图3a实施例中的步骤S305相关的内容和可选方式,在此不再赘述。The method and optional manner for the network device 101 to determine the first micro-segment identifier according to the first data packet are the same as the method and optional manner in the embodiment shown in FIG. 3a. For details, please refer to step S305 in the embodiment in FIG. 3a. The related content and optional methods will not be repeated here.
S407:网络设备101根据第一微分段段标识确定对第一数据报文的处理动作。S407: The network device 101 determines a processing action on the first data packet according to the first micro-segmentation identifier.
网络设备101根据第一微分段段标识确定对第一数据报文的处理动作的方法和可选方式与图3a所示的实施例中的方法和可选方式一致,详情请见图3a实施例中的步骤S307相关的内容和可选方式,在此不再赘述。The method and optional manner for the network device 101 to determine the processing action of the first data packet according to the first micro-segmentation segment identifier are consistent with the method and optional manner in the embodiment shown in FIG. 3a. For details, please refer to the embodiment in FIG. 3a. The content and optional manners related to step S307 in step S307 will not be repeated here.
S408:网络设备101对第一数据报文执行确定的处理动作。S408: The network device 101 performs a determined processing action on the first data packet.
网络设备101根据第一微分段段标识对第一数据报文执行确定的处理动作的方法和可选方式与图3a所示的实施例中的方法和可选方式一致,详情请见图3a实施例中的步骤S308相关的内容和可选方式,在此不再赘述。The method and optional manner for the network device 101 to perform the determined processing action on the first data packet according to the first micro-segmentation segment identifier are consistent with the method and optional manner in the embodiment shown in FIG. 3a. For details, please refer to the embodiment shown in FIG. 3a. The content and optional methods related to step S308 in step S308 will not be repeated here.
S409:当网络设备101根据第一数据报文确定的处理动作包括转发或标记时,网络设备101根据第一数据报文生成第二数据报文。S409: When the processing action determined by the network device 101 according to the first data packet includes forwarding or marking, the network device 101 generates a second data packet according to the first data packet.
网络设备101根据获得的针对第一数据报文的段路由网络转发路径和第一数据报文,生成第二数据报文。网络设备101获得该段路由网络转发路径的方式可以包括:一、网络设备101自身具备计算段路由网络转发路径的能力,网络设备101确定该段路由网络转发路径。二、网络设备101从控制器或路径计算单元处获得该段路由网络转发路径。The network device 101 generates a second data packet according to the obtained segment routing network forwarding path for the first data packet and the first data packet. The manner in which the network device 101 obtains the segment of the routing network forwarding path may include: 1. The network device 101 itself has the ability to calculate the segment of the routing network forwarding path, and the network device 101 determines the segment of the routing network forwarding path. 2. The network device 101 obtains the segment of the routing network forwarding path from the controller or the path calculation unit.
在一个示例中,网络设备101获得的转发路径对应的段标识列表为:End.TEpg SID1021,End.XTEpg SID3。In an example, the segment identifier list corresponding to the forwarding path obtained by the network device 101 is: End.TEpg SID 1021, End.XTEpg SID3.
网络设备101根据该转发路径和第一数据报文生成第二数据报文。以下SRv6作为示例,SR-MPLS的方案也与此类似,在此不再赘述。The network device 101 generates a second data packet according to the forwarding path and the first data packet. The following SRv6 is taken as an example, and the SR-MPLS solution is similar to this, so I will not repeat it here.
网络设备101生成第二数据报文,该第二数据报文包括SRH,该SRH中包括段标识列表,该段标识列表包括第一微分段段标识和微分段节点段标识,如End.TEpg SID1021,The network device 101 generates a second data packet, the second data packet includes SRH, the SRH includes a segment identifier list, and the segment identifier list includes a first micro-segment segment identifier and a micro-segment node segment identifier, such as End.TEpg SID1021,
End.XTEpg SID3。当该段标识列表不包括第二微分段段标识时,该第一微分段段标识携带在SRH的Segment List[0]的位置,该微分段节点段标识携带在SRH的Segment List[n]的位置,其中n>0,n是指定路径上的中间节点的数量。End.XTEpg SID3. When the segment identifier list does not include the second micro-segment segment identifier, the first micro-segment segment identifier is carried at the position of Segment List[0] of SRH, and the micro-segment node segment identifier is carried at the position of Segment List[n] of SRH, Where n>0, n is the number of intermediate nodes on the specified path.
可选的,该第二数据报文中还包括第二微分段段标识。当该段标识列表包括第二微分段段标识时,该第一微分段段标识携带在SRH的Segment List[1]的位置,该第二微分段段标识携带在SRH的Segment List[0]的位置,该微分段节点段标识携带在SRH的Segment List[n+1]的位置,其中n>1。在本方法实施例中所述的网络设备101生成第二数据报文中携带第二微分段段标识的方法和可选方式与图3a所示的实施例中的第二报文中文中携带第二微分段段标识的方法和可选方式一致,详情请见图3a所示的实施例中的S309部分相关内容,本申请在此不再赘述。Optionally, the second data message further includes a second micro-segment segment identifier. When the segment identifier list includes the second micro-segment segment identifier, the first micro-segment segment identifier is carried at the position of Segment List[1] of SRH, and the second micro-segment segment identifier is carried at the position of Segment List[0] of SRH. The micro-segment node segment identifier is carried in the Segment List[n+1] position of the SRH, where n>1. The method and optional manner in which the network device 101 generates the second micro-segment segment identifier in the second data packet described in this method embodiment are the same as those in the second packet in the embodiment shown in FIG. 3a. The method for identifying the micro-segment segment is the same as the optional method. For details, please refer to the relevant content of part S309 in the embodiment shown in FIG. 3a, which will not be repeated in this application.
S411:网络设备101向网络设备102发送第二数据报文。S411: The network device 101 sends a second data packet to the network device 102.
网络设备101根据路由转发信息,向网络设备102发送第二数据报文,该第二数据报文中携带有第一微分段段标识和微分段节点段标识。The network device 101 sends a second data packet to the network device 102 according to the routing and forwarding information, and the second data packet carries the first micro-segment segment identifier and the micro-segment node segment identifier.
可选的,该第二数据报文还携带有第二微分段段标识。Optionally, the second data message also carries a second micro-segmentation identifier.
S413:网络设备102接收到网络设备101发送的第二数据报文后,从第二数据报文中获得第一微分段段标识。S413: After receiving the second data packet sent by the network device 101, the network device 102 obtains the first micro-segmentation segment identifier from the second data packet.
网络设备102接收到网络设备101发送的第二数据报文,该数据报文的SRH中的目的地址为网络设备102发布的微分段节点段标识,如End.TEpg SID1021。网络设备102执行该微分段节点段标识指示的功能,即,根据微分段段标识对数据报文执行处理动作。The network device 102 receives the second data packet sent by the network device 101, and the destination address in the SRH of the data packet is the micro-segment node segment identifier issued by the network device 102, such as End.TEpg SID 1021. The network device 102 executes the function indicated by the micro-segment node segment identifier, that is, performs processing actions on the data packet according to the micro-segment segment identifier.
网络设备102从第二数据报文中获得第一微分段段标识,如:End.XTEpg SID3。在此实施中,网络设备102执行End.TEpg SID1021指示的功能,即,根据End.XTEpg SID3对数据报文执行处理动作。The network device 102 obtains the first micro-segment segment identifier from the second data message, such as End.XTEpg SID3. In this implementation, the network device 102 performs the function indicated by End.TEpg SID 1021, that is, performs processing actions on the data packet according to End.XTEpg SID3.
该网络设备102在根据第一微分段段标识确定对所述数据报文的处理动作之前,所述网络设备102还需要获得处理策略,该处理策略中包括匹配条件和处理动作。该处理策略中的处理动作包括以下一项或多项:转发、丢弃、标记、重定向和镜像。其中,标记为一种特殊的转发,即,网络设备在转发数据报文前,先对该数据报文进行标记。网络设备对数据报文可做的标记动作可包括,如重新标记该数据报文的DSCP,或修改该数据报文的优先级等。Before the network device 102 determines a processing action on the data packet according to the first micro-segmentation identifier, the network device 102 also needs to obtain a processing strategy, and the processing strategy includes a matching condition and a processing action. The processing actions in the processing strategy include one or more of the following: forwarding, discarding, marking, redirection, and mirroring. Wherein, marking is a special kind of forwarding, that is, the network device first marks the data message before forwarding the data message. The marking actions that a network device can perform on a data message may include, for example, remarking the DSCP of the data message, or modifying the priority of the data message.
网络设备102获得处理策略的方式与处理策略的内容与图3a所示的方法实施例中的网络设备101获得处理策略的方式与处理策略的内容一致,详情请参见图3a所示的网络设备101步骤S307获得处理策略处的详细描述,本申请在此不再赘述。The manner in which the network device 102 obtains the processing strategy and the content of the processing strategy are the same as the manner in which the network device 101 obtains the processing strategy and the content of the processing strategy in the method embodiment shown in FIG. 3a. For details, please refer to the network device 101 shown in FIG. 3a. Step S307 obtains a detailed description of the processing strategy, which will not be repeated in this application.
S415:网络设备102根据该第一微分段段标识确定对第二数据报文的处理动作。S415: The network device 102 determines a processing action on the second data packet according to the first micro-segmentation identifier.
网络设备102根据第一微分段段标识确定对第二数据报文的处理动作的方式与图3a所示的方法实施例中的网络设备103根据第一微分段段标识确定对第一数据报文的处理动作的方式一致,详情请参见图3a所示的方法实施例中的网络设备103根据第一微分段段标识确定对第一数据报文的处理动作处的详细描述(如步骤323),本申请在此不再赘述。The manner in which the network device 102 determines the processing action of the second data packet according to the first micro-segmentation identifier is the same as the method in which the network device 103 in the method embodiment shown in FIG. 3a determines the processing of the first data packet according to the first micro-segmentation identifier The actions are the same. For details, please refer to the detailed description of the processing action of the first data packet by the network device 103 in the method embodiment shown in FIG. 3a according to the first micro-segment identifier (such as step 323). This will not be repeated here.
S416:网络设备102对第二数据报文执行确定的处理动作。S416: The network device 102 performs a determined processing action on the second data packet.
当网络设备102确定的对第二数据报文的处理动作为丢弃时,网络设备102丢弃第二数据报文,结束流程。When the processing action for the second data packet determined by the network device 102 is discard, the network device 102 discards the second data packet and ends the process.
当网络设备102确定的对第二数据报文的处理动作为镜像时,网络设备102向指定的地址镜像该第一数据报文,结束流程。When the processing action on the second data packet determined by the network device 102 is mirroring, the network device 102 mirrors the first data packet to the designated address, and the process ends.
当网络设备102确定的对第二数据报文的处理动作为重定向时,网络设备102更改该第一数据报文的转发目的地址,结束流程。When the processing action for the second data packet determined by the network device 102 is redirection, the network device 102 changes the forwarding destination address of the first data packet, and ends the process.
当网络设备102确定的处理动作为转发或标记时,执行S417。When the processing action determined by the network device 102 is forwarding or marking, S417 is executed.
S417:网络设备102根据第二数据报文生成第三数据报文。S417: The network device 102 generates a third data packet according to the second data packet.
网络设备102修改第二数据报文得到第三数据报文,包括:1.网络设备102将SRH的SL字段值置为SL-1的值,即,当SL=1时,将SL值修改为0,当SL=2时,将SL值修改为1。2.网络设备102将第二数据报文中的IPv6头的目的地址修改为Segmentlist[SL]。在一个示例中,网络设备102将SRH的SL字段值置为0,并将IPv6头内的目的地址修改 为:End.XTEpg SID3。The network device 102 modifies the second data message to obtain the third data message, including: 1. The network device 102 sets the value of the SL field of the SRH to the value of SL-1, that is, when SL=1, the value of SL is modified to 0, when SL=2, modify the SL value to 1. 2. The network device 102 modifies the destination address of the IPv6 header in the second data message to Segmentlist[SL]. In an example, the network device 102 sets the value of the SL field of the SRH to 0, and modifies the destination address in the IPv6 header to: End.XTEpg SID3.
S419:网络设备102发送第三数据报文。S419: The network device 102 sends a third data packet.
网络设备102根据IPv6目的地址查找转发表项发送该第三数据报文。The network device 102 searches for the forwarding entry according to the IPv6 destination address and sends the third data packet.
在一个示例中,网络设备102向网络设备103发送第三数据报文。In an example, the network device 102 sends a third data packet to the network device 103.
S421:网络设备103接收到网络设备102发送的第三数据报文后,从第三数据报文中获得第一微分段段标识。S421: After receiving the third data packet sent by the network device 102, the network device 103 obtains the first micro-segmentation segment identifier from the third data packet.
网络设备103从第三数据报文中获得第一微分段段标识的方法和可选方式与图3a所示的方法实施例中的网络设备103获得第一微分段段标识的方法和可选方式一致,详情请参见图3a所示的方法实施例中的S321处的详细描述,本申请在此不再赘述。The method and optional manner in which the network device 103 obtains the first micro-segment segment identifier from the third data packet are the same as the method and optional manner in which the network device 103 obtains the first micro-segment segment identifier in the method embodiment shown in FIG. 3a. For details, please refer to the detailed description at S321 in the method embodiment shown in FIG. 3a, which is not repeated in this application.
S423:网络设备103根据该第一微分段段标识确定对第三数据报文的处理动作。S423: The network device 103 determines a processing action on the third data packet according to the first micro-segmentation identifier.
网络设备103根据该第一微分段段标识确定对第三数据报文的处理动作的方法和可选方式与图3a所示的方法实施例中的网络设备103根据第一微分段段标识确定对第二数据报文的处理动作的方式一致,详情请参见图3a所示的方法实施例中的S323处的详细描述,本申请在此不再赘述。The method and optional manner for the network device 103 to determine the processing action of the third data packet according to the first micro-segment segment identifier are the same as those of the network device 103 in the method embodiment shown in FIG. 3a. The processing actions of the data packets are in the same manner. For details, please refer to the detailed description at S323 in the method embodiment shown in FIG. 3a, which will not be repeated in this application.
S425:网络设备103对第三数据报文执行确定的处理动作。S425: The network device 103 performs a determined processing action on the third data packet.
网络设备103对第三数据报文执行确定的处理动作的方法和可选方式与图3a所示的方法实施例中的网络设备103对第二数据报文执行确定的处理动作方式一致,详情请参见图3a所示的方法实施例中的S325处的详细描述,本申请在此不再赘述。The method and optional manner for the network device 103 to perform the determined processing action on the third data packet are consistent with the manner in which the network device 103 performs the determined processing action on the second data packet in the method embodiment shown in FIG. 3a. For details, please Refer to the detailed description at S325 in the method embodiment shown in FIG. 3a, which is not repeated in this application.
S427:当网络设备103确定的处理动作为转发或标记时,网络设备103根据第三数据报文生成第四数据报文。S427: When the processing action determined by the network device 103 is forwarding or marking, the network device 103 generates a fourth data packet according to the third data packet.
网络设备103根据第三数据报文生成第四数据报文的方法和可选方式与图3a所示的方法实施例中的网络设备103根据第二数据报文生成第三数据报文的处理动作方式一致,详情请参见图3a所示的方法实施例中的S327处的详细描述,本申请在此不再赘述。The method and optional manner for the network device 103 to generate a fourth data packet according to the third data packet are the same as the processing action of the network device 103 in the method embodiment shown in FIG. 3a to generate a third data packet according to the second data packet The manners are the same. For details, please refer to the detailed description at S327 in the method embodiment shown in FIG. 3a, which is not repeated in this application.
S429:网络设备103发送第四数据报文。S429: The network device 103 sends a fourth data packet.
网络设备103网发送第四数据报文的方法和可选方式与图3a所示的方法实施例中的网络设备103发送第三数据报文的方式一致,详情请参见图3a所示的方法实施例中的S329处的详细描述,本申请在此不再赘述。The method and optional method for the network device 103 to send the fourth data packet are the same as the method for the network device 103 to send the third data packet in the method embodiment shown in FIG. 3a. For details, please refer to the method implementation shown in FIG. 3a. The detailed description at S329 in the example will not be repeated here in this application.
如图4b所示的方法实施例,提供了一种数据报文的处理方法流程图,该流程图与图4a所示的方法实施例主要差别在于,第一网络设备、第二网络设备和第三网络设备根据第一微分段段标识和第二微分段段标识进行报文处理。本实施例是对图4a方法实施例的一个细化表示,相关每个执行步骤的具体内容可具体参考图4a中的相同编号的步骤以及其可选方式的实现,为了简洁,不再在此处赘述图4b实施例的详细步骤。The method embodiment shown in FIG. 4b provides a flow chart of a method for processing data packets. The main difference between the flow chart and the method embodiment shown in FIG. 4a is that the first network device, the second network device, and the first network device Third, the network device processes the message according to the first micro-segment segment identifier and the second micro-segment segment identifier. This embodiment is a detailed representation of the method embodiment of FIG. 4a. For the specific content of each execution step, please refer to the steps with the same number in FIG. 4a and the implementation of their optional methods. For brevity, it will not be repeated here. The detailed steps of the embodiment in FIG. 4b will be repeated here.
以上介绍了本申请提供的数据报文的处理方法实施例,以下介绍本申请提供的第一网络设备和第二网络设备。The foregoing describes the embodiments of the data packet processing method provided in this application, and the following describes the first network device and the second network device provided in this application.
图11是本申请实施例提供的一种第二网络设备结构示意图,该网络设备1100可以执行图3a所示的第二网络设备(网络设备101)和图4a所示的第二网络设备(网络设备101)执行的方法。该网络设备1100包括接收单元1101,处理单元1102,发送单元1103。该接收单元1101可用于执行例如图3a实施例中的步骤S303和S305中的接收第一数据报文的相关方法,还可用于执行例如图4a实施例中的步骤S403、S404 和S405中的接收第一数据报文的相关方法。处理单元1102,可用于执行例如图3a实施例中的步骤S307、S308、S309和S305中的确定第一微分段段标识的相关方法,还可用于执行例如图4a实施例中的步骤S407、S408、S409和S405中的确定第一微分段段标识的相关方法;发送单元1103,可用于执行例如图3a实施例中的步骤S311,还可用于执行例如图4a实施例中的步骤S411。FIG. 11 is a schematic structural diagram of a second network device provided by an embodiment of the present application. The network device 1100 can execute the second network device (network device 101) shown in FIG. 3a and the second network device (network device 101) shown in FIG. 4a. The method performed by the device 101). The network device 1100 includes a receiving unit 1101, a processing unit 1102, and a sending unit 1103. The receiving unit 1101 can be used to perform, for example, the related methods of receiving the first data message in steps S303 and S305 in the embodiment of FIG. 3a, and can also be used to perform, for example, the receiving in steps S403, S404, and S405 in the embodiment of FIG. 4a. The related method of the first data message. The processing unit 1102 can be used to perform, for example, steps S307, S308, S309, and S305 in the embodiment of FIG. The related methods for determining the first micro-segment identifier in S409 and S405; the sending unit 1103 may be used to perform, for example, step S311 in the embodiment of FIG. 3a, and may also be used to perform, for example, step S411 in the embodiment of FIG. 4a.
需要说明的一点是,图11实施例提供的第二网络设备在进行如上所述的数据报文的处理时,仅以上述各功能单元的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元完成,即将第二网络设备的内部结构划分成不同的功能单元,以完成以上描述的全部或者部分功能;或者用统一个功能单元完成上述多个单元的功能。应理解,上述实施例提供的第二网络设备与上述转发路径的确定方法实施例属于同一构思,在此仅针对该第二网络设备的各单元执行的步骤进行了举例说明,但并不代表其就不执行上述实施例中的其他步骤或可选方法,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that when the second network device provided in the embodiment of FIG. 11 performs the above-mentioned data message processing, only the division of the above-mentioned functional units is used as an example for illustration. In actual applications, the The above function allocation is completed by different functional units, that is, the internal structure of the second network device is divided into different functional units to complete all or part of the functions described above; or a single functional unit is used to complete the functions of the above multiple units. It should be understood that the second network device provided in the foregoing embodiment belongs to the same concept as the foregoing embodiment of the method for determining a forwarding path. Here, only the steps performed by each unit of the second network device are described as examples, but it does not represent it. Other steps or optional methods in the foregoing embodiments are not executed, and the specific implementation process is detailed in the method embodiments, which will not be repeated here.
图12是本申请实施例提供的一种第一网络设备结构示意图,该网络设备1200可以执行图3a所示的第一网络设备(网络设备103)和图4a所示的第一网络设备(网络设备102)和第二网络设备(网络设备103)执行的方法。该网络设备1200包括接收单元1201,处理单元1202,发送单元1203。该接收单元1201可用于执行例如图3a所示的实施例中的步骤S321中的接收第二数据报文的相关方法。处理单元1202可用于执行例如图3a所示的实施例中的步骤S323、S325、S337和S321中的获得第一微分段段标识的方法。发送单元1203可用于执行例如图3a所示的实施例中的步骤S301和S319。该接收单元1201可用于执行例如图4a所示的实施例中的步骤S413中的接收第二数据报文的相关方法和S421中的接收第三数据报文的相关方法。处理单元1202可用于执行例如图4a所示的实施例中的步骤S415、S416、S417、S423、S425、S427、S413中的获得第一微分段段标识的相关方法和S421中的获得第一微分段段标识的相关方法。发送单元1203可用于执行例如图4a所示的实施例中的步骤S401、S402、S419和S429。Fig. 12 is a schematic structural diagram of a first network device provided by an embodiment of the present application. The network device 1200 can execute the first network device (network device 103) shown in Fig. 3a and the first network device (network device 103) shown in Fig. 4a. The method performed by the device 102) and the second network device (the network device 103). The network device 1200 includes a receiving unit 1201, a processing unit 1202, and a sending unit 1203. The receiving unit 1201 may be used to execute, for example, the related method of receiving the second data packet in step S321 in the embodiment shown in FIG. 3a. The processing unit 1202 may be used to execute, for example, the method of obtaining the first micro-segment segment identifier in steps S323, S325, S337, and S321 in the embodiment shown in FIG. 3a. The sending unit 1203 may be used to perform steps S301 and S319 in the embodiment shown in FIG. 3a, for example. The receiving unit 1201 may be used to execute, for example, the related method of receiving the second data packet in step S413 and the related method of receiving the third data packet in S421 in the embodiment shown in FIG. 4a. The processing unit 1202 may be used to perform, for example, the related method for obtaining the first micro-segmentation identifier in steps S415, S416, S417, S423, S425, S427, and S413 in the embodiment shown in FIG. 4a and the obtaining of the first micro-segmentation segment in S421. Related methods of identification. The sending unit 1203 may be used to execute steps S401, S402, S419, and S429 in the embodiment shown in FIG. 4a, for example.
需要说明的一点是,图12实施例提供的第一网络设备在进行如上所述的数据报文的处理时,仅以上述各功能单元的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元完成,即将第一网络设备的内部结构划分成不同的功能单元,以完成以上描述的全部或者部分功能;或者用统一个功能单元完成上述多个单元的功能。应理解,上述实施例提供的第一网络设备与上述数据报文的处理方法实施例属于同一构思,在此仅针对该第一网络设备的各单元执行的步骤进行了举例说明,但并不代表其就不执行上述实施例中的其他步骤或可选方法,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that when the first network device provided in the embodiment of FIG. 12 performs the above-mentioned data message processing, only the division of the above-mentioned functional units is used as an example for illustration. In actual applications, the The above-mentioned function allocation is completed by different functional units, that is, the internal structure of the first network device is divided into different functional units to complete all or part of the functions described above; or a single functional unit is used to complete the functions of the above-mentioned multiple units. It should be understood that the first network device provided in the foregoing embodiment and the foregoing data packet processing method embodiment belong to the same concept. Here, only the steps performed by each unit of the first network device are described as examples, but they do not represent It does not execute other steps or optional methods in the above-mentioned embodiment, and its specific implementation process is detailed in the method embodiment, which will not be repeated here.
以上介绍了本申请实施例的第一网络设备和第二网络设备,以下介绍该第一网络设备和第二网络设备可能的产品形态。应理解,但凡具备上述图11中的第二网络设备的特征的任何形态的产品,和但凡具备上述图12中的第一网络设备的特征的任何形态的产品,都落入本申请的保护范围。还应理解,以下介绍仅为举例,不限制本申请实施例的第一网络设备和第二网络设备的产品形态。The above describes the first network device and the second network device of the embodiments of the present application, and the following describes possible product forms of the first network device and the second network device. It should be understood that all products in any form that have the characteristics of the second network device in FIG. 11, and all products in any form that have the characteristics of the first network device in FIG. 12, fall within the scope of protection of this application . It should also be understood that the following introduction is only an example, and does not limit the product forms of the first network device and the second network device in the embodiments of the present application.
图13是本申请实施例提供的一种设备1300的结构示意图。图3a实施例所示的第一网络设备或第二网络设备,或图4a实施例所示的第一网络设备、第二网络设备或第三网络设备,均可以通过图13所示的设备来实现。参见图13所示的设备结构示意图。设备1300包括主控板和一个或多个接口板,主控板与接口板通信连接。主控板也称为主处理单元(main processing unit,MPU)或路由处理卡(route processor card),主控板负责对设备1300中各个组件的控制和管理,包括路由计算、设备管理和维护功能。接口板也称为线卡(line processing unit,LPU)或线卡(line card),用于转发数据。在一些实施例中,设备1300也可以包括交换网板,交换网板与主控板、接口板通信连接,交换网板用于转发接口板之间的数据,交换网板也可以称为交换网板单元(switch fabric unit,SFU)。接口板包括中央处理器、存储器、转发芯片和物理接口卡(physical interface card,PIC)。中央处理器与存储器、网络处理器和物理接口卡分别通信连接。存储器用于存储转发表。转发芯片用于基于存储器中保存的转发表转发接收到的数据报文,如果数据报文的目的地址为设备1300的地址,则将该数据报文上送至中央处理器(central processing unit,CPU),如中央处理器1331处理;如果数据报文的目的地址不是设备1300的地址,则根据该目的地址从转发表中查找到该目的地址对应的下一跳和出接口,将该数据报文转发到该目的地址对应的出接口。转发芯片可以是网络处理器(network processor,NP)。PIC也称为子卡,可安装在接口板上,负责将光电信号转换为数据报文并对数据报文进行合法性检查后转发给转发芯片处理。在一些实施例中,中央处理器也可执行转发芯片的功能,比如基于通用CPU实现软件转发,从而接口板中不需要转发芯片。主控板、接口板、交换网板之间的通信连接可以通过总线来实现。在一些实施例中,转发芯片可以通过专用集成电路(application-specific integrated circuit,ASIC)或现场可编程门阵列(field programmable gate array,FPGA)实现。FIG. 13 is a schematic structural diagram of a device 1300 provided by an embodiment of the present application. The first network device or the second network device shown in the embodiment of FIG. 3a, or the first network device, the second network device or the third network device shown in the embodiment of FIG. achieve. See the schematic diagram of the device structure shown in Figure 13. The device 1300 includes a main control board and one or more interface boards, and the main control board is in communication connection with the interface board. The main control board is also called the main processing unit (MPU) or route processor card (route processor card). The main control board is responsible for the control and management of each component in the device 1300, including routing calculation, device management and maintenance functions . The interface board is also called a line processing unit (LPU) or a line card (line card), and is used to forward data. In some embodiments, the device 1300 may also include a switching network board. The switching network board is in communication connection with the main control board and the interface board. The switching network board is used to forward data between the interface boards. The switching network board may also be called a switching network. Board unit (switch fabric unit, SFU). The interface board includes a central processing unit, a memory, a forwarding chip, and a physical interface card (PIC). The central processing unit is respectively communicatively connected with the memory, the network processor and the physical interface card. The memory is used to store the forwarding table. The forwarding chip is used to forward the received data message based on the forwarding table stored in the memory. If the destination address of the data message is the address of the device 1300, the data message is sent to the central processing unit (CPU). ), such as processing by the central processing unit 1331; if the destination address of the data message is not the address of the device 1300, the next hop and outbound interface corresponding to the destination address are found from the forwarding table according to the destination address, and the data message is Forward to the outgoing interface corresponding to the destination address. The forwarding chip may be a network processor (NP). The PIC is also called a daughter card, which can be installed on the interface board and is responsible for converting the photoelectric signal into a data message, and then forwarding the data message to the forwarding chip for processing after checking the legality of the data message. In some embodiments, the central processing unit can also perform the function of a forwarding chip, such as realizing software forwarding based on a general-purpose CPU, so that no forwarding chip is required in the interface board. The communication connection between the main control board, the interface board, and the switching network board can be realized through a bus. In some embodiments, the forwarding chip may be implemented by an application-specific integrated circuit (ASIC) or a field programmable gate array (FPGA).
在逻辑上,设备1300包括控制面和转发面,控制面包括主控板和中央处理器,转发面包括执行转发的各个组件,比如存储器、PIC和NP。控制面执行路由器、生成转发表、处理信令和协议报文、配置与维护设备的状态等功能,控制面将生成的转发表下发给转发面,在转发面,NP基于控制面下发的转发表对设备1300的PIC收到的报文查表转发。控制面下发的转发表可以保存在存储器中。在有些实施例中,控制面和转发面可以完全分离,不在同一设备上。下面将结合图3a和图4a的实施例对上述过程进行简要说明。Logically, the device 1300 includes a control plane and a forwarding plane. The control plane includes a main control board and a central processing unit. The forwarding plane includes various components that perform forwarding, such as memory, PIC, and NP. The control plane performs functions such as routers, generation of forwarding tables, processing of signaling and protocol messages, configuration and maintenance of the status of the equipment, and the control plane sends the generated forwarding tables to the forwarding plane. On the forwarding plane, the NP is based on the control plane’s The forwarding table looks up and forwards the message received by the PIC of the device 1300. The forwarding table issued by the control plane can be stored in the memory. In some embodiments, the control plane and the forwarding plane may be completely separated and not on the same device. The above process will be briefly described below in conjunction with the embodiment of FIG. 3a and FIG. 4a.
如图3a或图4a所述的方法所示,分段路由网络中的第二网络设备可以通过物理接口卡1333接收第一数据报文,判断当该第一数据报文的目的IP地址为网络设备1300的地址,则将该数据报文上送至CPU1331进行处理。该CPU1331可以根据该第一数据报文确定第一微分段段标识。可选的,该CPU1331还用于根据第一数据报文确定第二微分段段标识。该CPU1331还用于根据第一微分段段标识对第一数据报文执行对应的处理动作和生成第二数据报文;或者根据第一微分段段标识和第二微分段段标识对第一数据报文执行对应的处理动作和生成第二数据报文。CPU1311可被配置用于接收控制器或者计算单元的发送的配置指令。物理接口卡1333可用于向第一网络设备发送第二数据报文。As shown in the method described in Figure 3a or Figure 4a, the second network device in the segmented routing network can receive the first data packet through the physical interface card 1333, and determine when the destination IP address of the first data packet is the network The address of the device 1300, the data message is sent to the CPU 1331 for processing. The CPU 1331 can determine the first micro-segment identifier according to the first data packet. Optionally, the CPU 1331 is further configured to determine the second micro-segmentation segment identifier according to the first data packet. The CPU 1331 is also used to perform corresponding processing actions on the first data message and generate a second data message according to the first micro-segmentation identifier; or execute the first data message according to the first micro-segment identifier and the second micro-segment identifier Corresponding processing actions and generating a second data message. The CPU 1311 may be configured to receive configuration instructions sent by the controller or the computing unit. The physical interface card 1333 can be used to send a second data packet to the first network device.
如图3a或图4a所述的方法所示,分段路由网络中的第二网络设备或第一网络设备可以通过物理接口卡1333第一数据报文,判断当该第一数据报文的目的IP地址为网络设备1300的地址,则将该数据报文上送至CPU1331进行处理,该第一数据报文中携带有第一微分段段标识,可选的,该第一数据报文还携带有第二微分段段标识。该CPU1331用于根据第一微分段段标识对第一数据报文执行对应的处理动作和生成第二数据报文;或者根据第一微分段段标识和第二微分段段标识对第一数据报文执行对应的处理动作和生成第二数据报文。CPU1311可被配置用于接收控制器或者计算单元的发送的配置指令。物理接口卡1333可用于向第一网络设备发送第二数据报文。As shown in the method described in Figure 3a or Figure 4a, the second network device or the first network device in the segmented routing network can use the first data packet of the physical interface card 1333 to determine when the purpose of the first data packet is If the IP address is the address of the network device 1300, the data message is sent to the CPU 1331 for processing. The first data message carries the first micro-segment identifier. Optionally, the first data message also carries The second micro-segment segment identifier. The CPU 1331 is configured to perform corresponding processing actions on the first data message and generate a second data message according to the first micro-segmentation identifier; or perform corresponding processing to the first data message according to the first micro-segment identifier and the second micro-segment identifier The processing action and the generation of the second data message. The CPU 1311 may be configured to receive configuration instructions sent by the controller or the computing unit. The physical interface card 1333 can be used to send a second data packet to the first network device.
本发明实施例提供的网络设备可对应于上述图3a或图4a所述方法实施例中的第一网络设备、第二网络设备或第三网络设备,可以实现上述各个方法实施例中的第一网络设备、第二网络设备或第三网络设备所具有的功能和/或所实施的各种步骤和方法。以上仅为简要的示例性描述,为了简洁,在此不再赘述。The network device provided by the embodiment of the present invention may correspond to the first network device, the second network device, or the third network device in the method embodiment described in FIG. 3a or FIG. 4a, and can implement the first network device in each method embodiment described above. Functions and/or various steps and methods implemented by the network device, the second network device, or the third network device. The above is only a brief exemplary description, and for the sake of brevity, it will not be repeated here.
值得说明的是,主控板可能有一块或多块,有多块的时候可以包括主用主控板和备用主控板。接口板可能有一块或多块,网络设备的数据处理能力越强,提供的接口板越多。接口板上的物理接口卡也可以有一块或多块。交换网板可能没有,也可能有一块或多块,有多块的时候可以共同实现负荷分担冗余备份。在集中式转发架构下,网络设备可以不需要交换网板,接口板承担整个系统的业务数据的处理功能。在分布式转发架构下,网络设备可以有至少一块交换网板,通过交换网板实现多块接口板之间的数据交换,提供大容量的数据交换和处理能力。所以,分布式架构的网络设备的数据接入和处理能力要大于集中式架构的设备。可选地,网络设备的形态也可以是只有一块板卡,即没有交换网板,接口板和主控板的功能集成在该一块板卡上,此时接口板上的中央处理器和主控板上的中央处理器在该一块板卡上可以合并为一个中央处理器,执行两者叠加后的功能,这种形态设备的数据交换和处理能力较低(例如,低端交换机或路由器等网络设备)。具体采用哪种架构,取决于具体的组网部署场景,此处不做任何限定。It is worth noting that there may be one or more main control boards, and when there are more than one, it may include the main main control board and the standby main control board. There may be one or more interface boards. The stronger the data processing capability of the network device, the more interface boards are provided. There may also be one or more physical interface cards on the interface board. The switching network board may not exist, or there may be one or more. When there are more than one, the load sharing and redundant backup can be realized together. Under the centralized forwarding architecture, the network equipment does not need to switch the network board, and the interface board undertakes the processing function of the business data of the entire system. Under the distributed forwarding architecture, the network device can have at least one switching network board, and data exchange between multiple interface boards is realized through the switching network board, providing large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of network equipment with a distributed architecture are greater than those with a centralized architecture. Optionally, the form of the network device may also have only one board, that is, there is no switching network board, and the functions of the interface board and the main control board are integrated on the one board. At this time, the central processing unit and the main control board on the interface board The central processing unit on the board can be combined into a central processing unit on this board, and perform the functions of the superposition of the two. The data exchange and processing capacity of this form of equipment is low (for example, low-end switches or routers and other networks) equipment). The specific architecture used depends on the specific networking deployment scenario, and there is no restriction here.
图14是本申请实施例提供的一种设备1400的结构示意图。图3a实施例所示的第一网络设备或第二网络设备,或图4a实施例所示的第一网络设备、第二网络设备或第三网络设备,均可以通过图14所示的设备来实现。参见图14所示的设备结构示意图。该设备1400包括至少一个处理器1401,通信总线1402以及至少一个通信接口1404,可选地,该设备1400还可以包括存储器1403。FIG. 14 is a schematic structural diagram of a device 1400 provided by an embodiment of the present application. The first network device or the second network device shown in the embodiment of FIG. 3a, or the first network device, the second network device or the third network device shown in the embodiment of FIG. achieve. Refer to the schematic diagram of the device structure shown in Figure 14. The device 1400 includes at least one processor 1401, a communication bus 1402, and at least one communication interface 1404. Optionally, the device 1400 may further include a memory 1403.
处理器1401可以是一个通用中央处理器(central processing unit,CPU)、特定应用集成电路(application-specific integrated circuit,ASIC)或一个或多个用于控制本申请方案程序执行的集成电路。处理器可以用于对接收到的报文进行处理,以实现本申请实施例中提供的报文处理的方法。The processor 1401 may be a general-purpose central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling program execution of the solution of this application. The processor may be used to process the received message, so as to implement the message processing method provided in the embodiment of the present application.
比如,当图3a或图4a中的第二网络设备通过图14所示的设备1400来实现时,该处理器可以用于在接收到的报文中添加包括第一微分段段标识和第二微分段段标识的SRH,以便于后续分段路由网络中的其他网络设备可以根据第一微分段段标识和第二微分段段标识对数据报文进行处理,具体功能实现可参考方法图3a或图4a方法实施例中对应第二网络设备的处理部分。又比如,当图3a或图4a中的第一网络设备, 或图4a中的第二网络设备通过图14所示的网络设备来实现时,该处理器可以用于在接收到的数据报文中获取第一微分段段标识、第二微分段段标识,并根据第一微分段段标识和第二微分段段标识对数据报文进行处理,具体功能实现可参考方法实施例中第二网络设备和第一网络设备的处理部分。For example, when the second network device in FIG. 3a or FIG. 4a is implemented by the device 1400 shown in FIG. 14, the processor may be used to add the first micro-segment identifier and the second differential in the received message. SRH of the segment identifier, so that other network devices in the subsequent segment routing network can process the data message according to the first micro-segment segment identifier and the second micro-segment segment identifier. For specific function implementation, please refer to the method shown in Figure 3a or Figure 4a. This example corresponds to the processing part of the second network device. For another example, when the first network device in FIG. 3a or FIG. 4a, or the second network device in FIG. 4a is implemented by the network device shown in FIG. Obtain the first micro-segment segment identifier and the second micro-segment segment identifier in the process, and process the data message according to the first micro-segment segment identifier and the second micro-segment segment identifier. For specific function implementation, please refer to the second network device and the first The processing part of the network equipment.
通信总线1402用于在处理器1401、通信接口1404和存储器1403之间传送信息。The communication bus 1402 is used to transfer information between the processor 1401, the communication interface 1404, and the memory 1403.
存储器1403可以是只读存储器(read-only memory,ROM),如:电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only Memory,CD-ROM)或其它光盘、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)。或者存储器1403也可以是随机存取存储器(random access memory,RAM)或者可存储信息和指令的其它类型的动态存储设备。The memory 1403 can be a read-only memory (ROM), such as: electrically erasable programmable read-only memory (electrically erasable programmable read-only memory, EEPROM), compact disc read-only memory, CD -ROM) or other optical discs, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.). Or the memory 1403 may also be a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions.
存储器1403可以是独立存在,通过通信总线1402与处理器1401相连接。存储器1403也可以和处理器1401集成在一起。The memory 1403 may exist independently, and is connected to the processor 1401 through a communication bus 1402. The memory 1403 may also be integrated with the processor 1401.
可选地,存储器1403用于存储执行本申请方案的程序代码或指令,并由处理器1401来控制执行。处理器1401用于执行存储器1403中存储的程序代码。程序代码中可以包括一个或多个软件模块。可选地,处理器1401自身也可以存储执行本申请方案的程序代码或指令。Optionally, the memory 1403 is used to store program codes or instructions for executing the solutions of the present application, and the processor 1401 controls the execution. The processor 1401 is configured to execute program codes stored in the memory 1403. One or more software modules can be included in the program code. Optionally, the processor 1401 itself may also store program codes or instructions for executing the solutions of the present application.
通信接口1404,使用任何收发器一类的装置,用于与其它设备或通信网络通信,通信网络可以为以太网、无线接入网(RAN)或无线局域网(wireless local area networks,WLAN)等。在本申请实施例中,通信接口1404可以用于接收分段路由网络中的其他网络设备发送的报文,也可以向分段路由网络中的其他网络设备发送报文。通信接口1404可以为以太接口(Ethernet)接口、快速以太(Fast Ethernet,FE)接口或千兆以太(Gigabit Ethernet,GE)接口。The communication interface 1404 uses any device such as a transceiver to communicate with other devices or communication networks. The communication network may be Ethernet, wireless access network (RAN), or wireless local area networks (WLAN), etc. In the embodiment of the present application, the communication interface 1404 may be used to receive packets sent by other network devices in the segment routing network, and may also send packets to other network devices in the segment routing network. The communication interface 1404 may be an Ethernet interface (Ethernet) interface, a Fast Ethernet (FE) interface, or a Gigabit Ethernet (GE) interface.
在具体实现中,作为一种实施例,设备1400可以包括多个处理器,例如图14中所示的处理器1401和处理器1405。这些处理器中的每一个可以是一个单核(single-CPU)处理器,也可以是一个多核(multi-CPU)处理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。In a specific implementation, as an embodiment, the device 1400 may include multiple processors, such as the processor 1401 and the processor 1405 shown in FIG. 14. Each of these processors can be a single-CPU (single-CPU) processor or a multi-core (multi-CPU) processor. The processor here may refer to one or more devices, circuits, and/or processing cores for processing data (for example, computer program instructions).
应理解,上述各种产品形态的网络设备,分别具有上述数据报文的处理方法实施例中的网络设备的任意功能,此处不再赘述。It should be understood that the above-mentioned network devices of various product forms respectively have any function of the network device in the embodiment of the above-mentioned data packet processing method, and will not be repeated here.
参见图15,该图为本申请实施例提供的一种网络系统1500的示意图。Refer to FIG. 15, which is a schematic diagram of a network system 1500 according to an embodiment of this application.
本申请实施例提供的网络系统可以包括第一网络设备1510和第二网络设备1520,第一网络设备1510和第二网络设备1520之间进行通信。在一种可能的方式中,第二网络设备1520可执行如上述图3a和图3b所示的实施例中的网络设备101所执行的方法步骤和相关可选方式,第一网络设备1510可执行如上述图4a或图4b所示的实施例中的网络设备102所执行的方法步骤和相关可选方式。在一种可能的方式中,第一网络设备1510和第二网络设备1520之间进行通信,第二网络设备1520可执行如上述图3a和图3b所示的实施例中的网络设备101所执行的方法步骤和相关可选方式,第一网络设备1510可执行如上述图4a或图4b所示的实施例中的网络设备103所执行的方法步骤和相关可选方式。在一种可能的方式中,该网络系统中还包括第三网络设备1530,第一网络设备1510、第二网络设备1520和第三网 络设备之间进行通信,第二网络设备1520可执行如上述图3a和图3b所示的实施例中的网络设备101所执行的方法步骤和相关可选方式,第一网络设备1510可执行如上述图4a或图4b所示的实施例中的网络设备102所执行的方法步骤和相关可选方式,第一网络设备1530可执行如上述图4a或图4b所示的实施例中的网络设备103所执行的方法步骤和相关可选方式。网络设备101、网络设备102和网络设备103的具体产品形态如上所述,在此不再赘述。The network system provided by the embodiment of the present application may include a first network device 1510 and a second network device 1520, and communication is performed between the first network device 1510 and the second network device 1520. In a possible manner, the second network device 1520 may execute the method steps and related optional manners executed by the network device 101 in the embodiment shown in FIG. 3a and FIG. 3b, and the first network device 1510 may execute The method steps and related optional manners performed by the network device 102 in the embodiment shown in FIG. 4a or FIG. 4b are described above. In a possible way, the first network device 1510 and the second network device 1520 communicate with each other, and the second network device 1520 can perform the execution of the network device 101 in the embodiment shown in FIG. 3a and FIG. 3b. For the method steps and related optional manners, the first network device 1510 can execute the method steps and related optional manners executed by the network device 103 in the embodiment shown in FIG. 4a or FIG. 4b. In a possible manner, the network system also includes a third network device 1530, and the first network device 1510, the second network device 1520, and the third network device communicate with each other, and the second network device 1520 can perform as described above The method steps and related optional manners performed by the network device 101 in the embodiment shown in FIG. 3a and FIG. 3b, the first network device 1510 can execute the network device 102 in the embodiment shown in FIG. 4a or FIG. 4b For the executed method steps and related optional manners, the first network device 1530 may execute the method steps and related optional manners executed by the network device 103 in the embodiment shown in FIG. 4a or FIG. 4b. The specific product forms of the network device 101, the network device 102, and the network device 103 are as described above, and will not be repeated here.
本领域普通技术人员可以意识到,结合本文中所公开的实施例中描述的各方法步骤和单元,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各实施例的步骤及组成。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。本领域普通技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。A person of ordinary skill in the art may realize that, in combination with the method steps and units described in the embodiments disclosed herein, they can be implemented by electronic hardware, computer software, or a combination of both, in order to clearly illustrate the possibilities of hardware and software. Interchangeability. In the above description, the steps and components of each embodiment have been generally described in terms of function. Whether these functions are performed by hardware or software depends on the specific application and design constraint conditions of the technical solution. A person of ordinary skill in the art may use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of the present application.
本领域普通技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参见前述方法实施例中的对应过程,在此不再赘述。A person of ordinary skill in the art can clearly understand that, for the convenience and conciseness of description, the specific working process of the above-described system, device, and unit can be referred to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅是示意性的,例如,该单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口、装置或单元的间接耦合或通信连接,也可以是电的或其它的形式连接。In the several embodiments provided in this application, it should be understood that the disclosed device and method can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the unit is only a logical function division. In actual implementation, there may be other division methods, for example, multiple units or components may be combined or may be Integrate into another system, or some features can be ignored or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may also be electrical or other forms of connection.
该作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本申请实施例方案的目的。The unit described as a separate component may or may not be physically separated, and the component displayed as a unit may or may not be a physical unit, that is, it may be located in one place, or may also be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments of the present application.
另外,在本申请各个实施例中的处理单元可以分散到多个功能单元中,也可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以是两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, the processing units in each embodiment of the present application can be dispersed into multiple functional units, can also be integrated in one processing unit, or each unit can exist alone physically, or two or more units can be integrated. In one unit. The above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件、固件或者其组合实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机程序指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机程序指令可以从一个网站站点、计算机、服务器或数据中心通过有线或无线方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何介质或者是包含一个或多个介质集成的服务器、数据中心等数据存储设备。所述介质可以是磁性介质(例如软盘、硬盘、磁带)、光介质(例如,光盘)、或者半导体介质(例如固 态硬盘)等。In the above-mentioned embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, firmware, or a combination thereof, it may be implemented in the form of a computer program product in whole or in part. The computer program product includes one or more computer program instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer program instructions may be transmitted from a website, computer, server, or data. The center transmits to another website site, computer, server or data center through wired or wireless means. The computer-readable storage medium may be any medium that can be accessed by a computer or a data storage device such as a server or a data center integrated with one or more media. The medium may be a magnetic medium (for example, a floppy disk, a hard disk, and a magnetic tape), an optical medium (for example, an optical disk), or a semiconductor medium (for example, a solid-state hard disk).
以上所述的具体实施方式,对本发明的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上所述仅为本发明的具体实施方式而已,并不用于限定本发明的保护范围,凡在本发明的技术方案的基础之上,所做的任何修改、等同替换、改进等,均应包括在本发明的保护范围之内。The specific embodiments described above further describe the purpose, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific embodiments of the present invention, and are not intended to limit the scope of the present invention. The protection scope, any modification, equivalent replacement, improvement, etc. made on the basis of the technical solution of the present invention shall be included in the protection scope of the present invention.

Claims (38)

  1. 一种数据报文的处理方法,其特征在于,包括:A method for processing a data message, characterized in that it comprises:
    段路由网络中的第一网络设备接收第一数据报文,所述第一数据报文包括第一微分段段标识,所述第一微分段段标识用于标识所述段路由网络中的第二网络设备的一个微分段,所述第一数据报文是发送向所述第二网络设备的数据报文;A first network device in the segment routing network receives a first data message, the first data message including a first micro-segment segment identifier, and the first micro-segment segment identifier is used to identify a second network in the segment routing network A micro-segmentation of a device, where the first data message is a data message sent to the second network device;
    所述第一网络设备根据所述第一微分段段标识确定对所述第一数据报文的处理动作;Determining, by the first network device, a processing action on the first data packet according to the first micro-segmentation segment identifier;
    所述第一网络设备对所述第一数据报文执行所述处理动作。The first network device performs the processing action on the first data packet.
  2. 根据权利要求1所述的方法,其特征在于,所述第一网络设备根据所述第一微分段段标识确定对所述第一数据报文的处理动作,包括:The method according to claim 1, wherein the determining, by the first network device, a processing action on the first data packet according to the first micro-segmentation identifier, comprises:
    所述第一网络设备根据所述第一微分段段标识和所述处理动作的对应关系,确定对所述第一数据报文的处理动作。The first network device determines a processing action on the first data packet according to the correspondence between the first micro-segmentation segment identifier and the processing action.
  3. 根据权利要求1或2所述的方法,其特征在于,所述第一网络设备和所述第二网络设备为同一网络设备,所述第一微分段段标识包括功能部分,The method according to claim 1 or 2, wherein the first network device and the second network device are the same network device, and the first micro-segment segment identifier includes a functional part,
    在所述第一网络设备根据所述第一微分段段标识确定对所述第一数据报文的处理动作之前,所述方法还包括:Before the first network device determines a processing action on the first data packet according to the first micro-segmentation identifier, the method further includes:
    所述第一网络设备确定所述功能部分用于指示:所述第一网络设备根据所述第一微分段段标识确定对所述第一数据报文的处理动作。The first network device determines that the functional part is used to instruct: the first network device determines a processing action on the first data packet according to the first micro-segment segment identifier.
  4. 根据权利要求3所述的方法,其特征在于,当所述处理动作包括转发或标记时,所述第一网络设备对所述第一数据报文执行所述处理动作,包括:The method according to claim 3, wherein when the processing action includes forwarding or marking, the first network device performing the processing action on the first data packet includes:
    所述第一网络设备生成第二数据报文,所述第二数据报文不包括所述第一微分段段标识;Generating a second data packet by the first network device, and the second data packet does not include the first micro-segmentation segment identifier;
    所述第一网络设备发送所述第二数据报文。The first network device sends the second data packet.
  5. 根据权利要求1或2所述的方法,其特征在于,所述第一网络设备和所述第二网络设备为不同的设备,所述第一数据报文还包括微分段节点段标识,所述微分段节点段标识为所述第一网络设备的段标识,所述微分段节点段标识包括功能部分,所述功能部分用于指示:The method according to claim 1 or 2, wherein the first network device and the second network device are different devices, the first data packet further includes a micro-segment node segment identifier, and the The micro-segment node segment identifier is the segment identifier of the first network device, and the micro-segment node segment identifier includes a functional part, and the functional part is used to indicate:
    所述第一网络设备根据所述第一微分段段标识确定对所述第一数据报文的处理动作。The first network device determines a processing action on the first data packet according to the first micro-segmentation segment identifier.
  6. 根据权利要求1-5任一项所述的方法,其特征在于,所述第一数据报文还包括第二微分段段标识,所述第二微分段段标识用于标识所述段路由网络中的第三网络设备的一个微分段,所述第一微分段段标识和所述第二微分段段标识为由所述第三网络设备添加到所述第一数据报文中,所述第一网络设备根据所述第一微分段段标识确定对所述第一数据报文的处理动作,包括:The method according to any one of claims 1-5, wherein the first data message further includes a second micro-segmentation segment identifier, and the second micro-segmentation segment identifier is used to identify the A micro-segment of a third network device, the first micro-segment identifier and the second micro-segment identifier are added to the first data packet by the third network device, and the first network device is based on The determining of the processing action of the first data packet by the first micro-segmentation segment identifier includes:
    所述第一网络设备根据匹配条件和所述处理动作的对应关系,确定对所述第一数据报文的处理动作,所述匹配条件包括所述第一微分段段标识和所述第二微分段段标识。The first network device determines a processing action on the first data packet according to a correspondence between a matching condition and the processing action, and the matching condition includes the first micro-segmentation segment identifier and the second micro-segmentation segment Logo.
  7. 根据权利要求6所述的方法,其特征在于,The method of claim 6, wherein:
    所述第一数据报文的段标识列表中包括所述第二微分段段标识,或The segment identifier list of the first data packet includes the second micro-segment segment identifier, or
    所述第一数据报文还包括元数据,所述元数据包括所述第二微分段段标识。The first data message further includes metadata, and the metadata includes the second micro-segmentation identifier.
  8. 根据权利要求1-7任一项所述的方法,其特征在于,The method according to any one of claims 1-7, wherein:
    所述第一数据报文的段标识列表中包括所述第一微分段段标识。The segment identifier list of the first data message includes the first micro-segment segment identifier.
  9. 根据权利要求7或8所述的方法,其特征在于,所述段标识列表携带在所述第一数据报文的段路由头或多协议标签交换标签栈中。The method according to claim 7 or 8, wherein the segment identifier list is carried in a segment routing header or a multi-protocol label switching label stack of the first data message.
  10. 一种数据报文的处理方法,其特征在于,包括:A method for processing a data message, characterized in that it comprises:
    段路由网络中的第一网络设备接收第一数据报文;The first network device in the segment routing network receives the first data message;
    所述第一网络设备根据所述第一数据报文确定第一微分段段标识,所述第一微分段段标识用于标识所述段路由网络中的第二网络设备的一个微分段,所述第一数据报文不包括所述第一微分段段标识,所述第一数据报文为发送向所述第二网络设备的数据报文;The first network device determines a first micro-segment segment identifier according to the first data message, and the first micro-segment segment identifier is used to identify a micro-segment of a second network device in the segment routing network. A data message does not include the first micro-segmentation segment identifier, and the first data message is a data message sent to the second network device;
    所述第一网络设备根据所述第一微分段段标识确定对所述第一数据报文的处理动作;Determining, by the first network device, a processing action on the first data packet according to the first micro-segmentation segment identifier;
    所述第一网络设备对所述第一数据报文执行所述处理动作。The first network device performs the processing action on the first data packet.
  11. 根据权利要求10所述的方法,其特征在于,所述第一网络设备根据所述第一微分段段标识确定对所述第一数据报文的处理动作,包括:The method according to claim 10, wherein the first network device determines a processing action on the first data packet according to the first micro-segmentation segment identifier, comprising:
    所述第一网络设备根据所述第一微分段段标识和所述处理动作的对应关系,确定对所述第一数据报文的处理动作。The first network device determines a processing action on the first data packet according to the correspondence between the first micro-segmentation segment identifier and the processing action.
  12. 根据权利要求10或11所述的方法,其特征在于,所述第一微分段段标识包括功能部分,所述功能部分用于指示:所述第二网络设备根据所述第一微分段段标识确定对所述第一数据报文的处理动作。The method according to claim 10 or 11, wherein the first micro-segmentation segment identifier includes a functional part, and the functional part is used to indicate that the second network device determines the pairing according to the first micro-segmentation segment identifier. The processing action of the first data message.
  13. 根据权利要求10或11所述的方法,其特征在于,当所述处理动作包括转发或标记时,所述第一网络设备对所述第一数据报文执行所述处理动作,包括:The method according to claim 10 or 11, wherein when the processing action includes forwarding or marking, the first network device performing the processing action on the first data packet includes:
    所述第一网络设备根据所述第一数据报文生成第二数据报文,所述第二数据报文包括所述第一微分段段标识;Generating, by the first network device, a second data message according to the first data message, the second data message including the first micro-segment segment identifier;
    所述第一网络设备向所述第二网络设备发送所述第二数据报文。The first network device sends the second data packet to the second network device.
  14. 根据权利要求10-12任一项所述的方法,其特征在于,The method according to any one of claims 10-12, wherein:
    所述方法还包括:所述第一网络设备还根据所述接收第一数据报文确定所述第二微分段段标识,所述第二微分段段标识用于标识所述第一网络设备的一个微分段;The method further includes: the first network device further determines the second micro-segmentation segment identifier according to the received first data message, and the second micro-segmentation segment identifier is used to identify a differential of the first network device segment;
    所述第一网络设备根据所述第一微分段段标识确定对所述第一数据报文的处理动作,包括:The determining, by the first network device, a processing action on the first data packet according to the first micro-segmentation segment identifier includes:
    所述第一网络设备根据匹配条件和所述处理动作的对应关系,确定对所述第一数据报文的处理动作,所述匹配条件包括所述第一微分段段标识和所述第二微分段段标识。The first network device determines a processing action on the first data packet according to a correspondence between a matching condition and the processing action, and the matching condition includes the first micro-segmentation segment identifier and the second micro-segmentation segment Logo.
  15. 根据权利要求14所述的方法,其特征在于,当所述处理动作包括转发或标记时,所述第一网络设备对所述第一数据报文执行所述处理动作,包括:The method according to claim 14, wherein when the processing action includes forwarding or marking, the first network device performing the processing action on the first data packet includes:
    所述第一网络设备根据所述第一数据报文生成第二数据报文,所述第二数据报文包括所述第一微分段段标识和所述第二微分段段标识;Generating, by the first network device, a second data message according to the first data message, the second data message including the first micro-segmentation segment identifier and the second micro-segmentation segment identifier;
    所述第一网络设备向所述第二网络设备发送所述第二数据报文。The first network device sends the second data packet to the second network device.
  16. 根据权利要求15所述的方法,其特征在于,The method of claim 15, wherein:
    所述第二数据报文的段标识列表包括所述第二微分段段标识,或The segment identifier list of the second data message includes the second micro-segment segment identifier, or
    所述第二数据报文还包括元数据,所述元数据包括所述第二微分段段标识。The second data message further includes metadata, and the metadata includes the second micro-segment segment identifier.
  17. 根据权利要求14-16任一项所述的方法,其特征在于,所述第二微分段段标识包括功能部分,所述功能部分用于指示:所述第一网络设备根据所述第二微分段段标识确定对所述第一数据报文的处理动作。The method according to any one of claims 14-16, wherein the second micro-segmentation segment identifier includes a functional part, and the functional part is used to indicate: the first network device according to the second micro-segmentation segment The identifier determines the processing action for the first data packet.
  18. 根据权利要求13、15或16所述的方法,其特征在于,所述第二数据报文还包括微分段节点段标识,所述微分段节点段标识为所述段路由网络中的第三网络设备的段标识,所述微分段节点段标识用于指示所述第三网络设备根据所述第一微分段段标识对所述第二数据报文进行处理。The method according to claim 13, 15 or 16, wherein the second data message further includes a micro-segment node segment identifier, and the micro-segment node segment identifier is a third network in the segment routing network The segment identifier of the device, where the micro-segment node segment identifier is used to instruct the third network device to process the second data packet according to the first micro-segment segment identifier.
  19. 一种第一网络设备,应用于段路由网络中,其特征在于,包括:A first network device applied to a segment routing network, characterized in that it includes:
    接收单元,用于接收第一数据报文,所述第一数据报文包括第一微分段段标识,所述第一微分段段标识用于标识所述段路由网络中的第二网络设备的一个微分段,所述第一数据报文是发送向所述第二网络设备的数据报文;The receiving unit is configured to receive a first data message, the first data message including a first micro-segment segment identifier, and the first micro-segment segment identifier is used to identify a differential of the second network device in the segment routing network Paragraph, the first data message is a data message sent to the second network device;
    处理单元,用于根据所述第一微分段段标识确定对所述第一数据报文的处理动作;A processing unit, configured to determine a processing action for the first data packet according to the first micro-segmentation segment identifier;
    所述处理单元,用于对所述第一数据报文执行所述处理动作。The processing unit is configured to perform the processing action on the first data packet.
  20. 根据权利要求19所述的第一网络设备,其特征在于,所述处理单元,用于根据所述第一微分段段标识确定对所述第一数据报文的处理动作,具体为:The first network device according to claim 19, wherein the processing unit is configured to determine a processing action on the first data packet according to the first micro-segmentation segment identifier, specifically:
    所述处理单元,用于根据所述第一微分段段标识和所述处理动作的对应关系,确定对所述第一数据报文的处理动作。The processing unit is configured to determine a processing action on the first data packet according to the corresponding relationship between the first micro-segmentation segment identifier and the processing action.
  21. 根据权利要求19或20所述的第一网络设备,其特征在于,所述第一网络设备和所述第二网络设备为同一网络设备,所述第一微分段段标识包括功能部分,The first network device according to claim 19 or 20, wherein the first network device and the second network device are the same network device, and the first micro-segment segment identifier includes a functional part,
    在所述处理单元用于根据所述第一微分段段标识确定对所述第一数据报文的处理动作之前,所述处理单元还具体用于:Before the processing unit is configured to determine a processing action on the first data packet according to the first micro-segmentation segment identifier, the processing unit is further specifically configured to:
    确定所述功能部分用于指示:所述处理单元根据所述第一微分段段标识确定对所述第一数据报文的处理动作。The determining the functional part is used to indicate that the processing unit determines a processing action on the first data packet according to the first micro-segmentation identifier.
  22. 根据权利要求21所述的第一网络设备,所述第一网络设备还包括发送单元,其特征在于,当所述处理动作包括转发或标记时,所述处理单元对所述第一数据报文执行所述处理动作,具体为:The first network device according to claim 21, further comprising a sending unit, wherein when the processing action includes forwarding or marking, the processing unit performs processing on the first data packet The execution of the processing action is specifically:
    所述处理单元生成第二数据报文,所述第二数据报文不包括所述第一微分段段标识;The processing unit generates a second data message, and the second data message does not include the first micro-segment segment identifier;
    所述发送单元,用于发送所述第二数据报文。The sending unit is configured to send the second data message.
  23. 根据权利要求19或20所述的第一网络设备,其特征在于,所述第一网络设备和所述第二网络设备为不同的设备,所述第一数据报文还包括微分段节点段标识,所述微分段节点段标识为所述第一网络设备的段标识,所述微分段节点段标识包括功能部分,所述功能部分用于指示:The first network device according to claim 19 or 20, wherein the first network device and the second network device are different devices, and the first data packet further includes a micro-segment node segment identifier The micro-segment node segment identifier is the segment identifier of the first network device, and the micro-segment node segment identifier includes a functional part, and the functional part is used to indicate:
    所述处理单元根据所述第一微分段段标识确定对所述第一数据报文的处理动作。The processing unit determines a processing action on the first data packet according to the first micro-segmentation segment identifier.
  24. 根据权利要求19-23任一项所述的第一网络设备,其特征在于,所述第一数据报文还包括第二微分段段标识,所述第二微分段段标识用于标识所述段路由网络中的第三网络设备的一个微分段,所述第一微分段段标识和所述第二微分段段标识为由所述第三网络设备添加到所述第一数据报文中,所述处理单元,用于根据所述第一微分段段标识确定对所述第一数据报文的处理动作,具体为:The first network device according to any one of claims 19-23, wherein the first data message further includes a second micro-segment segment identifier, and the second micro-segment segment identifier is used to identify the segment route A micro-segment of a third network device in the network, the first micro-segment identifier and the second micro-segment identifier are added to the first data packet by the third network device, the processing unit , Used to determine a processing action on the first data packet according to the first micro-segmentation segment identifier, specifically:
    所述处理单元,用于根据匹配条件和所述处理动作的对应关系,确定对所述第一数据报文的处理动作,所述匹配条件包括所述第一微分段段标识和所述第二微分段段标识。The processing unit is configured to determine a processing action for the first data packet according to the correspondence between a matching condition and the processing action, and the matching condition includes the first micro-segment segment identifier and the second differential Segment identifier.
  25. 根据权利要求24所述的第一网络设备,其特征在于,The first network device according to claim 24, wherein:
    所述第一数据报文的段标识列表中包括所述第二微分段段标识,或The segment identifier list of the first data packet includes the second micro-segment segment identifier, or
    所述第一数据报文还包括元数据,所述元数据包括所述第二微分段段标识。The first data message further includes metadata, and the metadata includes the second micro-segmentation identifier.
  26. 根据权利要求19-25任一项所述的第一网络设备,其特征在于,The first network device according to any one of claims 19-25, wherein:
    所述第一数据报文的段标识列表中包括所述第一微分段段标识。The segment identifier list of the first data message includes the first micro-segment segment identifier.
  27. 根据权利要求25或26所述的方法,其特征在于,所述段标识列表携带在所述第一数据报文的段路由头或多协议标签交换标签栈中。The method according to claim 25 or 26, wherein the segment identifier list is carried in a segment routing header or a multi-protocol label switching label stack of the first data message.
  28. 一种第二网络设备,应用于段路由网络中,其特征在于,包括:A second network device, applied to a segment routing network, is characterized in that it includes:
    接收单元,用于接收第一数据报文;The receiving unit is configured to receive the first data message;
    处理单元,用于根据所述第一数据报文确定第一微分段段标识,所述第一微分段段标识用于标识所述段路由网络中的第二网络设备的一个微分段,所述第一数据报文不包括所述第一微分段段标识,所述第一数据报文为发送向所述第二网络设备的数据报文;The processing unit is configured to determine a first micro-segment segment identifier according to the first data message, where the first micro-segment segment identifier is used to identify a micro-segment of a second network device in the segment routing network, and the first The data message does not include the first micro-segmentation segment identifier, and the first data message is a data message sent to the second network device;
    所述处理单元,还用于根据所述第一微分段段标识确定对所述第一数据报文的处理动作;The processing unit is further configured to determine a processing action on the first data packet according to the first micro-segmentation segment identifier;
    所述处理单元,还用于对所述第一数据报文执行所述处理动作。The processing unit is further configured to perform the processing action on the first data packet.
  29. 根据权利要求28所述的第二网络设备,其特征在于,所述处理单元还用于根据所述第一微分段段标识确定对所述第一数据报文的处理动作,具体为:The second network device according to claim 28, wherein the processing unit is further configured to determine a processing action on the first data packet according to the first micro-segment segment identifier, specifically:
    所述处理单元,用于根据所述第一微分段段标识和所述处理动作的对应关系,确定对所述第一数据报文的处理动作。The processing unit is configured to determine a processing action on the first data packet according to the corresponding relationship between the first micro-segmentation segment identifier and the processing action.
  30. 根据权利要求28或29所述的第二网络设备,其特征在于,所述第一微分段段标识包括功能部分,所述功能部分用于指示:所述第二网络设备根据所述第一微分段段标识确定对所述第一数据报文的处理动作。The second network device according to claim 28 or 29, wherein the first micro-segmentation identifier includes a functional part, and the functional part is used to indicate that the second network device is based on the first micro-segmentation The identifier determines the processing action for the first data packet.
  31. 根据权利要求28或29所述的第二网络设备,所述第二网络设备还包括发送单元,其特征在于,当所述处理动作包括转发或标记时,所述处理单元还用于对所述第一数据报文执行所述处理动作,具体为:The second network device according to claim 28 or 29, the second network device further comprising a sending unit, wherein when the processing action includes forwarding or marking, the processing unit is further configured to The first data message performs the processing action, specifically:
    所述处理单元,用于根据所述第一数据报文生成第二数据报文,所述第二数据报文包括所述第一微分段段标识;The processing unit is configured to generate a second data message according to the first data message, the second data message including the first micro-segmentation identifier;
    所述发送单元,用于向所述第二网络设备发送所述第二数据报文。The sending unit is configured to send the second data packet to the second network device.
  32. 根据权利要求28-30任一项所述的第二网络设备,其特征在于,The second network device according to any one of claims 28-30, wherein:
    还包括:所述处理单元,还用于根据所述接收第一数据报文确定所述第二微分段段标识,所述第二微分段段标识用于标识所述第一网络设备的一个微分段;It further includes: the processing unit is further configured to determine the second micro-segment segment identifier according to the received first data message, the second micro-segment segment identifier being used to identify a micro-segment of the first network device;
    所述处理单元,还用于根据所述第一微分段段标识确定对所述第一数据报文的处理动作,具体为:The processing unit is further configured to determine a processing action on the first data packet according to the first micro-segmentation segment identifier, specifically:
    所述处理单元根据匹配条件和所述处理动作的对应关系,确定对所述第一数据报文的处理动作,所述匹配条件包括所述第一微分段段标识和所述第二微分段段标识。The processing unit determines a processing action on the first data packet according to a correspondence between a matching condition and the processing action, where the matching condition includes the first micro-segment segment identifier and the second micro-segment segment identifier.
  33. 根据权利要求30所述的第二网络设备,所述第二网络设备还包括发送单元,其特 征在于,当所述处理动作包括转发或标记时,所述处理单元,还用于对所述第一数据报文执行所述处理动作,包括:The second network device according to claim 30, further comprising a sending unit, wherein when the processing action includes forwarding or marking, the processing unit is further configured to A data message executes the processing action, including:
    所述处理单元,用于根据所述第一数据报文生成第二数据报文,所述第二数据报文包括所述第一微分段段标识和所述第二微分段段标识;The processing unit is configured to generate a second data message according to the first data message, the second data message including the first micro-segment segment identifier and the second micro-segment segment identifier;
    所述处理单元,用于向所述第二网络设备发送所述第二数据报文。The processing unit is configured to send the second data packet to the second network device.
  34. 根据权利要求33所述的第二网络设备,其特征在于,The second network device according to claim 33, wherein:
    所述第二数据报文的段标识列表包括所述第二微分段段标识,或The segment identifier list of the second data message includes the second micro-segment segment identifier, or
    所述第二数据报文还包括元数据,所述元数据包括所述第二微分段段标识。The second data message further includes metadata, and the metadata includes the second micro-segment segment identifier.
  35. 根据权利要求32-34任一项所述的第二网络设备,其特征在于,所述第二微分段段标识包括功能部分,所述功能部分用于指示:所述第一网络设备根据所述第二微分段段标识确定对所述第一数据报文的处理动作。The second network device according to any one of claims 32-34, wherein the second micro-segmentation segment identifier includes a functional part, and the functional part is used to indicate: the first network device according to the first The second micro-segment identifier determines the processing action of the first data packet.
  36. 根据权利要求31、33或34所述的第二网络设备,其特征在于,所述第二数据报文还包括微分段节点段标识,所述微分段节点段标识为所述段路由网络中的第三网络设备的段标识,所述微分段节点段标识用于指示所述第三网络设备根据所述第一微分段段标识对所述第二数据报文进行处理。The second network device according to claim 31, 33, or 34, wherein the second data message further includes a micro-segment node segment identifier, and the micro-segment node segment identifier is a segment in the segment routing network The segment identifier of the third network device, where the micro-segment node segment identifier is used to instruct the third network device to process the second data packet according to the first micro-segment segment identifier.
  37. 一种网络系统,其特征在于,所述网络系统包括第一网络设备和第二网络设备,所述第一网络设备为权利要求19至24任一项的所述第一网络设备,所述第二网络设备为权利要求25至30任一项的所述第二网络设备。A network system, wherein the network system includes a first network device and a second network device, the first network device is the first network device according to any one of claims 19 to 24, and the first network device is The second network device is the second network device according to any one of claims 25 to 30.
  38. 一种计算机可读存储介质,其特征在于,所述存储介质上存储有计算机程序,所述计算机程序用于执行权利要求1-18任一项的所述方法。A computer-readable storage medium, wherein a computer program is stored on the storage medium, and the computer program is used to execute the method of any one of claims 1-18.
PCT/CN2020/105056 2019-11-15 2020-07-28 Data packet processing method and device, and storage medium and system WO2021093372A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911122088.3A CN112822104A (en) 2019-11-15 2019-11-15 Data message processing method, device, storage medium and system
CN201911122088.3 2019-11-15

Publications (1)

Publication Number Publication Date
WO2021093372A1 true WO2021093372A1 (en) 2021-05-20

Family

ID=75851892

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/105056 WO2021093372A1 (en) 2019-11-15 2020-07-28 Data packet processing method and device, and storage medium and system

Country Status (2)

Country Link
CN (1) CN112822104A (en)
WO (1) WO2021093372A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114124839A (en) * 2021-09-07 2022-03-01 中国联合网络通信集团有限公司 Interface board and data processing method

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113542213B (en) * 2021-05-27 2023-09-22 新华三大数据技术有限公司 Access control policy generation method and device and orchestrator
CN113438208B (en) * 2021-06-03 2022-08-26 新华三技术有限公司 Message processing method, device and equipment
US11831548B1 (en) * 2022-11-29 2023-11-28 Ciena Corporation Distinguishing SRv6 micro-SID destination address from IPv6 destination address

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160294702A1 (en) * 2015-03-30 2016-10-06 Alcatel-Lucent Usa, Inc. Offline optimization for traffic engineering with segment routing
CN109962847A (en) * 2017-12-14 2019-07-02 中国电信股份有限公司 The packaging method and device and computer readable storage medium of business function chain message
CN109981457A (en) * 2017-12-27 2019-07-05 华为技术有限公司 A kind of method of Message processing, network node and system
CN109981458A (en) * 2019-03-08 2019-07-05 华为技术有限公司 A kind of method, network node and the system of determining message forwarding path

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10404600B2 (en) * 2017-09-12 2019-09-03 Google Llc Mechanism and apparatus for path protection when using compressed segment routing label stacks
CN108429685B (en) * 2018-04-28 2020-08-04 电子科技大学 Service function chain routing method based on segmented routing technology

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160294702A1 (en) * 2015-03-30 2016-10-06 Alcatel-Lucent Usa, Inc. Offline optimization for traffic engineering with segment routing
CN109962847A (en) * 2017-12-14 2019-07-02 中国电信股份有限公司 The packaging method and device and computer readable storage medium of business function chain message
CN109981457A (en) * 2017-12-27 2019-07-05 华为技术有限公司 A kind of method of Message processing, network node and system
CN109981458A (en) * 2019-03-08 2019-07-05 华为技术有限公司 A kind of method, network node and the system of determining message forwarding path

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114124839A (en) * 2021-09-07 2022-03-01 中国联合网络通信集团有限公司 Interface board and data processing method
CN114124839B (en) * 2021-09-07 2023-06-06 中国联合网络通信集团有限公司 Interface board and data processing method

Also Published As

Publication number Publication date
CN112822104A (en) 2021-05-18

Similar Documents

Publication Publication Date Title
WO2021093372A1 (en) Data packet processing method and device, and storage medium and system
EP3985929B1 (en) Rule-based network identifier mapping
US10320664B2 (en) Cloud overlay for operations administration and management
EP2874359B1 (en) Extended ethernet fabric switches
US10193707B2 (en) Packet transmission method and apparatus
US9755959B2 (en) Dynamic service path creation
US9537752B2 (en) Encoding inter-domain shared service paths
US10103902B1 (en) Auto-discovery of replication node and remote VTEPs in VXLANs
US9331936B2 (en) Switch fabric support for overlay network features
US10237179B2 (en) Systems and methods of inter data center out-bound traffic management
CN104601472B (en) The method and message handling system of VXLAN gateways distribution route are realized in the chips
US9294349B2 (en) Host traffic driven network orchestration within data center fabric
US9300524B2 (en) Message forwarding between geographically dispersed network sites
CN112910750B (en) Method, apparatus, system, and medium for address resolution using logical router
US9716687B2 (en) Distributed gateways for overlay networks
US9515927B2 (en) System and method for layer 3 proxy routing
WO2021082575A1 (en) Packet forwarding method, apparatus, storage medium, and system
WO2022012689A1 (en) Route advertisement method and related device
CN106331206A (en) Domain name management method and device
EP2899927A1 (en) Method, device and system for implementing packet routing in network
WO2020212998A1 (en) Network address allocation in a virtual layer 2 domain spanning across multiple container clusters
US20190356632A1 (en) Method and system for network traffic steering towards a service device
CN106789523B (en) Method and device for creating logical tunnel
WO2022012690A1 (en) Router advertisement method and related device
US20220385570A1 (en) Policy enforcement for bare metal servers by top of rack switches

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: 20886486

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20886486

Country of ref document: EP

Kind code of ref document: A1