WO2023061069A1 - Routing packet processing method and apparatus, and storage medium and electronic apparatus - Google Patents

Routing packet processing method and apparatus, and storage medium and electronic apparatus Download PDF

Info

Publication number
WO2023061069A1
WO2023061069A1 PCT/CN2022/115496 CN2022115496W WO2023061069A1 WO 2023061069 A1 WO2023061069 A1 WO 2023061069A1 CN 2022115496 W CN2022115496 W CN 2022115496W WO 2023061069 A1 WO2023061069 A1 WO 2023061069A1
Authority
WO
WIPO (PCT)
Prior art keywords
variable
target
routing
information
indication information
Prior art date
Application number
PCT/CN2022/115496
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 WO2023061069A1 publication Critical patent/WO2023061069A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing

Definitions

  • Embodiments of the present disclosure relate to the communication field, and in particular, relate to a routing message processing method, device, storage medium, and electronic device.
  • FIG. 1 is a schematic diagram of a network structure according to data packet processing in related technologies.
  • VXLAN VXLAN
  • PE1 Provide Edge, operator edge
  • PE2 nodes
  • PE1 Advertises the MAC entry it learned from the CPE to PE2 through the RT-2 route
  • Nexthop Nexthop as the address of the CPE, so that After receiving the RT-2 route, PE2 creates a tunnel to the CPE instead of to PE1.
  • FIG. 1 is just a simplified network, and the actual network is often more complex.
  • Figure 2 is a schematic diagram of the second network structure according to data packet processing in related technologies, as shown in Figure 2, where PE1 and PE2 are used as The boundary point between the Ethernet Virtual Private Network (EVPN) domain and the static VXLAN domain, where PE1/PE2/PE3 form the VXLAN EVPN domain, PE1/PE2/CPE form the static VXLAN domain, and in the static VXLAN domain , the VXLAN tunnel is statically configured, and in the VXLAN EVPN domain, the VXLAN tunnel is dynamically created.
  • EVPN Ethernet Virtual Private Network
  • PE1 still uses the Medium Access Control (MAC) address learned from the CPE as the next hop when publishing the RT-2 route instead of PE1's own IP address.
  • MAC Medium Access Control
  • PE3 will also create the VXLAN tunnel T1 to the CPE instead of the VXLAN tunnel T2 to PE1. This is wrong, because the CPE will not create A static VXLAN tunnel to PE3, so that the VXLAN data packets sent by PE3 to the CPE through the tunnel T1 are discarded by the CPE.
  • IMET Inclusive Multicast Ethernet Tag
  • IP Internet Protocol
  • PE1 advertises the RT-2 route of PE2
  • PE2 will receive the RT-2 route and create a tunnel with the Anycast PE address as the source IP.
  • the source IPs of these two routes when creating a VXLAN tunnel need to use different source IPs. Currently, this needs to be implemented through complex configurations such as Route Map.
  • ELP ESI Link Protection
  • ELP ESI Link Protection
  • the devices try to bypass each other, so that the data packets appear between the devices, that is, a loop occurs.
  • the tunnel between devices needs to be marked with a special mark, so that the forwarding plane knows that the data packets received from the tunnel can no longer be sent out from the tunnel according to the mark.
  • Embodiments of the present disclosure provide a routing message processing method, device, storage medium, and electronic device to at least solve the problem in the related art of how the sending end controls different processing of the same routing message by different receiving ends.
  • a routing packet processing method including:
  • the first device acquires target routing information
  • the first device publishes a first routing message according to the target routing information, where the first routing message is used to instruct a device receiving the first routing message to perform a first target action, and the first The routing message carries the first instruction instruction information, the second instruction instruction information, the first instruction information, the first target value description information buffer, the second target value description information buffer, the first variable instruction information buffer, and the second Descriptive information of the target action, the first indication information instructs the device receiving the first routing message to perform at least one of the following processes:
  • the device receiving the first routing packet is a device that meets the first condition, and executes the second target action in the context of executing the first target action;
  • the device receiving the first routing message is a device that does not meet the first condition and is in the context of performing the first target action, not executing the second target action;
  • the first condition is that the first variable matches the first target value
  • the first variable is the variable indicated by the indication information in the first variable indication information buffer
  • the first target value is the The value in the first target value description information buffer or the value obtained by the method indicated by the instruction information in the first target value description information buffer
  • the first instruction instruction information indicates to determine the first variable A method for indicating the location of the information buffer and the first target value description information buffer
  • the second instruction indication information indicates a method for obtaining the description information of the second target action.
  • a routing packet processing method including:
  • the text carries the first instruction instruction information, the second instruction instruction information, the first instruction information, the first target value description information buffer, the second target value description information buffer, the first variable instruction information buffer and the second target action description information;
  • the first condition is that the first variable matches the first target value
  • the first variable is the variable indicated by the indication information in the first variable indication information buffer
  • the first target value is the The value in the first target value description information buffer or the value obtained by the method indicated by the instruction information in the first target value description information buffer
  • the first instruction instruction information indicates to determine the first variable A method for indicating the location of the information buffer and the first target value description information buffer
  • the second instruction indication information indicates a method for obtaining the description information of the second target action.
  • an apparatus for processing routing packets, which is applied to the first device including:
  • the acquisition module is set to acquire target routing information
  • a publishing module configured to publish a first routing message according to the target routing information, wherein the first routing message is used to instruct the device receiving the first routing message to perform a first target action, and the first The routing message carries the first instruction instruction information, the second instruction instruction information, the first instruction information, the first target value description information buffer, the second target value description information buffer, the first variable instruction information buffer, and the second Descriptive information of the target action, the first indication information instructs the device receiving the first routing message to perform at least one of the following processes:
  • the device receiving the first routing packet is a device that meets the first condition, and executes the second target action in the context of executing the first target action;
  • the device receiving the first routing message is a device that does not meet the first condition and is in the context of performing the first target action, not executing the second target action;
  • the first condition is that the first variable matches the first target value
  • the first variable is the variable indicated by the indication information in the first variable indication information buffer
  • the first target value is the The value in the first target value description information buffer or the value obtained by the method indicated by the instruction information in the first target value description information buffer
  • the first instruction instruction information indicates to determine the first variable A method for indicating the location of the information buffer and the first target value description information buffer
  • the second instruction indication information indicates a method for obtaining the description information of the second target action.
  • a device for processing routing packets including:
  • the receiving module is configured to receive a first routing packet issued by the first device according to the target routing information, wherein the first routing packet is used to instruct the device receiving the first routing packet to perform a first target action, and the The first routing message carries the first instruction instruction information, the second instruction instruction information, the first instruction information, the first target value description information buffer, the second target value description information buffer, and the first variable instruction information buffer and description information of the second target action;
  • a processing module configured to perform at least one of the following processing according to the first instruction information instruction:
  • the first condition is that the first variable matches the first target value
  • the first variable is the variable indicated by the indication information in the first variable indication information buffer
  • the first target value is the The value in the first target value description information buffer or the value obtained by the method indicated by the instruction information in the first target value description information buffer
  • the first instruction instruction information indicates to determine the first variable A method for indicating the location of the information buffer and the first target value description information buffer
  • the second instruction indication information indicates a method for obtaining the description information of the second target action.
  • a computer-readable storage medium where a computer program is stored in the storage medium, wherein the computer program is set to execute any one of the above method embodiments when running in the steps.
  • an electronic device including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to perform any of the above Steps in the method examples.
  • the first device acquires target routing information; the first device issues a first routing message according to the target routing information, and the first indication information carried in the first routing message indicates receiving the first
  • the device for routing packets performs at least one of the following processes: when the device receiving the first routing packet is a device that satisfies the first condition, and executes the second target action in the context of executing the first target action ;
  • the device receiving the first routing message is a device that does not meet the first condition, and does not execute the second target action in the context of executing the first target action, it can solve the problem in the related art How does the sender control the different processing of the same routing packet by different receivers?
  • the sender controls the different processing methods for the same routing packet by different receivers. At least one processing method is different from the processing behavior specified in the current protocol.
  • FIG. 1 is a first schematic diagram of a network structure according to data packet processing in the related art
  • FIG. 2 is a second schematic diagram of a networking structure according to data packet processing in the related art
  • FIG. 3 is a block diagram of a hardware structure of a mobile terminal according to a routing message processing method according to an embodiment of the present disclosure
  • FIG. 4 is a first flowchart of a routing message processing method according to an embodiment of the present disclosure
  • FIG. 5 is a second flowchart of a routing message processing method according to an embodiment of the present disclosure.
  • FIG. 6 is a first schematic diagram of a network structure for data packet processing according to an embodiment of the present disclosure
  • FIG. 7 is a schematic diagram of the architecture of the Programming TLV according to an embodiment of the present disclosure.
  • FIG. 8 is a second schematic diagram of a network structure for processing data packets according to an embodiment of the present disclosure.
  • FIG. 9 is a first block diagram of an apparatus for processing routing packets according to an embodiment of the present disclosure.
  • Fig. 10 is a second block diagram of an apparatus for processing routing packets according to an embodiment of the present disclosure.
  • FIG. 3 is a block diagram of the hardware structure of the mobile terminal according to the routing message processing method of the embodiment of the present disclosure.
  • the mobile terminal may include one or more (only shown in FIG. 3 a) a processor 102 (the processor 102 may include but not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the above-mentioned mobile terminal may also include a memory for communication Functional transmission device 106 and input and output device 108 .
  • a processor 102 may include but not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA
  • a memory 104 for storing data
  • the above-mentioned mobile terminal may also include a memory for communication Functional transmission device 106 and input and output device 108 .
  • FIG. 3 is only for illustration, and it does not limit the structure of the above-mentioned mobile terminal.
  • the mobile terminal may also include more or fewer components than those shown in FIG. 3, or have a different configuration from that shown in FIG.
  • the memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the routing packet processing method in the embodiment of the present disclosure, and the processor 102 runs the computer program stored in the memory 104, thereby Executing various functional applications and slicing processing of the service chain address pool is to realize the above-mentioned method.
  • the memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.
  • the memory 104 may further include a memory that is remotely located relative to the processor 102, and these remote memories may be connected to the mobile terminal through a network. Examples of the aforementioned networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • the transmission device 106 is used to receive or transmit data via a network.
  • the specific example of the above network may include a wireless network provided by the communication provider of the mobile terminal.
  • the transmission device 106 includes a network interface controller (NIC for short), which can be connected to other network devices through a base station so as to communicate with the Internet.
  • the transmission device 106 may be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet in a wireless manner.
  • RF Radio Frequency
  • FIG. 4 is a flowchart 1 of a routing message processing method according to an embodiment of the present disclosure. As shown in FIG. 4 , the The process includes the following steps:
  • Step S402 the first device acquires target routing information
  • Step S404 the first device publishes a first routing message according to the target routing information, wherein the first routing message is used to instruct the device receiving the first routing message to perform a first target action, and the The first routing message carries the first instruction instruction information, the second instruction instruction information, the first instruction information, the first target value description information buffer, the second target value description information buffer, and the first variable instruction information buffer and description information of the second target action, the first indication information instructs the device receiving the first routing message to perform at least one of the following processes:
  • the device receiving the first routing packet is a device that meets the first condition, and executes the second target action in the context of executing the first target action;
  • the device receiving the first routing message is a device that does not meet the first condition and is in the context of performing the first target action, not executing the second target action;
  • the first condition is that the first variable matches the first target value
  • the first variable is the variable indicated by the indication information in the first variable indication information buffer
  • the first target value is the The value in the first target value description information buffer or the value obtained by the method indicated by the instruction information in the first target value description information buffer
  • the first instruction instruction information indicates to determine the first variable A method for indicating the location of the information buffer and the first target value description information buffer
  • the second instruction indication information indicates a method for obtaining the description information of the second target action.
  • the first instruction indication information or the second instruction indication information may be the first indication information.
  • the first target action is the processing performed by the node receiving the first routing packet according to the information in the first routing packet when receiving the first routing packet, instead of After receiving the first routing message, process the data message according to the other received data message and the information in the first routing message. Further, in some implementation manners, all the information required to execute the first target action is in the first routing packet or can be obtained through indication information in the first routing packet.
  • the second target action is an action in the context of executing the first target action.
  • actions in the context of the first target action include actions before executing the first target action, actions during the execution of the first target action, and actions after executing the first target action and executing Actions before other actions.
  • the matching of the first variable and the first target value includes:
  • the first variable is equal to the first target value
  • At least one of the first variable and the first target value is a set, then there is an inclusion relationship between the first variable and the first target value.
  • the matching of the first variable and the first target value in some implementations means that the first variable is included in the set
  • the first target value in other embodiments, the first target value is included in the first variable.
  • the description information of the second target action indicates that the second target action is not to execute the first target action.
  • the first variable indication information buffer is used to carry a first type of indication information
  • the first type of indication information is indication information indicating variables in a first variable set
  • the first variable set include at least two variables in .
  • the description information of the second target action includes third instruction indication information, a second variable indication information buffer, and a second target value description information buffer;
  • the third instruction indication information indicates that the second target action is to set the value of the second variable as the value in the first buffer, and the second variable is the value in the second variable indication information buffer.
  • the variable indicated by the indication information, the first buffer is the second target value description information buffer or a buffer determined according to the method indicated by the indication information in the second target value description information buffer.
  • the third instruction indication information may be the second instruction indication information.
  • the second variable indication information buffer is used to carry a second type of indication information
  • the second type of indication information is indication information indicating variables in a second variable set
  • the second variable set include at least two variables in .
  • the second variable set includes at least two of the following variables: ⁇ the source IP of the IP tunnel; the destination IP of the tunnel; the Bypass flag on the tunnel; the split horizon flag on the tunnel; The Bypass sign of the ingress replication list entry corresponding to the first routing message; the split horizon sign of the ingress replication list entry corresponding to the first routing message ⁇ ;
  • the Bypass flag is the field storing the third indication information
  • the split horizon flag is the field storing the fourth indication information
  • the ingress replication list entry is routed by EVPN RT-3 Constructed entries.
  • the two variables are standardized variables on the first device, devices meeting the first condition, and devices not meeting the first condition.
  • the first routing message, the first variable, the first target value, and the second variable satisfy one of the fifth condition, the sixth condition, and the seventh condition; wherein ,
  • the fifth condition is: the first routing message is a second routing message, wherein the next hop Nexthop of the second routing message is the IP address identifying the first device;
  • the first variable is a set of common IP addresses between the node receiving the second routing message and other nodes, the first target value is a fifth IP, and the fifth IP is the first device an IP address common to the device meeting the first condition, and the second variable is the first attribute of the first entity matching the second routing packet;
  • the sixth condition is: the first routing message is a third routing message, wherein the next hop Nexthop of the third routing message is the IP address identifying the first device; the first The variable is the IP address identifying the node on the node receiving the third routing message, the first target value is a first IP value set, and the first IP value set is the IP configured on the first device A set of address values, the second variable being a second attribute of the second entity matching the third routing packet, wherein the first set of IP values includes at least a device identifying a device meeting the first condition An IP address, and the first IP value set does not include an IP address identifying a device that does not meet the first condition;
  • the seventh condition is: the first routing message is a fourth routing message, wherein the next hop Nexthop of the fourth routing message is the IP address identifying the first device;
  • the first variable is a second IP value set on the node receiving the fourth routing message
  • the first target value is a value identifying the IP address of the first device
  • the second IP value set is a set of IP address values configured on the node receiving the fourth routing message
  • the second variable is a second attribute of a second entity matching the fourth routing message
  • the first The second IP value set includes at least the IP address that identifies the first device
  • the third IP address value set of the device that does not meet the first condition does not include the IP address that identifies the first device
  • the second IP address value set does not include the IP address that identifies the first device.
  • the three IP address sets are IP address value sets configured on devices that do not meet the first condition, and the third IP address set and the second IP address set are configured through the same configuration interface.
  • the second routing packet, the third routing packet, or the next hop Nexthop of the third routing packet is the IP address identifying the first device.
  • the method also includes:
  • the first device When the first routing packet, the first variable, the first target value, and the second variable satisfy the sixth condition, the first device receives a fifth routing packet from the second device , wherein the second device is a device that receives the third routing message and satisfies the first condition, and the next hop Nexthop of the fifth routing message is an IP address identifying the second device,
  • the fifth routing message and the third routing message are similar routing messages, and the fifth routing message does not carry information related to the first instruction information, the second instruction instruction information, and the third instruction instruction information Corresponding instruction information;
  • the first device In response to the next hop of the fifth routing packet being in the first set of IP values, the first device sets a fourth variable as a fourth target value, so that the fourth variable is the same as the second
  • the variables have a symmetrical relationship, wherein the fourth variable is a variable in the context of executing the first target action on the fifth routing packet.
  • the fourth variable has a symmetrical relationship with the second variable, and it may be that the fourth entity to which the fourth variable belongs has a symmetrical relationship with the fifth entity to which the second variable belongs, and the fourth variable
  • the four variables and the second variable are respectively the same elements in the key values of the two entities, wherein the symmetrical relationship between the fourth entity and the fifth entity may be the key value of the fourth entity and
  • the key values of the fifth entity have the same structure and have mutually symmetrical values, and the co-located elements are elements with the same ordinal number in the key values; for example, when the fourth entity and the fifth entity When both key values include ⁇ A attribute, B attribute>, if the A attribute of the fourth entity is equal to the B attribute of the fifth entity and the B attribute of the fourth entity is equal to the A attribute of the fifth entity, Then the key value of the fourth entity and the key value of the fifth entity have mutually symmetrical values, so that the fifth entity and the fourth entity have a symmetrical relationship.
  • the method also includes:
  • the first device Before sending the third routing packet, the first device configures the first IP set.
  • the second target action includes coupling a third entity with the target routing information and setting a third attribute of the third entity to the second target value, wherein the The third attribute is the first attribute of the first entity or the second attribute of the second entity, and the third entity is the second entity or the second attribute to which the third attribute belongs An entity, and the third attribute is a field of the third entity storing second indication information.
  • the first routing message is a sixth routing message
  • the sixth routing message includes:
  • the sixth routing message indicates the routing information to reach the target host through the fourth device after reaching the fourth device through the first target tunnel; wherein, the fourth device passes through the same NVO (Network Virtualization Overlay, network virtualization overlay) ) tunnels belong to the first device and the device that receives the sixth routing message and meets the first condition, and the NVO tunnel does not belong to the third device, and the third device is the device that receives the sixth routing message The node of the sixth routing packet and the third device does not meet the first condition.
  • NVO Network Virtualization Overlay, network virtualization overlay
  • the first routing message is a sixth routing message
  • the sixth routing message further includes:
  • the sixth routing packet indicates routing information to reach the target host via the first device after reaching the first device through the second target tunnel.
  • the second target action further includes, before coupling the third entity with the target routing information, if the third entity has not been created, creating the third entity entity.
  • the second indication information is used to indicate that the packet received from the third entity cannot be forwarded to a fourth entity, and the fourth entity is different from the third entity.
  • the fourth entity is the first target tunnel.
  • the second indication information is used to indicate that the packet received from the third entity cannot be forwarded to the third entity.
  • the publishing of the sixth routing packet by the first device according to the target routing information includes:
  • the first device publishes the target routing information to the EVPN network through the sixth routing message
  • the second target value is a second IP
  • the second IP is the purpose of the first target tunnel IP
  • the value of the fifth IP is obtained from the source IP of the first target tunnel
  • the third attribute is the destination IP of the tunnel matching the sixth routing packet.
  • the publishing of the sixth routing packet by the first device according to the target routing information includes:
  • the first device publishes the target routing information to the EVPN network through the sixth routing message, the value of the fifth IP is obtained from the source IP of the first target tunnel, and the second target value is The indication information in the description information buffer indicates that the second target value is obtained from the first target value, and the third attribute is the source IP of the VXLAN tunnel that matches the sixth routing packet.
  • the sixth routing message also carries fourth instruction indication information, a third variable indication information buffer, and a third target value description information buffer, wherein the fourth instruction indication information, the The third variable indication information buffer and the third target value description information buffer respectively correspond to the functions of the third instruction indication information, the second variable indication information buffer, and the second target value buffer .
  • the second entity or the first entity is at least one of the following:
  • Ethernet segment identifier (Ethernet Segment Identifier, referred to as ESI) forwarding table item matched with the first routing message;
  • the IP tunnel can be VXLAN encapsulation, SRv6 encapsulation, Geneve encapsulation, VXLAN GPE (Generic Protocol Extension, general protocol extension) encapsulation, NVGRE (Network Virtualization using Generic Routing Encapsulation, network virtualization using GRE) These tunnels are sometimes called VXLAN tunnels, SRv6 tunnels, Geneve tunnels, VXLAN GPE tunnels, NVGRE tunnels, and GRE tunnels.
  • the ESI forwarding table entry can be a forwarding table entry based on EVPN RT-1 routing, and at this time, the first routing message can be an EVPN RT-1 routing message;
  • the entry copy list table The item may be a forwarding table entry constructed based on EVPN RT-3 routing, and at this time, the first routing message may be an EVPN RT-3 routing message.
  • the second target value description information buffer contains the second target value or indicates a manner of obtaining the second target value.
  • the first target value description information buffer contains the first target value or indicates a manner of obtaining the first target value.
  • the first variable set includes at least two variables in the following variables: ⁇ node Router ID; node IP address set; BGP link establishment address; Anycast PE address set; Source NVE address of NVE interface ⁇ ;
  • the BGP link establishment address is the source IP address of the TCP session used to establish the BGP session.
  • the two variables are standardized variables on the first device, devices meeting the first condition, and devices not meeting the first condition.
  • the standardized variable refers to that the format of the indication information indicating the variable is consistent on the first device, the device that meets the first condition, and the device that does not meet the first condition. or, the same configuration interface is used on the first device, the device meeting the first condition, and the device not meeting the first condition to modify or indicate the same variable; wherein, the same variable is in Different nodes can have different values. For example, the values of NVE IP on different nodes are different, but they all belong to the variable "NVE IP". If the format has a consistent definition, it can be said that the "NVE IP" variable is a normalized variable on these nodes.
  • the indication information of the first variable indication information buffer may be the indication information of the standardized variable, at this time: use the indication information in the first variable indication information buffer The property that can be changed, whenever a new standardized variable is added, a new first condition is added, so that the new first condition can be compared with any existing second target action Combining to obtain different new processing behaviors; similarly, utilizing the changeable nature of the indication information in the second variable indication information buffer, whenever adding a new standardized variable, a new The second target action, so that the new second target action can be combined with any of the existing first conditions to obtain different new processing behaviors.
  • the new first condition and the new second target action brought about by the newly added standardized variable can also be combined with functions. For example, after adding the standardized variable "NVE IP", You can realize functions such as setting "NVE IP” to 8.8.8.8 when "NVE IP” is 7.7.7.7.
  • the method before the first device publishes the first routing packet according to the target routing information, the method further includes:
  • the first variable indication information buffer is used to indicate different variables in the first variable set by changing the indication information without changing the configuration on the node receiving the first routing message On the premise, the node performing the second target action is changed.
  • the first variable indication information, the first target value description information, and the second target action description information come from configuration information.
  • the first variable indicates an information buffer
  • the description information of the first target value, and the description information of the second target action are included in the first routing message in the form of a script.
  • the first variable indication information buffer, the description information of the first target value and the description information of the second target action are included in the same TLV (Type, Length, Value), and the TLV The TLV type value is the first indication information.
  • FIG. 5 is a flowchart 2 of a routing packet processing method according to an embodiment of the present disclosure. As shown in FIG. 5 , the process includes the following step:
  • Step S502 receiving a first routing packet issued by the first device according to the target routing information, wherein the first routing packet is used to instruct the device receiving the first routing packet to perform a first target action, and the first routing packet
  • a routing message carries the first instruction instruction information, the second instruction instruction information, the first instruction information, the first target value description information buffer, the second target value description information buffer, the first variable instruction information buffer, and the second 2. Descriptive information of the target action;
  • Step S504 performing at least one of the following processes according to the first indication information:
  • the first condition is that the first variable matches the first target value
  • the first variable is the variable indicated by the indication information in the first variable indication information buffer
  • the first target value is the The value in the first target value description information buffer or the value obtained by the method indicated by the instruction information in the first target value description information buffer
  • the first instruction instruction information indicates to determine the first variable A method for indicating the location of the information buffer and the first target value description information buffer
  • the second instruction indication information indicates a method for obtaining the description information of the second target action.
  • the first variable indication information buffer is used to carry a first type of indication information
  • the first type of indication information is indication information indicating variables in a first variable set
  • the first variable set include at least two variables in .
  • the description information of the second target action includes third instruction indication information, a second variable indication information buffer, and a second target value description information buffer;
  • the third instruction indication information indicates that the second target action is to set the value of the second variable as the value in the first buffer, and the second variable is the value in the second variable indication information buffer.
  • the variable indicated by the indication information, the first buffer is the second target value description information buffer or a buffer determined according to the method indicated by the indication information in the second target value description information buffer.
  • the second variable indication information buffer is used to carry a second type of indication information, the second type of indication information is indication information indicating variables in a second variable set, and the second variable set Include at least two variables in .
  • the first variable indication information buffer is used to carry a first type of indication information, the first type of indication information is indication information indicating variables in a first variable set, and the first variable set includes at least two variables .
  • the method when the first routing message, the first variable, the first target value, and the second variable satisfy the sixth condition, the method further includes:
  • the next hop Nexthop of the fifth routing message is an identification device IP address
  • the fifth routing message and the third routing message are similar routing messages
  • the fifth routing message does not carry the same as the first indication information, the second instruction indication information, the first The instruction information corresponding to the instruction information of the three instructions;
  • the fifth routing message is used to instruct the first device to perform the following processing: in response to the next hop of the fifth routing message being in the first IP value set, the first device sends the fourth The variable is set to a fourth target value, so that the fourth variable has a symmetrical relationship with the second variable, wherein the fourth variable is that the first device executes the first Variables in the context of the target action.
  • the second target action includes coupling a third entity with the target routing information and setting a third attribute of the third entity to the second target value, wherein the The third attribute is the first attribute of the first entity or the second attribute of the second entity, and the third entity is the second entity or the first entity to which the third attribute belongs , the third attribute is a field of the third entity storing second indication information, and the second target value is a value of the second indication information.
  • the second indication information is used to indicate that the packet received from the third entity cannot be forwarded to a fourth entity, and the fourth entity is different from the third entity.
  • the second indication information is used to indicate that the packet received from the third entity cannot be forwarded to the third entity.
  • the second entity or the first entity is at least one of the following:
  • the device receiving the first routing message is a device that satisfies the first condition (corresponding to the second device), and executes the second target in the context of executing the first target action Action: when the device receiving the first routing message is a device that does not meet the first condition (corresponding to a third device), and in the context of executing the first target action, the second target is not executed actions, including:
  • the first device (such as PE1) is the first routing information (for example, learned from the fourth device to the MAC entry) publishes the first routing packet (ie RT-2 routing).
  • the first routing message carries the description information of the second target value (identifying the IP value of the fourth device, such as the second IP), the description information of the first target value (such as the IP value of the first device and the second device) common IP address), the first instruction indication information, and the second target action (such as determining the tunnel destination IP) indication information.
  • the first routing packet is used by the second device and the third device to perform the first target action (such as "create an IP tunnel") according to the first routing packet.
  • the second device is a device that satisfies the first condition
  • the third device is a device that does not meet the first condition
  • the second device such as PE2 executes the For the second target action
  • the third device (such as PE3) does not use the second target value description information when executing the first target action.
  • the first target value description information is parameter information used for judging whether the first condition is satisfied, and the first device also meets the first condition.
  • the first device (such as PE1) is the first routing information (for example, learned from the fourth device to the MAC entry) publishes the first routing packet (ie RT-2 routing).
  • the first routing message carries the description information of the second target value (indicating information indicating the method for obtaining the first target value), the description information of the first target value (for example, the common IP address of the first device and the second device address), the first instruction indication information, and the second target action (such as determining the source IP of the NVO tunnel corresponding to the first routing packet) indication information.
  • the first routing packet is used by the second device and the third device to perform the first target action (such as "create an IP tunnel") according to the first routing packet.
  • the second device is a device that satisfies the first condition
  • the third device is a device that does not meet the first condition
  • the second device (such as PE2) according to the first target value (that is, according to the The second target value describes the value obtained by the method indicated in the information) executes the second target action (such as determining the first target value as the source IP of the NVO tunnel), and the third device (such as PE3 ) does not use the second target value description information when executing the first target action.
  • the first target value description information is parameter information used when judging whether the first condition is met, and the first device also meets the first condition.
  • the first device (such as PE1) publishes the first routing message (ie, the EVPN VPLS instance) for the first routing information (ie, the EVPN VPLS instance) that satisfies the fourth condition (ie, there is an Anycast VTEP (VXLAN Tunnel End Point, VXLAN tunnel endpoint) address).
  • the first routing message carries the description information of the second target value (such as "indication information indicating the BGP link establishment address"), the description information of the first target value (such as the value of the Anycast VTEP address), the The first instruction indication information and the second target action (such as determining the source IP of the NVO tunnel corresponding to the first routing packet) indication information.
  • the first routing packet is used by the second device and the third device to perform the first target action (such as "create an IP tunnel") according to the first routing packet.
  • the second device is a device that satisfies the first condition
  • the third device is a device that does not meet the first condition
  • the second device (such as PE2) executes the second target value according to the second target value.
  • Target action (such as determining the second target value (such as the local address in the BGP link establishment address of the BGP session that receives the first routing message) as the value of the source IP of the NVO tunnel)
  • the second The third device (such as PE3) does not use the second target value description information when executing the first target action.
  • the first target value description information is parameter information used for judging whether the first condition is satisfied, and the first device also meets the first condition.
  • the first device publishes a first routing packet according to the first routing information.
  • the first routing message carries the second target value (ie "action-parameters"), the first target value (ie “matching-parameters”), the second environment variable indication information (match type) and the first action ( action statement) instructions.
  • the first routing packet is used by the second device and the third device to perform first processing according to the first routing packet.
  • the second device is a device that satisfies the second condition
  • the third device is a device that does not meet the second condition
  • the second device performs the first process according to the first parameter (i.e. "action-parameters" information executes the first action
  • the third device does not execute the first action when executing the first process.
  • the second condition is that the value of the second environment variable is equal to the first target value, and the first device also satisfies the second condition.
  • the first device publishes a first routing packet.
  • the first routing message carries second target value description information (namely "matching-parameters"), second environment variable indication information (match type) and first action description information (action statement).
  • the first routing packet is used by the second device and the third device to perform first processing according to the first routing packet.
  • the second device is a device that satisfies the second condition
  • the third device is a device that does not meet the second condition
  • the second device executes the first action when performing the first process, so The third device does not perform the first action when performing the first process.
  • the second condition is that the value of the first pre-variable is equal to the second target value.
  • the first action description information indicates that the value of the first environment variable indication information is set as the first target value
  • the first post variable is a variable generated during the first processing
  • the first routing message also carries first post variable indication information and first target value description information.
  • the second target value description information includes the second target value or indicates the method for obtaining the second target value
  • the first target value description information includes the first target value or indicates the method for obtaining the second target value. A target value method.
  • the sending end and the receiving end have a unified value range and meaning of the first pre-variable, the second target value, and the first action description information.
  • the value range of the first pre-variable includes ⁇ node Router ID; node IP address set; BGP (Border Gateway Protocol, Border Gateway Protocol) link building address; Anycast PE address set; NVE interface Source NVE address ⁇
  • the first action includes ⁇ Deny: discard the first routing message; Set: set the value of the X post variable to the Y target value ⁇ , wherein the X post
  • the value range of the variable includes ⁇ the source IP of the IP tunnel; the destination IP of the tunnel; the Bypass sign on the tunnel; the split horizon sign on the tunnel; the Bypass sign of the entry copy list entry corresponding to the first routing message; The split horizon flag of the ingress replication list entry corresponding to the first routing packet ⁇ .
  • the first pre-variable indication information, the second target value description information and the first action description information are included in the first routing message in the form of a script.
  • the The above script comes from configuration information.
  • the first pre-variable, the second target value and the first action description information are included in the first routing packet in the form of TLV.
  • CE forms a superior network (the first network), wherein, PE1 and PE2 are the boundary nodes between the subordinate network and the superior network, and PE1 and PE2 use the same virtual address as the address of the NVE interface for the subordinate network, namely Anycast PE address, so that only one remote NVE (Network Virtualization Edge, Network Virtualization Edge) interface is perceived from the CPE side, and a VXLAN tunnel is established with this virtual address.
  • NVE Network Virtualization Edge, Network Virtualization Edge
  • CPE uplink packets can reach PE3 or dual-homed CE3 (Customer Edge) by choosing PE1 or PE2 (CE3 in Figure 1 still exists in Figure 2, but it is not shown in Figure 2), However, there may also be single-homed CE devices in the network, such as CE1 and CE2. After the CPE's uplink packets arrive at one of the PEs, they may need to detour to another PE to reach the single-homed CE. Therefore, a bypass channel is required between dual-active PE1 and PE2. Deploy EVPN neighbors between PE1 and PE2, and configure different addresses, namely Bypass VTEP addresses, to create a Bypass VXLAN tunnel between PE1 and PE2 as a bypass channel.
  • the real address of PE3 is 150.3.3.3, which is also the BGP link establishment address and BGP Router ID.
  • FIG. 7 is a schematic diagram of the architecture of the Programming TLV according to an embodiment of the present disclosure.
  • PE1 and PE2 learn the MAC address information M1 of the host H1 on the CPE side through the uplink message on the CPE side, and the M1 is obtained from The static VXLAN tunnel T14 is learned, so that the host H1 can first reach the CPE node through the destination IP address 4.4.4.4 of the tunnel T14, and then reach the H1 host through the CPE node, and then route the message through MAC/IP R1 publishes the M1 to the EVPN network, which carries the Programming TLV, and the Programming TLV carries the destination IP of the T14 tunnel (that is, 4.4.4.4, the second IP) through the Action Parameters Sub-TLV, and through the Matching Parameters Sub-TLV -TLV carries the source IP of the T14 tunnel (i.e.
  • the first IP which is also the Anycast PE address of PE1 and PE2), and instructs the receiving end node of the routing message R1 to send its Anycast PE address through Matching Sub-TLV Match the data carried in Matching Parameters, and if the match is successful (called Matching Sub-TLV hit), execute the action corresponding to the Action Sub-TLV; indicate the receiving end node of the routing message R1 through the Action Sub-TLV if Matching Sub -TLV match, when matching the VXLAN tunnel, use the IP address carried in the Action Parameters Sub-TLV as the destination IP of the VXLAN tunnel matched by R1.
  • the Programming TLV is a new TLV.
  • the PE2 node receives the routing message R1, matches the Anycast PE address configured on PE2 with the IP address 1.1.1.1 in the Matching Parameters Sub-TLV according to its Matching Sub-TLV instruction, and finds that the match is successful. Then, according to The Action Sub-TLV indicates that the IP address 4.4.4.4 in the Action Parameters Sub-TLV is used as the destination IP address of the VXLAN tunnel that matches R1.
  • the PE3 node receives the routing message R1, and according to its Matching Sub-TLV instruction, it finds that the Anycast PE address is not configured locally, so it cannot match the IP address in the Matching Parameters Sub-TLV, so the matching fails, so the Action Sub is ignored -TLV instructions and the data in the Action Parameters Sub-TLV to create a VXLAN tunnel T31 with a source IP of 150.3.3.3 and a destination IP of 100.1.1.1.
  • the Nexthop of the RT-2 route R1 advertised by PE1 is the real address of PE1 (namely 100.1.1.1).
  • the first instruction indication information (that is, the type encoding of Maching Sub-TLV) indicates that the Value part of Maching Sub-TLV is the first variable indication information buffer and the Value part of Maching Parameters Sub-TLV is the first target value description information buffer district.
  • the second instruction indication information (that is, the type code of the Action Sub-TLV) indicates that the Value part of the Action Sub-TLV is the second variable indication information buffer and the Value part of the Action Parameters Sub-TLV is the second target value description information buffer district.
  • the first indication information (that is, the type code of Programming TLV) instructs the second device (that is, PE2) to execute the second target action according to the second target value when executing the first target action
  • the The first indication information indicates that the third device (that is, PE3) does not execute the second target action according to the second target value when executing the first target action.
  • the third device is a device that does not satisfy the first condition
  • the first condition is that the first variable is equal to the first target value.
  • the second target action assigns a value to the second variable (that is, the destination IP of the VXLAN tunnel that matches R1), and executes the second variable according to the second target value (that is, 4.4.4.4).
  • the target action is to use the second target value to assign a value to the second variable.
  • the Nexthop of the RT-2 route advertised by PE1 and PE2 is a real address rather than the Anycast PE address
  • the Nexthop of the RT-1 route corresponding to CE3 (see Figure 1, not shown in Figure 2) published by PE1 and PE2 is also The real address does not need to be an Anycast PE address, thus avoiding the problem that some traffic has to be detoured through the VXLAN tunnel between PE1-PE2 when one of the CE3 dual-homing links fails.
  • This embodiment is the same as Example 1 except where specified.
  • this embodiment uses the Action Sub-TLV to instruct the receiving end node of the routing message R1 to use the IP address carried in the Action Parameters Sub-TLV as the destination IP of the VXLAN tunnel matching R1, At the same time, use the Action Parameters Sub-TLV to indicate that the source IP of the VXLAN tunnel that matches R1 is in the Matching Parameters Sub-TLV.
  • the Action Parameters Sub-TLV does not carry any IP address, but only carries an instruction information on how to obtain the corresponding IP address.
  • Example 1 Unless otherwise specified, this embodiment is the same as the superposition of Example 1 and Example 2.
  • TLV1 the routing message R1 (i.e. the first routing message)
  • TLV2 one of the Programming TLVs
  • TLV2 another Programming TLV
  • the Matching Sub-TLV of the TLV1 is the same as that of the TLV2, and the Matching Parameters Sub-TLV is also the same.
  • the first routing message also carries the fourth instruction indication information (the type encoding of the Action Sub-TLV of TLV2), the third variable indication information buffer (the value domain of the Action Sub-TLV of TLV2) and the third target value Description information buffer (value domain of Action Parameters Sub-TLV of TLV2), wherein, the fourth instruction indication information, the third variable indication information buffer and the third target value description information buffer are respectively related to the
  • the third instruction indication information (the type encoding of the Action Sub-TLV of TLV1), the second variable indication information buffer (the value domain of the Action Sub-TLV of TLV1), the second target value buffer (the Action Parameters Sub-TLV value domain) has the same effect.
  • This embodiment is the same as Example 3 except where specified.
  • this embodiment replaces the two Programming TLVs in Example 3 with one Programming TLV (referred to as TLV3)
  • the method is: the Matching Sub-TLV of the TLV3 and the Matching TLV of the TLV1 (or TLV2) Same, the Matching Parameters Sub-TLV of the TLV3 is the same as the Matching Parameters Sub-TLV of the TLV1 (or TLV2); and, by carrying the IPt and the ninth indication information in the Action Parameters Sub-TLV at the same time, so that according to the The Action Parameters Sub-TLV of TLV3 can obtain two IP addresses at the same time, that is, IPs and IPt, wherein the ninth indication indicates that the IPs are obtained in the Matching Parameters Sub-TLV; and, using the TLV3
  • the Action Sub-TLV instructs the receiving end node of the routing message R1 to use the IPs as the source IP of the VXLAN tunnel matching R1, and use the IPt as the destination IP of the VXLAN tunnel matching R
  • this embodiment does not carry the Programming TLV, but carries the Consignor PE TLV.
  • the method is: carry the IPt in the Value part of the consignor PE TLV at the operator edge of the entrusting party, and use the R1 Nexthop carries the IPs, and, through the TLV Type (i.e., type coding) of the Consignor PE TLV, indicates that the IPs are carried out and "the Matching Sub-TLV in the TLV3 indicates that the IPs carried in the TLV3 are carried out.” Matching" is the same match, and at the same time, the TLV Type of the Consignor TLV also indicates that the receiving end node of the routing message R1 uses the IPs as the source IP of the VXLAN tunnel that matches R1, and uses the IPt as the source IP of the VXLAN tunnel that matches R1. R1 matches the destination IP of the VXLAN tunnel.
  • This embodiment is the same as Example 2 except where specified.
  • PE1 and PE2 send RT3 route R3 to each other, where Nexthop is the real address of PE1 and PE2, and ORIP is also the real address of PE1 and PE2, and PMSI Tunnel extended community attribute
  • the Tunnel ID in is also the real address of PE1 and PE2 respectively.
  • the present embodiment carries the Programming TLV (referred to as TLV4) in the RT-3 routing message R3, and the Matching Sub-TLV, Matching Parameters Sub-TLV and Action Sub-TLV of the TLV4 are all consistent with the Same as above TLV2.
  • TLV4 Programming TLV
  • this embodiment carries the tenth indication information and the eleventh indication information in the Action Parameters Sub-TLV, and uses the tenth indication information to indicate that the receiving end node of the routing message R3 is related to the route
  • the source IP of the VXLAN tunnel (corresponding to the third entity) matched by the message R3 is the BGP link establishment address on the receiving end node (marked as IPs2, namely the 200.2.2.2), and the tenth An indication indicates that the VXLAN tunnel is marked as a Bypass VXLAN tunnel (corresponding to setting the field storing the third indication information of the third entity as the value of the third indication information).
  • the tenth indication information and the eleventh indication information may be the same data, and the eleventh indication information indicates the third indication information.
  • PE2 After PE2 receives the routing message R3, according to the instructions of the Programming TLV, it will create a VXLAN tunnel T21b according to the routing message R3, and the source IP of the VXLAN tunnel T21b is the IPs2 (i.e. said 200.2.2.2), destination IP is the Tunnel ID (i.e. said 100.1.1.1) in the PMSI Tunnel extended community attribute of said RT-3 route, and said tunnel T21b is marked as a Bypass tunnel.
  • IPs2 i.e. said 200.2.2.2
  • destination IP is the Tunnel ID (i.e. said 100.1.1.1) in the PMSI Tunnel extended community attribute of said RT-3 route
  • said tunnel T21b is marked as a Bypass tunnel.
  • the two-tuple ⁇ the tenth indication information, the eleventh indication information> corresponds to the second target value description information
  • the field of the VXLAN tunnel that matches the routing message R3 stores the third indication information (that is, the Bypass flag) > that is, corresponds to the second variable, the two-tuple ⁇ IPs2, the third indication
  • the value of the message > ie corresponds to the second target value.
  • Example 5 Unless otherwise specified, this embodiment is the same as the superposition of Example 5 and Example 6.
  • the Consignor PE TLV and the TLV4 are respectively carried and processed in the RT-2 route and the RT-3 route.
  • VXLAN tunnel T21b created through the RT-3 route is marked as a Bypass tunnel.
  • This embodiment is the same as Example 7 except where specified.
  • the TLV4 is replaced by script 2.
  • the first indication information is the type code of the TLV carrying the script.
  • the script language of the script has at least two statements, a match statement and a set statement, and each of the match statement and the set statement has two parameters.
  • the first instruction indication information indicates that the first parameter of the match statement (i.e. the keyword anycast-vtep-address of the script language) position (i.e. the data block storing anycast-vtep-address) is all
  • the first variable indicates the information buffer and the location of the second parameter of the match statement (ie, the keyword vxlan-tunnel-destination of the script language) (ie, the data block storing vxlan-tunnel-destination) is described by the first target value information buffer;
  • the first parameter (being the keyword bgp-nexthop of the scripting language) position (being the data block of storing bgp-nexthop) of the second instruction indicating information (being the set keyword of the scripting language) indication set statement is described second variable Indicate the information buffer and the second parameter (i.e. the keyword consignor-pe-ip of the script language) position (i.e. the data block storing consignor-pe-ip) of the match statement is the described second target value description information buffer;
  • the first indication information indicates that the second device executes the second target action according to the second target value when executing the first target action
  • the first indication information indicates that the third device performs
  • the first target action does not execute the second target action according to the second target value
  • the second device is a device that satisfies the first condition
  • the third device is a device that does not meet the first condition.
  • a conditional device, the first condition being that the first variable is equal to the first target value.
  • the first device (PE1) publishes a first routing packet.
  • the first routing message carries second target value description information (bgp-nexthop), first variable indication information (anycast-vtep-address) and first action description information (setvxlan-tunnel-destination consignor-pe-ip ).
  • the first routing packet is used by the second device (PE2) and the third device (PE3) to perform a first target action (creating a VXLAN tunnel) according to the first routing packet.
  • the second device is a device that satisfies the first condition (match anycast-vtep-address bgp-nexthop)
  • the third device is a device that does not meet the first condition
  • the second device is performing the second Execute the second target action (set vxlan-tunnel-destination consignor-pe-ip) during a target action, and the third device does not execute the second target action when executing the first process.
  • the first condition is that the value of the first variable (Anycast PE address of the receiving end of the first routing message) is equal to the first target value (Nexthop of the first routing message).
  • the second target action description information indicates that the value of the second variable (the destination IP of the VXLAN tunnel to be created) is set as the second target value (the value of the Consignor PE TLV), and the second The variable is a variable generated during the first target action (that is, creating a VXLAN tunnel), and the first routing message also carries the second variable indication information (vxlan-tunnel-destination) and the second target value description information ( consignor-pe-ip).
  • the first target value description information indicates the method for obtaining the first target value (obtained from Nexthop in the first routing message)
  • the second target value description information indicates the method for obtaining the second target value method (taken from the Consignor PE TLV).
  • the first device (PE1) publishes a first routing packet.
  • the first routing message carries the first target value description information (bgp-nexthop), the first pre-variable (that is, the first variable) indication information (anycast-vtep-address) and the first action (that is, the Describe the second target action) description information (set vxlan-tunnel--source bgp-update-source).
  • the first routing packet is used by the second device (PE2) and the third device (PE3) to perform first processing (that is, the first target action) according to the first routing packet, and in this example, create a VXLAN tunnel).
  • the second device is a device that satisfies the second condition (equivalent to the first condition, in this example, match anycast-vtep-address bgp-nexthop), and the third device is a device that does not meet the second condition
  • the second device executes the first action when performing the first processing (setting the source IP of the VXLAN tunnel to be created as the BGP link establishment address of the node receiving the first routing message) , the third device does not perform the first action when performing the first process.
  • the second condition is that the value of the first pre-variable (Anycast PE address of the receiving end of the first routing message) is equal to the first target value (Nexthop of the first routing message).
  • the first action description information indicates that the value of the first post variable (that is, the second variable, in this example, the source IP of the VXLAN tunnel to be created) is set as the first target value (the value of the BGP link-building address of the node receiving the first routing message), the first post variable is a variable generated during the first processing (that is, creating a VXLAN tunnel), and the first The routing message also carries the first post variable indication information (that is, the second variable indication information, vxlan-tunnel-source in this embodiment) and the second target value description information (bgp-update-source).
  • the first target value description information includes the first target value or indicates the method for obtaining the first target value (obtained from Nexthop in the first routing message), and the second target value description information includes The second target value may indicate a method for obtaining the second target value (obtained from the BGP link establishment address of the node receiving the first routing message).
  • the value range of the first pre-variable includes ⁇ node Router ID; node IP address set; BGP link establishment address; Anycast PE address set; Source NVE address of the NVE interface ⁇ , the first An action includes ⁇ Deny: discard the first routing packet; Set: set the value of the X post variable to the Y target value ⁇ , wherein the value range of the X post variable includes ⁇ IP tunnel The source IP of the tunnel; the destination IP of the tunnel; the Bypass mark on the tunnel; the split horizon mark on the tunnel; the Bypass mark of the entry replication list entry corresponding to the first routing message; corresponding to the first routing message entry to copy the split horizon flag of the list entry ⁇ .
  • the matching of the second target value with the first pre-variable means that the second target value is in the set, wherein, The first pre-variable is a variable that exists before the first process is performed.
  • FIG. 8 is a second schematic diagram of a network structure for data message processing according to an embodiment of the present disclosure. As shown in Figure 8, it is an EVPN network, where CE3 is on ES3, and when CE1 node fails, ES3 on PE1 and PE2 will both perceive This failure, and ESI link protection ELP, that is, both PE1 and PE2 try to bypass each other to CE3, thus causing data packets to ping-pong between PE1 and PE2, that is, a loop occurs, in order to break the loop , you can mark the tunnel between PE1 and PE2 as a split-horizon tunnel, that is, data packets received from this tunnel cannot be sent out from this tunnel.
  • ESI link protection ELP that is, both PE1 and PE2 try to bypass each other to CE3, thus causing data packets to ping-pong between PE1 and PE2, that is, a loop occurs, in order to break the loop , you can mark the tunnel between PE1 and PE2 as a split-horizon tunnel, that is, data packets received from this
  • PE1 and PE2 Configure each other's NVE IP as their protector IP on PE1 and PE2, and then PE1 and PE2 carry a Programming TLV when sending EVPN routes to each other, and these two Programming TLVs are TLV5 and TLV6 respectively.
  • the Matching Sub-TLV of TLV5 indicates to match the value in the Matching Parameters Sub-TLV with the protector IP set of the receiving end (including the NVE IP of PE1), and the Action Sub-TLV indicates that if the matching is established, execute the Action Parameters Sub-TLV
  • the Action Parameters Sub-TLV indicates to mark the "split horizon" on the VXLAN tunnel T21c created according to the EVPN route.
  • the Matching Sub-TLV of TLV6 indicates to match the value in the Matching Parameters Sub-TLV with the protector IP set of the receiver (corresponding to the second IP value set mentioned above, including the NVE IP of PE2), and the Action Sub-TLV indicates that if the If the above match is established, the action in the Action Parameters Sub-TLV is executed, wherein the value of the Matching Parameters Sub-TLV is the NVE IP of PE2, and the Action Parameters Sub-TLV indicates that the VXLAN tunnel T12c created according to the EVPN route is marked with "Horizontal split" mark (corresponding to the above-mentioned fourth indication information).
  • VXLAN tunnels T21c and T12c are marking the VXLAN tunnels T21c and T12c as "split-horizon" tunnels. PE1/PE2 will not resend the data packets sent by the other party to the other party, thus breaking the loop.
  • PE1 and PE2 only configure each other's NVE IP as their own protector IP (in this form, PE1 and PE2 record each other's The IP of the other party), the IP of the protector of PE1 is not the IP owned by PE1 (so it is not the common IP of PE1 and PE2), the IP of the protector of PE2 is not the IP owned by PE2 (so it is not the common IP of PE1 and PE2) .
  • PE2 does not need to configure PE1 as its protector, and only PE1 needs to configure PE2 as its protector.
  • TLV7 indicates that the NVE IP of the receiving end is used to match the value in the Matching Parameters Sub-TLV
  • the Action Sub-TLV indicates that if the match is established, the action in the Action Parameters Sub-TLV is executed, wherein, Matching Parameters Sub -The value of TLV is a set composed of the protector IP of PE1 (corresponding to the above-mentioned first IP value set, including the NVE IP of PE2), and the Action Parameters Sub-TLV indicates the VXLAN tunnel T21c created according to the EVPN route Put the "horizontal split" mark on it (corresponding to the above-mentioned second instruction information).
  • PE1 when PE1 receives the EVPN route sent by PE2, although it does not carry the Programming TLV, PE1 finds that the Next hop of the route is an element in its protector IP set (that is, the Nexthop match this set), PE1 will also mark the VXLAN tunnel T12c created according to this route as "split horizon".
  • PE2 and PE1 will respectively mark the VXLAN tunnels T21c and T12c as "split horizon" tunnels, so that PE1/PE2 will not resend the data packets sent by the other party to the other party, thus breaking the loop. road.
  • the loop is broken without upgrading the PE2 node or changing the configuration on the PE2 node.
  • FIG. 9 is a block diagram 1 of a routing message processing device according to an embodiment of the present disclosure, as shown in FIG. 9 display, including:
  • An acquisition module 92 configured to acquire target routing information
  • the publishing module 94 is configured to publish a first routing message according to the target routing information, wherein the first routing message is used to instruct the device receiving the first routing message to perform a first target action, and the first routing message
  • a routing message carries the first instruction instruction information, the second instruction instruction information, the first instruction information, the first target value description information buffer, the second target value description information buffer, the first variable instruction information buffer, and the second 2.
  • Descriptive information of the target action, the first indication information instructs the device receiving the first routing message to perform at least one of the following processes:
  • the device receiving the first routing packet is a device that meets the first condition, and executes the second target action in the context of executing the first target action;
  • the device receiving the first routing message is a device that does not meet the first condition and is in the context of performing the first target action, not executing the second target action;
  • the first condition is that the first variable matches the first target value
  • the first variable is the variable indicated by the indication information in the first variable indication information buffer
  • the first target value is the The value in the first target value description information buffer or the value obtained by the method indicated by the instruction information in the first target value description information buffer
  • the first instruction instruction information indicates to determine the first variable A method for indicating the location of the information buffer and the first target value description information buffer
  • the second instruction indication information indicates a method for obtaining the description information of the second target action.
  • the first variable indication information buffer is used to carry a first type of indication information
  • the first type of indication information is indication information indicating variables in a first variable set
  • the first variable set include at least two variables in .
  • the description information of the second target action includes third instruction indication information, a second variable indication information buffer, and a second target value description information buffer;
  • the third instruction indication information indicates that the second target action is to set the value of the second variable as the value in the first buffer, and the second variable is the value in the second variable indication information buffer.
  • the variable indicated by the indication information, the first buffer is the second target value description information buffer or a buffer determined according to the method indicated by the indication information in the second target value description information buffer.
  • the second variable indication information buffer is used to carry a second type of indication information
  • the second type of indication information is indication information indicating variables in a second variable set
  • the second variable set include at least two variables in .
  • the first routing message, the first variable, the first target value, and the second variable satisfy one of the fifth condition, the sixth condition, and the seventh condition; wherein ,
  • the fifth condition is: the first routing message is a second routing message, and the first variable is a set of common IP addresses between the node receiving the second routing message and other nodes, so The first target value is the fifth IP, the fifth IP is the common IP address of the first device and the device meeting the first condition, and the second variable matches the second routing packet The first attribute of the first entity of ;
  • the sixth condition is: the first routing message is a third routing message, the first variable is the IP address identifying the node on the node receiving the third routing message, and the first target The value is the first IP value set, the first IP value set is the IP address value set configured on the first device, and the second variable is the first IP value of the second entity that matches the third routing message.
  • Two attributes wherein the first IP value set includes at least an IP address identifying a device that meets the first condition, and the first IP value set does not include an IP address that identifies a device that does not meet the first condition IP address;
  • the seventh condition is: the first routing message is a fourth routing message, the first variable is a second IP value set on the node receiving the fourth routing message, and the first target The value is a value identifying the IP address of the first device, the second IP value set is the IP address value set configured on the node receiving the fourth routing message, and the second variable is the same as the The second attribute of the second entity matched by the fourth routing packet, wherein the second IP value set includes at least the IP address identifying the first device, and the first IP address of the device that does not meet the first condition The IP address identifying the first device is not included in the three IP address value sets, the third IP address set is an IP address value set configured on a device that does not meet the first condition, and the third IP address The set is configured through the same configuration interface as the second set of IP addresses.
  • the method when the first routing message, the first variable, the first target value, and the second variable satisfy the sixth condition, the method further includes:
  • the first device receives a fifth routing packet from a second device, where the second device is a device that receives the third routing packet and satisfies the first condition, and the fifth routing packet
  • the next hop Nexthop is the IP address identifying the second device, the fifth routing message and the third routing message are similar routing messages, and the fifth routing message does not carry the same routing message as the first routing message.
  • the first device In response to the next hop of the fifth routing packet being in the first IP value set, the first device sets a fourth variable as a fourth target value, where the fourth variable is a reference to the The fifth variable in the context in which the routing packet executes the first target action makes the fourth variable have a symmetrical relationship with the second variable.
  • the second target action includes coupling a third entity with the target routing information and setting a third attribute of the third entity to the second target value, wherein the The third attribute is the first attribute of the first entity or the second attribute of the second entity, and the third entity is the second entity or the second attribute to which the third attribute belongs An entity, and the third attribute is a field of the third entity storing second indication information.
  • the second indication information is third indication information or fourth indication information, wherein the third indication information is used to indicate that the message received from the third entity cannot be forwarded to the fourth entity, and the fourth entity is different from the third entity, and the fourth indication information is used to indicate that the packet received from the third entity cannot be forwarded to the third entity.
  • the first routing message is a sixth routing message
  • the sixth routing message includes:
  • the sixth routing message indicates the routing information to reach the target host through the fourth device after reaching the fourth device through the first target tunnel; A device and a device that receives the sixth routing message and satisfies the first condition, and the NVO tunnel is not included in a third device, the third device is the node that receives the sixth routing message and the The third device does not satisfy the first condition.
  • the first variable indication information buffer is used to indicate different variables in the first variable set by changing the indication information without changing the configuration on the node receiving the first routing message On the premise, the node performing the second target action is changed.
  • the device also includes:
  • a configuration module configured to configure the first IP value set before sending the third routing packet.
  • the second target action is an action in the context of executing the first target action.
  • the matching of the first variable and the first target value includes:
  • the first variable is equal to the first target value
  • At least one of the first variable and the first target value is a set, then there is an inclusion relationship between the first variable and the first target value.
  • the description information of the second target action indicates that the second target action is not to execute the first target action.
  • the second variable set includes at least two of the following variables: ⁇ the source IP of the IP tunnel; the destination IP of the tunnel; the Bypass flag on the tunnel; the split horizon flag on the tunnel; The Bypass sign of the ingress replication list entry corresponding to the first routing message; the split horizon sign of the ingress replication list entry corresponding to the first routing message ⁇ ;
  • the two variables are standardized variables on the first device, devices meeting the first condition, and devices not meeting the first condition.
  • the second target action further includes, before coupling the third entity with the target routing information, if the third entity has not been created, creating the third entity entity.
  • the distribution module is further configured for the first device to publish the target routing information to the EVPN network through the sixth routing message, the second target value is the second IP, The second IP is the destination IP of the first target tunnel, the value of the fifth IP is obtained from the source IP of the first target tunnel, and the third attribute is to match the sixth routing message The destination IP of the tunnel.
  • the distribution module is also used for
  • the first device publishes the target routing information to the EVPN network through the sixth routing message, the value of the fifth IP is obtained from the source IP of the first target tunnel, and the second target value is The indication information in the description information buffer indicates that the second target value is obtained from the first target value, and the third attribute is the source IP of the VXLAN tunnel that matches the sixth routing packet.
  • the sixth routing message also carries fourth instruction indication information, a third variable indication information buffer, and a third target value description information buffer, wherein the fourth instruction indication information, the The third variable indication information buffer and the third target value description information buffer respectively correspond to the functions of the third instruction indication information, the second variable indication information buffer, and the second target value buffer .
  • the second entity or the first entity is at least one of the following:
  • the second target value description information buffer contains the second target value or indicates a manner of obtaining the second target value.
  • the first target value description information buffer contains the first target value or indicates a manner of obtaining the first target value.
  • the first variable set includes at least two variables in the following variables: ⁇ node Router ID; node IP address set; BGP link establishment address; Anycast PE address set; Source NVE address of NVE interface ⁇ ;
  • the two variables are standardized variables on the first device, devices meeting the first condition, and devices not meeting the first condition.
  • the device also includes:
  • An instructing module configured to instruct to send the first routing message.
  • the first variable indication information, the first target value description information, and the second target action description information come from configuration information.
  • the first variable indicates an information buffer
  • the description information of the first target value, and the description information of the second target action are included in the first routing message in the form of a script.
  • the first variable indicates the information buffer, the description information of the first target value, and the description information of the second target action are included in the same TLV, and the TLV type value of the TLV is the The first instruction message.
  • a routing message processing device is also provided, and Fig. 10 is a block diagram 2 of a routing message processing device according to an embodiment of the present disclosure, as shown in Fig. 10 , including:
  • the receiving module 102 is configured to receive a first routing packet issued by the first device according to the target routing information, where the first routing packet is used to instruct the device receiving the first routing packet to perform a first target action,
  • the first routing message carries the first instruction instruction information, the second instruction instruction information, the first instruction information, the first target value description information buffer, the second target value description information buffer, and the first variable instruction information buffer The descriptive information of the area and the second target action;
  • the processing module 104 is configured to perform at least one of the following processing according to the first indication information instruction:
  • the first condition is that the first variable matches the first target value
  • the first variable is the variable indicated by the indication information in the first variable indication information buffer
  • the first target value is the The value in the first target value description information buffer or the value obtained by the method indicated by the instruction information in the first target value description information buffer
  • the first instruction instruction information indicates to determine the first variable A method for indicating the location of the information buffer and the first target value description information buffer
  • the second instruction indication information indicates a method for obtaining the description information of the second target action.
  • the description information of the second target action includes third instruction indication information, a second variable indication information buffer, and a second target value description information buffer;
  • the third instruction indication information indicates that the second target action is to set the value of the second variable as the value in the first buffer, and the second variable is the value in the second variable indication information buffer.
  • the variable indicated by the indication information, the first buffer is the second target value description information buffer or a buffer determined according to the method indicated by the indication information in the second target value description information buffer.
  • the first variable indication information buffer is used to carry a first type of indication information
  • the first type of indication information is indication information indicating variables in a first variable set
  • the first variable set include at least two variables in .
  • the second variable indication information buffer is used to carry a second type of indication information, the second type of indication information is indication information indicating variables in a second variable set, and the second variable set includes at least two variables .
  • the method when the first routing message, the first variable, the first target value, and the second variable satisfy the sixth condition, the method further includes:
  • the next hop Nexthop of the fifth routing message is an identification device IP address
  • the fifth routing message and the third routing message are similar routing messages
  • the fifth routing message does not carry the same as the first indication information, the second instruction indication information, the first The instruction information corresponding to the instruction information of the three instructions;
  • the fifth routing message is used to instruct the first device to perform the following processing: in response to the next hop of the fifth routing message being in the first IP value set, the first device sends the fourth The variable is set to a fourth target value, wherein the fourth variable is a variable in the context in which the first device performs the first target action on the fifth routing packet, so that the fourth variable is the same as the The second variable has a symmetrical relationship.
  • the second target action includes coupling a third entity with the target routing information and setting a third attribute of the third entity to the second target value, wherein the The third attribute is the first attribute of the first entity or the second attribute of the second entity, the third entity is the second entity or the first entity to which the third attribute belongs, and the third attribute is a field of the third entity storing second indication information, and the second target value is a value of the second indication information.
  • the second indication information is used to indicate that the message received from the third entity cannot be forwarded to a fourth entity, and the fourth entity is different from the third entity, or,
  • the second indication information is used to indicate that the message received from the third entity cannot be forwarded to the third entity.
  • the second entity or the first entity is at least one of the following:
  • Embodiments of the present disclosure also provide a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps in any one of the above method embodiments when running.
  • the above-mentioned computer-readable storage medium may include but not limited to: U disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM) , mobile hard disk, magnetic disk or optical disk and other media that can store computer programs.
  • ROM read-only memory
  • RAM random access memory
  • mobile hard disk magnetic disk or optical disk and other media that can store computer programs.
  • Embodiments of the present disclosure also provide an electronic device, including a memory and a processor, where a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
  • the electronic device may further include a transmission device and an input and output device, wherein the transmission device is connected to the processor, and the input and output device is connected to the processor.
  • each module or each step of the above-mentioned disclosure can be realized by a general-purpose computing device, and they can be concentrated on a single computing device, or distributed in a network composed of multiple computing devices In fact, they can be implemented in program code executable by a computing device, and thus, they can be stored in a storage device to be executed by a computing device, and in some cases, can be executed in an order different from that shown here. Or described steps, or they are fabricated into individual integrated circuit modules, or multiple modules or steps among them are fabricated into a single integrated circuit module for implementation. As such, the present disclosure is not limited to any specific combination of hardware and software.

Landscapes

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

Abstract

Embodiments of the present disclosure provide a routing packet processing method and apparatus, and a storage medium and an electronic apparatus. The method comprises: a first device obtaining target routing information; and issuing a first routing packet according to the target routing information, first indication information carried by the first routing packet being used for instructing a device receiving the first routing packet to carry out at least one of the following processing: when the device receiving the first routing packet is a device satisfying a first condition and is in the context of executing a first target action, executing a second target action; and when the device receiving the first routing packet is a device not satisfying the first condition and is in the context of executing the first target action, not executing the second target action. The problem in the related art of how a sending terminal controls different receiving terminals to carry out different processing on a same routing packet can be solved.

Description

路由报文处理方法、装置、存储介质及电子装置Routing message processing method, device, storage medium and electronic device
相关申请的交叉引用Cross References to Related Applications
本公开基于2021年10月15日提交的发明名称为“路由报文处理方法、装置、存储介质及电子装置”的中国专利申请CN202111204435.4,并且要求该专利申请的优先权,通过引用将其所公开的内容全部并入本公开。This disclosure is based on the Chinese patent application CN202111204435.4 filed on October 15, 2021 with the title of "routing message processing method, device, storage medium and electronic device", and claims the priority of this patent application, which is incorporated by reference The disclosed content is incorporated in this disclosure in its entirety.
技术领域technical field
本公开实施例涉及通信领域,具体而言,涉及一种路由报文处理方法、装置、存储介质及电子装置。Embodiments of the present disclosure relate to the communication field, and in particular, relate to a routing message processing method, device, storage medium, and electronic device.
背景技术Background technique
图1是根据相关技术中数据报文处理的组网结构示意图一,如图1所示,在客户端设备(Custom Premise Equipment,简称为CPE)通过静态虚拟扩展局域网(Virtual extensible Local Area Network,简称为VXLAN)隧道双归到PE1(Provider Edge,运营商边缘)和PE2节点时,PE1将其从CPE学到的MAC条目通过RT-2路由发布给PE2时,将Nexthop设置为CPE的地址,从而使得PE2收到该RT-2路由后,创建到CPE的隧道而不是到PE1的隧道。Figure 1 is a schematic diagram of a network structure according to data packet processing in related technologies. When the VXLAN) tunnel is dual-homed to PE1 (Provider Edge, operator edge) and PE2 nodes, when PE1 advertises the MAC entry it learned from the CPE to PE2 through the RT-2 route, it sets Nexthop as the address of the CPE, so that After receiving the RT-2 route, PE2 creates a tunnel to the CPE instead of to PE1.
图1所示网络只是一个简化了的网络,实际的网络往往会更复杂,图2是根据相关技术中数据报文处理的组网结构示意图二,如图2所示,其中,PE1和PE2作为以太网虚拟私有网络(Ethernet Virtual Private Network,简称为EVPN)域和静态VXLAN域的边界点,其中,PE1/PE2/PE3组成VXLAN EVPN域,PE1/PE2/CPE组成静态VXLAN域,在静态VXLAN域中,VXLAN隧道为静态配置,在VXLAN EVPN域中,VXLAN隧道为动态创建。按上述方法,则PE1仍然将从CPE学到的媒体接入控制(Medium Access Control,简称为MAC)地址在发布RT-2路由时以CPE的地址作为下一跳而不是以PE1自己的IP地址作为下一跳,这样一来,该RT-2路由到达PE3时,PE3也将会创建到CPE的VXLAN隧道T1而不是到PE1的VXLAN隧道T2,这样是不对的,因为CPE上并不会创建到PE3的静态VXLAN隧道,从而造成PE3通过所述隧道T1发送到CPE的VXLAN数据报文被CPE丢弃。The network shown in Figure 1 is just a simplified network, and the actual network is often more complex. Figure 2 is a schematic diagram of the second network structure according to data packet processing in related technologies, as shown in Figure 2, where PE1 and PE2 are used as The boundary point between the Ethernet Virtual Private Network (EVPN) domain and the static VXLAN domain, where PE1/PE2/PE3 form the VXLAN EVPN domain, PE1/PE2/CPE form the static VXLAN domain, and in the static VXLAN domain , the VXLAN tunnel is statically configured, and in the VXLAN EVPN domain, the VXLAN tunnel is dynamically created. According to the above method, PE1 still uses the Medium Access Control (MAC) address learned from the CPE as the next hop when publishing the RT-2 route instead of PE1's own IP address. As the next hop, in this way, when the RT-2 route reaches PE3, PE3 will also create the VXLAN tunnel T1 to the CPE instead of the VXLAN tunnel T2 to PE1. This is wrong, because the CPE will not create A static VXLAN tunnel to PE3, so that the VXLAN data packets sent by PE3 to the CPE through the tunnel T1 are discarded by the CPE.
同时,对于PE1发布给PE2的包容式组播以太标记路由(Inclusive Multicast Ethernet Tag,简称为IMET)路由,希望PE2收到该IMET路由(即RT-3路由)创建的是PE2到PE1的隧道,该隧道的源IP地址不能使用Anycast PE地址,而将使用PE2的物理IP地址作为源网络协议(Internet Protocol,简称为IP)地址。但是,对于PE1发布PE2的RT-2路由,却希望PE2收到该RT-2路由创建的是以Anycast PE地址作为源IP的隧道。这两种路由创建VXLAN隧道时的源IP需要采用不同的源IP,当前,这需要通过Route Map等复杂配置来实现。At the same time, for the Inclusive Multicast Ethernet Tag (IMET) route advertised by PE1 to PE2, it is hoped that PE2 will receive the IMET route (that is, the RT-3 route) to create a tunnel from PE2 to PE1. The source IP address of the tunnel cannot use the Anycast PE address, but the physical IP address of PE2 will be used as the source Internet Protocol (Internet Protocol, referred to as IP) address. However, when PE1 advertises the RT-2 route of PE2, it hopes that PE2 will receive the RT-2 route and create a tunnel with the Anycast PE address as the source IP. The source IPs of these two routes when creating a VXLAN tunnel need to use different source IPs. Currently, this needs to be implemented through complex configurations such as Route Map.
EVPN网络中存在链路保护ESI链路保护(ESI Link Protection,简称为ELP),即设备间都试图通过对方绕道,于是造成数据报文在设备之间出现乒乓,也就是出现环路,为了破除此环路,需要将设备之间的隧道打上特殊标志,使得转发面根据此标志,知道从该隧道接收的数据报文不能再从该隧道发出。但是,有时候,从一条隧道接收的数据报文再从该隧道转发出去是正常的,因此,不能一刀切将所有隧道都打上该特殊标志。There is link protection in the EVPN network ESI Link Protection (ESI Link Protection, referred to as ELP), that is, the devices try to bypass each other, so that the data packets appear between the devices, that is, a loop occurs. For this loop, the tunnel between devices needs to be marked with a special mark, so that the forwarding plane knows that the data packets received from the tunnel can no longer be sent out from the tunnel according to the mark. However, sometimes, it is normal for data packets received from a tunnel to be forwarded through the tunnel. Therefore, it is not possible to mark all tunnels with this special flag across the board.
针对相关技术中发送端如何控制不同接收端对同一路由报文的不同处理的问题,尚未提出解决方案。No solution has been proposed for the problem of how the sender controls different processing of the same routing message by different receivers in the related art.
发明内容Contents of the invention
本公开实施例提供了一种路由报文处理方法、装置、存储介质及电子装置,以至少解决相关技术中发送端如何控制不同接收端对同一路由报文的不同处理的问题。Embodiments of the present disclosure provide a routing message processing method, device, storage medium, and electronic device to at least solve the problem in the related art of how the sending end controls different processing of the same routing message by different receiving ends.
根据本公开的一个实施例,提供了一种路由报文处理方法,包括:According to an embodiment of the present disclosure, a routing packet processing method is provided, including:
第一设备获取目标路由信息;The first device acquires target routing information;
所述第一设备根据所述目标路由信息发布第一路由报文,其中,所述第一路由报文用于指示接收所述第一路由报文的设备执行第一目标动作,所述第一路由报文中携带第一指令指示信息、第二指令指示信息、第一指示信息、第一目标值描述信息缓冲区、第二目标值描述信息缓冲区、第一变量指示信息缓冲区以及第二目标动作的描述信息,所述第一指示信息指示接收所述第一路由报文的设备进行以下至少之一处理:The first device publishes a first routing message according to the target routing information, where the first routing message is used to instruct a device receiving the first routing message to perform a first target action, and the first The routing message carries the first instruction instruction information, the second instruction instruction information, the first instruction information, the first target value description information buffer, the second target value description information buffer, the first variable instruction information buffer, and the second Descriptive information of the target action, the first indication information instructs the device receiving the first routing message to perform at least one of the following processes:
当接收所述第一路由报文的设备为满足第一条件的设备,且在执行所述第一目标动作的上下文中执行所述第二目标动作;When the device receiving the first routing packet is a device that meets the first condition, and executes the second target action in the context of executing the first target action;
当接收所述第一路由报文的设备为不满足所述第一条件的设备,且在执行所述第一目标动作的上下文中时不执行所述第二目标动作;When the device receiving the first routing message is a device that does not meet the first condition and is in the context of performing the first target action, not executing the second target action;
其中,所述第一条件为第一变量与第一目标值匹配,所述第一变量为所述第一变量指示信息缓冲区中的指示信息所指示的变量,所述第一目标值为所述第一目标值描述信息缓冲区中的数值或者用所述第一目标值描述信息缓冲区中的指示信息所指示的方法获得的数值,所述第一指令指示信息指示确定所述第一变量指示信息缓冲区和所述第一目标值描述信息缓冲区的位置的方法,所述第二指令指示信息指示获得所述第二目标动作的描述信息的方法。Wherein, the first condition is that the first variable matches the first target value, the first variable is the variable indicated by the indication information in the first variable indication information buffer, and the first target value is the The value in the first target value description information buffer or the value obtained by the method indicated by the instruction information in the first target value description information buffer, the first instruction instruction information indicates to determine the first variable A method for indicating the location of the information buffer and the first target value description information buffer, and the second instruction indication information indicates a method for obtaining the description information of the second target action.
根据本公开的另一个实施例,还提供了一种路由报文处理方法,包括:According to another embodiment of the present disclosure, a routing packet processing method is also provided, including:
接收第一设备根据目标路由信息发布的第一路由报文,其中,所述第一路由报文用于指示接收所述第一路由报文的设备执行第一目标动作,所述第一路由报文中携带第一指令指示信息、第二指令指示信息、第一指示信息、第一目标值描述信息缓冲区、第二目标值描述信息缓冲区、第一变量指示信息缓冲区以及第二目标动作的描述信息;receiving a first routing packet issued by the first device according to the target routing information, wherein the first routing packet is used to instruct the device receiving the first routing packet to perform a first target action, and the first routing packet The text carries the first instruction instruction information, the second instruction instruction information, the first instruction information, the first target value description information buffer, the second target value description information buffer, the first variable instruction information buffer and the second target action description information;
根据所述第一指示信息指示进行以下至少之一处理:performing at least one of the following processes according to the first indication information:
当满足第一条件,且在执行所述第一目标动作的上下文中执行所述第二目标动作;performing the second target action in the context of performing the first target action when the first condition is met;
当不满足所述第一条件,且在执行所述第一目标动作的上下文中时不执行所述第二目标动作;not performing the second target action when the first condition is not satisfied and in the context of performing the first target action;
其中,所述第一条件为第一变量与第一目标值匹配,所述第一变量为所述第一变量指示信息缓冲区中的指示信息所指示的变量,所述第一目标值为所述第一目标值描述信息缓冲区中的数值或者用所述第一目标值描述信息缓冲区中的指示信息所指示的方法获得的数值,所述第一指令指示信息指示确定所述第一变量指示信息缓冲区和所述第一目标值描述信息缓冲区的位置的方法,所述第二指令指示信息指示获得所述第二目标动作的描述信息的方法。Wherein, the first condition is that the first variable matches the first target value, the first variable is the variable indicated by the indication information in the first variable indication information buffer, and the first target value is the The value in the first target value description information buffer or the value obtained by the method indicated by the instruction information in the first target value description information buffer, the first instruction instruction information indicates to determine the first variable A method for indicating the location of the information buffer and the first target value description information buffer, and the second instruction indication information indicates a method for obtaining the description information of the second target action.
根据本公开的另一个实施例,还提供了一种路由报文处理装置,应用于所述第一设备,包括:According to another embodiment of the present disclosure, there is also provided an apparatus for processing routing packets, which is applied to the first device, including:
获取模块,设置为获取目标路由信息;The acquisition module is set to acquire target routing information;
发布模块,设置为根据所述目标路由信息发布第一路由报文,其中,所述第一路由报文用于指示接收所述第一路由报文的设备执行第一目标动作,所述第一路由报文中携带第一指令指示信息、第二指令指示信息、第一指示信息、第一目标值描述信息缓冲区、第二目标值描述信息缓冲区、第一变量指示信息缓冲区以及第二目标动作的描述信息,所述第一指示信息指示接收所述第一路由报文的设备进行以下至少之一处理:A publishing module, configured to publish a first routing message according to the target routing information, wherein the first routing message is used to instruct the device receiving the first routing message to perform a first target action, and the first The routing message carries the first instruction instruction information, the second instruction instruction information, the first instruction information, the first target value description information buffer, the second target value description information buffer, the first variable instruction information buffer, and the second Descriptive information of the target action, the first indication information instructs the device receiving the first routing message to perform at least one of the following processes:
当接收所述第一路由报文的设备为满足第一条件的设备,且在执行所述第一目标动作的上下文中执行所述第二目标动作;When the device receiving the first routing packet is a device that meets the first condition, and executes the second target action in the context of executing the first target action;
当接收所述第一路由报文的设备为不满足所述第一条件的设备,且在执行所述第一目标动作的上下文中时不执行所述第二目标动作;When the device receiving the first routing message is a device that does not meet the first condition and is in the context of performing the first target action, not executing the second target action;
其中,所述第一条件为第一变量与第一目标值匹配,所述第一变量为所述第一变量指示信息缓冲区中的指示信息所指示的变量,所述第一目标值为所述第一目标值描述信息缓冲区中的数值或者用所述第一目标值描述信息缓冲区中的指示信息所指示的方法获得的数值,所述第一指令指示信息指示确定所述第一变量指示信息缓冲区和所述第一目标值描述信息缓冲区的位置的方法,所述第二指令指示信息指示获得所述第二目标动作的描述信息的方法。Wherein, the first condition is that the first variable matches the first target value, the first variable is the variable indicated by the indication information in the first variable indication information buffer, and the first target value is the The value in the first target value description information buffer or the value obtained by the method indicated by the instruction information in the first target value description information buffer, the first instruction instruction information indicates to determine the first variable A method for indicating the location of the information buffer and the first target value description information buffer, and the second instruction indication information indicates a method for obtaining the description information of the second target action.
根据本公开的另一个实施例,还提供了一种路由报文处理装置,包括:According to another embodiment of the present disclosure, a device for processing routing packets is also provided, including:
接收模块,设置为接收第一设备根据目标路由信息发布的第一路由报文,其中,所述第一路由报文用于指示接收所述第一路由报文的设备执行第一目标动作,所述第一路由报文中携带第一指令指示信息、第二指令指示信息、第一指示信息、第一目标值描述信息缓冲区、第二目标值描述信息缓冲区、第一变量指示信息缓冲区以及第二目标动作的描述信息;The receiving module is configured to receive a first routing packet issued by the first device according to the target routing information, wherein the first routing packet is used to instruct the device receiving the first routing packet to perform a first target action, and the The first routing message carries the first instruction instruction information, the second instruction instruction information, the first instruction information, the first target value description information buffer, the second target value description information buffer, and the first variable instruction information buffer and description information of the second target action;
处理模块,设置为根据所述第一指示信息指示进行以下至少之一处理:A processing module, configured to perform at least one of the following processing according to the first instruction information instruction:
当满足第一条件,且在执行所述第一目标动作的上下文中执行所述第二目标动作;performing the second target action in the context of performing the first target action when the first condition is met;
当不满足所述第一条件,且在执行所述第一目标动作的上下文中时不执行所述第二目标动作;not performing the second target action when the first condition is not satisfied and in the context of performing the first target action;
其中,所述第一条件为第一变量与第一目标值匹配,所述第一变量为所述第一变量指示信息缓冲区中的指示信息所指示的变量,所述第一目标值为所述第一目标值描述信息缓冲区中的数值或者用所述第一目标值描述信息缓冲区中的指示信息所指示的方法获得的数值,所述第一指令指示信息指示确定所述第一变量指示信息缓冲区和所述第一目标值描述信息缓冲区的位置的方法,所述第二指令指示信息指示获得所述第二目标动作的描述信息的方法。Wherein, the first condition is that the first variable matches the first target value, the first variable is the variable indicated by the indication information in the first variable indication information buffer, and the first target value is the The value in the first target value description information buffer or the value obtained by the method indicated by the instruction information in the first target value description information buffer, the first instruction instruction information indicates to determine the first variable A method for indicating the location of the information buffer and the first target value description information buffer, and the second instruction indication information indicates a method for obtaining the description information of the second target action.
根据本公开的又一个实施例,还提供了一种计算机可读的存储介质,所述存储介质中存储有计算机程序,其中,所述计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。According to yet another embodiment of the present disclosure, there is also provided a computer-readable storage medium, where a computer program is stored in the storage medium, wherein the computer program is set to execute any one of the above method embodiments when running in the steps.
根据本公开的又一个实施例,还提供了一种电子装置,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器被设置为运行所述计算机程序以执行上述任一项方法实施例中的步骤。According to yet another embodiment of the present disclosure, there is also provided an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to perform any of the above Steps in the method examples.
本公开实施例,第一设备获取目标路由信息;所述第一设备根据所述目标路由信息发布第一路由报文,所述第一路由报文携带的第一指示信息指示接收所述第一路由报文的设备进行以下至少之一处理:当接收所述第一路由报文的设备为满足第一条件的设备,且在执行所述第一目标动作的上下文中执行所述第二目标动作;当接收所述第一路由报文的设备为不满足所述第一条件的设备,且在执行所述第一目标动作的上下文中时不执行所述第二目标动作, 可以解决相关技术中发送端如何控制不同接收端对同一路由报文的不同处理的问题,由发送端控制不同接收端对同一路由报文采取不同处理的方式,至少一种处理方式与当前协议规定的处理行为不同。In an embodiment of the present disclosure, the first device acquires target routing information; the first device issues a first routing message according to the target routing information, and the first indication information carried in the first routing message indicates receiving the first The device for routing packets performs at least one of the following processes: when the device receiving the first routing packet is a device that satisfies the first condition, and executes the second target action in the context of executing the first target action ; When the device receiving the first routing message is a device that does not meet the first condition, and does not execute the second target action in the context of executing the first target action, it can solve the problem in the related art How does the sender control the different processing of the same routing packet by different receivers? The sender controls the different processing methods for the same routing packet by different receivers. At least one processing method is different from the processing behavior specified in the current protocol.
附图说明Description of drawings
图1是根据相关技术中数据报文处理的组网结构示意图一;FIG. 1 is a first schematic diagram of a network structure according to data packet processing in the related art;
图2是根据相关技术中数据报文处理的组网结构示意图二;FIG. 2 is a second schematic diagram of a networking structure according to data packet processing in the related art;
图3是本公开实施例的路由报文处理方法的移动终端的硬件结构框图;FIG. 3 is a block diagram of a hardware structure of a mobile terminal according to a routing message processing method according to an embodiment of the present disclosure;
图4是根据本公开实施例的路由报文处理方法的流程图一;FIG. 4 is a first flowchart of a routing message processing method according to an embodiment of the present disclosure;
图5是根据本公开实施例的路由报文处理方法的流程图二;FIG. 5 is a second flowchart of a routing message processing method according to an embodiment of the present disclosure;
图6是根据本公开实施例的数据报文处理的组网结构示意图一;FIG. 6 is a first schematic diagram of a network structure for data packet processing according to an embodiment of the present disclosure;
图7是根据本公开实施例的Programming TLV的架构示意图;FIG. 7 is a schematic diagram of the architecture of the Programming TLV according to an embodiment of the present disclosure;
图8是根据本公开实施例的数据报文处理的组网结构示意图二;FIG. 8 is a second schematic diagram of a network structure for processing data packets according to an embodiment of the present disclosure;
图9是根据本公开实施例的路由报文处理装置的框图一;FIG. 9 is a first block diagram of an apparatus for processing routing packets according to an embodiment of the present disclosure;
图10是根据本公开实施例的路由报文处理装置的框图二。Fig. 10 is a second block diagram of an apparatus for processing routing packets according to an embodiment of the present disclosure.
具体实施方式Detailed ways
下文中将参考附图并结合实施例来详细说明本公开的实施例。Hereinafter, embodiments of the present disclosure will be described in detail with reference to the drawings and in combination with the embodiments.
需要说明的是,本公开的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It should be noted that the terms "first" and "second" in the specification and claims of the present disclosure and the above drawings are used to distinguish similar objects, but not necessarily used to describe a specific sequence or sequence.
本公开实施例中所提供的方法实施例可以在移动终端、计算机终端或者类似的运算装置中执行。以运行在移动终端上为例,图3是本公开实施例的路由报文处理方法的移动终端的硬件结构框图,如图3所示,移动终端可以包括一个或多个(图3中仅示出一个)处理器102(处理器102可以包括但不限于微处理器MCU或可编程逻辑器件FPGA等的处理装置)和用于存储数据的存储器104,其中,上述移动终端还可以包括用于通信功能的传输设备106以及输入输出设备108。本领域普通技术人员可以理解,图3所示的结构仅为示意,其并不对上述移动终端的结构造成限定。例如,移动终端还可包括比图3中所示更多或者更少的组件,或者具有与图3所示不同的配置。The method embodiments provided in the embodiments of the present disclosure may be executed in mobile terminals, computer terminals or similar computing devices. Taking running on a mobile terminal as an example, FIG. 3 is a block diagram of the hardware structure of the mobile terminal according to the routing message processing method of the embodiment of the present disclosure. As shown in FIG. 3 , the mobile terminal may include one or more (only shown in FIG. 3 a) a processor 102 (the processor 102 may include but not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the above-mentioned mobile terminal may also include a memory for communication Functional transmission device 106 and input and output device 108 . Those skilled in the art can understand that the structure shown in FIG. 3 is only for illustration, and it does not limit the structure of the above-mentioned mobile terminal. For example, the mobile terminal may also include more or fewer components than those shown in FIG. 3, or have a different configuration from that shown in FIG.
存储器104可用于存储计算机程序,例如,应用软件的软件程序以及模块,如本公开实施例中的路由报文处理方法对应的计算机程序,处理器102通过运行存储在存储器104内的计算机程序,从而执行各种功能应用以及业务链地址池切片处理,即实现上述的方法。存储器104可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器104可进一步包括相对于处理器102远程设置的存储器,这些远程存储器可以通过网络连接至移动终端。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the routing packet processing method in the embodiment of the present disclosure, and the processor 102 runs the computer program stored in the memory 104, thereby Executing various functional applications and slicing processing of the service chain address pool is to realize the above-mentioned method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory that is remotely located relative to the processor 102, and these remote memories may be connected to the mobile terminal through a network. Examples of the aforementioned networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
传输装置106用于经由一个网络接收或者发送数据。上述的网络具体实例可包括移动终端的通信供应商提供的无线网络。在一个实例中,传输装置106包括一个网络适配器(Network Interface Controller,简称为NIC),其可通过基站与其他网络设备相连从而可与互联网进行通讯。在一个实例中,传输装置106可以为射频(Radio Frequency,简称为RF)模块, 其用于通过无线方式与互联网进行通讯。The transmission device 106 is used to receive or transmit data via a network. The specific example of the above network may include a wireless network provided by the communication provider of the mobile terminal. In one example, the transmission device 106 includes a network interface controller (NIC for short), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet in a wireless manner.
在本实施例中提供了一种运行于上述移动终端或网络架构的路由报文处理方法,图4是根据本公开实施例的路由报文处理方法的流程图一,如图4所示,该流程包括如下步骤:In this embodiment, a routing message processing method running on the above-mentioned mobile terminal or network architecture is provided. FIG. 4 is a flowchart 1 of a routing message processing method according to an embodiment of the present disclosure. As shown in FIG. 4 , the The process includes the following steps:
步骤S402,第一设备获取目标路由信息;Step S402, the first device acquires target routing information;
步骤S404,所述第一设备根据所述目标路由信息发布第一路由报文,其中,所述第一路由报文用于指示接收所述第一路由报文的设备执行第一目标动作,所述第一路由报文中携带第一指令指示信息、第二指令指示信息、第一指示信息、第一目标值描述信息缓冲区、第二目标值描述信息缓冲区、第一变量指示信息缓冲区以及第二目标动作的描述信息,所述第一指示信息指示接收所述第一路由报文的设备进行以下至少之一处理:Step S404, the first device publishes a first routing message according to the target routing information, wherein the first routing message is used to instruct the device receiving the first routing message to perform a first target action, and the The first routing message carries the first instruction instruction information, the second instruction instruction information, the first instruction information, the first target value description information buffer, the second target value description information buffer, and the first variable instruction information buffer and description information of the second target action, the first indication information instructs the device receiving the first routing message to perform at least one of the following processes:
当接收所述第一路由报文的设备为满足第一条件的设备,且在执行所述第一目标动作的上下文中执行所述第二目标动作;When the device receiving the first routing packet is a device that meets the first condition, and executes the second target action in the context of executing the first target action;
当接收所述第一路由报文的设备为不满足所述第一条件的设备,且在执行所述第一目标动作的上下文中时不执行所述第二目标动作;When the device receiving the first routing message is a device that does not meet the first condition and is in the context of performing the first target action, not executing the second target action;
其中,所述第一条件为第一变量与第一目标值匹配,所述第一变量为所述第一变量指示信息缓冲区中的指示信息所指示的变量,所述第一目标值为所述第一目标值描述信息缓冲区中的数值或者用所述第一目标值描述信息缓冲区中的指示信息所指示的方法获得的数值,所述第一指令指示信息指示确定所述第一变量指示信息缓冲区和所述第一目标值描述信息缓冲区的位置的方法,所述第二指令指示信息指示获得所述第二目标动作的描述信息的方法。Wherein, the first condition is that the first variable matches the first target value, the first variable is the variable indicated by the indication information in the first variable indication information buffer, and the first target value is the The value in the first target value description information buffer or the value obtained by the method indicated by the instruction information in the first target value description information buffer, the first instruction instruction information indicates to determine the first variable A method for indicating the location of the information buffer and the first target value description information buffer, and the second instruction indication information indicates a method for obtaining the description information of the second target action.
需要说明的是,在一些实施方式中,所述第一指令指示信息或第二指令指示信息可以是所述第一指示信息。It should be noted that, in some implementation manners, the first instruction indication information or the second instruction indication information may be the first indication information.
需要说明的是,所述第一目标动作为接收所述第一路由报文的节点在接收所述第一路由报文时根据所述第一路由报文中的信息进行的处理,而不是在接收所述第一路由报文后根据另外接收到的数据报文及所述第一路由报文中的信息对该数据报文进行的处理。进一步地,在一些实施方式中,执行所述第一目标动作所需的信息都在所述第一路由报文中或者都可以通过所述第一路由报文中的指示信息获得。It should be noted that the first target action is the processing performed by the node receiving the first routing packet according to the information in the first routing packet when receiving the first routing packet, instead of After receiving the first routing message, process the data message according to the other received data message and the information in the first routing message. Further, in some implementation manners, all the information required to execute the first target action is in the first routing packet or can be obtained through indication information in the first routing packet.
通过上述步骤S402至S404,可以解决相关技术中发送端如何控制不同接收端对同一路由报文的不同处理的问题,由发送端控制不同接收端对同一路由报文采取不同处理的方式,至少一种处理方式与当前协议规定的处理行为不同。Through the above steps S402 to S404, the problem of how the sending end controls different processing of the same routing message by different receiving ends in the related art can be solved, and the sending end controls different receiving ends to adopt different processing methods for the same routing message, at least one This processing method is different from the processing behavior stipulated in the current agreement.
在一实施例中,所述第二目标动作为执行所述第一目标动作的上下文中的动作。In one embodiment, the second target action is an action in the context of executing the first target action.
需要说明的是,所述第一目标动作上下文中的动作,包括执行所述第一目标动作前的动作、执行所述第一目标动作过程中的动作和执行所述第一目标动作后且执行其它动作前的动作。It should be noted that the actions in the context of the first target action include actions before executing the first target action, actions during the execution of the first target action, and actions after executing the first target action and executing Actions before other actions.
在一实施例中,所述第一变量与所述第一目标值匹配包括:In an embodiment, the matching of the first variable and the first target value includes:
若所述第一变量与所述第一目标值都不是集合,则所述第一变量等于所述第一目标值;If neither the first variable nor the first target value is a set, the first variable is equal to the first target value;
若所述第一变量与所述第一目标值的至少之一为集合,则所述第一变量与所述第一目标值存在包含关系。If at least one of the first variable and the first target value is a set, then there is an inclusion relationship between the first variable and the first target value.
需要说明的是,若所述第一变量与所述第一目标值均为集合,则所述第一变量与所述第一目标值匹配在一些实施方式中为所述第一变量包含于所述第一目标值,在另一些实施方式中为所述第一目标值包含于所述第一变量。It should be noted that, if both the first variable and the first target value are sets, then the matching of the first variable and the first target value in some implementations means that the first variable is included in the set The first target value, in other embodiments, the first target value is included in the first variable.
在一实施例中,所述第二目标动作的描述信息指示所述第二目标动作为不执行所述第一目标动作。In an embodiment, the description information of the second target action indicates that the second target action is not to execute the first target action.
在一实施例中,所述第一变量指示信息缓冲区用于携带第一类指示信息,所述第一类指示信息为指示第一变量集合中的变量的指示信息,所述第一变量集合中至少包括两个变量。In an embodiment, the first variable indication information buffer is used to carry a first type of indication information, the first type of indication information is indication information indicating variables in a first variable set, and the first variable set Include at least two variables in .
在一实施例中,所述第二目标动作的描述信息包括第三指令指示信息、第二变量指示信息缓冲区和第二目标值描述信息缓冲区;In an embodiment, the description information of the second target action includes third instruction indication information, a second variable indication information buffer, and a second target value description information buffer;
其中,所述第三指令指示信息指示所述第二目标动作为将第二变量的值设置为第一缓冲区中的值,所述第二变量为所述第二变量指示信息缓冲区中的指示信息所指示的变量,所述第一缓冲区为所述第二目标值描述信息缓冲区或者根据所述第二目标值描述信息缓冲区中的指示信息所指示的方法确定的缓冲区。Wherein, the third instruction indication information indicates that the second target action is to set the value of the second variable as the value in the first buffer, and the second variable is the value in the second variable indication information buffer. The variable indicated by the indication information, the first buffer is the second target value description information buffer or a buffer determined according to the method indicated by the indication information in the second target value description information buffer.
需要说明的是,在一种实施方式中,所述第三指令指示信息可以是所述第二指令指示信息。It should be noted that, in an implementation manner, the third instruction indication information may be the second instruction indication information.
在一实施例中,所述第二变量指示信息缓冲区用于携带第二类指示信息,所述第二类指示信息为指示第二变量集合中的变量的指示信息,所述第二变量集合中至少包括两个变量。In an embodiment, the second variable indication information buffer is used to carry a second type of indication information, the second type of indication information is indication information indicating variables in a second variable set, and the second variable set Include at least two variables in .
在一实施例中,所述第二变量集合中至少包括如下变量中的两变量:{IP隧道的源IP;隧道的目的IP;隧道上的Bypass标志;隧道上的水平分割标志;与所述第一路由报文对应的入口复制列表表项的Bypass标志;与所述第一路由报文对应的入口复制列表表项的水平分割标志};In one embodiment, the second variable set includes at least two of the following variables: {the source IP of the IP tunnel; the destination IP of the tunnel; the Bypass flag on the tunnel; the split horizon flag on the tunnel; The Bypass sign of the ingress replication list entry corresponding to the first routing message; the split horizon sign of the ingress replication list entry corresponding to the first routing message};
需要说明的是,所述Bypass标志即存储所述第三指示信息的字段,所述水平分割标志即存储所述第四指示信息的字段,所述入口复制列表表项即由EVPN RT-3路由构建的表项。It should be noted that the Bypass flag is the field storing the third indication information, the split horizon flag is the field storing the fourth indication information, and the ingress replication list entry is routed by EVPN RT-3 Constructed entries.
所述两变量为所述第一设备、满足所述第一条件的设备和不满足所述第一条件的设备上的标准化变量。The two variables are standardized variables on the first device, devices meeting the first condition, and devices not meeting the first condition.
在一实施例中,所述第一路由报文、所述第一变量、所述第一目标值、所述第二变量满足第五条件、第六条件、第七条件三者之一;其中,In an embodiment, the first routing message, the first variable, the first target value, and the second variable satisfy one of the fifth condition, the sixth condition, and the seventh condition; wherein ,
所述第五条件为:所述第一路由报文为第二路由报文,其中,所述第二路由报文的下一跳Nexthop为标识所述第一设备的IP地址;The fifth condition is: the first routing message is a second routing message, wherein the next hop Nexthop of the second routing message is the IP address identifying the first device;
所述第一变量为接收所述第二路由报文的节点与其它节点之间的共同IP地址的集合,所述第一目标值为第五IP,所述第五IP为所述第一设备与满足所述第一条件的设备共同的IP地址,所述第二变量为与所述第二路由报文匹配的第一实体的第一属性;The first variable is a set of common IP addresses between the node receiving the second routing message and other nodes, the first target value is a fifth IP, and the fifth IP is the first device an IP address common to the device meeting the first condition, and the second variable is the first attribute of the first entity matching the second routing packet;
所述第六条件为:所述第一路由报文为第三路由报文,其中,所述第三路由报文的下一跳Nexthop为标识所述第一设备的IP地址;所述第一变量为接收所述第三路由报文的节点上标识该节点的IP地址,所述第一目标值为第一IP值集合,所述第一IP值集合为所述第一设备上配置的IP地址值集合,所述第二变量为与所述第三路由报文匹配的第二实体的第二属性,其中,所述第一IP值集合中至少包括标识满足所述第一条件的设备的IP地址,且所述第一IP值集合中不包括标识不满足所述第一条件的设备的IP地址;The sixth condition is: the first routing message is a third routing message, wherein the next hop Nexthop of the third routing message is the IP address identifying the first device; the first The variable is the IP address identifying the node on the node receiving the third routing message, the first target value is a first IP value set, and the first IP value set is the IP configured on the first device A set of address values, the second variable being a second attribute of the second entity matching the third routing packet, wherein the first set of IP values includes at least a device identifying a device meeting the first condition An IP address, and the first IP value set does not include an IP address identifying a device that does not meet the first condition;
所述第七条件为:所述第一路由报文为第四路由报文,其中,所述第四路由报文的下一跳Nexthop为标识所述第一设备的IP地址;The seventh condition is: the first routing message is a fourth routing message, wherein the next hop Nexthop of the fourth routing message is the IP address identifying the first device;
所述第一变量为接收所述第四路由报文的节点上的第二IP值集合,所述第一目标值为标识所述第一设备的IP地址的值,所述第二IP值集合为所述接收所述第四路由报文的节点上 配置的IP地址值集合,所述第二变量为与所述第四路由报文匹配的第二实体的第二属性,其中,所述第二IP值集合中至少包括标识所述第一设备的IP地址,且不满足所述第一条件的设备的第三IP地址值集合中不包括标识所述第一设备的IP地址,所述第三IP地址集合为不满足所述第一条件的设备上配置的IP地址值集合,且所述第三IP地址集合与所述第二IP地址集合通过同样的配置接口配置。The first variable is a second IP value set on the node receiving the fourth routing message, the first target value is a value identifying the IP address of the first device, and the second IP value set is a set of IP address values configured on the node receiving the fourth routing message, the second variable is a second attribute of a second entity matching the fourth routing message, wherein the first The second IP value set includes at least the IP address that identifies the first device, and the third IP address value set of the device that does not meet the first condition does not include the IP address that identifies the first device, and the second IP address value set does not include the IP address that identifies the first device. The three IP address sets are IP address value sets configured on devices that do not meet the first condition, and the third IP address set and the second IP address set are configured through the same configuration interface.
在一种实施方式中,所述第二路由报文、第三路由报文或第三路由报文的下一跳Nexthop为标识所述第一设备的IP地址。In an implementation manner, the second routing packet, the third routing packet, or the next hop Nexthop of the third routing packet is the IP address identifying the first device.
在一实施例中,所述方法还包括:In one embodiment, the method also includes:
当所述第一路由报文、所述第一变量、所述第一目标值、所述第二变量满足所述第六条件时,所述第一设备从第二设备接收第五路由报文,其中,所述第二设备为接收所述第三路由报文且满足所述第一条件的设备,所述第五路由报文的下一跳Nexthop为标识所述第二设备的IP地址,所述第五路由报文与所述第三路由报文为同类路由报文,且所述第五路由报文不携带与所述第一指示信息、第二指令指示信息、第三指令指示信息对应的指示信息;When the first routing packet, the first variable, the first target value, and the second variable satisfy the sixth condition, the first device receives a fifth routing packet from the second device , wherein the second device is a device that receives the third routing message and satisfies the first condition, and the next hop Nexthop of the fifth routing message is an IP address identifying the second device, The fifth routing message and the third routing message are similar routing messages, and the fifth routing message does not carry information related to the first instruction information, the second instruction instruction information, and the third instruction instruction information Corresponding instruction information;
响应于所述第五路由报文的下一跳在所述第一IP值集合中,所述第一设备将第四变量设置为第四目标值,使得所述第四变量与所述第二变量具有对称关系,其中,所述第四变量为对所述第五路由报文执行所述第一目标动作的上下文中的变量。In response to the next hop of the fifth routing packet being in the first set of IP values, the first device sets a fourth variable as a fourth target value, so that the fourth variable is the same as the second The variables have a symmetrical relationship, wherein the fourth variable is a variable in the context of executing the first target action on the fifth routing packet.
需要说明的是,所述第四变量与所述第二变量具有对称关系,可以是所述第四变量所属的第四实体与所述第二变量所属的第五实体具有对称关系且所述第四变量与所述第二变量分别为所述两个实体的键值中的同位元素,其中,所述第四实体与所述第五实体具有对称关系可以是所述第四实体的键值与所述第五实体的键值具有相同的结构并且具有相互对称的值,所述同位元素即所述键值中具有相同序数的元素;比如,当所述第四实体和所述第五实体的键值均包括<A属性,B属性>时,若所述第四实体的A属性等于所述第五实体的B属性且所述第四实体的B属性等于所述第五实体的A属性,则所述第四实体的键值与所述第五实体的键值就具有相互对称的值,从而所述第五实体与所述第四实体就具有对称关系,此时,若所述第四变量和所述第五变量分别为所述第四实体和所述第五实体的A属性(即所述键值中的第一个元素),则可以说所述第四变量与所述第二变量具有对称关系。It should be noted that the fourth variable has a symmetrical relationship with the second variable, and it may be that the fourth entity to which the fourth variable belongs has a symmetrical relationship with the fifth entity to which the second variable belongs, and the fourth variable The four variables and the second variable are respectively the same elements in the key values of the two entities, wherein the symmetrical relationship between the fourth entity and the fifth entity may be the key value of the fourth entity and The key values of the fifth entity have the same structure and have mutually symmetrical values, and the co-located elements are elements with the same ordinal number in the key values; for example, when the fourth entity and the fifth entity When both key values include <A attribute, B attribute>, if the A attribute of the fourth entity is equal to the B attribute of the fifth entity and the B attribute of the fourth entity is equal to the A attribute of the fifth entity, Then the key value of the fourth entity and the key value of the fifth entity have mutually symmetrical values, so that the fifth entity and the fourth entity have a symmetrical relationship. At this time, if the fourth entity variable and the fifth variable are respectively the A attribute of the fourth entity and the fifth entity (that is, the first element in the key value), then it can be said that the fourth variable and the second The variables have a symmetric relationship.
在一实施例中,所述方法还包括:In one embodiment, the method also includes:
在发送所述第三路由报文之前,所述第一设备配置所述第一IP集合。Before sending the third routing packet, the first device configures the first IP set.
在一实施例中,所述第二目标动作包括将第三实体与所述目标路由信息耦合在一起以及将所述第三实体的第三属性设置为所述第二目标值,其中,所述第三属性为所述第一实体的所述第一属性或所述第二实体的所述第二属性,所述第三实体为所述第三属性所属的所述第二实体或所述第一实体,且所述第三属性为所述第三实体的存储第二指示信息的字段。In an embodiment, the second target action includes coupling a third entity with the target routing information and setting a third attribute of the third entity to the second target value, wherein the The third attribute is the first attribute of the first entity or the second attribute of the second entity, and the third entity is the second entity or the second attribute to which the third attribute belongs An entity, and the third attribute is a field of the third entity storing second indication information.
在一实施例中,所述第一路由报文为第六路由报文,所述第六路由报文包括:In an embodiment, the first routing message is a sixth routing message, and the sixth routing message includes:
所述第六路由报文指示通过第一目标隧道到达第四设备之后经过所述第四设备到达目标主机的路由信息;其中,所述第四设备通过同一NVO(Network Virtualization Overlay,网络虚拟化覆盖)隧道多归入到所述第一设备和接收所述第六路由报文且满足所述第一条件的设备,且所述NVO隧道没有归入第三设备,所述第三设备为接收所述第六路由报文的节点且所述第三设备不满足所述第一条件。The sixth routing message indicates the routing information to reach the target host through the fourth device after reaching the fourth device through the first target tunnel; wherein, the fourth device passes through the same NVO (Network Virtualization Overlay, network virtualization overlay) ) tunnels belong to the first device and the device that receives the sixth routing message and meets the first condition, and the NVO tunnel does not belong to the third device, and the third device is the device that receives the sixth routing message The node of the sixth routing packet and the third device does not meet the first condition.
在一实施例中,所述第一路由报文为第六路由报文,所述第六路由报文还包括:In an embodiment, the first routing message is a sixth routing message, and the sixth routing message further includes:
所述第六路由报文指示通过第二目标隧道到达第一设备之后经过所述第一设备到达目标主机的路由信息。The sixth routing packet indicates routing information to reach the target host via the first device after reaching the first device through the second target tunnel.
在一实施例中,所述第二目标动作还包括,在将所述第三实体与所述目标路由信息耦合在一起之前,若所述第三实体还没有被创建,则创建所述第三实体。In an embodiment, the second target action further includes, before coupling the third entity with the target routing information, if the third entity has not been created, creating the third entity entity.
在一实施例中,所述第二指示信息用于指示从所述第三实体收到的报文不可转发到第四实体,并且所述第四实体与所述第三实体不同。In an embodiment, the second indication information is used to indicate that the packet received from the third entity cannot be forwarded to a fourth entity, and the fourth entity is different from the third entity.
需要说明的是,在一些实施方式中,所述第四实体为所述第一目标隧道。It should be noted that, in some implementation manners, the fourth entity is the first target tunnel.
在一实施例中,所述第二指示信息用于指示从所述第三实体收到的报文不可转发到所述第三实体。In an embodiment, the second indication information is used to indicate that the packet received from the third entity cannot be forwarded to the third entity.
在一实施例中,所述第一设备根据所述目标路由信息发布第六路由报文包括:In an embodiment, the publishing of the sixth routing packet by the first device according to the target routing information includes:
所述第一设备通过所述第六路由报文将所述目标路由信息发布到EVPN网络中,所述第二目标值为第二IP,所述第二IP为所述第一目标隧道的目的IP,所述第五IP的值从所述第一目标隧道的源IP获得,所述第三属性为与所述第六路由报文匹配的隧道的目的IP。The first device publishes the target routing information to the EVPN network through the sixth routing message, the second target value is a second IP, and the second IP is the purpose of the first target tunnel IP, the value of the fifth IP is obtained from the source IP of the first target tunnel, and the third attribute is the destination IP of the tunnel matching the sixth routing packet.
在一实施例中,所述第一设备根据所述目标路由信息发布第六路由报文包括:In an embodiment, the publishing of the sixth routing packet by the first device according to the target routing information includes:
所述第一设备通过所述第六路由报文将所述目标路由信息发布到EVPN网络中,所述第五IP的值从所述第一目标隧道的源IP获得,所述第二目标值描述信息缓冲区中的指示信息指示所述第二目标值从所述第一目标值获得,所述第三属性为与所述第六路由报文匹配的VXLAN隧道的源IP。The first device publishes the target routing information to the EVPN network through the sixth routing message, the value of the fifth IP is obtained from the source IP of the first target tunnel, and the second target value is The indication information in the description information buffer indicates that the second target value is obtained from the first target value, and the third attribute is the source IP of the VXLAN tunnel that matches the sixth routing packet.
在一实施例中,所述第六路由报文还携带第四指令指示信息、第三变量指示信息缓冲区和第三目标值描述信息缓冲区,其中,所述第四指令指示信息、所述第三变量指示信息缓冲区和所述第三目标值描述信息缓冲区分别与所述第三指令指示信息、所述第二变量指示信息缓冲区、所述第二目标值缓冲区的作用相对应。In an embodiment, the sixth routing message also carries fourth instruction indication information, a third variable indication information buffer, and a third target value description information buffer, wherein the fourth instruction indication information, the The third variable indication information buffer and the third target value description information buffer respectively correspond to the functions of the third instruction indication information, the second variable indication information buffer, and the second target value buffer .
在一实施例中,所述第二实体或所述第一实体为以下至少之一:In an embodiment, the second entity or the first entity is at least one of the following:
与所述第一路由报文匹配的IP隧道的转发表项;A forwarding entry of the IP tunnel matched with the first routing packet;
与所述第一路由报文匹配的以太分段标识符(Ethernet Segment Identifier,简称为ESI)转发表项;An Ethernet segment identifier (Ethernet Segment Identifier, referred to as ESI) forwarding table item matched with the first routing message;
与所述第一路由报文匹配的入口复制列表表项。Ingress replication list entries matching the first routing packet.
需要说明的是,所述IP隧道可以是承载VXLAN封装、SRv6封装、Geneve封装、VXLAN GPE(Generic Protocol Extension,通用协议扩展)封装、NVGRE(Network Virtualization using Generic Routing Encapsulation,采用GRE的网络虚拟化)封装、GRE封装等封装的IP隧道,这些隧道有时也分别被称为VXLAN隧道、SRv6隧道、Geneve隧道、VXLAN GPE隧道、NVGRE隧道和GRE隧道,在数据中心等场景中,这些隧道有时也被称为NVO隧道;所述ESI转发表项可以是基于基于EVPN RT-1路由构建的转发表项,此时所述第一路由报文可以是EVPN RT-1路由报文;所述入口复制列表表项可以是基于EVPN RT-3路由构建的转发表项,此时所述第一路由报文可以是EVPN RT-3路由报文。It should be noted that the IP tunnel can be VXLAN encapsulation, SRv6 encapsulation, Geneve encapsulation, VXLAN GPE (Generic Protocol Extension, general protocol extension) encapsulation, NVGRE (Network Virtualization using Generic Routing Encapsulation, network virtualization using GRE) These tunnels are sometimes called VXLAN tunnels, SRv6 tunnels, Geneve tunnels, VXLAN GPE tunnels, NVGRE tunnels, and GRE tunnels. In scenarios such as data centers, these tunnels are sometimes called It is an NVO tunnel; the ESI forwarding table entry can be a forwarding table entry based on EVPN RT-1 routing, and at this time, the first routing message can be an EVPN RT-1 routing message; the entry copy list table The item may be a forwarding table entry constructed based on EVPN RT-3 routing, and at this time, the first routing message may be an EVPN RT-3 routing message.
在一实施例中,所述第二目标值描述信息缓冲区中包含所述第二目标值或者指示取得所述第二目标值的方式。In an embodiment, the second target value description information buffer contains the second target value or indicates a manner of obtaining the second target value.
在一实施例中,所述第一目标值描述信息缓冲区中包含所述第一目标值或者指示取得所述第一目标值的方式。In an embodiment, the first target value description information buffer contains the first target value or indicates a manner of obtaining the first target value.
在一实施例中,所述第一变量集合中至少包括如下变量中的两变量:{节点Router ID;节点IP地址集合;BGP建链地址;Anycast PE地址集合;NVE接口的Source NVE地址};In one embodiment, the first variable set includes at least two variables in the following variables: {node Router ID; node IP address set; BGP link establishment address; Anycast PE address set; Source NVE address of NVE interface};
需要说明的是,所述BGP建链地址即用于建立BGP会话的TCP会话的源IP地址。It should be noted that the BGP link establishment address is the source IP address of the TCP session used to establish the BGP session.
所述两变量为所述第一设备、满足所述第一条件的设备和不满足所述第一条件的设备上的标准化变量。The two variables are standardized variables on the first device, devices meeting the first condition, and devices not meeting the first condition.
需要说明的是,所述标准化变量,指的是所述第一设备、满足所述第一条件的设备和不满足所述第一条件的设备上对于指示所述变量的指示信息的格式有一致的定义,或者,所述第一设备、满足所述第一条件的设备和不满足所述第一条件的设备上采用相同的配置接口修改或指示同一所述变量;其中,同一所述变量在不同节点上可以具有不同的值,比如,不同节点的NVE IP的值是不同的,但它们都属于“NVE IP”这一变量,如果若干节点上对如何指示“NVE IP”变量的指示信息的格式有一致的定义,就可以说“NVE IP”变量是这些节点上的标准化变量。It should be noted that the standardized variable refers to that the format of the indication information indicating the variable is consistent on the first device, the device that meets the first condition, and the device that does not meet the first condition. or, the same configuration interface is used on the first device, the device meeting the first condition, and the device not meeting the first condition to modify or indicate the same variable; wherein, the same variable is in Different nodes can have different values. For example, the values of NVE IP on different nodes are different, but they all belong to the variable "NVE IP". If the format has a consistent definition, it can be said that the "NVE IP" variable is a normalized variable on these nodes.
需要说明的是,在一些实施方式中,所述第一变量指示信息缓冲区的指示信息可以是所述标准化变量的指示信息,此时:利用所述第一变量指示信息缓冲区中的指示信息可以改变的性质,每当增加一种新的标准化变量,就增加了一种新的所述第一条件,从而新的所述第一条件可以跟已有的任意一种所述第二目标动作进行组合,分别得到不同的新的处理行为;类似地,利用所述第二变量指示信息缓冲区中的指示信息可以改变的性质,每当增加一种新的标准化变量,就增加了一种新的所述第二目标动作,从而新的所述第二目标动作可以跟已有的任意一种所述第一条件进行组合,分别得到不同的新的处理行为。It should be noted that, in some implementations, the indication information of the first variable indication information buffer may be the indication information of the standardized variable, at this time: use the indication information in the first variable indication information buffer The property that can be changed, whenever a new standardized variable is added, a new first condition is added, so that the new first condition can be compared with any existing second target action Combining to obtain different new processing behaviors; similarly, utilizing the changeable nature of the indication information in the second variable indication information buffer, whenever adding a new standardized variable, a new The second target action, so that the new second target action can be combined with any of the existing first conditions to obtain different new processing behaviors.
通过由所述第一变量指示信息缓冲区和/或所述第二变量指示信息缓冲区提供的这种功能组合能力,只要定义一种新的标准化变量,即可得到多种新的处理行为,降低了新功能开发成本,缩短了新功能的开发时间。需要说明的是,由新增的标准化变量带来的新的所述第一条件和新的所述第二目标动作之间也可以进行功能组合,比如,新增标准化变量“NVE IP”以后,就可以实现当“NVE IP”为7.7.7.7时将“NVE IP”设置为8.8.8.8之类的功能。Through the function combination capability provided by the first variable indicating information buffer and/or the second variable indicating information buffer, as long as a new standardized variable is defined, a variety of new processing behaviors can be obtained, The cost of new function development is reduced, and the development time of new functions is shortened. It should be noted that the new first condition and the new second target action brought about by the newly added standardized variable can also be combined with functions. For example, after adding the standardized variable "NVE IP", You can realize functions such as setting "NVE IP" to 8.8.8.8 when "NVE IP" is 7.7.7.7.
在一实施例中,在所述第一设备根据所述目标路由信息发布所述第一路由报文之前,所述方法还包括:In an embodiment, before the first device publishes the first routing packet according to the target routing information, the method further includes:
指示发送所述第一路由报文。Instruct to send the first routing packet.
在一实施例中,所述第一变量指示信息缓冲区用于通过改变指示信息指示所述第一变量集合中的不同变量,在不改变接收所述第一路由报文的节点上的配置的前提下,使得执行所述第二目标动作的节点发生变化。In an embodiment, the first variable indication information buffer is used to indicate different variables in the first variable set by changing the indication information without changing the configuration on the node receiving the first routing message On the premise, the node performing the second target action is changed.
在一实施例中,所述第一变量指示信息、所述第一目标值描述信息和所述第二目标动作的描述信息来自于配置信息。In an embodiment, the first variable indication information, the first target value description information, and the second target action description information come from configuration information.
在一实施例中,所述第一变量指示信息缓冲区、所述第一目标值描述信息和所述第二目标动作的描述信息以脚本的形式包含在所述第一路由报文中。In an embodiment, the first variable indicates an information buffer, the description information of the first target value, and the description information of the second target action are included in the first routing message in the form of a script.
在一实施例中,所述第一变量指示信息缓冲区、所述第一目标值描述信息和所述第二目标动作的描述信息包含在同一TLV(Type,Length,Value)中,所述TLV的TLV类型值为所述第一指示信息。In an embodiment, the first variable indication information buffer, the description information of the first target value and the description information of the second target action are included in the same TLV (Type, Length, Value), and the TLV The TLV type value is the first indication information.
根据本公开实施例的另一方面,还提供了一种路由报文处理方法,图5是根据本公开实 施例的路由报文处理方法的流程图二,如图5所示,该流程包括如下步骤:According to another aspect of the embodiment of the present disclosure, a routing packet processing method is also provided. FIG. 5 is a flowchart 2 of a routing packet processing method according to an embodiment of the present disclosure. As shown in FIG. 5 , the process includes the following step:
步骤S502,接收第一设备根据目标路由信息发布的第一路由报文,其中,所述第一路由报文用于指示接收所述第一路由报文的设备执行第一目标动作,所述第一路由报文中携带第一指令指示信息、第二指令指示信息、第一指示信息、第一目标值描述信息缓冲区、第二目标值描述信息缓冲区、第一变量指示信息缓冲区以及第二目标动作的描述信息;Step S502, receiving a first routing packet issued by the first device according to the target routing information, wherein the first routing packet is used to instruct the device receiving the first routing packet to perform a first target action, and the first routing packet A routing message carries the first instruction instruction information, the second instruction instruction information, the first instruction information, the first target value description information buffer, the second target value description information buffer, the first variable instruction information buffer, and the second 2. Descriptive information of the target action;
步骤S504,根据所述第一指示信息指示进行以下至少之一处理:Step S504, performing at least one of the following processes according to the first indication information:
当满足第一条件,且在执行所述第一目标动作的上下文中执行所述第二目标动作;performing the second target action in the context of performing the first target action when the first condition is met;
当不满足所述第一条件,且在执行所述第一目标动作的上下文中时不执行所述第二目标动作;not performing the second target action when the first condition is not satisfied and in the context of performing the first target action;
其中,所述第一条件为第一变量与第一目标值匹配,所述第一变量为所述第一变量指示信息缓冲区中的指示信息所指示的变量,所述第一目标值为所述第一目标值描述信息缓冲区中的数值或者用所述第一目标值描述信息缓冲区中的指示信息所指示的方法获得的数值,所述第一指令指示信息指示确定所述第一变量指示信息缓冲区和所述第一目标值描述信息缓冲区的位置的方法,所述第二指令指示信息指示获得所述第二目标动作的描述信息的方法。Wherein, the first condition is that the first variable matches the first target value, the first variable is the variable indicated by the indication information in the first variable indication information buffer, and the first target value is the The value in the first target value description information buffer or the value obtained by the method indicated by the instruction information in the first target value description information buffer, the first instruction instruction information indicates to determine the first variable A method for indicating the location of the information buffer and the first target value description information buffer, and the second instruction indication information indicates a method for obtaining the description information of the second target action.
通过上述步骤S502至S504,可以解决相关技术中发送端如何控制不同接收端对同一路由报文的不同处理的问题,由发送端控制不同接收端对同一路由报文采取不同处理的方式,至少一种处理方式与当前协议规定的处理行为不同。Through the above steps S502 to S504, the problem of how the sending end controls different processing of the same routing message by different receiving ends in the related art can be solved, and the sending end controls different receiving ends to adopt different processing methods for the same routing message, at least one This processing method is different from the processing behavior stipulated in the current agreement.
在一实施例中,所述第一变量指示信息缓冲区用于携带第一类指示信息,所述第一类指示信息为指示第一变量集合中的变量的指示信息,所述第一变量集合中至少包括两个变量。In an embodiment, the first variable indication information buffer is used to carry a first type of indication information, the first type of indication information is indication information indicating variables in a first variable set, and the first variable set Include at least two variables in .
在一实施例中,所述第二目标动作的描述信息包括第三指令指示信息、第二变量指示信息缓冲区和第二目标值描述信息缓冲区;In an embodiment, the description information of the second target action includes third instruction indication information, a second variable indication information buffer, and a second target value description information buffer;
其中,所述第三指令指示信息指示所述第二目标动作为将第二变量的值设置为第一缓冲区中的值,所述第二变量为所述第二变量指示信息缓冲区中的指示信息所指示的变量,所述第一缓冲区为所述第二目标值描述信息缓冲区或者根据所述第二目标值描述信息缓冲区中的指示信息所指示的方法确定的缓冲区。Wherein, the third instruction indication information indicates that the second target action is to set the value of the second variable as the value in the first buffer, and the second variable is the value in the second variable indication information buffer. The variable indicated by the indication information, the first buffer is the second target value description information buffer or a buffer determined according to the method indicated by the indication information in the second target value description information buffer.
在一实施例中,所述第二变量指示信息缓冲区用于携带第二类指示信息,所述第二类指示信息为指示第二变量集合中的变量的指示信息,所述第二变量集合中至少包括两个变量。所述第一变量指示信息缓冲区用于携带第一类指示信息,所述第一类指示信息为指示第一变量集合中的变量的指示信息,所述第一变量集合中至少包括两个变量。In an embodiment, the second variable indication information buffer is used to carry a second type of indication information, the second type of indication information is indication information indicating variables in a second variable set, and the second variable set Include at least two variables in . The first variable indication information buffer is used to carry a first type of indication information, the first type of indication information is indication information indicating variables in a first variable set, and the first variable set includes at least two variables .
在一实施例中当所述第一路由报文、所述第一变量、所述第一目标值、所述第二变量满足所述第六条件时,所述方法还包括:In an embodiment, when the first routing message, the first variable, the first target value, and the second variable satisfy the sixth condition, the method further includes:
向所述第一设备发送第五路由报文,其中,若为接收所述第三路由报文且满足所述第一条件的设备,所述第五路由报文的下一跳Nexthop为标识设备的IP地址,所述第五路由报文与所述第三路由报文为同类路由报文,且所述第五路由报文不携带与所述第一指示信息、第二指令指示信息、第三指令指示信息对应的指示信息;Sending a fifth routing message to the first device, wherein, if it is a device that receives the third routing message and satisfies the first condition, the next hop Nexthop of the fifth routing message is an identification device IP address, the fifth routing message and the third routing message are similar routing messages, and the fifth routing message does not carry the same as the first indication information, the second instruction indication information, the first The instruction information corresponding to the instruction information of the three instructions;
所述第五路由报文用于指示所述第一设备执行如下处理:响应于所述第五路由报文的下一跳在所述第一IP值集合中,所述第一设备将第四变量设置为第四目标值,使得所述第四变量与所述第二变量具有对称关系,其中,所述第四变量为所述第一设备对所述第五路由报文执行所述第一目标动作的上下文中的变量。The fifth routing message is used to instruct the first device to perform the following processing: in response to the next hop of the fifth routing message being in the first IP value set, the first device sends the fourth The variable is set to a fourth target value, so that the fourth variable has a symmetrical relationship with the second variable, wherein the fourth variable is that the first device executes the first Variables in the context of the target action.
在一实施例中,所述第二目标动作包括将第三实体与所述目标路由信息耦合在一起以及将所述第三实体的第三属性设置为所述第二目标值,其中,所述第三属性为第一实体的所述第一属性或所述第二实体的所述第二属性,所述第三实体为所述第三属性所属的所述第二实体或所述第一实体,所述第三属性为所述第三实体的存储第二指示信息的字段,所述第二目标值为所述第二指示信息的值。In an embodiment, the second target action includes coupling a third entity with the target routing information and setting a third attribute of the third entity to the second target value, wherein the The third attribute is the first attribute of the first entity or the second attribute of the second entity, and the third entity is the second entity or the first entity to which the third attribute belongs , the third attribute is a field of the third entity storing second indication information, and the second target value is a value of the second indication information.
在一实施例中,所述第二指示信息用于指示从所述第三实体收到的报文不可转发到第四实体,并且所述第四实体与所述第三实体不同。In an embodiment, the second indication information is used to indicate that the packet received from the third entity cannot be forwarded to a fourth entity, and the fourth entity is different from the third entity.
在一实施例中,所述第二指示信息用于指示从所述第三实体收到的报文不可转发到所述第三实体。In an embodiment, the second indication information is used to indicate that the packet received from the third entity cannot be forwarded to the third entity.
在一实施例中,所述第二实体或所述第一实体为以下至少之一:In an embodiment, the second entity or the first entity is at least one of the following:
与所述第一路由报文匹配的IP隧道的转发表项;A forwarding entry of the IP tunnel matched with the first routing packet;
与所述第一路由报文匹配的ESI转发表项;An ESI forwarding entry matching the first routing message;
与所述第一路由报文匹配的入口复制列表表项。Ingress replication list entries matching the first routing packet.
本公开一实施例中,当接收所述第一路由报文的设备为满足第一条件的设备(对应第二设备),且在执行所述第一目标动作的上下文中执行所述第二目标动作;当接收所述第一路由报文的设备为不满足所述第一条件的设备(对应第三设备),且在执行所述第一目标动作的上下文中时不执行所述第二目标动作,包括:In an embodiment of the present disclosure, when the device receiving the first routing message is a device that satisfies the first condition (corresponding to the second device), and executes the second target in the context of executing the first target action Action: when the device receiving the first routing message is a device that does not meet the first condition (corresponding to a third device), and in the context of executing the first target action, the second target is not executed actions, including:
所述第一设备(比如PE1)为满足第三条件(即“通过第二网络区域的第四设备(比如CPE)到达某个主机H的”)的第一路由信息(比如从第四设备学习到的MAC条目)发布第一路由报文(即RT-2路由)。所述第一路由报文中携带所述第二目标值描述信息(标识第四设备的IP值,比如所述第二IP)、第一目标值描述信息(比如第一设备与第二设备的共同IP地址)、所述第一指令指示信息和所述第二目标动作(比如确定隧道目的IP)指示信息。所述第一路由报文用于第二设备和第三设备根据所述第一路由报文执行所述第一目标动作(比如“创建IP隧道”)。其中,所述第二设备为满足第一条件的设备,所述第三设备为不满足第一条件的设备,所述第二设备(比如PE2)根据所述第二目标值描述信息执行所述所述第二目标动作,所述第三设备(比如PE3)在执行所述第一目标动作时不采用所述第二目标值描述信息。其中,所述第一目标值描述信息为判断是否满足所述第一条件时所用的参数信息,所述第一设备也满足所述第一条件。The first device (such as PE1) is the first routing information (for example, learned from the fourth device to the MAC entry) publishes the first routing packet (ie RT-2 routing). The first routing message carries the description information of the second target value (identifying the IP value of the fourth device, such as the second IP), the description information of the first target value (such as the IP value of the first device and the second device) common IP address), the first instruction indication information, and the second target action (such as determining the tunnel destination IP) indication information. The first routing packet is used by the second device and the third device to perform the first target action (such as "create an IP tunnel") according to the first routing packet. Wherein, the second device is a device that satisfies the first condition, the third device is a device that does not meet the first condition, and the second device (such as PE2) executes the For the second target action, the third device (such as PE3) does not use the second target value description information when executing the first target action. Wherein, the first target value description information is parameter information used for judging whether the first condition is satisfied, and the first device also meets the first condition.
所述第一设备(比如PE1)为满足第三条件(即“通过第二网络区域的第四设备(比如CPE)到达某个主机H的”)的第一路由信息(比如从第四设备学习到的MAC条目)发布第一路由报文(即RT-2路由)。所述第一路由报文中携带所述第二目标值描述信息(指示获取所述第一目标值的方法指示信息)、第一目标值描述信息(比如第一设备与第二设备的共同IP地址)、所述第一指令指示信息和所述第二目标动作(比如确定与所述第一路由报文对应的NVO隧道的源IP)指示信息。所述第一路由报文用于第二设备和第三设备根据所述第一路由报文执行所述第一目标动作(比如“创建IP隧道”)。其中,所述第二设备为满足第一条件的设备,所述第三设备为不满足第一条件的设备,所述第二设备(比如PE2)根据所述第一目标值(即根据所述第二目标值描述信息中指示的方法获取到的值)执行所述第二目标动作(比如将所述第一目标值确定为所述NVO隧道的源IP),所述第三设备(比如PE3)在执行所述第一目标动作时不采用所述第二目标值描述信息。其中,所述第一目标值描述信息为判断是否满足所 述第一条件时所用的参数信息,所述第一设备也满足所述第一条件。The first device (such as PE1) is the first routing information (for example, learned from the fourth device to the MAC entry) publishes the first routing packet (ie RT-2 routing). The first routing message carries the description information of the second target value (indicating information indicating the method for obtaining the first target value), the description information of the first target value (for example, the common IP address of the first device and the second device address), the first instruction indication information, and the second target action (such as determining the source IP of the NVO tunnel corresponding to the first routing packet) indication information. The first routing packet is used by the second device and the third device to perform the first target action (such as "create an IP tunnel") according to the first routing packet. Wherein, the second device is a device that satisfies the first condition, the third device is a device that does not meet the first condition, and the second device (such as PE2) according to the first target value (that is, according to the The second target value describes the value obtained by the method indicated in the information) executes the second target action (such as determining the first target value as the source IP of the NVO tunnel), and the third device (such as PE3 ) does not use the second target value description information when executing the first target action. Wherein, the first target value description information is parameter information used when judging whether the first condition is met, and the first device also meets the first condition.
所述第一设备(比如PE1)为满足第四条件(即存在Anycast VTEP(VXLAN Tunnel End Point,VXLAN隧道端点)地址)的第一路由信息(即EVPN VPLS实例)发布第一路由报文(即RT-3路由)。所述第一路由报文中携带所述第二目标值描述信息(比如“指示BGP建链地址的指示信息”)、第一目标值描述信息(比如所述Anycast VTEP地址的值)、所述第一指令指示信息和所述第二目标动作(比如确定与所述第一路由报文对应的NVO隧道的源IP)指示信息。所述第一路由报文用于第二设备和第三设备根据所述第一路由报文执行所述第一目标动作(比如“创建IP隧道”)。其中,所述第二设备为满足第一条件的设备,所述第三设备为不满足第一条件的设备,所述第二设备(比如PE2)根据所述第二目标值执行所述第二目标动作(比如将所述第二目标值(比如接收所述第一路由报文的BGP会话的BGP建链地址中的本地地址)确定为所述NVO隧道的源IP的值),所述第三设备(比如PE3)在执行所述第一目标动作时不采用所述第二目标值描述信息。其中,所述第一目标值描述信息为判断是否满足所述第一条件时所用的参数信息,所述第一设备也满足所述第一条件。The first device (such as PE1) publishes the first routing message (ie, the EVPN VPLS instance) for the first routing information (ie, the EVPN VPLS instance) that satisfies the fourth condition (ie, there is an Anycast VTEP (VXLAN Tunnel End Point, VXLAN tunnel endpoint) address). RT-3 routing). The first routing message carries the description information of the second target value (such as "indication information indicating the BGP link establishment address"), the description information of the first target value (such as the value of the Anycast VTEP address), the The first instruction indication information and the second target action (such as determining the source IP of the NVO tunnel corresponding to the first routing packet) indication information. The first routing packet is used by the second device and the third device to perform the first target action (such as "create an IP tunnel") according to the first routing packet. Wherein, the second device is a device that satisfies the first condition, the third device is a device that does not meet the first condition, and the second device (such as PE2) executes the second target value according to the second target value. Target action (such as determining the second target value (such as the local address in the BGP link establishment address of the BGP session that receives the first routing message) as the value of the source IP of the NVO tunnel), the second The third device (such as PE3) does not use the second target value description information when executing the first target action. Wherein, the first target value description information is parameter information used for judging whether the first condition is satisfied, and the first device also meets the first condition.
所述第一设备根据第一路由信息发布第一路由报文。所述第一路由报文中携带第二目标值(即“action-parameters”)、第一目标值(即“matching-parameters”)和第二环境变量指示信息(match类型)和第一动作(action语句)指示信息。所述第一路由报文用于第二设备和第三设备根据所述第一路由报文执行第一处理。其中,所述第二设备为满足第二条件的设备,所述第三设备为不满足第二条件的设备,所述第二设备在进行所述第一处理时根据所述第一参数(即“action-parameters”)信息执行所述第一动作,所述第三设备在执行第一处理时不执行所述第一动作。其中,所述第二条件即所述第二环境变量的值等于所述第一目标值,所述第一设备也满足所述第二条件。The first device publishes a first routing packet according to the first routing information. The first routing message carries the second target value (ie "action-parameters"), the first target value (ie "matching-parameters"), the second environment variable indication information (match type) and the first action ( action statement) instructions. The first routing packet is used by the second device and the third device to perform first processing according to the first routing packet. Wherein, the second device is a device that satisfies the second condition, the third device is a device that does not meet the second condition, and the second device performs the first process according to the first parameter (i.e. "action-parameters") information executes the first action, and the third device does not execute the first action when executing the first process. Wherein, the second condition is that the value of the second environment variable is equal to the first target value, and the first device also satisfies the second condition.
所述第一设备发布第一路由报文。所述第一路由报文中携带第二目标值描述信息(即“matching-parameters”)和第二环境变量指示信息(match类型)和第一动作描述信息(action语句)。所述第一路由报文用于第二设备和第三设备根据所述第一路由报文执行第一处理。其中,所述第二设备为满足第二条件的设备,所述第三设备为不满足第二条件的设备,所述第二设备在进行所述第一处理时执行所述第一动作,所述第三设备在执行第一处理时不执行所述第一动作。其中,所述第二条件即所述第一前置变量的值等于所述第二目标值。在一个实施例中,所述第一动作描述信息即是指示将第一环境变量指示信息的值设置为第一目标值,所述第一后置变量是所述第一处理过程中产生的变量,所述第一路由报文中还携带第一后置变量指示信息和第一目标值描述信息。其中,所述第二目标值描述信息包含所述第二目标值或者指示取得所述第二目标值的方法,所述第一目标值描述信息包含所述第一目标值或者指示取得所述第一目标值的方法。The first device publishes a first routing packet. The first routing message carries second target value description information (namely "matching-parameters"), second environment variable indication information (match type) and first action description information (action statement). The first routing packet is used by the second device and the third device to perform first processing according to the first routing packet. Wherein, the second device is a device that satisfies the second condition, the third device is a device that does not meet the second condition, and the second device executes the first action when performing the first process, so The third device does not perform the first action when performing the first process. Wherein, the second condition is that the value of the first pre-variable is equal to the second target value. In one embodiment, the first action description information indicates that the value of the first environment variable indication information is set as the first target value, and the first post variable is a variable generated during the first processing , the first routing message also carries first post variable indication information and first target value description information. Wherein, the second target value description information includes the second target value or indicates the method for obtaining the second target value, and the first target value description information includes the first target value or indicates the method for obtaining the second target value. A target value method.
进一步的,在发送所述第一路由报文之前,还需要,发送端和接收端对所述第一前置变量、第二目标值、第一动作描述信息的取值范围和含义有统一的认识。其中,在一些实施例中,所述第一前置变量取值范围包括{节点Router ID;节点IP地址集合;BGP(Border Gateway Protocol,边界网关协议)建链地址;Anycast PE地址集合;NVE接口的Source NVE地址},所述第一动作包括{Deny:丢弃所述第一路由报文;Set:将第X后置变量的值设置为第Y目标值},其中,所述第X后置变量的取值范围包括{IP隧道的源IP;隧道的目的IP;隧道上的Bypass标志;隧道上的水平分割标志;与所述第一路由报文对应的入口复制列表表项的 Bypass标志;与所述第一路由报文对应的入口复制列表表项的水平分割标志}。Further, before sending the first routing message, it is also required that the sending end and the receiving end have a unified value range and meaning of the first pre-variable, the second target value, and the first action description information. know. Wherein, in some embodiments, the value range of the first pre-variable includes {node Router ID; node IP address set; BGP (Border Gateway Protocol, Border Gateway Protocol) link building address; Anycast PE address set; NVE interface Source NVE address}, the first action includes {Deny: discard the first routing message; Set: set the value of the X post variable to the Y target value}, wherein the X post The value range of the variable includes {the source IP of the IP tunnel; the destination IP of the tunnel; the Bypass sign on the tunnel; the split horizon sign on the tunnel; the Bypass sign of the entry copy list entry corresponding to the first routing message; The split horizon flag of the ingress replication list entry corresponding to the first routing packet}.
在一实施例中,所述第一前置变量指示信息、第二目标值描述信息和第一动作描述信息以脚本的形式包含在所述第一路由报文中,在一些实施例中,所述脚本来自于配置信息。In an embodiment, the first pre-variable indication information, the second target value description information and the first action description information are included in the first routing message in the form of a script. In some embodiments, the The above script comes from configuration information.
在另一实施例中,所述第一前置变量、第二目标值和第一动作描述信息以TLV的形式包含在所述第一路由报文中。In another embodiment, the first pre-variable, the second target value and the first action description information are included in the first routing packet in the form of TLV.
示例1Example 1
图6是根据本公开实施例的数据报文处理的组网结构示意图一,如图6所示,CPE、PE1和PE2以及CPE的CE组成下级网络(第二网络),PE1、PE2和PE3及其CE组成上级网络(第一网络),其中,PE1和PE2为所述下级网络和所述上级网络的边界节点,PE1和PE2对所述下级网络使用同一个虚地址作为NVE接口的地址,即Anycast PE地址,这样从CPE侧只感知到一个远端的NVE(Network Virtualization Edge,网络虚拟化边缘)接口,并与该虚地址建立VXLAN隧道。CPE上行的报文任选PE1或PE2都可以到达PE3或双归接入的CE3(Customer Edge,客户边缘)(图1中的CE3在图2中仍然存在,只是图2中未示出),但是网络中也可能存在单归接入的CE设备,例如:CE1和CE2。CPE上行的报文到达其中一个PE后可能还需绕行到另一台PE设备才能到达单归接入的CE设备,所以在双活的PE1和PE2之间需要一个绕行通道。在PE1和PE2之间部署EVPN邻居,并分别配置不同的地址,即Bypass VTEP地址,用于在PE1和PE2之间创建Bypass VXLAN隧道作为绕行通道。6 is a first schematic diagram of a network structure for processing data packets according to an embodiment of the present disclosure. As shown in FIG. Its CE forms a superior network (the first network), wherein, PE1 and PE2 are the boundary nodes between the subordinate network and the superior network, and PE1 and PE2 use the same virtual address as the address of the NVE interface for the subordinate network, namely Anycast PE address, so that only one remote NVE (Network Virtualization Edge, Network Virtualization Edge) interface is perceived from the CPE side, and a VXLAN tunnel is established with this virtual address. CPE uplink packets can reach PE3 or dual-homed CE3 (Customer Edge) by choosing PE1 or PE2 (CE3 in Figure 1 still exists in Figure 2, but it is not shown in Figure 2), However, there may also be single-homed CE devices in the network, such as CE1 and CE2. After the CPE's uplink packets arrive at one of the PEs, they may need to detour to another PE to reach the single-homed CE. Therefore, a bypass channel is required between dual-active PE1 and PE2. Deploy EVPN neighbors between PE1 and PE2, and configure different addresses, namely Bypass VTEP addresses, to create a Bypass VXLAN tunnel between PE1 and PE2 as a bypass channel.
设定CPE地址为4.4.4.4(即第二IP值),PE1/PE2的Anycast地址为1.1.1.1(即第一IP值),PE1的实地址为100.1.1.1,PE2的实地址为200.2.2.2,PE3的实地址为150.3.3.3,实地址也是BGP建链地址、BGP Router ID。Set the CPE address to 4.4.4.4 (ie the second IP value), the Anycast address of PE1/PE2 to 1.1.1.1 (ie the first IP value), the real address of PE1 to 100.1.1.1, and the real address of PE2 to 200.2. 2.2. The real address of PE3 is 150.3.3.3, which is also the BGP link establishment address and BGP Router ID.
其中,在CPE上配置静态VXLAN隧道<SIP=4.4.4.4,DIP=1.1.1.1>,在PE1上配置静态VXLAN隧道T14(<SIP=1.1.1.1,DIP=4.4.4.4>),在PE2上也配置静态VXLAN隧道T24(<SIP=1.1.1.1,DIP=4.4.4.4>),在PE1、PE2和PE3上开启EVPN,其它VXLAN隧道均通过EVPN控制面自动创建,包括PE2到PE1的VXLAN隧道T21,PE3到PE1的VXLAN隧道T31。Among them, configure static VXLAN tunnel <SIP=4.4.4.4, DIP=1.1.1.1> on CPE, configure static VXLAN tunnel T14 (<SIP=1.1.1.1, DIP=4.4.4.4>) on PE1, and configure Also configure the static VXLAN tunnel T24 (<SIP=1.1.1.1, DIP=4.4.4.4>), enable EVPN on PE1, PE2, and PE3, and other VXLAN tunnels are automatically created through the EVPN control plane, including the VXLAN tunnel from PE2 to PE1 T21, the VXLAN tunnel T31 from PE3 to PE1.
图7是根据本公开实施例的Programming TLV的架构示意图,如图7所示,PE1和PE2通过CPE侧的上行报文学习到的CPE侧的主机H1的MAC地址信息M1,所述M1是从所述静态VXLAN隧道T14上学到,从而得知所述主机H1可以先通过隧道T14的目的IP地址4.4.4.4到达CPE节点然后再经CPE节点到达所述H1主机,然后通过MAC/IP路由报文R1将所述M1发布到EVPN网络中,其中携带Programming TLV,所述Programming TLV中通过Action Parameters Sub-TLV携带所述T14隧道的目的IP(即4.4.4.4,第二IP),通过Matching Parameters Sub-TLV携带所述T14隧道的源IP(即1.1.1.1,第一IP,同时也是PE1和PE2的Anycast PE地址),通过Matching Sub-TLV指示路由报文R1的接收端节点将其Anycast PE地址与Matching Parameters中携带的数据相匹配,并且若匹配成功(称为Matching Sub-TLV命中)则执行Action Sub-TLV对应的动作;通过Action Sub-TLV指示路由报文R1的接收端节点若Matching Sub-TLV命中,则在匹配VXLAN隧道时将Action Parameters Sub-TLV中携带的IP地址作为其为R1匹配的VXLAN隧道的目的IP。其中,所述Programming TLV是一种新的TLV。7 is a schematic diagram of the architecture of the Programming TLV according to an embodiment of the present disclosure. As shown in FIG. 7, PE1 and PE2 learn the MAC address information M1 of the host H1 on the CPE side through the uplink message on the CPE side, and the M1 is obtained from The static VXLAN tunnel T14 is learned, so that the host H1 can first reach the CPE node through the destination IP address 4.4.4.4 of the tunnel T14, and then reach the H1 host through the CPE node, and then route the message through MAC/IP R1 publishes the M1 to the EVPN network, which carries the Programming TLV, and the Programming TLV carries the destination IP of the T14 tunnel (that is, 4.4.4.4, the second IP) through the Action Parameters Sub-TLV, and through the Matching Parameters Sub-TLV -TLV carries the source IP of the T14 tunnel (i.e. 1.1.1.1, the first IP, which is also the Anycast PE address of PE1 and PE2), and instructs the receiving end node of the routing message R1 to send its Anycast PE address through Matching Sub-TLV Match the data carried in Matching Parameters, and if the match is successful (called Matching Sub-TLV hit), execute the action corresponding to the Action Sub-TLV; indicate the receiving end node of the routing message R1 through the Action Sub-TLV if Matching Sub -TLV match, when matching the VXLAN tunnel, use the IP address carried in the Action Parameters Sub-TLV as the destination IP of the VXLAN tunnel matched by R1. Wherein, the Programming TLV is a new TLV.
PE2节点收到所述路由报文R1,根据其Matching Sub-TLV的指示将PE2上配置的Anycast PE地址与Matching Parameters Sub-TLV中的IP地址1.1.1.1相匹配,发现匹配成功,然 后,根据Action Sub-TLV的指示将Action Parameters Sub-TLV中的IP地址4.4.4.4地址作为与R1相匹配的VXLAN隧道的目的IP地址。The PE2 node receives the routing message R1, matches the Anycast PE address configured on PE2 with the IP address 1.1.1.1 in the Matching Parameters Sub-TLV according to its Matching Sub-TLV instruction, and finds that the match is successful. Then, according to The Action Sub-TLV indicates that the IP address 4.4.4.4 in the Action Parameters Sub-TLV is used as the destination IP address of the VXLAN tunnel that matches R1.
PE3节点收到所述路由报文R1,根据其Matching Sub-TLV的指示发现本地没有配置Anycast PE地址,因而无法与Matching Parameters Sub-TLV中的IP地址进行匹配,于是匹配失败,因而忽略Action Sub-TLV的指示和Action Parameters Sub-TLV中的数据,从而创建一条源IP为150.3.3.3目的IP为100.1.1.1的VXLAN隧道T31。The PE3 node receives the routing message R1, and according to its Matching Sub-TLV instruction, it finds that the Anycast PE address is not configured locally, so it cannot match the IP address in the Matching Parameters Sub-TLV, so the matching fails, so the Action Sub is ignored -TLV instructions and the data in the Action Parameters Sub-TLV to create a VXLAN tunnel T31 with a source IP of 150.3.3.3 and a destination IP of 100.1.1.1.
值得注意的是,PE1所发布的所述RT-2路由R1的Nexthop为PE1的实地址(即100.1.1.1)。It should be noted that the Nexthop of the RT-2 route R1 advertised by PE1 is the real address of PE1 (namely 100.1.1.1).
第一指令指示信息(即Maching Sub-TLV的类型编码)指示Maching Sub-TLV的Value部分为所述第一变量指示信息缓冲区且Maching Parameters Sub-TLV的Value部分为第一目标值描述信息缓冲区。The first instruction indication information (that is, the type encoding of Maching Sub-TLV) indicates that the Value part of Maching Sub-TLV is the first variable indication information buffer and the Value part of Maching Parameters Sub-TLV is the first target value description information buffer district.
第二指令指示信息(即Action Sub-TLV的类型编码)指示Action Sub-TLV的Value部分为所述第二变量指示信息缓冲区且Action Parameters Sub-TLV的Value部分为第二目标值描述信息缓冲区。The second instruction indication information (that is, the type code of the Action Sub-TLV) indicates that the Value part of the Action Sub-TLV is the second variable indication information buffer and the Value part of the Action Parameters Sub-TLV is the second target value description information buffer district.
所述第一指示信息(即Programming TLV的类型编码)指示所述第二设备(即PE2)在执行所述第一目标动作时根据所述第二目标值执行所述第二目标动作,所述第一指示信息指示所述第三设备(即PE3)在执行所述第一目标动作时不根据所述第二目标值执行所述第二目标动作,所述第二设备为满足所述第一条件的设备,所述第三设备为不满足所述第一条件的设备,所述第一条件为所述第一变量等于所述第一目标值。其中,所述第二目标动作即给所述第二变量(即与R1相匹配的VXLAN隧道的目的IP)赋值,所述根据所述第二目标值(即4.4.4.4)执行所述第二目标动作即用所述第二目标值给所述第二变量赋值。The first indication information (that is, the type code of Programming TLV) instructs the second device (that is, PE2) to execute the second target action according to the second target value when executing the first target action, the The first indication information indicates that the third device (that is, PE3) does not execute the second target action according to the second target value when executing the first target action. conditions, the third device is a device that does not satisfy the first condition, and the first condition is that the first variable is equal to the first target value. Wherein, the second target action assigns a value to the second variable (that is, the destination IP of the VXLAN tunnel that matches R1), and executes the second variable according to the second target value (that is, 4.4.4.4). The target action is to use the second target value to assign a value to the second variable.
由于PE1和PE2所发布的RT-2路由的Nexthop为实地址而不是Anycast PE地址,PE1和PE2所发布的与CE3(参见图1,图2中未示出)对应RT-1路由的Nexthop也是实地址而不需要是Anycast PE地址,从而避免了当CE3双归链路中的一条链路失效时部分流量不得不经由PE1-PE2之间的VXLAN隧道绕行的问题。Because the Nexthop of the RT-2 route advertised by PE1 and PE2 is a real address rather than the Anycast PE address, the Nexthop of the RT-1 route corresponding to CE3 (see Figure 1, not shown in Figure 2) published by PE1 and PE2 is also The real address does not need to be an Anycast PE address, thus avoiding the problem that some traffic has to be detoured through the VXLAN tunnel between PE1-PE2 when one of the CE3 dual-homing links fails.
示例2Example 2
除特殊说明之处以外,本实施例与示例1相同。This embodiment is the same as Example 1 except where specified.
与示例1不同,本实施例用Action Sub-TLV指示所述路由报文R1的接收端节点将在所述Action Parameters Sub-TLV中携带的IP地址作为与R1相匹配的VXLAN隧道的目的IP,同时,用Action Parameters Sub-TLV指示与R1相匹配的VXLAN隧道的源IP在Matching Parameters Sub-TLV中。Different from Example 1, this embodiment uses the Action Sub-TLV to instruct the receiving end node of the routing message R1 to use the IP address carried in the Action Parameters Sub-TLV as the destination IP of the VXLAN tunnel matching R1, At the same time, use the Action Parameters Sub-TLV to indicate that the source IP of the VXLAN tunnel that matches R1 is in the Matching Parameters Sub-TLV.
值得注意的是,本实施例中,Action Parameters Sub-TLV中并没有携带任何IP地址,仅仅是携带了一个如何获取相应IP地址的指示信息。It is worth noting that in this embodiment, the Action Parameters Sub-TLV does not carry any IP address, but only carries an instruction information on how to obtain the corresponding IP address.
示例3Example 3
除特殊说明之处以外,本实施例与示例1和示例2的叠加相同。Unless otherwise specified, this embodiment is the same as the superposition of Example 1 and Example 2.
与示例1和示例2不同,本实施例中,所述路由报文R1(即第一路由报文)中同时包含两个Programming TLV,其方法为:其中一个Programming TLV(记为TLV1)与示例1中相同,另一个Programming TLV(记为TLV2)与示例2中相同。Different from Example 1 and Example 2, in this embodiment, two Programming TLVs are included in the routing message R1 (i.e. the first routing message), and the method is as follows: one of the Programming TLVs (referred to as TLV1) and the example 1, another Programming TLV (denoted as TLV2) is the same as in Example 2.
值得注意的是,所述TLV1与所述TLV2的Matching Sub-TLV相同,Matching Parameters Sub-TLV也相同。It is worth noting that the Matching Sub-TLV of the TLV1 is the same as that of the TLV2, and the Matching Parameters Sub-TLV is also the same.
所述第一路由报文还携带第四指令指示信息(TLV2的Action Sub-TLV的类型编码)、第三变量指示信息缓冲区(TLV2的Act ion Sub-TLV的值域)和第三目标值描述信息缓冲区(TLV2的Action Parameters Sub-TLV的值域),其中,所述第四指令指示信息、所述第三变量指示信息缓冲区和所述第三目标值描述信息缓冲区分别与所述第三指令指示信息(TLV1的Action Sub-TLV的类型编码)、所述第二变量指示信息缓冲区(TLV1的Action Sub-TLV的值域)、所述第二目标值缓冲区(TLV1的Action Parameters Sub-TLV的值域)的作用相同。The first routing message also carries the fourth instruction indication information (the type encoding of the Action Sub-TLV of TLV2), the third variable indication information buffer (the value domain of the Action Sub-TLV of TLV2) and the third target value Description information buffer (value domain of Action Parameters Sub-TLV of TLV2), wherein, the fourth instruction indication information, the third variable indication information buffer and the third target value description information buffer are respectively related to the The third instruction indication information (the type encoding of the Action Sub-TLV of TLV1), the second variable indication information buffer (the value domain of the Action Sub-TLV of TLV1), the second target value buffer (the Action Parameters Sub-TLV value domain) has the same effect.
需要说明的是,虽然这两个缓冲区的作用相同,但因为缓冲区中的内容是不同数据,从而两者对应的第二目标动作的行为也不同。It should be noted that although the functions of the two buffers are the same, the behaviors of the second target actions corresponding to the two buffers are also different because the contents in the buffers are different data.
示例4Example 4
除特殊说明之处以外,本实施例与示例3相同。This embodiment is the same as Example 3 except where specified.
与示例3不同,本实施例用一个Programming TLV(记为TLV3)取代示例3中的两个Programming TLV,其方法为:所述TLV3的Matching Sub-TLV与所述TLV1(或TLV2)的Matching TLV相同,所述TLV3的Matching Parameters Sub-TLV与所述TLV1(或TLV2)的Matching Parameters Sub-TLV相同;并且,通过在Action Parameters Sub-TLV中同时携带IPt和第九指示信息,使得根据所述TLV3的Action Parameters Sub-TLV可以同时获取到两个IP地址,即IPs和IPt,其中,所述第九指示信息指示在所述Matching Parameters Sub-TLV中获取所述IPs;并且,用所述TLV3的Action Sub-TLV指示所述路由报文R1的接收端节点用所述IPs作为与R1相匹配的VXLAN隧道的源IP,用所述IPt作为与R1相匹配的VXLAN隧道的目的IP。Different from Example 3, this embodiment replaces the two Programming TLVs in Example 3 with one Programming TLV (referred to as TLV3), the method is: the Matching Sub-TLV of the TLV3 and the Matching TLV of the TLV1 (or TLV2) Same, the Matching Parameters Sub-TLV of the TLV3 is the same as the Matching Parameters Sub-TLV of the TLV1 (or TLV2); and, by carrying the IPt and the ninth indication information in the Action Parameters Sub-TLV at the same time, so that according to the The Action Parameters Sub-TLV of TLV3 can obtain two IP addresses at the same time, that is, IPs and IPt, wherein the ninth indication indicates that the IPs are obtained in the Matching Parameters Sub-TLV; and, using the TLV3 The Action Sub-TLV instructs the receiving end node of the routing message R1 to use the IPs as the source IP of the VXLAN tunnel matching R1, and use the IPt as the destination IP of the VXLAN tunnel matching R1.
示例5Example 5
除特殊说明之处以外,本实施例与示例4相同。This embodiment is the same as Example 4 except where specified.
与示例4不同,本实施例不携带所述Programming TLV,而是携带Consignor PE TLV,其方法为:在所述委托方运营商边缘Consignor PE TLV的Value部分携带所述IPt,用所述R1的Nexthop携带所述IPs,并且,通过所述Consignor PE TLV的TLV Type(即类型编码)指示对所述IPs进行与“所述TLV3中的Matching Sub-TLV指示对所述TLV3中携带的IPs进行的匹配”相同的匹配,同时,通过所述Consignor TLV的TLV Type还指示所述路由报文R1的接收端节点用所述IPs作为与R1相匹配的VXLAN隧道的源IP,用所述IPt作为与R1相匹配的VXLAN隧道的目的IP。Different from Example 4, this embodiment does not carry the Programming TLV, but carries the Consignor PE TLV. The method is: carry the IPt in the Value part of the consignor PE TLV at the operator edge of the entrusting party, and use the R1 Nexthop carries the IPs, and, through the TLV Type (i.e., type coding) of the Consignor PE TLV, indicates that the IPs are carried out and "the Matching Sub-TLV in the TLV3 indicates that the IPs carried in the TLV3 are carried out." Matching" is the same match, and at the same time, the TLV Type of the Consignor TLV also indicates that the receiving end node of the routing message R1 uses the IPs as the source IP of the VXLAN tunnel that matches R1, and uses the IPt as the source IP of the VXLAN tunnel that matches R1. R1 matches the destination IP of the VXLAN tunnel.
示例6Example 6
除特殊说明之处以外,本实施例与示例2相同。This embodiment is the same as Example 2 except where specified.
与示例2不同,其中,PE1和PE2之间互相发送RT3路由R3,其中的Nexthop分别为PE1和PE2的实地址,其中的ORIP也分别是PE1和PE2的实地址,其中的PMSI Tunnel扩展团体属性中的Tunnel ID也分别是PE1和PE2的实地址。Different from Example 2, PE1 and PE2 send RT3 route R3 to each other, where Nexthop is the real address of PE1 and PE2, and ORIP is also the real address of PE1 and PE2, and PMSI Tunnel extended community attribute The Tunnel ID in is also the real address of PE1 and PE2 respectively.
与示例2不同,本实施例在RT-3路由报文R3中携带所述Programming TLV(记为TLV4),所述TLV4的Matching Sub-TLV、Matching Parameters Sub-TLV和Action Sub-TLV均与所述TLV2相同。Different from Example 2, the present embodiment carries the Programming TLV (referred to as TLV4) in the RT-3 routing message R3, and the Matching Sub-TLV, Matching Parameters Sub-TLV and Action Sub-TLV of the TLV4 are all consistent with the Same as above TLV2.
与示例2不同,本实施例在Action Parameters Sub-TLV中携带第十指示信息和第十一指示信息,并用所述第十指示信息指示所述路由报文R3的接收端节点上与所述路由报文R3匹配的VXLAN隧道(对应于所述第三实体)的源IP为所述接收端节点上的BGP建链地址(记为IPs2,即所述200.2.2.2),并且用所述第十一指示信息指示将所述VXLAN隧道标记为Bypass VXLAN隧道(对应于将所述第三实体的存储第三指示信息的字段设置为第三指示信息的值)。其中,所述第十指示信息和所述第十一指示信息可以是同一数据,所述第十一指示信息指示所述第三指示信息。Different from Example 2, this embodiment carries the tenth indication information and the eleventh indication information in the Action Parameters Sub-TLV, and uses the tenth indication information to indicate that the receiving end node of the routing message R3 is related to the route The source IP of the VXLAN tunnel (corresponding to the third entity) matched by the message R3 is the BGP link establishment address on the receiving end node (marked as IPs2, namely the 200.2.2.2), and the tenth An indication indicates that the VXLAN tunnel is marked as a Bypass VXLAN tunnel (corresponding to setting the field storing the third indication information of the third entity as the value of the third indication information). Wherein, the tenth indication information and the eleventh indication information may be the same data, and the eleventh indication information indicates the third indication information.
需要说明的是,PE2在收到所述路由报文R3以后,按照所述Programming TLV的指示,就会根据所述路由报文R3创建VXLAN隧道T21b,所述VXLAN隧道T21b的源IP为所述IPs2(即所述200.2.2.2),目的IP为所述RT-3路由的PMSI Tunnel扩展团体属性中的Tunnel ID(即所述100.1.1.1),并且,所述隧道T21b被标记为Bypass隧道。需要说明的是,二元组<第十指示信息,第十一指示信息>即对应于所述第二目标值描述信息,二元组<与所述路由报文R3匹配的VXLAN隧道的源IP,与所述路由报文R3匹配的VXLAN隧道的存储所述第三指示信息的字段(即所述Bypass标记)>即对应于所述第二变量,二元组<IPs2,所述第三指示信息的值>即对应于所述第二目标值。It should be noted that, after PE2 receives the routing message R3, according to the instructions of the Programming TLV, it will create a VXLAN tunnel T21b according to the routing message R3, and the source IP of the VXLAN tunnel T21b is the IPs2 (i.e. said 200.2.2.2), destination IP is the Tunnel ID (i.e. said 100.1.1.1) in the PMSI Tunnel extended community attribute of said RT-3 route, and said tunnel T21b is marked as a Bypass tunnel. It should be noted that the two-tuple <the tenth indication information, the eleventh indication information> corresponds to the second target value description information, and the two-tuple <the source IP address of the VXLAN tunnel that matches the routing packet R3 , the field of the VXLAN tunnel that matches the routing message R3 stores the third indication information (that is, the Bypass flag) > that is, corresponds to the second variable, the two-tuple <IPs2, the third indication The value of the message > ie corresponds to the second target value.
需要说明的是,由于PE1和PE2没有将Anycast PE地址作为所述RT-3路由的ORIP(或PMSI Tunnel属性中的Tunnel ID),这就避免了PE3将它们发布的RT-3路由在入口复制列表中作为同一个成员看待,从而避免了来自PE3的广播、未知单播与组播(Broadcast,Unknown Unicast and Multicas,简称为BUM)报文不得不通过Bypass隧道绕行。It should be noted that since PE1 and PE2 do not use the Anycast PE address as the ORIP of the RT-3 route (or the Tunnel ID in the PMSI Tunnel attribute), this prevents PE3 from duplicating the RT-3 routes they advertised at the ingress The list is regarded as the same member, thereby avoiding that the broadcast, unknown unicast and multicast (Broadcast, Unknown Unicast and Multicas, BUM for short) messages from PE3 have to be detoured through the Bypass tunnel.
示例7Example 7
除特殊说明之处以外,本实施例与示例5和示例6的叠加相同。Unless otherwise specified, this embodiment is the same as the superposition of Example 5 and Example 6.
需要说明的是,在本实施例中,所述Consignor PE TLV和所述TLV4分别在RT-2路由和RT-3路由中携带并且被处理。It should be noted that, in this embodiment, the Consignor PE TLV and the TLV4 are respectively carried and processed in the RT-2 route and the RT-3 route.
需要说明的是,通过所述RT-3路由创建的VXLAN隧道T21b被标记为Bypass隧道。It should be noted that the VXLAN tunnel T21b created through the RT-3 route is marked as a Bypass tunnel.
示例8Example 8
除特殊说明之处以外,本实施例与示例7相同。This embodiment is the same as Example 7 except where specified.
与示例7不同,在本实施例中,所述Consignor PE TLV虽然仍然存在,但其相应指示作用被脚本1代替,仅作为携带IP地址的工具。Different from Example 7, in this embodiment, although the Consignor PE TLV still exists, its corresponding indication role is replaced by script 1, which is only used as a tool for carrying IP addresses.
与示例7不同,在本实施例中,所述TLV4被脚本2代替。Different from example 7, in this embodiment, the TLV4 is replaced by script 2.
脚本1:script 1:
match anycast-vtep-address bgp-nexthopmatch anycast-vtep-address bgp-nexthop
set vxlan-tunnel-source bgp-nexthopset vxlan-tunnel-source bgp-nexthop
set vxlan-tunnel-destination consignor-pe-ipset vxlan-tunnel-destination consignor-pe-ip
第一指示信息即携带此脚本的TLV的类型码,此脚本的脚本语言至少有两种语句,match语句和set语句,且match语句和set语句各有两个参数。The first indication information is the type code of the TLV carrying the script. The script language of the script has at least two statements, a match statement and a set statement, and each of the match statement and the set statement has two parameters.
第一指令指示信息(即脚本语言的match关键字)指示match语句的第一个参数(即脚本语言的关键字anycast-vtep-address)位置(即存储anycast-vtep-address的数据块)为所述第一变量指示信息缓冲区且match语句的第二个参数(即脚本语言的关键字vxlan-tunnel-destination)位置(即存储vxlan-tunnel-destination的数据块)为所述第一目标值描述信息缓冲区;The first instruction indication information (i.e. the match keyword of the script language) indicates that the first parameter of the match statement (i.e. the keyword anycast-vtep-address of the script language) position (i.e. the data block storing anycast-vtep-address) is all The first variable indicates the information buffer and the location of the second parameter of the match statement (ie, the keyword vxlan-tunnel-destination of the script language) (ie, the data block storing vxlan-tunnel-destination) is described by the first target value information buffer;
第二指令指示信息(即脚本语言的set关键字)指示set语句的第一个参数(即脚本语言的关键字bgp-nexthop)位置(即存储bgp-nexthop的数据块)为所述第二变量指示信息缓冲区且match语句的第二个参数(即脚本语言的关键字consignor-pe-ip)位置(即存储consignor-pe-ip的数据块)为所述第二目标值描述信息缓冲区;The first parameter (being the keyword bgp-nexthop of the scripting language) position (being the data block of storing bgp-nexthop) of the second instruction indicating information (being the set keyword of the scripting language) indication set statement is described second variable Indicate the information buffer and the second parameter (i.e. the keyword consignor-pe-ip of the script language) position (i.e. the data block storing consignor-pe-ip) of the match statement is the described second target value description information buffer;
所述第一指示信息指示所述第二设备在执行所述第一目标动作时根据所述第二目标值执行所述第二目标动作,所述第一指示信息指示所述第三设备在执行所述第一目标动作时不根据所述第二目标值执行所述第二目标动作,所述第二设备为满足所述第一条件的设备,所述第三设备为不满足所述第一条件的设备,所述第一条件为所述第一变量等于所述第一目标值。The first indication information indicates that the second device executes the second target action according to the second target value when executing the first target action, and the first indication information indicates that the third device performs The first target action does not execute the second target action according to the second target value, the second device is a device that satisfies the first condition, and the third device is a device that does not meet the first condition. A conditional device, the first condition being that the first variable is equal to the first target value.
所述第一设备(PE1)发布第一路由报文。所述第一路由报文中携带第二目标值描述信息(bgp-nexthop)和第一变量指示信息(anycast-vtep-address)和第一动作描述信息(setvxlan-tunnel-destination consignor-pe-ip)。所述第一路由报文用于第二设备(PE2)和第三设备(PE3)根据所述第一路由报文执行第一目标动作(创建VXLAN隧道)。其中,所述第二设备为满足第一条件(match anycast-vtep-address bgp-nexthop)的设备,所述第三设备为不满足第一条件的设备,所述第二设备在进行所述第一目标动作时执行所述第二目标动作(set vxlan-tunnel-destination consignor-pe-ip),所述第三设备在执行第一处理时不执行所述第二目标动作。其中,所述第一条件即所述第一变量(第一路由报文接收端的Anycast PE地址)的值等于所述第一目标值(第一路由报文的Nexthop)。在本实施例中,所述第二目标动作描述信息即是指示将第二变量(待创建VXLAN隧道的目的IP)的值设置为第二目标值(Consignor PE TLV的值),所述第二变量是所述第一目标动作(即创建VXLAN隧道)过程中产生的变量,所述第一路由报文中还携带第二变量指示信息(vxlan-tunnel-destination)和第二目标值描述信息(consignor-pe-ip)。其中,所述第一目标值描述信息指示取得所述第一目标值的方法(从第一路由报文的Nexthop中取得),所述第二目标值描述信息指示取得所述第二目标值的方法(从Consignor PE TLV中取得)。The first device (PE1) publishes a first routing packet. The first routing message carries second target value description information (bgp-nexthop), first variable indication information (anycast-vtep-address) and first action description information (setvxlan-tunnel-destination consignor-pe-ip ). The first routing packet is used by the second device (PE2) and the third device (PE3) to perform a first target action (creating a VXLAN tunnel) according to the first routing packet. Wherein, the second device is a device that satisfies the first condition (match anycast-vtep-address bgp-nexthop), the third device is a device that does not meet the first condition, and the second device is performing the second Execute the second target action (set vxlan-tunnel-destination consignor-pe-ip) during a target action, and the third device does not execute the second target action when executing the first process. Wherein, the first condition is that the value of the first variable (Anycast PE address of the receiving end of the first routing message) is equal to the first target value (Nexthop of the first routing message). In this embodiment, the second target action description information indicates that the value of the second variable (the destination IP of the VXLAN tunnel to be created) is set as the second target value (the value of the Consignor PE TLV), and the second The variable is a variable generated during the first target action (that is, creating a VXLAN tunnel), and the first routing message also carries the second variable indication information (vxlan-tunnel-destination) and the second target value description information ( consignor-pe-ip). Wherein, the first target value description information indicates the method for obtaining the first target value (obtained from Nexthop in the first routing message), and the second target value description information indicates the method for obtaining the second target value method (taken from the Consignor PE TLV).
脚本2:Script 2:
match anycast-vtep-address bgp-nexthopmatch anycast-vtep-address bgp-nexthop
set vxlan-tunnel-source bgp-update-sourceset vxlan-tunnel-source bgp-update-source
set vxlan-tunnel-flags bypass-tunnelset vxlan-tunnel-flags bypass-tunnel
所述第一设备(PE1)发布第一路由报文。所述第一路由报文中携带第一目标值描述信息(bgp-nexthop)和第一前置变量(即所述第一变量)指示信息(anycast-vtep-address)和第一动作(即所述第二目标动作)描述信息(set vxlan-tunnel--source bgp-update-source)。 所述第一路由报文用于第二设备(PE2)和第三设备(PE3)根据所述第一路由报文执行第一处理(即所述第一目标动作,在本示例中即创建VXLAN隧道)。其中,所述第二设备为满足第二条件(相当于所述第一条件,在本示例中即match anycast-vtep-address bgp-nexthop)的设备,所述第三设备为不满足第二条件的设备,所述第二设备在进行所述第一处理时执行所述第一动作(将待创建的VXLAN隧道的源IP设置为接收所述第一路由报文的节点的BGP建链地址),所述第三设备在执行第一处理时不执行所述第一动作。其中,所述第二条件即所述第一前置变量(第一路由报文接收端的Anycast PE地址)的值等于所述第一目标值(所述第一路由报文的Nexthop)。在一个实施例中,所述第一动作描述信息即是指示将第一后置变量(即所述第二变量,在本示例中即待创建VXLAN隧道的源IP)的值设置为第一目标值(接收所述第一路由报文的节点的BGP建链地址的值),所述第一后置变量是所述第一处理(即创建VXLAN隧道)过程中产生的变量,所述第一路由报文中还携带第一后置变量指示信息(即所述第二变量指示信息,在本实施例中即vxlan-tunnel-source)和第二目标值描述信息(bgp-update-source)。其中,所述第一目标值描述信息包含所述第一目标值或者指示取得所述第一目标值的方法(从第一路由报文的Nexthop中取得),所述第二目标值描述信息包含所述第二目标值或者指示取得所述第二目标值的方法(从接收所述第一路由报文的节点的BGP建链地址中取得)。The first device (PE1) publishes a first routing packet. The first routing message carries the first target value description information (bgp-nexthop), the first pre-variable (that is, the first variable) indication information (anycast-vtep-address) and the first action (that is, the Describe the second target action) description information (set vxlan-tunnel--source bgp-update-source). The first routing packet is used by the second device (PE2) and the third device (PE3) to perform first processing (that is, the first target action) according to the first routing packet, and in this example, create a VXLAN tunnel). Wherein, the second device is a device that satisfies the second condition (equivalent to the first condition, in this example, match anycast-vtep-address bgp-nexthop), and the third device is a device that does not meet the second condition The device, the second device executes the first action when performing the first processing (setting the source IP of the VXLAN tunnel to be created as the BGP link establishment address of the node receiving the first routing message) , the third device does not perform the first action when performing the first process. Wherein, the second condition is that the value of the first pre-variable (Anycast PE address of the receiving end of the first routing message) is equal to the first target value (Nexthop of the first routing message). In one embodiment, the first action description information indicates that the value of the first post variable (that is, the second variable, in this example, the source IP of the VXLAN tunnel to be created) is set as the first target value (the value of the BGP link-building address of the node receiving the first routing message), the first post variable is a variable generated during the first processing (that is, creating a VXLAN tunnel), and the first The routing message also carries the first post variable indication information (that is, the second variable indication information, vxlan-tunnel-source in this embodiment) and the second target value description information (bgp-update-source). Wherein, the first target value description information includes the first target value or indicates the method for obtaining the first target value (obtained from Nexthop in the first routing message), and the second target value description information includes The second target value may indicate a method for obtaining the second target value (obtained from the BGP link establishment address of the node receiving the first routing message).
在发送所述第一路由报文之前,还需要,发送端和接收端对所述第一前置变量、第二目标值、第一动作及其描述信息(或指示信息)的取值范围和含义有统一的认识。其中,在一些实施例中,所述第一前置变量取值范围包括{节点Router ID;节点IP地址集合;BGP建链地址;Anycast PE地址集合;NVE接口的Source NVE地址},所述第一动作包括{Deny:丢弃所述第一路由报文;Set:将第X后置变量的值设置为第Y目标值},其中,所述第X后置变量的取值范围包括{IP隧道的源IP;隧道的目的IP;隧道上的Bypass标志;隧道上的水平分割标志;与所述第一路由报文对应的入口复制列表表项的Bypass标志;与所述第一路由报文对应的入口复制列表表项的水平分割标志}。Before sending the first routing message, it is also necessary for the sending end and the receiving end to compare the value range and There is a unified understanding of meaning. Wherein, in some embodiments, the value range of the first pre-variable includes {node Router ID; node IP address set; BGP link establishment address; Anycast PE address set; Source NVE address of the NVE interface}, the first An action includes {Deny: discard the first routing packet; Set: set the value of the X post variable to the Y target value}, wherein the value range of the X post variable includes {IP tunnel The source IP of the tunnel; the destination IP of the tunnel; the Bypass mark on the tunnel; the split horizon mark on the tunnel; the Bypass mark of the entry replication list entry corresponding to the first routing message; corresponding to the first routing message entry to copy the split horizon flag of the list entry}.
需要说明的是,当所述第一前置变量为一个集合时,所述第二目标值与所述第一前置变量匹配指的是所述第二目标值在所述集合中,其中,所述第一前置变量是执行所述第一处理之前就存在的变量。It should be noted that when the first pre-variable is a set, the matching of the second target value with the first pre-variable means that the second target value is in the set, wherein, The first pre-variable is a variable that exists before the first process is performed.
示例9Example 9
图8是根据本公开实施例的数据报文处理的组网结构示意图二,如图8所示,是个EVPN网络,其中CE3在ES3上,当CE1节点失效时,PE1和PE2上ES3都会感知到该失效,并进行ESI链路保护ELP,也是说,PE1和PE2都试图通过对方绕到到CE3,于是造成数据报文在PE1和PE2之间乒乓,也就是出现环路,为了破除此环路,可以将PE1和PE2之间的隧道标记为水平分割隧道,也就是说,从该隧道接收的数据报文不能再从该隧道发出。Figure 8 is a second schematic diagram of a network structure for data message processing according to an embodiment of the present disclosure. As shown in Figure 8, it is an EVPN network, where CE3 is on ES3, and when CE1 node fails, ES3 on PE1 and PE2 will both perceive This failure, and ESI link protection ELP, that is, both PE1 and PE2 try to bypass each other to CE3, thus causing data packets to ping-pong between PE1 and PE2, that is, a loop occurs, in order to break the loop , you can mark the tunnel between PE1 and PE2 as a split-horizon tunnel, that is, data packets received from this tunnel cannot be sent out from this tunnel.
在PE1和PE2上相互将对方的NVE IP配置为自己的保护者IP,然后PE1和PE2向对方发送EVPN路由时分别携带一个Programming TLV,这两个Programming TLV分别是TLV5和TLV6。Configure each other's NVE IP as their protector IP on PE1 and PE2, and then PE1 and PE2 carry a Programming TLV when sending EVPN routes to each other, and these two Programming TLVs are TLV5 and TLV6 respectively.
其中,TLV5的Matching Sub-TLV指示用接收端的保护者IP集合(其中包括PE1的NVE IP) 匹配Matching Parameters Sub-TLV中的值,Action Sub-TLV指示如果所述匹配成立,执行Action Parameters Sub-TLV中的动作,其中,Matching Parameters Sub-TLV的值为PE1的NVE IP,所述Action Parameters Sub-TLV指示在根据所述EVPN路由创建的VXLAN隧道T21c上打上“水平分割”标记。Among them, the Matching Sub-TLV of TLV5 indicates to match the value in the Matching Parameters Sub-TLV with the protector IP set of the receiving end (including the NVE IP of PE1), and the Action Sub-TLV indicates that if the matching is established, execute the Action Parameters Sub-TLV The action in the TLV, wherein the value of the Matching Parameters Sub-TLV is the NVE IP of PE1, and the Action Parameters Sub-TLV indicates to mark the "split horizon" on the VXLAN tunnel T21c created according to the EVPN route.
其中,TLV6的Matching Sub-TLV指示用接收端的保护者IP集合(对应上述的第二IP值集合,其中包括PE2的NVE IP)匹配Matching Parameters Sub-TLV中的值,Action Sub-TLV指示如果所述匹配成立,执行Action Parameters Sub-TLV中的动作,其中,Matching Parameters Sub-TLV的值为PE2的NVE IP,所述Action Parameters Sub-TLV指示在根据所述EVPN路由创建的VXLAN隧道T12c上打上“水平分割”标记(对应上述的第四指示信息)。Among them, the Matching Sub-TLV of TLV6 indicates to match the value in the Matching Parameters Sub-TLV with the protector IP set of the receiver (corresponding to the second IP value set mentioned above, including the NVE IP of PE2), and the Action Sub-TLV indicates that if the If the above match is established, the action in the Action Parameters Sub-TLV is executed, wherein the value of the Matching Parameters Sub-TLV is the NVE IP of PE2, and the Action Parameters Sub-TLV indicates that the VXLAN tunnel T12c created according to the EVPN route is marked with "Horizontal split" mark (corresponding to the above-mentioned fourth indication information).
需要说明的是,通过给所述VXLAN隧道T21c和T12c标记为“水平分割”隧道,使得PE1/PE2不会将对方发来的数据报文再发给对方,从而破除了所述环路。It should be noted that by marking the VXLAN tunnels T21c and T12c as "split-horizon" tunnels, PE1/PE2 will not resend the data packets sent by the other party to the other party, thus breaking the loop.
需要说明的是,PE1(对应所述第一设备)和PE2(对应所述第二设备)只是相互将对方的NVE IP配置为自己的保护者IP(通过这种形式,PE1和PE2互相记录了对方的IP),PE1的保护者IP并不是PE1拥有的IP(因而也不是PE1与PE2共同的IP),PE2的保护者IP并不是PE2拥有的IP(因而也不是PE1与PE2共同的IP)。It should be noted that PE1 (corresponding to the first device) and PE2 (corresponding to the second device) only configure each other's NVE IP as their own protector IP (in this form, PE1 and PE2 record each other's The IP of the other party), the IP of the protector of PE1 is not the IP owned by PE1 (so it is not the common IP of PE1 and PE2), the IP of the protector of PE2 is not the IP owned by PE2 (so it is not the common IP of PE1 and PE2) .
示例10Example 10
除特殊说明之处以外,本实施例与示例9相同。This embodiment is the same as Example 9 except where specified.
与示例9不同,在本实施例中,PE2不需要将PE1配置为其保护者,只有PE1需要将PE2配置为其保护者。Different from Example 9, in this embodiment, PE2 does not need to configure PE1 as its protector, and only PE1 needs to configure PE2 as its protector.
与示例9不同,在本实施例中,PE2不会给PE1发送Programming TLV,只有PE1会给PE2发送Programming TLV(记为TLV7)。所述TLV7的Matching Sub-TLV指示用接收端的NVE IP匹配Matching Parameters Sub-TLV中的值,Action Sub-TLV指示如果所述匹配成立,执行Action Parameters Sub-TLV中的动作,其中,Matching Parameters Sub-TLV的值为PE1的保护者IP组成的集合(对应上述的第一IP值集合,其中包括PE2的NVE IP),所述Action Parameters Sub-TLV指示在根据所述EVPN路由创建的VXLAN隧道T21c上打上“水平分割”标记(对应上述的第二指示信息)。Different from example 9, in this embodiment, PE2 will not send Programming TLV to PE1, only PE1 will send Programming TLV to PE2 (denoted as TLV7). The Matching Sub-TLV of the TLV7 indicates that the NVE IP of the receiving end is used to match the value in the Matching Parameters Sub-TLV, and the Action Sub-TLV indicates that if the match is established, the action in the Action Parameters Sub-TLV is executed, wherein, Matching Parameters Sub -The value of TLV is a set composed of the protector IP of PE1 (corresponding to the above-mentioned first IP value set, including the NVE IP of PE2), and the Action Parameters Sub-TLV indicates the VXLAN tunnel T21c created according to the EVPN route Put the "horizontal split" mark on it (corresponding to the above-mentioned second instruction information).
与示例9不同,在本实施例中,当PE1收到PE2发来的EVPN路由,虽然其中没有携带Programming TLV,PE1发现该路由的Next hop为自己的保护者IP集合中的元素(即该Nexthop匹配该集合),PE1也会将根据该路由创建的VXLAN隧道T12c打上“水平分割”标记。Different from Example 9, in this embodiment, when PE1 receives the EVPN route sent by PE2, although it does not carry the Programming TLV, PE1 finds that the Next hop of the route is an element in its protector IP set (that is, the Nexthop match this set), PE1 will also mark the VXLAN tunnel T12c created according to this route as "split horizon".
通过以上方法,PE2和PE1分别会给所述VXLAN隧道T21c和T12c标记为“水平分割”隧道,使得PE1/PE2不会将对方发来的数据报文再发给对方,从而破除了所述环路。Through the above method, PE2 and PE1 will respectively mark the VXLAN tunnels T21c and T12c as "split horizon" tunnels, so that PE1/PE2 will not resend the data packets sent by the other party to the other party, thus breaking the loop. road.
在本实施例中,只要PE2是支持本发明的Programming TLV的节点,既不需要升级PE2节点,也不需要改变PE2节点上的配置,就破除了所述环路。In this embodiment, as long as PE2 is a node supporting the Programming TLV of the present invention, the loop is broken without upgrading the PE2 node or changing the configuration on the PE2 node.
根据本公开的另一个实施例,还提供了一种路由报文处理装置,应用于所述第一设备,图9是根据本公开实施例的路由报文处理装置的框图一,如图9所示,包括:According to another embodiment of the present disclosure, there is also provided a routing message processing device, which is applied to the first device. FIG. 9 is a block diagram 1 of a routing message processing device according to an embodiment of the present disclosure, as shown in FIG. 9 display, including:
获取模块92,用于获取目标路由信息;An acquisition module 92, configured to acquire target routing information;
发布模块94,用于根据所述目标路由信息发布第一路由报文,其中,所述第一路由报文 用于指示接收所述第一路由报文的设备执行第一目标动作,所述第一路由报文中携带第一指令指示信息、第二指令指示信息、第一指示信息、第一目标值描述信息缓冲区、第二目标值描述信息缓冲区、第一变量指示信息缓冲区以及第二目标动作的描述信息,所述第一指示信息指示接收所述第一路由报文的设备进行以下至少之一处理:The publishing module 94 is configured to publish a first routing message according to the target routing information, wherein the first routing message is used to instruct the device receiving the first routing message to perform a first target action, and the first routing message A routing message carries the first instruction instruction information, the second instruction instruction information, the first instruction information, the first target value description information buffer, the second target value description information buffer, the first variable instruction information buffer, and the second 2. Descriptive information of the target action, the first indication information instructs the device receiving the first routing message to perform at least one of the following processes:
当接收所述第一路由报文的设备为满足第一条件的设备,且在执行所述第一目标动作的上下文中执行所述第二目标动作;When the device receiving the first routing packet is a device that meets the first condition, and executes the second target action in the context of executing the first target action;
当接收所述第一路由报文的设备为不满足所述第一条件的设备,且在执行所述第一目标动作的上下文中时不执行所述第二目标动作;When the device receiving the first routing message is a device that does not meet the first condition and is in the context of performing the first target action, not executing the second target action;
其中,所述第一条件为第一变量与第一目标值匹配,所述第一变量为所述第一变量指示信息缓冲区中的指示信息所指示的变量,所述第一目标值为所述第一目标值描述信息缓冲区中的数值或者用所述第一目标值描述信息缓冲区中的指示信息所指示的方法获得的数值,所述第一指令指示信息指示确定所述第一变量指示信息缓冲区和所述第一目标值描述信息缓冲区的位置的方法,所述第二指令指示信息指示获得所述第二目标动作的描述信息的方法。Wherein, the first condition is that the first variable matches the first target value, the first variable is the variable indicated by the indication information in the first variable indication information buffer, and the first target value is the The value in the first target value description information buffer or the value obtained by the method indicated by the instruction information in the first target value description information buffer, the first instruction instruction information indicates to determine the first variable A method for indicating the location of the information buffer and the first target value description information buffer, and the second instruction indication information indicates a method for obtaining the description information of the second target action.
在一实施例中,所述第一变量指示信息缓冲区用于携带第一类指示信息,所述第一类指示信息为指示第一变量集合中的变量的指示信息,所述第一变量集合中至少包括两个变量。In an embodiment, the first variable indication information buffer is used to carry a first type of indication information, the first type of indication information is indication information indicating variables in a first variable set, and the first variable set Include at least two variables in .
在一实施例中,所述第二目标动作的描述信息包括第三指令指示信息、第二变量指示信息缓冲区和第二目标值描述信息缓冲区;In an embodiment, the description information of the second target action includes third instruction indication information, a second variable indication information buffer, and a second target value description information buffer;
其中,所述第三指令指示信息指示所述第二目标动作为将第二变量的值设置为第一缓冲区中的值,所述第二变量为所述第二变量指示信息缓冲区中的指示信息所指示的变量,所述第一缓冲区为所述第二目标值描述信息缓冲区或者根据所述第二目标值描述信息缓冲区中的指示信息所指示的方法确定的缓冲区。Wherein, the third instruction indication information indicates that the second target action is to set the value of the second variable as the value in the first buffer, and the second variable is the value in the second variable indication information buffer. The variable indicated by the indication information, the first buffer is the second target value description information buffer or a buffer determined according to the method indicated by the indication information in the second target value description information buffer.
在一实施例中,所述第二变量指示信息缓冲区用于携带第二类指示信息,所述第二类指示信息为指示第二变量集合中的变量的指示信息,所述第二变量集合中至少包括两个变量。In an embodiment, the second variable indication information buffer is used to carry a second type of indication information, the second type of indication information is indication information indicating variables in a second variable set, and the second variable set Include at least two variables in .
在一实施例中,所述第一路由报文、所述第一变量、所述第一目标值、所述第二变量满足第五条件、第六条件、第七条件三者之一;其中,In an embodiment, the first routing message, the first variable, the first target value, and the second variable satisfy one of the fifth condition, the sixth condition, and the seventh condition; wherein ,
所述第五条件为:所述第一路由报文为第二路由报文,所述第一变量为接收所述第二路由报文的节点与其它节点之间的共同IP地址的集合,所述第一目标值为第五IP,所述第五IP为所述第一设备与满足所述第一条件的设备共同的IP地址,所述第二变量为与所述第二路由报文匹配的第一实体的第一属性;The fifth condition is: the first routing message is a second routing message, and the first variable is a set of common IP addresses between the node receiving the second routing message and other nodes, so The first target value is the fifth IP, the fifth IP is the common IP address of the first device and the device meeting the first condition, and the second variable matches the second routing packet The first attribute of the first entity of ;
所述第六条件为:所述第一路由报文为第三路由报文,所述第一变量为接收所述第三路由报文的节点上标识该节点的IP地址,所述第一目标值为第一IP值集合,所述第一IP值集合为所述第一设备上配置的IP地址值集合,所述第二变量为与所述第三路由报文匹配的第二实体的第二属性,其中,所述第一IP值集合中至少包括标识满足所述第一条件的设备的IP地址,且所述第一IP值集合中不包括标识不满足所述第一条件的设备的IP地址;The sixth condition is: the first routing message is a third routing message, the first variable is the IP address identifying the node on the node receiving the third routing message, and the first target The value is the first IP value set, the first IP value set is the IP address value set configured on the first device, and the second variable is the first IP value of the second entity that matches the third routing message. Two attributes, wherein the first IP value set includes at least an IP address identifying a device that meets the first condition, and the first IP value set does not include an IP address that identifies a device that does not meet the first condition IP address;
所述第七条件为:所述第一路由报文为第四路由报文,所述第一变量为接收所述第四路由报文的节点上的第二IP值集合,所述第一目标值为标识所述第一设备的IP地址的值,所述第二IP值集合为所述接收所述第四路由报文的节点上配置的IP地址值集合,所述第二变量为与所述第四路由报文匹配的第二实体的第二属性,其中,所述第二IP值集合中至少包括标识所述第一设备的IP地址,且不满足所述第一条件的设备的第三IP地址值集合中不包括 标识所述第一设备的IP地址,所述第三IP地址集合为不满足所述第一条件的设备上配置的IP地址值集合,且所述第三IP地址集合与所述第二IP地址集合通过同样的配置接口配置。The seventh condition is: the first routing message is a fourth routing message, the first variable is a second IP value set on the node receiving the fourth routing message, and the first target The value is a value identifying the IP address of the first device, the second IP value set is the IP address value set configured on the node receiving the fourth routing message, and the second variable is the same as the The second attribute of the second entity matched by the fourth routing packet, wherein the second IP value set includes at least the IP address identifying the first device, and the first IP address of the device that does not meet the first condition The IP address identifying the first device is not included in the three IP address value sets, the third IP address set is an IP address value set configured on a device that does not meet the first condition, and the third IP address The set is configured through the same configuration interface as the second set of IP addresses.
在一实施例中,当所述第一路由报文、所述第一变量、所述第一目标值、所述第二变量满足所述第六条件时,所述方法还包括:In an embodiment, when the first routing message, the first variable, the first target value, and the second variable satisfy the sixth condition, the method further includes:
所述第一设备从第二设备接收第五路由报文,其中,所述第二设备为接收所述第三路由报文且满足所述第一条件的设备,所述第五路由报文的下一跳Nexthop为标识所述第二设备的IP地址,所述第五路由报文与所述第三路由报文为同类路由报文,且所述第五路由报文不携带与所述第一指示信息、第二指令指示信息、第三指令指示信息对应的指示信息;The first device receives a fifth routing packet from a second device, where the second device is a device that receives the third routing packet and satisfies the first condition, and the fifth routing packet The next hop Nexthop is the IP address identifying the second device, the fifth routing message and the third routing message are similar routing messages, and the fifth routing message does not carry the same routing message as the first routing message. Instruction information corresponding to the instruction information, the second instruction instruction information, and the third instruction instruction information;
响应于所述第五路由报文的下一跳在所述第一IP值集合中,所述第一设备将第四变量设置为第四目标值,其中,所述第四变量为对所述第五路由报文执行所述第一目标动作的上下文中的变量,使得所述第四变量与所述第二变量具有对称关系。In response to the next hop of the fifth routing packet being in the first IP value set, the first device sets a fourth variable as a fourth target value, where the fourth variable is a reference to the The fifth variable in the context in which the routing packet executes the first target action makes the fourth variable have a symmetrical relationship with the second variable.
在一实施例中,所述第二目标动作包括将第三实体与所述目标路由信息耦合在一起以及将所述第三实体的第三属性设置为所述第二目标值,其中,所述第三属性为所述第一实体的所述第一属性或所述第二实体的所述第二属性,所述第三实体为所述第三属性所属的所述第二实体或所述第一实体,且所述第三属性为所述第三实体的存储第二指示信息的字段。In an embodiment, the second target action includes coupling a third entity with the target routing information and setting a third attribute of the third entity to the second target value, wherein the The third attribute is the first attribute of the first entity or the second attribute of the second entity, and the third entity is the second entity or the second attribute to which the third attribute belongs An entity, and the third attribute is a field of the third entity storing second indication information.
在一实施例中,所述第二指示信息为第三指示信息或第四指示信息,其中,所述第三指示信息用于指示从所述第三实体收到的报文不可转发到第四实体,并且所述第四实体与所述第三实体不同,所述第四指示信息用于指示从所述第三实体收到的报文不可转发到所述第三实体。In an embodiment, the second indication information is third indication information or fourth indication information, wherein the third indication information is used to indicate that the message received from the third entity cannot be forwarded to the fourth entity, and the fourth entity is different from the third entity, and the fourth indication information is used to indicate that the packet received from the third entity cannot be forwarded to the third entity.
在一实施例中,所述第一路由报文为第六路由报文,所述第六路由报文包括:In an embodiment, the first routing message is a sixth routing message, and the sixth routing message includes:
所述第六路由报文指示通过第一目标隧道到达第四设备之后经过所述第四设备到达目标主机的路由信息;其中,所述第四设备通过同一NVO隧道多归入到所述第一设备和接收所述第六路由报文且满足所述第一条件的设备,且所述NVO隧道没有归入第三设备,所述第三设备为接收所述第六路由报文的节点且所述第三设备不满足所述第一条件。The sixth routing message indicates the routing information to reach the target host through the fourth device after reaching the fourth device through the first target tunnel; A device and a device that receives the sixth routing message and satisfies the first condition, and the NVO tunnel is not included in a third device, the third device is the node that receives the sixth routing message and the The third device does not satisfy the first condition.
在一实施例中,所述第一变量指示信息缓冲区用于通过改变指示信息指示所述第一变量集合中的不同变量,在不改变接收所述第一路由报文的节点上的配置的前提下,使得执行所述第二目标动作的节点发生变化。In an embodiment, the first variable indication information buffer is used to indicate different variables in the first variable set by changing the indication information without changing the configuration on the node receiving the first routing message On the premise, the node performing the second target action is changed.
在一实施例中,所述装置还包括:In one embodiment, the device also includes:
配置模块,用于在发送所述第三路由报文之前,配置所述第一IP值集合。A configuration module, configured to configure the first IP value set before sending the third routing packet.
在一实施例中,所述第二目标动作为执行所述第一目标动作的上下文中的动作。In one embodiment, the second target action is an action in the context of executing the first target action.
在一实施例中,所述第一变量与所述第一目标值匹配包括:In an embodiment, the matching of the first variable and the first target value includes:
若所述第一变量与所述第一目标值都不是集合,则所述第一变量等于所述第一目标值;If neither the first variable nor the first target value is a set, the first variable is equal to the first target value;
若所述第一变量与所述第一目标值的至少之一为集合,则所述第一变量与所述第一目标值存在包含关系。If at least one of the first variable and the first target value is a set, then there is an inclusion relationship between the first variable and the first target value.
在一实施例中,所述第二目标动作的描述信息指示所述第二目标动作为不执行所述第一目标动作。In an embodiment, the description information of the second target action indicates that the second target action is not to execute the first target action.
在一实施例中,所述第二变量集合中至少包括如下变量中的两变量:{IP隧道的源IP;隧道的目的IP;隧道上的Bypass标志;隧道上的水平分割标志;与所述第一路由报文对应的入口复制列表表项的Bypass标志;与所述第一路由报文对应的入口复制列表表项的水平分割标志};In one embodiment, the second variable set includes at least two of the following variables: {the source IP of the IP tunnel; the destination IP of the tunnel; the Bypass flag on the tunnel; the split horizon flag on the tunnel; The Bypass sign of the ingress replication list entry corresponding to the first routing message; the split horizon sign of the ingress replication list entry corresponding to the first routing message};
所述两变量为所述第一设备、满足所述第一条件的设备和不满足所述第一条件的设备上的标准化变量。The two variables are standardized variables on the first device, devices meeting the first condition, and devices not meeting the first condition.
在一实施例中,所述第二目标动作还包括,在将所述第三实体与所述目标路由信息耦合在一起之前,若所述第三实体还没有被创建,则创建所述第三实体。In an embodiment, the second target action further includes, before coupling the third entity with the target routing information, if the third entity has not been created, creating the third entity entity.
在一实施例中,所述分布模块,还用于所述第一设备通过所述第六路由报文将所述目标路由信息发布到EVPN网络中,所述第二目标值为第二IP,所述第二IP为所述第一目标隧道的目的IP,所述第五IP的值从所述第一目标隧道的源IP获得,所述第三属性为与所述第六路由报文匹配的隧道的目的IP。In an embodiment, the distribution module is further configured for the first device to publish the target routing information to the EVPN network through the sixth routing message, the second target value is the second IP, The second IP is the destination IP of the first target tunnel, the value of the fifth IP is obtained from the source IP of the first target tunnel, and the third attribute is to match the sixth routing message The destination IP of the tunnel.
在一实施例中,所述分布模块,还用于In one embodiment, the distribution module is also used for
所述第一设备通过所述第六路由报文将所述目标路由信息发布到EVPN网络中,所述第五IP的值从所述第一目标隧道的源IP获得,所述第二目标值描述信息缓冲区中的指示信息指示所述第二目标值从所述第一目标值获得,所述第三属性为与所述第六路由报文匹配的VXLAN隧道的源IP。The first device publishes the target routing information to the EVPN network through the sixth routing message, the value of the fifth IP is obtained from the source IP of the first target tunnel, and the second target value is The indication information in the description information buffer indicates that the second target value is obtained from the first target value, and the third attribute is the source IP of the VXLAN tunnel that matches the sixth routing packet.
在一实施例中,所述第六路由报文还携带第四指令指示信息、第三变量指示信息缓冲区和第三目标值描述信息缓冲区,其中,所述第四指令指示信息、所述第三变量指示信息缓冲区和所述第三目标值描述信息缓冲区分别与所述第三指令指示信息、所述第二变量指示信息缓冲区、所述第二目标值缓冲区的作用相对应。In an embodiment, the sixth routing message also carries fourth instruction indication information, a third variable indication information buffer, and a third target value description information buffer, wherein the fourth instruction indication information, the The third variable indication information buffer and the third target value description information buffer respectively correspond to the functions of the third instruction indication information, the second variable indication information buffer, and the second target value buffer .
在一实施例中,所述第二实体或所述第一实体为以下至少之一:In an embodiment, the second entity or the first entity is at least one of the following:
与所述第一路由报文匹配的IP隧道的转发表项;A forwarding entry of the IP tunnel matched with the first routing packet;
与所述第一路由报文匹配的ESI转发表项;An ESI forwarding entry matching the first routing message;
与所述第一路由报文匹配的入口复制列表表项。Ingress replication list entries matching the first routing packet.
在一实施例中,所述第二目标值描述信息缓冲区中包含所述第二目标值或者指示取得所述第二目标值的方式。In an embodiment, the second target value description information buffer contains the second target value or indicates a manner of obtaining the second target value.
在一实施例中,所述第一目标值描述信息缓冲区中包含所述第一目标值或者指示取得所述第一目标值的方式。In an embodiment, the first target value description information buffer contains the first target value or indicates a manner of obtaining the first target value.
在一实施例中,所述第一变量集合中至少包括如下变量中的两变量:{节点Router ID;节点IP地址集合;BGP建链地址;Anycast PE地址集合;NVE接口的Source NVE地址};In one embodiment, the first variable set includes at least two variables in the following variables: {node Router ID; node IP address set; BGP link establishment address; Anycast PE address set; Source NVE address of NVE interface};
所述两变量为所述第一设备、满足所述第一条件的设备和不满足所述第一条件的设备上的标准化变量。The two variables are standardized variables on the first device, devices meeting the first condition, and devices not meeting the first condition.
在一实施例中,所述装置还包括:In one embodiment, the device also includes:
指示模块,用于指示发送所述第一路由报文。An instructing module, configured to instruct to send the first routing message.
在一实施例中,所述第一变量指示信息、所述第一目标值描述信息和所述第二目标动作的描述信息来自于配置信息。In an embodiment, the first variable indication information, the first target value description information, and the second target action description information come from configuration information.
在一实施例中,所述第一变量指示信息缓冲区、所述第一目标值描述信息和所述第二目标动作的描述信息以脚本的形式包含在所述第一路由报文中。In an embodiment, the first variable indicates an information buffer, the description information of the first target value, and the description information of the second target action are included in the first routing message in the form of a script.
在一实施例中,所述第一变量指示信息缓冲区、所述第一目标值描述信息和所述第二目标动作的描述信息包含在同一TLV中,所述TLV的TLV类型值为所述第一指示信息。In one embodiment, the first variable indicates the information buffer, the description information of the first target value, and the description information of the second target action are included in the same TLV, and the TLV type value of the TLV is the The first instruction message.
根据本公开的另一个实施例,还提供了一种路由报文处理装置,图10是根据本公开实施 例的路由报文处理装置的框图二,如图10所示,包括:According to another embodiment of the present disclosure, a routing message processing device is also provided, and Fig. 10 is a block diagram 2 of a routing message processing device according to an embodiment of the present disclosure, as shown in Fig. 10 , including:
接收模块102,设置为接收第一设备根据目标路由信息发布的第一路由报文,其中,所述第一路由报文用于指示接收所述第一路由报文的设备执行第一目标动作,所述第一路由报文中携带第一指令指示信息、第二指令指示信息、第一指示信息、第一目标值描述信息缓冲区、第二目标值描述信息缓冲区、第一变量指示信息缓冲区以及第二目标动作的描述信息;The receiving module 102 is configured to receive a first routing packet issued by the first device according to the target routing information, where the first routing packet is used to instruct the device receiving the first routing packet to perform a first target action, The first routing message carries the first instruction instruction information, the second instruction instruction information, the first instruction information, the first target value description information buffer, the second target value description information buffer, and the first variable instruction information buffer The descriptive information of the area and the second target action;
处理模块104,设置为根据所述第一指示信息指示进行以下至少之一处理:The processing module 104 is configured to perform at least one of the following processing according to the first indication information instruction:
当满足第一条件,且在执行所述第一目标动作的上下文中执行所述第二目标动作;performing the second target action in the context of performing the first target action when the first condition is met;
当不满足所述第一条件,且在执行所述第一目标动作的上下文中时不执行所述第二目标动作;not performing the second target action when the first condition is not satisfied and in the context of performing the first target action;
其中,所述第一条件为第一变量与第一目标值匹配,所述第一变量为所述第一变量指示信息缓冲区中的指示信息所指示的变量,所述第一目标值为所述第一目标值描述信息缓冲区中的数值或者用所述第一目标值描述信息缓冲区中的指示信息所指示的方法获得的数值,所述第一指令指示信息指示确定所述第一变量指示信息缓冲区和所述第一目标值描述信息缓冲区的位置的方法,所述第二指令指示信息指示获得所述第二目标动作的描述信息的方法。Wherein, the first condition is that the first variable matches the first target value, the first variable is the variable indicated by the indication information in the first variable indication information buffer, and the first target value is the The value in the first target value description information buffer or the value obtained by the method indicated by the instruction information in the first target value description information buffer, the first instruction instruction information indicates to determine the first variable A method for indicating the location of the information buffer and the first target value description information buffer, and the second instruction indication information indicates a method for obtaining the description information of the second target action.
在一实施例中,所述第二目标动作的描述信息包括第三指令指示信息、第二变量指示信息缓冲区和第二目标值描述信息缓冲区;In an embodiment, the description information of the second target action includes third instruction indication information, a second variable indication information buffer, and a second target value description information buffer;
其中,所述第三指令指示信息指示所述第二目标动作为将第二变量的值设置为第一缓冲区中的值,所述第二变量为所述第二变量指示信息缓冲区中的指示信息所指示的变量,所述第一缓冲区为所述第二目标值描述信息缓冲区或者根据所述第二目标值描述信息缓冲区中的指示信息所指示的方法确定的缓冲区。Wherein, the third instruction indication information indicates that the second target action is to set the value of the second variable as the value in the first buffer, and the second variable is the value in the second variable indication information buffer. The variable indicated by the indication information, the first buffer is the second target value description information buffer or a buffer determined according to the method indicated by the indication information in the second target value description information buffer.
在一实施例中,所述第一变量指示信息缓冲区用于携带第一类指示信息,所述第一类指示信息为指示第一变量集合中的变量的指示信息,所述第一变量集合中至少包括两个变量。In an embodiment, the first variable indication information buffer is used to carry a first type of indication information, the first type of indication information is indication information indicating variables in a first variable set, and the first variable set Include at least two variables in .
所述第二变量指示信息缓冲区用于携带第二类指示信息,所述第二类指示信息为指示第二变量集合中的变量的指示信息,所述第二变量集合中至少包括两个变量。The second variable indication information buffer is used to carry a second type of indication information, the second type of indication information is indication information indicating variables in a second variable set, and the second variable set includes at least two variables .
在一实施例中,当所述第一路由报文、所述第一变量、所述第一目标值、所述第二变量满足所述第六条件时,所述方法还包括:In an embodiment, when the first routing message, the first variable, the first target value, and the second variable satisfy the sixth condition, the method further includes:
向所述第一设备发送第五路由报文,其中,若为接收所述第三路由报文且满足所述第一条件的设备,所述第五路由报文的下一跳Nexthop为标识设备的IP地址,所述第五路由报文与所述第三路由报文为同类路由报文,且所述第五路由报文不携带与所述第一指示信息、第二指令指示信息、第三指令指示信息对应的指示信息;Sending a fifth routing message to the first device, wherein, if it is a device that receives the third routing message and satisfies the first condition, the next hop Nexthop of the fifth routing message is an identification device IP address, the fifth routing message and the third routing message are similar routing messages, and the fifth routing message does not carry the same as the first indication information, the second instruction indication information, the first The instruction information corresponding to the instruction information of the three instructions;
所述第五路由报文用于指示所述第一设备执行如下处理:响应于所述第五路由报文的下一跳在所述第一IP值集合中,所述第一设备将第四变量设置为第四目标值,其中,所述第四变量为所述第一设备对所述第五路由报文执行所述第一目标动作的上下文中的变量,使得所述第四变量与所述第二变量具有对称关系。The fifth routing message is used to instruct the first device to perform the following processing: in response to the next hop of the fifth routing message being in the first IP value set, the first device sends the fourth The variable is set to a fourth target value, wherein the fourth variable is a variable in the context in which the first device performs the first target action on the fifth routing packet, so that the fourth variable is the same as the The second variable has a symmetrical relationship.
在一实施例中,所述第二目标动作包括将第三实体与所述目标路由信息耦合在一起以及将所述第三实体的第三属性设置为所述第二目标值,其中,所述第三属性为第一实体的第一属性或第二实体的第二属性,所述第三实体为所述第三属性所属的所述第二实体或所述第一实体,所述第三属性为所述第三实体的存储第二指示信息的字段,所述第二目标值为所述第二指示信息的值。In an embodiment, the second target action includes coupling a third entity with the target routing information and setting a third attribute of the third entity to the second target value, wherein the The third attribute is the first attribute of the first entity or the second attribute of the second entity, the third entity is the second entity or the first entity to which the third attribute belongs, and the third attribute is a field of the third entity storing second indication information, and the second target value is a value of the second indication information.
在一实施例中,所述第二指示信息用于指示从所述第三实体收到的报文不可转发到第四实体,并且所述第四实体与所述第三实体不同,或者,In an embodiment, the second indication information is used to indicate that the message received from the third entity cannot be forwarded to a fourth entity, and the fourth entity is different from the third entity, or,
所述第二指示信息用于指示从所述第三实体收到的报文不可转发到所述第三实体。The second indication information is used to indicate that the message received from the third entity cannot be forwarded to the third entity.
在一实施例中,所述第二实体或所述第一实体为以下至少之一:In an embodiment, the second entity or the first entity is at least one of the following:
与所述第一路由报文匹配的IP隧道的转发表项;A forwarding entry of the IP tunnel matched with the first routing packet;
与所述第一路由报文匹配的ESI转发表项;An ESI forwarding entry matching the first routing message;
与所述第一路由报文匹配的入口复制列表表项。Ingress replication list entries matching the first routing packet.
本公开的实施例还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,其中,该计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。Embodiments of the present disclosure also provide a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps in any one of the above method embodiments when running.
在一个示例性实施例中,上述计算机可读存储介质可以包括但不限于:U盘、只读存储器(Read-Only Memory,简称为ROM)、随机存取存储器(Random Access Memory,简称为RAM)、移动硬盘、磁碟或者光盘等各种可以存储计算机程序的介质。In an exemplary embodiment, the above-mentioned computer-readable storage medium may include but not limited to: U disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM) , mobile hard disk, magnetic disk or optical disk and other media that can store computer programs.
本公开的实施例还提供了一种电子装置,包括存储器和处理器,该存储器中存储有计算机程序,该处理器被设置为运行计算机程序以执行上述任一项方法实施例中的步骤。Embodiments of the present disclosure also provide an electronic device, including a memory and a processor, where a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
在一个示例性实施例中,上述电子装置还可以包括传输设备以及输入输出设备,其中,该传输设备和上述处理器连接,该输入输出设备和上述处理器连接。In an exemplary embodiment, the electronic device may further include a transmission device and an input and output device, wherein the transmission device is connected to the processor, and the input and output device is connected to the processor.
本实施例中的具体示例可以参考上述实施例及示例性实施方式中所描述的示例,本实施例在此不再赘述。For specific examples in this embodiment, reference may be made to the examples described in the foregoing embodiments and exemplary implementation manners, and details will not be repeated here in this embodiment.
显然,本领域的技术人员应该明白,上述的本公开的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本公开不限制于任何特定的硬件和软件结合。Obviously, those skilled in the art should understand that each module or each step of the above-mentioned disclosure can be realized by a general-purpose computing device, and they can be concentrated on a single computing device, or distributed in a network composed of multiple computing devices In fact, they can be implemented in program code executable by a computing device, and thus, they can be stored in a storage device to be executed by a computing device, and in some cases, can be executed in an order different from that shown here. Or described steps, or they are fabricated into individual integrated circuit modules, or multiple modules or steps among them are fabricated into a single integrated circuit module for implementation. As such, the present disclosure is not limited to any specific combination of hardware and software.
以上所述仅为本公开的优选实施例而已,并不用于限制本公开,对于本领域的技术人员来说,本公开可以有各种更改和变化。凡在本公开的原则之内,所作的任何修改、等同替换、改进等,均应包含在本公开的保护范围之内。The above descriptions are only preferred embodiments of the present disclosure, and are not intended to limit the present disclosure. For those skilled in the art, the present disclosure may have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims (21)

  1. 一种路由报文处理方法,包括:A routing message processing method, comprising:
    第一设备获取目标路由信息;The first device acquires target routing information;
    所述第一设备根据所述目标路由信息发布第一路由报文,其中,所述第一路由报文用于指示接收所述第一路由报文的设备执行第一目标动作,所述第一路由报文中携带第一指令指示信息、第二指令指示信息、第一指示信息、第一目标值描述信息缓冲区、第二目标值描述信息缓冲区、第一变量指示信息缓冲区以及第二目标动作的描述信息,所述第一指示信息指示接收所述第一路由报文的设备进行以下至少之一处理:The first device publishes a first routing message according to the target routing information, where the first routing message is used to instruct a device receiving the first routing message to perform a first target action, and the first The routing message carries the first instruction instruction information, the second instruction instruction information, the first instruction information, the first target value description information buffer, the second target value description information buffer, the first variable instruction information buffer, and the second Descriptive information of the target action, the first indication information instructs the device receiving the first routing message to perform at least one of the following processes:
    当接收所述第一路由报文的设备为满足第一条件的设备,且在执行所述第一目标动作的上下文中执行所述第二目标动作;When the device receiving the first routing packet is a device that meets the first condition, and executes the second target action in the context of executing the first target action;
    当接收所述第一路由报文的设备为不满足所述第一条件的设备,且在执行所述第一目标动作的上下文中时不执行所述第二目标动作;When the device receiving the first routing message is a device that does not meet the first condition and is in the context of performing the first target action, not executing the second target action;
    其中,所述第一条件为第一变量与第一目标值匹配,所述第一变量为所述第一变量指示信息缓冲区中的指示信息所指示的变量,所述第一目标值为所述第一目标值描述信息缓冲区中的数值或者用所述第一目标值描述信息缓冲区中的指示信息所指示的方法获得的数值,所述第一指令指示信息指示确定所述第一变量指示信息缓冲区和所述第一目标值描述信息缓冲区的位置的方法,所述第二指令指示信息指示获得所述第二目标动作的描述信息的方法。Wherein, the first condition is that the first variable matches the first target value, the first variable is the variable indicated by the indication information in the first variable indication information buffer, and the first target value is the The value in the first target value description information buffer or the value obtained by the method indicated by the instruction information in the first target value description information buffer, the first instruction instruction information indicates to determine the first variable A method for indicating the location of the information buffer and the first target value description information buffer, and the second instruction indication information indicates a method for obtaining the description information of the second target action.
  2. 根据权利要求1所述的方法,其中,The method according to claim 1, wherein,
    所述第一变量指示信息缓冲区用于携带第一类指示信息,所述第一类指示信息为指示第一变量集合中的变量的指示信息,所述第一变量集合中至少包括两个变量。The first variable indication information buffer is used to carry a first type of indication information, the first type of indication information is indication information indicating variables in a first variable set, and the first variable set includes at least two variables .
  3. 根据权利要求1所述的方法,其中,The method according to claim 1, wherein,
    所述第二目标动作的描述信息包括第三指令指示信息、第二变量指示信息缓冲区和第二目标值描述信息缓冲区;The description information of the second target action includes third instruction indication information, a second variable indication information buffer, and a second target value description information buffer;
    其中,所述第三指令指示信息指示所述第二目标动作为将第二变量的值设置为第一缓冲区中的值,所述第二变量为所述第二变量指示信息缓冲区中的指示信息所指示的变量,所述第一缓冲区为所述第二目标值描述信息缓冲区或者根据所述第二目标值描述信息缓冲区中的指示信息所指示的方法确定的缓冲区。Wherein, the third instruction indication information indicates that the second target action is to set the value of the second variable as the value in the first buffer, and the second variable is the value in the second variable indication information buffer. The variable indicated by the indication information, the first buffer is the second target value description information buffer or a buffer determined according to the method indicated by the indication information in the second target value description information buffer.
  4. 根据权利要求3所述的方法,其中,The method according to claim 3, wherein,
    所述第二变量指示信息缓冲区用于携带第二类指示信息,所述第二类指示信息为指示第二变量集合中的变量的指示信息,所述第二变量集合中至少包括两个变量。The second variable indication information buffer is used to carry a second type of indication information, the second type of indication information is indication information indicating variables in a second variable set, and the second variable set includes at least two variables .
  5. 根据权利要求3所述的方法,其中,The method according to claim 3, wherein,
    所述第一路由报文、所述第一变量、所述第一目标值、所述第二变量满足第五条件、第六条件、第七条件三者之一;其中,The first routing message, the first variable, the first target value, and the second variable satisfy one of the fifth condition, the sixth condition, and the seventh condition; wherein,
    所述第五条件为:所述第一路由报文为第二路由报文,所述第一变量为接收所述第二路由报文的节点与其它节点之间的共同IP地址的集合,所述第一目标值为第五IP,所述第五IP为所述第一设备与满足所述第一条件的设备共同的IP地址,所述第二变量为与所述第二路由报文匹配的第一实体的第一属性;The fifth condition is: the first routing message is a second routing message, and the first variable is a set of common IP addresses between the node receiving the second routing message and other nodes, so The first target value is the fifth IP, the fifth IP is the common IP address of the first device and the device meeting the first condition, and the second variable matches the second routing packet The first attribute of the first entity of ;
    所述第六条件为:所述第一路由报文为第三路由报文,所述第一变量为接收所述第三路 由报文的节点上标识该节点的IP地址,所述第一目标值为第一IP值集合,所述第一IP值集合为所述第一设备上配置的IP地址值集合,所述第二变量为与所述第三路由报文匹配的第二实体的第二属性,其中,所述第一IP值集合中至少包括标识满足所述第一条件的设备的IP地址,且所述第一IP值集合中不包括标识不满足所述第一条件的设备的IP地址;The sixth condition is: the first routing message is a third routing message, the first variable is the IP address identifying the node on the node receiving the third routing message, and the first target The value is the first IP value set, the first IP value set is the IP address value set configured on the first device, and the second variable is the first IP value of the second entity that matches the third routing message. Two attributes, wherein the first IP value set includes at least an IP address identifying a device that meets the first condition, and the first IP value set does not include an IP address that identifies a device that does not meet the first condition IP address;
    所述第七条件为:所述第一路由报文为第四路由报文,所述第一变量为接收所述第四路由报文的节点上的第二IP值集合,所述第一目标值为标识所述第一设备的IP地址的值,所述第二IP值集合为所述接收所述第四路由报文的节点上配置的IP地址值集合,所述第二变量为与所述第四路由报文匹配的第二实体的第二属性,其中,所述第二IP值集合中至少包括标识所述第一设备的IP地址,且不满足所述第一条件的设备的第三IP地址值集合中不包括标识所述第一设备的IP地址,所述第三IP地址集合为不满足所述第一条件的设备上配置的IP地址值集合,且所述第三IP地址集合与所述第二IP地址集合通过同样的配置接口配置。The seventh condition is: the first routing message is a fourth routing message, the first variable is a second IP value set on the node receiving the fourth routing message, and the first target The value is a value identifying the IP address of the first device, the second IP value set is the IP address value set configured on the node receiving the fourth routing message, and the second variable is the same as the The second attribute of the second entity matched by the fourth routing packet, wherein the second IP value set includes at least the IP address identifying the first device, and the first IP address of the device that does not meet the first condition The IP address identifying the first device is not included in the three IP address value sets, the third IP address set is an IP address value set configured on a device that does not meet the first condition, and the third IP address The set is configured through the same configuration interface as the second set of IP addresses.
  6. 根据权利要求5所述的方法,其中,当所述第一路由报文、所述第一变量、所述第一目标值、所述第二变量满足所述第六条件时,所述方法还包括:The method according to claim 5, wherein, when the first routing message, the first variable, the first target value, and the second variable satisfy the sixth condition, the method further include:
    所述第一设备从第二设备接收第五路由报文,其中,所述第二设备为接收所述第三路由报文且满足所述第一条件的设备,所述第五路由报文的下一跳Nexthop为标识所述第二设备的IP地址,所述第五路由报文与所述第三路由报文为同类路由报文,且所述第五路由报文不携带与所述第一指示信息、第二指令指示信息、第三指令指示信息对应的指示信息;The first device receives a fifth routing packet from a second device, where the second device is a device that receives the third routing packet and satisfies the first condition, and the fifth routing packet The next hop Nexthop is the IP address identifying the second device, the fifth routing message and the third routing message are similar routing messages, and the fifth routing message does not carry the same routing message as the first routing message. Instruction information corresponding to the instruction information, the second instruction instruction information, and the third instruction instruction information;
    响应于所述第五路由报文的下一跳在所述第一IP值集合中,所述第一设备将第四变量设置为第四目标值,使得所述第四变量与所述第二变量具有对称关系,其中,所述第四变量为对所述第五路由报文执行所述第一目标动作的上下文中的变量。In response to the next hop of the fifth routing packet being in the first set of IP values, the first device sets a fourth variable as a fourth target value, so that the fourth variable is the same as the second The variables have a symmetrical relationship, wherein the fourth variable is a variable in the context of executing the first target action on the fifth routing packet.
  7. 根据权利要求5至6中任意一项所述的方法,其中,A method according to any one of claims 5 to 6, wherein,
    所述第二目标动作包括将第三实体与所述目标路由信息耦合在一起以及将所述第三实体的第三属性设置为所述第二目标值,其中,所述第三属性为所述第一实体的所述第一属性或所述第二实体的所述第二属性,所述第三实体为所述第三属性所属的所述第二实体或所述第一实体,且所述第三属性为所述第三实体的存储第二指示信息的字段。The second target action includes coupling a third entity with the target routing information and setting a third attribute of the third entity to the second target value, wherein the third attribute is the The first attribute of the first entity or the second attribute of the second entity, the third entity is the second entity or the first entity to which the third attribute belongs, and the The third attribute is a field of the third entity storing the second indication information.
  8. 根据权利要求7所述的方法,其中,The method according to claim 7, wherein,
    所述第二指示信息为第三指示信息或第四指示信息,其中,所述第三指示信息用于指示从所述第三实体收到的报文不可转发到第四实体,并且所述第四实体与所述第三实体不同,所述第四指示信息用于指示从所述第三实体收到的报文不可转发到所述第三实体。The second indication information is third indication information or fourth indication information, where the third indication information is used to indicate that the message received from the third entity cannot be forwarded to the fourth entity, and the first The fourth entity is different from the third entity, and the fourth indication information is used to indicate that the packet received from the third entity cannot be forwarded to the third entity.
  9. 根据权利要求1所述的方法,其中,The method according to claim 1, wherein,
    所述第一路由报文为第六路由报文,所述第六路由报文包括:The first routing message is a sixth routing message, and the sixth routing message includes:
    所述第六路由报文指示通过第一目标隧道到达第四设备之后经过所述第四设备到达目标主机的路由信息;其中,所述第四设备通过同一NVO隧道多归入到所述第一设备和接收所述第六路由报文且满足所述第一条件的设备,且所述NVO隧道没有归入第三设备,所述第三设备为接收所述第六路由报文的节点且所述第三设备不满足所述第一条件。The sixth routing message indicates the routing information to reach the target host through the fourth device after reaching the fourth device through the first target tunnel; A device and a device that receives the sixth routing message and satisfies the first condition, and the NVO tunnel is not included in a third device, the third device is the node that receives the sixth routing message and the The third device does not satisfy the first condition.
  10. 根据权利要求1至6、8中任意一项所述的方法,其中,The method according to any one of claims 1 to 6, 8, wherein,
    所述第一变量指示信息缓冲区用于通过改变指示信息指示所述第一变量集合中的不同变量,在不改变接收所述第一路由报文的节点上的配置的前提下,使得执行所述第二目标动作的节点发生变化。The first variable indication information buffer is used to indicate different variables in the first variable set by changing the indication information, so that the execution of the The node of the second target action changes.
  11. 一种路由报文处理方法,包括:A routing message processing method, comprising:
    接收第一设备根据目标路由信息发布的第一路由报文,其中,所述第一路由报文用于指示接收所述第一路由报文的设备执行第一目标动作,所述第一路由报文中携带第一指令指示信息、第二指令指示信息、第一指示信息、第一目标值描述信息缓冲区、第二目标值描述信息缓冲区、第一变量指示信息缓冲区以及第二目标动作的描述信息;receiving a first routing packet issued by the first device according to the target routing information, wherein the first routing packet is used to instruct the device receiving the first routing packet to perform a first target action, and the first routing packet The text carries the first instruction instruction information, the second instruction instruction information, the first instruction information, the first target value description information buffer, the second target value description information buffer, the first variable instruction information buffer and the second target action description information;
    根据所述第一指示信息指示进行以下至少之一处理:performing at least one of the following processes according to the first indication information:
    当满足第一条件,且在执行所述第一目标动作的上下文中执行所述第二目标动作;performing the second target action in the context of performing the first target action when the first condition is met;
    当不满足所述第一条件,且在执行所述第一目标动作的上下文中时不执行所述第二目标动作;not performing the second target action when the first condition is not satisfied and in the context of performing the first target action;
    其中,所述第一条件为第一变量与第一目标值匹配,所述第一变量为所述第一变量指示信息缓冲区中的指示信息所指示的变量,所述第一目标值为所述第一目标值描述信息缓冲区中的数值或者用所述第一目标值描述信息缓冲区中的指示信息所指示的方法获得的数值,所述第一指令指示信息指示确定所述第一变量指示信息缓冲区和所述第一目标值描述信息缓冲区的位置的方法,所述第二指令指示信息指示获得所述第二目标动作的描述信息的方法。Wherein, the first condition is that the first variable matches the first target value, the first variable is the variable indicated by the indication information in the first variable indication information buffer, and the first target value is the The value in the first target value description information buffer or the value obtained by the method indicated by the instruction information in the first target value description information buffer, the first instruction instruction information indicates to determine the first variable A method for indicating the location of the information buffer and the first target value description information buffer, and the second instruction indication information indicates a method for obtaining the description information of the second target action.
  12. 根据权利要求11所述的方法,其中,The method of claim 11, wherein,
    所述第二目标动作的描述信息包括第三指令指示信息、第二变量指示信息缓冲区和第二目标值描述信息缓冲区;The description information of the second target action includes third instruction indication information, a second variable indication information buffer, and a second target value description information buffer;
    其中,所述第三指令指示信息指示所述第二目标动作为将第二变量的值设置为第一缓冲区中的值,所述第二变量为所述第二变量指示信息缓冲区中的指示信息所指示的变量,所述第一缓冲区为所述第二目标值描述信息缓冲区或者根据所述第二目标值描述信息缓冲区中的指示信息所指示的方法确定的缓冲区。Wherein, the third instruction indication information indicates that the second target action is to set the value of the second variable as the value in the first buffer, and the second variable is the value in the second variable indication information buffer. The variable indicated by the indication information, the first buffer is the second target value description information buffer or a buffer determined according to the method indicated by the indication information in the second target value description information buffer.
  13. 根据权利要求12所述的方法,其中,The method of claim 12, wherein,
    所述第一变量指示信息缓冲区用于携带第一类指示信息,所述第一类指示信息为指示第一变量集合中的变量的指示信息,所述第一变量集合中至少包括两个变量;The first variable indication information buffer is used to carry a first type of indication information, the first type of indication information is indication information indicating variables in a first variable set, and the first variable set includes at least two variables ;
    所述第二变量指示信息缓冲区用于携带第二类指示信息,所述第二类指示信息为指示第二变量集合中的变量的指示信息,所述第二变量集合中至少包括两个变量。The second variable indication information buffer is used to carry a second type of indication information, the second type of indication information is indication information indicating variables in a second variable set, and the second variable set includes at least two variables .
  14. 根据权利要求12或13所述的方法,其中,当所述第一路由报文、所述第一变量、所述第一目标值、所述第二变量满足第六条件时,所述方法还包括:The method according to claim 12 or 13, wherein, when the first routing message, the first variable, the first target value, and the second variable satisfy a sixth condition, the method further include:
    向所述第一设备发送第五路由报文,其中,若为接收第三路由报文且满足所述第一条件的设备,所述第五路由报文的下一跳Nexthop为标识设备的IP地址,所述第五路由报文与所述第三路由报文为同类路由报文,且所述第五路由报文不携带与所述第一指示信息、第二指令指示信息、第三指令指示信息对应的指示信息;Sending a fifth routing message to the first device, wherein, if it is a device that receives the third routing message and satisfies the first condition, the next hop Nexthop of the fifth routing message is the IP address of the identified device Address, the fifth routing message and the third routing message are similar routing messages, and the fifth routing message does not carry the same information as the first instruction information, the second instruction instruction information, and the third instruction instruction information corresponding to the instruction information;
    所述第五路由报文用于指示所述第一设备执行如下处理:响应于所述第五路由报文的下一跳在第一IP值集合中,所述第一设备将第四变量设置为第四目标值,其中,所述第四变量为所述第一设备对所述第五路由报文执行所述第一目标动作的上下文中的变量,使得所述第四变量与所述第二变量具有对称关系。The fifth routing message is used to instruct the first device to perform the following processing: in response to the next hop of the fifth routing message being in the first IP value set, the first device sets the fourth variable to is the fourth target value, wherein the fourth variable is a variable in the context of the first device performing the first target action on the fifth routing packet, so that the fourth variable is the same as the first The two variables have a symmetrical relationship.
  15. 根据权利要求12所述的方法,其中,The method of claim 12, wherein,
    所述第二目标动作包括将第三实体与所述目标路由信息耦合在一起以及将所述第三实体的第三属性设置为所述第二目标值,其中,所述第三属性为第一实体的第一属性或第二实体 的第二属性,所述第三实体为所述第三属性所属的所述第二实体或所述第一实体,所述第三属性为所述第三实体的存储第二指示信息的字段,所述第二目标值为所述第二指示信息的值。The second target action includes coupling a third entity with the target routing information and setting a third attribute of the third entity to the second target value, wherein the third attribute is the first The first attribute of the entity or the second attribute of the second entity, the third entity is the second entity or the first entity to which the third attribute belongs, and the third attribute is the third entity A field for storing second indication information, the second target value is a value of the second indication information.
  16. 根据权利要求15所述的方法,其中,The method of claim 15, wherein,
    所述第二指示信息用于指示从所述第三实体收到的报文不可转发到第四实体,并且所述第四实体与所述第三实体不同,或者,The second indication information is used to indicate that the message received from the third entity cannot be forwarded to a fourth entity, and the fourth entity is different from the third entity, or,
    所述第二指示信息用于指示从所述第三实体收到的报文不可转发到所述第三实体。The second indication information is used to indicate that the message received from the third entity cannot be forwarded to the third entity.
  17. 根据权利要求15或16所述的方法,其中,A method according to claim 15 or 16, wherein,
    所述第二实体或所述第一实体为以下至少之一:The second entity or the first entity is at least one of the following:
    与所述第一路由报文匹配的IP隧道的转发表项;A forwarding entry of the IP tunnel matched with the first routing packet;
    与所述第一路由报文匹配的ESI转发表项;An ESI forwarding entry matching the first routing message;
    与所述第一路由报文匹配的入口复制列表表项。Ingress replication list entries matching the first routing packet.
  18. 一种路由报文处理装置,应用于所述第一设备,包括:An apparatus for processing routing packets, applied to the first device, comprising:
    获取模块,设置为获取目标路由信息;The acquisition module is set to acquire target routing information;
    发布模块,设置为根据所述目标路由信息发布第一路由报文,其中,所述第一路由报文用于指示接收所述第一路由报文的设备执行第一目标动作,所述第一路由报文中携带第一指令指示信息、第二指令指示信息、第一指示信息、第一目标值描述信息缓冲区、第二目标值描述信息缓冲区、第一变量指示信息缓冲区以及第二目标动作的描述信息,所述第一指示信息指示接收所述第一路由报文的设备进行以下至少之一处理:A publishing module, configured to publish a first routing message according to the target routing information, wherein the first routing message is used to instruct the device receiving the first routing message to perform a first target action, and the first The routing message carries the first instruction instruction information, the second instruction instruction information, the first instruction information, the first target value description information buffer, the second target value description information buffer, the first variable instruction information buffer, and the second Descriptive information of the target action, the first indication information instructs the device receiving the first routing message to perform at least one of the following processes:
    当接收所述第一路由报文的设备为满足第一条件的设备,且在执行所述第一目标动作的上下文中执行所述第二目标动作;When the device receiving the first routing packet is a device that meets the first condition, and executes the second target action in the context of executing the first target action;
    当接收所述第一路由报文的设备为不满足所述第一条件的设备,且在执行所述第一目标动作的上下文中时不执行所述第二目标动作;When the device receiving the first routing message is a device that does not meet the first condition and is in the context of performing the first target action, not executing the second target action;
    其中,所述第一条件为第一变量与第一目标值匹配,所述第一变量为所述第一变量指示信息缓冲区中的指示信息所指示的变量,所述第一目标值为所述第一目标值描述信息缓冲区中的数值或者用所述第一目标值描述信息缓冲区中的指示信息所指示的方法获得的数值,所述第一指令指示信息指示确定所述第一变量指示信息缓冲区和所述第一目标值描述信息缓冲区的位置的方法,所述第二指令指示信息指示获得所述第二目标动作的描述信息的方法。Wherein, the first condition is that the first variable matches the first target value, the first variable is the variable indicated by the indication information in the first variable indication information buffer, and the first target value is the The value in the first target value description information buffer or the value obtained by the method indicated by the instruction information in the first target value description information buffer, the first instruction instruction information indicates to determine the first variable A method for indicating the location of the information buffer and the first target value description information buffer, and the second instruction indication information indicates a method for obtaining the description information of the second target action.
  19. 一种路由报文处理装置,包括:A routing message processing device, comprising:
    接收模块,设置为接收第一设备根据目标路由信息发布的第一路由报文,其中,所述第一路由报文用于指示接收所述第一路由报文的设备执行第一目标动作,所述第一路由报文中携带第一指令指示信息、第二指令指示信息、第一指示信息、第一目标值描述信息缓冲区、第二目标值描述信息缓冲区、第一变量指示信息缓冲区以及第二目标动作的描述信息;The receiving module is configured to receive a first routing packet issued by the first device according to the target routing information, wherein the first routing packet is used to instruct the device receiving the first routing packet to perform a first target action, and the The first routing message carries the first instruction instruction information, the second instruction instruction information, the first instruction information, the first target value description information buffer, the second target value description information buffer, and the first variable instruction information buffer and description information of the second target action;
    处理模块,设置为根据所述第一指示信息指示进行以下至少之一处理:A processing module, configured to perform at least one of the following processing according to the first instruction information instruction:
    当满足第一条件,且在执行所述第一目标动作的上下文中执行所述第二目标动作;performing the second target action in the context of performing the first target action when the first condition is met;
    当不满足所述第一条件,且在执行所述第一目标动作的上下文中时不执行所述第二目标动作;not performing the second target action when the first condition is not satisfied and in the context of performing the first target action;
    其中,所述第一条件为第一变量与第一目标值匹配,所述第一变量为所述第一变量指示信息缓冲区中的指示信息所指示的变量,所述第一目标值为所述第一目标值描述信息缓冲区中的数值或者用所述第一目标值描述信息缓冲区中的指示信息所指示的方法获得的数值,所 述第一指令指示信息指示确定所述第一变量指示信息缓冲区和所述第一目标值描述信息缓冲区的位置的方法,所述第二指令指示信息指示获得所述第二目标动作的描述信息的方法。Wherein, the first condition is that the first variable matches the first target value, the first variable is the variable indicated by the indication information in the first variable indication information buffer, and the first target value is the The value in the first target value description information buffer or the value obtained by the method indicated by the instruction information in the first target value description information buffer, the first instruction instruction information indicates to determine the first variable A method for indicating the location of the information buffer and the first target value description information buffer, and the second instruction indication information indicates a method for obtaining the description information of the second target action.
  20. 一种计算机可读的存储介质,所述存储介质中存储有计算机程序,其中,所述计算机程序被设置为运行时执行所述权利要求1至10、11至17任一项中所述的方法。A computer-readable storage medium, wherein a computer program is stored in the storage medium, wherein the computer program is configured to perform the method described in any one of claims 1 to 10, 11 to 17 when running .
  21. 一种电子装置,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器被设置为运行所述计算机程序以执行所述权利要求1至10、11至17任一项中所述的方法。An electronic device, comprising a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to perform any of the claims 1 to 10, 11 to 17 described method.
PCT/CN2022/115496 2021-10-15 2022-08-29 Routing packet processing method and apparatus, and storage medium and electronic apparatus WO2023061069A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111204435.4A CN115996157A (en) 2021-10-15 2021-10-15 Routing message processing method and device, storage medium and electronic device
CN202111204435.4 2021-10-15

Publications (1)

Publication Number Publication Date
WO2023061069A1 true WO2023061069A1 (en) 2023-04-20

Family

ID=85988159

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/115496 WO2023061069A1 (en) 2021-10-15 2022-08-29 Routing packet processing method and apparatus, and storage medium and electronic apparatus

Country Status (2)

Country Link
CN (1) CN115996157A (en)
WO (1) WO2023061069A1 (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103139189A (en) * 2011-12-05 2013-06-05 京信通信系统(中国)有限公司 Internet protocol security (IPSec) tunnel sharing method, IPSec tunnel sharing system and IPSec tunnel sharing equipment
US20160301626A1 (en) * 2015-04-08 2016-10-13 Oracle International Corporation Tunnel consolidation for real-time communications
EP3148151A1 (en) * 2015-09-23 2017-03-29 Vodafone GmbH Method, computer program product and network system for establishing a data communication
CN107294711A (en) * 2017-07-11 2017-10-24 国网辽宁省电力有限公司 A kind of power information Intranet message encryption dissemination method based on VXLAN technologies
WO2018063276A1 (en) * 2016-09-30 2018-04-05 Intel Corporation U-plane path selection and reselection for ue to ue communication
CN111277481A (en) * 2020-01-09 2020-06-12 奇安信科技集团股份有限公司 Method, device, equipment and storage medium for establishing VPN tunnel
CN112583714A (en) * 2019-09-30 2021-03-30 华为技术有限公司 Routing control method and device
CN112929273A (en) * 2017-03-14 2021-06-08 华为技术有限公司 Method, equipment and system for processing route

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103139189A (en) * 2011-12-05 2013-06-05 京信通信系统(中国)有限公司 Internet protocol security (IPSec) tunnel sharing method, IPSec tunnel sharing system and IPSec tunnel sharing equipment
US20160301626A1 (en) * 2015-04-08 2016-10-13 Oracle International Corporation Tunnel consolidation for real-time communications
EP3148151A1 (en) * 2015-09-23 2017-03-29 Vodafone GmbH Method, computer program product and network system for establishing a data communication
WO2018063276A1 (en) * 2016-09-30 2018-04-05 Intel Corporation U-plane path selection and reselection for ue to ue communication
CN112929273A (en) * 2017-03-14 2021-06-08 华为技术有限公司 Method, equipment and system for processing route
CN107294711A (en) * 2017-07-11 2017-10-24 国网辽宁省电力有限公司 A kind of power information Intranet message encryption dissemination method based on VXLAN technologies
CN112583714A (en) * 2019-09-30 2021-03-30 华为技术有限公司 Routing control method and device
CN111277481A (en) * 2020-01-09 2020-06-12 奇安信科技集团股份有限公司 Method, device, equipment and storage medium for establishing VPN tunnel

Also Published As

Publication number Publication date
CN115996157A (en) 2023-04-21

Similar Documents

Publication Publication Date Title
WO2021063232A1 (en) Method, apparatus and system for establishing bier forwarding table entry
US9929940B2 (en) Update of MAC routes in EVPN single-active topology
US10771380B2 (en) Fast control path and data path convergence in layer 2 overlay networks
CN111670565B (en) Method, equipment and system for controlling routing iteration
US10367715B2 (en) Proxy of routing protocols to redundant controllers
US9860169B1 (en) Neighbor resolution for remote EVPN hosts in IPV6 EVPN environment
US20170099180A1 (en) Fast convergence of evpn networks for multi homing topologies
US10404573B2 (en) Efficient method to aggregate changes and to produce border gateway protocol link-state (BGP-LS) content from intermediate system to intermediate system (IS-IS) link-state database
EP3188422B1 (en) Traffic black holing avoidance and fast convergence for active-active pbb-evpn redundancy
US8923162B2 (en) Management of private virtual networks
CN112511995B (en) Message interaction method, device, equipment and storage medium
CN111064659B (en) Node protection of BUM traffic for multi-homed node failures
US20230291682A1 (en) Method and device for processing data packet, storage medium, and electronic device
US20230126279A1 (en) Fast reroute for bum traffic in ethernet virtual private networks
CN115225568A (en) Fast reroute to Ethernet VPN-VLANS
US20230081052A1 (en) Method and apparatus for sending multicast packet
WO2023061069A1 (en) Routing packet processing method and apparatus, and storage medium and electronic apparatus
CN112910771B (en) Connection establishment method, device, equipment and storage medium
CN113114553B (en) Method and device for realizing butt joint of different networks under EVPN
WO2022222582A1 (en) Packet processing method and apparatus, and storage medium and electronic apparatus
WO2022042610A1 (en) Information processing method, network controller, node and computer-readable storage medium
CN117336270A (en) Multicast information forwarding method and device, multicast information sink node and medium

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE