WO2023174188A1 - Packet processing method, routing announcement method, and related device - Google Patents

Packet processing method, routing announcement method, and related device Download PDF

Info

Publication number
WO2023174188A1
WO2023174188A1 PCT/CN2023/080968 CN2023080968W WO2023174188A1 WO 2023174188 A1 WO2023174188 A1 WO 2023174188A1 CN 2023080968 W CN2023080968 W CN 2023080968W WO 2023174188 A1 WO2023174188 A1 WO 2023174188A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
vxlan
message
length
communication device
Prior art date
Application number
PCT/CN2023/080968
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
Priority claimed from CN202210570065.4A external-priority patent/CN116800559A/en
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2023174188A1 publication Critical patent/WO2023174188A1/en

Links

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

Definitions

  • the present application relates to the field of communication technology, and in particular to a message processing method, a route advertisement method and related equipment.
  • VXLAN Virtual Extensible Local Area Network
  • DCN data communication networks
  • the source virtual extended LAN tunnel endpoint (VXLAN Tunnel EndPoint, VTEP) of the VXLAN tunnel encapsulates the VXLAN header, User Datagram Protocol (UDP) header, and Internet Protocol (Internet Protocol, IP) header in sequence for the received message. and the outer Ethernet header, and forwards the encapsulated packet in the VXLAN tunnel.
  • UDP User Datagram Protocol
  • IP Internet Protocol
  • IP Internet Protocol
  • IP Internet Protocol
  • IPv4VXLAN IPv6VXLAN
  • VXLAN6 processes packets transmitted through the VXLAN tunnel according to the above processing method, but there is a problem of low packet encapsulation efficiency.
  • this application provides a packet processing method, a route advertisement method and related equipment, which can efficiently perform VXLAN encapsulation, improve packet encapsulation efficiency, and thereby achieve efficient packet processing.
  • the present application provides a message processing method applied to a first communication device that serves as a source VTEP.
  • the method may include: the first communication device obtains a first message, and the first communication device serves as a source VTEP.
  • the first message carries VXLAN information through the IPv6 header, and the VXLAN information at least includes a VXLAN Network Identifier (VNI). Therefore, the first communication device sends the first message to the second communication device through the VXLAN tunnel.
  • the second communications device serves as the destination VTEP.
  • the way in which the VXLAN information is encapsulated in the IPv6 header of the first packet can be recorded as the VXLAN encapsulation optimization method.
  • the VXLAN encapsulation optimization method does not need to encapsulate the UDP header for the packet that is about to enter the VXLAN tunnel. and VXLAN header, it can also carry the VXLAN information required for VXLAN tunnel forwarding in the message and send it to the destination VTEP through the VXLAN tunnel, achieving the effect of transmitting the message in the VXLAN tunnel.
  • the method provided by this application is effective It improves the encapsulation efficiency of packets, making the length of packets transmitted in the VXLAN tunnel smaller, making the source VTEP of the VXLAN tunnel encapsulate packets faster, and the source VTEP and intermediate nodes of the VXLAN tunnel processing packets faster. Fast. When the bandwidth remains unchanged, the source VTEP and intermediate nodes of the VXLAN tunnel can process more packets, enabling efficient packet processing. become possible.
  • the VXLAN information may be carried in the destination IPv6 address of the IPv6 header of the first message, that is, the IPv6 header of the first message includes the destination IPv6 address, and the destination IPv6 address includes the network of the destination VTEP. segment address and the VXLAN information.
  • the VXLAN information may be carried in the last 64 bits of the destination IPv6 address. If the length of the VXLAN information is 64 bits, then the last 64 bits of the destination IPv6 address are all used to carry the VXLAN information; if the length of the VXLAN information is less than 64 bits, then the last 64 bits of the destination IPv6 address Some bits are used to carry the VXLAN information.
  • the VXLAN information may be carried in the source IPv6 address of the IPv6 header of the first message. That is, the IPv6 header of the first message includes the source IPv6 address, and the source IPv6 address includes the network of the source VTEP. segment address and the VXLAN information.
  • the VXLAN information may be carried in the last 64 bits of the source IPv6 address. If the length of the VXLAN information is 64 bits, then the last 64 bits of the source IPv6 address are all used to carry the VXLAN information; if the length of the VXLAN information is less than 64 bits, then the last 64 bits of the source IPv6 address Some bits are used to carry the VXLAN information.
  • the length of the VNI in the VXLAN information may be less than or equal to 24 bits, and the VXLAN information may also include one or more of the following: at least one Flag; a Reserve field.
  • the method may further include: the first communication device receiving a route advertisement message published by the destination VTEP, where the route advertisement message includes a route prefix, the next hop, the VNI and the first information, wherein, The next hop is the network segment address of the destination VTEP, and the first information indicates that the destination VTEP supports VXLAN encapsulation optimization; thus, the first communication device saves the network segment address of the destination VTEP, the VNI and The association relationship of the second information, the second information instructs the source VTEP to encapsulate the VXLAN information including the VNI in the IPv6 header to obtain the first packet. Wherein, the first communication device saves the association relationship between the network segment address of the destination VTEP, the VNI and the second information.
  • the first communication device may include: the first communication device stores the network segment address of the destination VTEP, the VNI The association with the second information is saved to the forwarding side.
  • the first communication device receives the route advertisement message and saves the content in the route advertisement message, and is ready to process the service message on the forwarding plane.
  • the first communication device can obtain the first report based on the content encapsulation in the saved route advertisement message. Text and forward.
  • the first information may be carried through attributes or extended community attributes in the route advertisement message.
  • the first information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI.
  • the second information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI.
  • the mode of the VXLAN information is an all-bit mode
  • the length of the VXLAN information is 64 bits
  • the VNI length is 24 bits
  • the mode of the VXLAN information is an omitted reservation mode
  • the length of the VXLAN information is The length is greater than or equal to 24 bits, and the length of the VXLAN information is less than 64 bits, and the length of the VNI is 24 bits.
  • the length of the VXLAN information is 32 bits, and the length of the VNI The length is 24 bits; or, the mode of the VXLAN information is a simplified compression mode, and the length of the VXLAN information is greater than or equal to M bits, and the length of the VXLAN information is less than 64 bits, the length of the VNI is M bits, and the M is an integer greater than or equal to 1.
  • the VXLAN information includes 8 bits Flags and M-bit VNI.
  • the extended attributes or extended community attributes used to carry the first information in the route advertisement message may include but are not limited to: Type field and SubType field, Flag, LocLen field and Reserved, where the Type field and the subtype SubType together identify the
  • the attribute or extended community attribute is the first information, indicating VXLAN6 encapsulation optimization; the value of the LocLen field is used to indicate the length of the network segment address of the VTEP.
  • the value of the LocLen field is fixed to 64 bits.
  • the value of the LocLen field is fixed to 64 bits.
  • the value of the LocLen field can be determined based on the length of the VXLAN information.
  • the value of Flag is used to indicate the mode of carrying VXLAN information in the IPv6 header.
  • Flag 1 can indicate the all-bit mode.
  • the first communication device obtaining the first message may include: the first communication device receiving the second message; and the first communication device matching the network segment of the destination VTEP according to the destination address of the second message. address, and obtain the VNI and the second information according to the association relationship; the first communication device encapsulates the second message according to the instructions of the second information, and obtains the first message.
  • the first communication device uses the content published by the saved route advertisement message to process the received message to obtain the first message, thereby realizing optimized encapsulation of the received message using VXLAN encapsulation optimization.
  • this application also provides a message processing method, applied to a second communication device, and the second communication device is used as a destination VTEP.
  • the method may include, for example: the second communication device receives data through a VXLAN tunnel.
  • the first message sent by the first communication device, the first message includes an IPv6 header, the IPv6 header includes VXLAN information, the VXLAN information includes the VXLAN network identifier VNI, and the first communication device serves as the source VTEP;
  • the second communication device processes the first message according to the VXLAN information. In this way, the way in which the VXLAN information is encapsulated in the IPv6 header of the first packet can be recorded as a VXLAN encapsulation optimization method.
  • this VXLAN encapsulation optimization method does not need to encapsulate the packets that are about to enter the VXLAN tunnel.
  • the UDP header and VXLAN header can also carry the VXLAN information required for VXLAN tunnel forwarding in the message and send it to the destination VTEP through the VXLAN tunnel.
  • the destination VTEP can process the received message based on the VXLAN information carried in the IPv6 header. , to achieve the effect of packet transmission in the VXLAN tunnel. Since the destination VTEP supports the method provided in the embodiment of this application, it is possible for the source VTEP and the intermediate node to efficiently encapsulate packets and process efficient packets.
  • the IPv6 header of the first message includes a destination IPv6 address
  • the destination IPv6 address includes the network segment address of the destination VTEP and the VXLAN information.
  • the VXLAN information carries In the last 64 bits of the destination IPv6 address. For example, all the last 64 bits of the destination IPv6 address are used to carry the VXLAN information.
  • the IPv6 header of the first message includes a source IPv6 address
  • the source IPv6 address includes the network segment address of the source VTEP and the VXLAN information.
  • the VXLAN information is carried in the last 64 bits of the source IPv6 address. For example, all the last 64 bits of the source IPv6 address are used to carry the VXLAN information.
  • the length of the VNI is less than or equal to 24 bits.
  • the VXLAN information may also include one or more of the following: at least one Flag; a Reserve field.
  • the method may further include: the second communication device publishes a route advertisement message to the source VTEP, where the route advertisement message includes a route prefix, a download link, and a routing prefix.
  • the route advertisement message includes a route prefix, a download link, and a routing prefix.
  • One hop, the VNI and first information wherein the next hop is the network segment address of the destination VTEP, and the first information indicates that the destination VTEP supports VXLAN encapsulation optimization.
  • the first information may be carried through attributes or extended community attributes in the route advertisement message.
  • the first information may also indicate one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI.
  • the method may further include: the second communication device saving the association relationship between the network segment address of the destination VTEP, the VNI and second information, where the second information indicates the link including the VNI.
  • VXLAN information is encapsulated in the IPv6 header of the first message.
  • the second information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI.
  • the mode of the VXLAN information is an all-bit mode, the length of the VXLAN information is 64 bits, and the VNI length is 24 bits; or the mode of the VXLAN information is an omitted reservation mode, and the length of the VXLAN information is The length of the VXLAN information is greater than or equal to 24 bits, and the length of the VXLAN information is less than 64 bits, and the length of the VNI is 24 bits; or the mode of the VXLAN information is a streamlined compression mode, and the length of the VXLAN information is greater than or equal to M bits, and the length of the VXLAN information is less than 64 bits, the length of the VNI is M bits, and M is an integer greater than or equal to 1.
  • the second communication device processes the first message according to the VXLAN information, which may include: the second communication device matches the network segment of the destination VTEP according to the destination address of the first message. Address, obtain the VNI and the second information according to the association relationship; the second communication device obtains the VXLAN information from the IPv6 header of the first message based on the indication of the second information; second The communication device strips off the IPv6 header of the second message to obtain the second message; the second communication device forwards the second message according to the VXLAN information.
  • the VXLAN information may include: the second communication device matches the network segment of the destination VTEP according to the destination address of the first message. Address, obtain the VNI and the second information according to the association relationship; the second communication device obtains the VXLAN information from the IPv6 header of the first message based on the indication of the second information; second The communication device strips off the IPv6 header of the second message to obtain the second message; the second communication device forwards the second message according to the VXLAN information.
  • the present application also provides a route advertisement method, applied to a first communication device that serves as a source VTEP.
  • the method may include: the first communication device receives a message sent by a second communication device.
  • the route advertisement message includes the route prefix, the next hop, the virtual extended LAN VXLAN network identifier VNI and the first information, wherein the second communication device is used as the destination VTEP, and the next hop is the The network segment address of the destination VTEP, the first information indicates that the destination VTEP supports VXLAN encapsulation optimization; the first communication device saves the association between the network segment address of the destination VTEP, the VNI and the second information, the The second information instructs the source VTEP to encapsulate VXLAN information including the VNI in an IPv6 header.
  • the first communication device receives the supported VXLAN encapsulation optimization method advertised by the second communication device. It no longer needs to encapsulate UDP headers and VXLAN headers for packets that are about to enter the VXLAN tunnel, and can also forward the VXLAN tunnel required for VXLAN. The information is carried in the packet and sent to the destination VTEP through the VXLAN tunnel to achieve the effect of transmitting the packet in the VXLAN tunnel, which can effectively improve the encapsulation efficiency of the packet and make efficient packet processing possible.
  • the storing of the association between the network segment address of the destination VTEP, the VNI and the second information may include: storing the network segment address of the destination VTEP, the VNI and the second information.
  • the association of information is saved to the forwarding surface.
  • the first information may be attributes or extended community attributes in the route advertisement message.
  • the first information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI.
  • the second information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI.
  • the mode of the VXLAN information is an all-bit mode, the length of the VXLAN information is 64 bits, and the VNI length is 24 bits; or the mode of the VXLAN information is an omitted reservation mode, and the length of the VXLAN information is The length of the VXLAN information is greater than or equal to 24 bits, and the length of the VXLAN information is less than 64 bits, and the length of the VNI is 24 bits; or the mode of the VXLAN information is a streamlined compression mode, and the length of the VXLAN information is greater than or equal to M bits, and the length of the VXLAN information is less than 64 bits, the length of the VNI is M bits, and M is an integer greater than or equal to 1.
  • the VXLAN information also includes one or more of the following: at least one Flag; a Reserve field.
  • the method may further include: the first communication device receives the first message; the first communication device matches the network segment address of the destination VTEP according to the destination address of the first message, and the first communication device matches the network segment address of the destination VTEP according to the association.
  • the first communication device encapsulates the first message according to the instruction of the second information, and obtains a second message, where the second message includes the first IPv6 header, the first IPv6 header includes VXLAN information, and the VXLAN information includes the VNI; the first communication device sends the second message to the second communication device through a VXLAN tunnel.
  • the first communication device can encapsulate the received message in a VXLAN encapsulation optimization manner, thereby improving the encapsulation efficiency of the message.
  • the present application also provides a method for route advertisement, applied to a second communication device that serves as a destination VTEP.
  • the method may include: the second communication device generates a route advertisement message, said The route advertisement message includes a route prefix, a next hop, a VXLAN network identifier VNI, and first information, where the next hop is the network segment address of the destination VTEP, and the first information indicates that the destination VTEP supports VXLAN encapsulation.
  • the second communication device sends the route advertisement message to the first communication device, the first communication device serving as the source VTEP.
  • the second communication device notifies the first communication device of a method that supports VXLAN encapsulation optimization, and can carry out VXLAN information required for VXLAN tunnel forwarding in the IPv6 header of the packet. Processing, to achieve the effect of effective transmission of the message in the VXLAN tunnel, can effectively improve the encapsulation efficiency of the message, making efficient message processing possible.
  • the first information is an attribute or an extended community attribute in the route advertisement message.
  • the first information also indicates one or more of the following: a mode in which the IPv6 header carries the VXLAN information; The length of the VXLAN information; the length of the VNI.
  • the VXLAN information may also include one or more of the following: at least one Flag; a Reserve field.
  • the method may further include: saving the association between the network segment address of the destination VTEP, the VNI and second information, the second information indicating that the VXLAN information including the VNI is encapsulated in the sixth version of the Internet Protocol in the IPv6 header.
  • the second information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI.
  • the mode of the VXLAN information is the all-bit mode, the length of the VXLAN information is 64 bits, and the VNI length is 24 bits; or the mode of the VXLAN information is the omitted reservation mode, and the length of the VXLAN information is The length of the VXLAN information is greater than or equal to 24 bits, and the length of the VXLAN information is less than 64 bits, and the length of the VNI is 24 bits; or the mode of the VXLAN information is a streamlined compression mode, and the length of the VXLAN information is greater than or equal to M bits, and the length of the VXLAN information is less than 64 bits, the length of the VNI is M bits, and M is an integer greater than or equal to 1.
  • the method may further include: the second communication device receives the first message sent by the first communication device through the VXLAN tunnel, the first message includes an IPv6 header, and the IPv6 header includes the VXLAN information; match the network segment address of the destination VTEP according to the destination address of the first message, and obtain the VNI and the second information according to the association relationship; based on the indication of the second information, obtain the Obtain the VXLAN information from the IPv6 header of the first message; peel off the IPv6 header of the second message to obtain the second message; forward the second message according to the VXLAN information.
  • the second communication device can decapsulate the received message in a VXLAN encapsulation-optimized manner, thereby improving message processing efficiency.
  • inventions of the present application provide a communication device, which can be applied to a first communication device.
  • the communication device includes a transceiver unit and a processing unit.
  • the transceiver unit is configured to perform operations related to reception and/or transmission performed by the first communication device in the above first aspect and various possible implementations of the first aspect; the processing unit For performing operations other than reception and/or transmission-related operations performed by the first communication device in the above-mentioned first aspect and various possible implementations of the first aspect.
  • the transceiver unit may include a receiving unit and/or a sending unit, the receiving unit is used to perform reception-related operations, and the sending unit is used to perform sending-related operations.
  • the processing unit is configured to obtain a first message, the first message includes a sixth version of the Internet Protocol IPv6 header, the IPv6 header includes virtual extended LAN VXLAN information, and the VXLAN information includes a VXLAN network identifier VNI; send A unit configured to send the first message to a second communication device through a VXLAN tunnel, and the second communication device serves as the destination VTEP.
  • the IPv6 header includes a destination IPv6 address
  • the destination IPv6 address includes the network segment address of the destination VTEP and the VXLAN information.
  • the VXLAN information is carried in the last 64 bits of the destination IPv6 address. For example, all the last 64 bits of the destination IPv6 address are used to carry the VXLAN information.
  • the IPv6 header includes a source IPv6 address
  • the source IPv6 address includes the source VTEP
  • the VXLAN information is carried in the last 64 bits of the source IPv6 address. For example, all the last 64 bits of the source IPv6 address are used to carry the VXLAN information.
  • the length of the VNI is less than or equal to 24 bits.
  • the VXLAN information also includes one or more of the following: at least one Flag; a Reserve field.
  • the receiving unit is configured to receive a route advertisement message published by the destination VTEP.
  • the route advertisement message includes a route prefix, a next hop, the VNI and first information, wherein the next hop is the network segment address of the destination VTEP, and the first information indicates that the destination VTEP supports VXLAN encapsulation optimization;
  • the processing unit is also used to save the association between the network segment address of the destination VTEP, the VNI, and the second information relationship, the second information instructs the source VTEP to encapsulate the VXLAN information including the VNI in the IPv6 header to obtain the first packet.
  • the processing unit is specifically configured to: save the association relationship between the network segment address of the destination VTEP, the VNI and the second information to the forwarding plane.
  • the first information is an attribute or an extended community attribute in the route advertisement message.
  • the first information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI.
  • the mode of the VXLAN information is the all-bit mode, the length of the VXLAN information is 64 bits, and the VNI length is 24 bits; or the mode of the VXLAN information is the omitted reservation mode, and the length of the VXLAN information is The length of the VXLAN information is greater than or equal to 24 bits, and the length of the VXLAN information is less than 64 bits, and the length of the VNI is 24 bits; or the mode of the VXLAN information is a streamlined compression mode, and the length of the VXLAN information is greater than or equal to M bits, and the length of the VXLAN information is less than 64 bits, the length of the VNI is M bits, and M is an integer greater than or equal to 1.
  • the processing unit includes: a receiving subunit, configured to receive the second message; and a processing subunit, configured to match the network segment address of the destination VTEP according to the destination address of the second message.
  • the association relationship obtains the VNI and the second information; the processing subunit is also configured to encapsulate the second message according to the instructions of the second information to obtain the first message .
  • the second information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI.
  • the mode of the VXLAN information is the all-bit mode, the length of the VXLAN information is 64 bits, and the VNI length is 24 bits; or the mode of the VXLAN information is the omitted reservation mode, and the length of the VXLAN information is The length of the VXLAN information is greater than or equal to 24 bits, and the length of the VXLAN information is less than 64 bits, and the length of the VNI is 24 bits; or the mode of the VXLAN information is a streamlined compression mode, and the length of the VXLAN information is greater than or equal to M bits, and the length of the VXLAN information is less than 64 bits, the length of the VNI is M bits, and M is an integer greater than or equal to 1.
  • the transceiver unit is configured to perform reception and/or transmission related operations performed by the first communication device in the above third aspect and various possible implementations of the third aspect; the processing The unit is configured to perform operations other than the reception and/or transmission related operations performed by the first communication device in the above third aspect and various possible implementations of the third aspect.
  • the transceiver unit may include a receiving unit and/or a sending unit, the receiving unit is used to perform reception-related operations, and the sending unit is used to perform sending-related operations.
  • the receiving unit is configured to receive a route advertisement message sent by the second communication device, where the route advertisement message package including route prefix, next hop, virtual extended local area network VXLAN network identification VNI and first information, wherein the second communication device is used as the destination VTEP, the next hop is the network segment address of the destination VTEP, and the The first information indicates that the destination VTEP supports VXLAN encapsulation optimization; the processing unit is configured to save the association between the network segment address of the destination VTEP, the VNI and the second information. The second information indicates that the source VTEP will The VXLAN information including the VNI is encapsulated in the Internet Protocol version 6 IPv6 header.
  • the processing unit is specifically configured to save the association relationship between the network segment address of the destination VTEP, the VNI and the second information to the forwarding plane.
  • the first information is an attribute or an extended community attribute in the route advertisement message.
  • the first information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI.
  • the second information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI.
  • the mode of the VXLAN information is the all-bit mode, the length of the VXLAN information is 64 bits, and the VNI length is 24 bits; or the mode of the VXLAN information is the omitted reservation mode, and the length of the VXLAN information is The length of the VXLAN information is greater than or equal to 24 bits, and the length of the VXLAN information is less than 64 bits, and the length of the VNI is 24 bits; or the mode of the VXLAN information is a streamlined compression mode, and the length of the VXLAN information is greater than or equal to M bits, and the length of the VXLAN information is less than 64 bits, the length of the VNI is M bits, and M is an integer greater than or equal to 1.
  • the VXLAN information also includes one or more of the following: at least one Flag; a Reserve field.
  • the receiving unit is further configured to receive the first message; the processing unit is further configured to match the network segment address of the destination VTEP according to the destination address of the first message. Obtain the VNI and the second information based on the association relationship; the processing unit is also configured to encapsulate the first message according to the instructions of the second information to obtain a second message.
  • the second message includes a first IPv6 header, the first IPv6 header includes VXLAN information, and the VXLAN information includes the VNI; a sending unit configured to send the second message to the second communication device through a VXLAN tunnel. .
  • inventions of the present application provide a communication device, which can be applied to a second communication device.
  • the communication device includes a transceiver unit and a processing unit.
  • the transceiver unit is configured to perform reception and/or transmission-related operations performed by the second communication device in the above second aspect and various possible implementations of the second aspect; the processing unit For performing operations other than the reception and/or transmission-related operations performed by the second communication device in the above-mentioned second aspect and various possible implementations of the second aspect.
  • the transceiver unit may include a receiving unit and/or a sending unit, the receiving unit is used to perform reception-related operations, and the sending unit is used to perform sending-related operations.
  • the receiving unit is configured to receive the first message sent by the first communication device through the virtual extended local area network VXLAN tunnel, the first message includes the sixth version of the Internet Protocol IPv6 header, the IPv6 header includes VXLAN information, and the The VXLAN information includes a VXLAN network identifier VNI, and the first communication device is used as a source VTEP; a processing unit is used to process the first message according to the VXLAN information.
  • the IPv6 header includes a destination IPv6 address
  • the destination IPv6 address includes the destination VTEP.
  • the VXLAN information is carried in the last 64 bits of the destination IPv6 address. For example, all the last 64 bits of the destination IPv6 address are used to carry the VXLAN information.
  • the IPv6 header includes a source IPv6 address
  • the source IPv6 address includes the network segment address of the source VTEP and the VXLAN information.
  • the VXLAN information is carried in the last 64 bits of the source IPv6 address. For example, all the last 64 bits of the source IPv6 address are used to carry the VXLAN information.
  • the length of the VNI is less than or equal to 24 bits.
  • the VXLAN information also includes one or more of the following: at least one Flag; a Reserve field.
  • the sending unit is configured to publish a route advertisement message to the source VTEP.
  • the route advertisement message includes a route prefix, a next hop, the VNI and first information, wherein the next hop is the network segment address of the destination VTEP, and the first information indicates that the destination VTEP supports VXLAN encapsulation optimization.
  • the first information is an attribute or an extended community attribute in the route advertisement message.
  • the first information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI.
  • the mode of the VXLAN information is the all-bit mode, the length of the VXLAN information is 64 bits, and the VNI length is 24 bits; or the mode of the VXLAN information is the omitted reservation mode, and the length of the VXLAN information is The length of the VXLAN information is greater than or equal to 24 bits, and the length of the VXLAN information is less than 64 bits, and the length of the VNI is 24 bits; or the mode of the VXLAN information is a streamlined compression mode, and the length of the VXLAN information is greater than or equal to M bits, and the length of the VXLAN information is less than 64 bits, the length of the VNI is M bits, and M is an integer greater than or equal to 1.
  • the processing unit is also configured to save the association between the network segment address of the destination VTEP, the VNI, and second information.
  • the second information indicates that the VXLAN information including the VNI is encapsulated in in the IPv6 header of the first packet.
  • the second information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI.
  • the mode of the VXLAN information is the all-bit mode, the length of the VXLAN information is 64 bits, and the VNI length is 24 bits; or the mode of the VXLAN information is the omitted reservation mode, and the length of the VXLAN information is The length of the VXLAN information is greater than or equal to 24 bits, and the length of the VXLAN information is less than 64 bits, and the length of the VNI is 24 bits; or the mode of the VXLAN information is a streamlined compression mode, and the length of the VXLAN information is greater than or equal to M bits, and the length of the VXLAN information is less than 64 bits, the length of the VNI is M bits, and M is an integer greater than or equal to 1.
  • the processing unit includes: a matching subunit, configured to match the network segment address of the destination VTEP according to the destination address of the first message, and obtain the VNI and the destination address according to the association relationship.
  • the second information the first obtaining subunit is used to obtain the VXLAN information from the IPv6 header of the first message based on the indication of the second information; the second obtaining subunit is used to strip the The IPv6 header of the second message is used to obtain the second message; the forwarding subunit is used to forward the second message according to the VXLAN information.
  • the transceiver unit is configured to perform reception and/or transmission-related operations performed by the second communication device in the above-mentioned fourth aspect and various possible implementations of the fourth aspect; the processing unit for execution Operations other than the receiving and/or sending related operations performed by the second communication device in the fourth aspect and various possible implementations of the fourth aspect.
  • the transceiver unit may include a receiving unit and/or a sending unit, the receiving unit is used to perform reception-related operations, and the sending unit is used to perform sending-related operations.
  • the processing unit is configured to generate a route advertisement message.
  • the route advertisement message includes a route prefix, a next hop, a virtual extended LAN VXLAN network identifier VNI and first information, where the next hop is the destination VTEP.
  • the network segment address, the first information indicates that the destination VTEP supports VXLAN encapsulation optimization;
  • the sending unit is configured to send the route advertisement message to the first communication device, and the first communication device serves as the source VTEP.
  • the first information is an attribute or an extended community attribute in the route advertisement message.
  • the first information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI.
  • the mode of the VXLAN information is the all-bit mode, the length of the VXLAN information is 64 bits, and the VNI length is 24 bits; or the mode of the VXLAN information is the omitted reservation mode, and the length of the VXLAN information is The length of the VXLAN information is greater than or equal to 24 bits, and the length of the VXLAN information is less than 64 bits, and the length of the VNI is 24 bits; or the mode of the VXLAN information is a streamlined compression mode, and the length of the VXLAN information is greater than or equal to M bits, and the length of the VXLAN information is less than 64 bits, the length of the VNI is M bits, and M is an integer greater than or equal to 1.
  • the VXLAN information also includes one or more of the following: at least one Flag; a Reserve field.
  • the processing unit is also configured to save the association between the network segment address of the destination VTEP, the VNI, and second information.
  • the second information indicates that the VXLAN information including the VNI is encapsulated in In the IPv6 header of Internet Protocol version 6.
  • the second information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI.
  • the mode of the VXLAN information is the all-bit mode, the length of the VXLAN information is 64 bits, and the VNI length is 24 bits; or the mode of the VXLAN information is the omitted reservation mode, and the length of the VXLAN information is The length of the VXLAN information is greater than or equal to 24 bits, and the length of the VXLAN information is less than 64 bits, and the length of the VNI is 24 bits; or the mode of the VXLAN information is a streamlined compression mode, and the length of the VXLAN information is greater than or equal to M bits, and the length of the VXLAN information is less than 64 bits, the length of the VNI is M bits, and M is an integer greater than or equal to 1.
  • the receiving unit is configured to receive the first message sent by the first communication device through the VXLAN tunnel, the first message includes an IPv6 header, and the IPv6 header includes the VXLAN information;
  • the processing unit is also configured to match the network segment address of the destination VTEP according to the destination address of the first message, and obtain the VNI and the second information according to the association relationship;
  • the processing unit is also configured to Based on the indication of the second information, obtain the VXLAN information from the IPv6 header of the first message;
  • the processing unit is also configured to strip the IPv6 header of the second message to obtain the second message;
  • the sending unit is further configured to forward the second message according to the VXLAN information.
  • the present application provides a communication device.
  • the communication device includes a memory and a processor; the memory is used to store program code; the processor is used to run instructions in the program code, so that The communication device performs the above first aspect and the method described in any one of the first aspects, or causes the communication device to perform the above second aspect and the method described in any one of the second aspects, or causes the The communication device performs the above third The method described in any one of the above aspects and the third aspect, or causing the communication device to perform the method described in any one of the above fourth aspect and the fourth aspect.
  • the present application provides a communication device.
  • the communication device includes a communication interface and a processor. Through the communication interface and the processor, the communication device is caused to execute the method described in any of the preceding aspects and Part or all of the operations of any implementation of the method described in any aspect.
  • the communication interface is used to perform the sending and receiving operations performed by the communication device described in any one of the above first aspect and the first aspect
  • the processor is used to perform the above first aspect and the first aspect.
  • the communication interface is used to perform the transceiver operation performed by the communication device according to any one of the above second aspect and the second aspect, so The processor is used to perform other operations other than the sending and receiving operations performed by the communication device described in any one of the above second aspect and the second aspect; or, the communication interface is used to perform the above third aspect and any one of the third aspects.
  • a transceiver operation performed by the communication device described in one of the above the processor is configured to perform other operations other than the transceiver operation performed by the communication device described in any one of the above third aspect and the third aspect; or, the communication The interface is used to perform the transceiver operation performed by the communication device described in any one of the fourth aspect and the fourth aspect, and the processor is used to perform the except operation performed by the communication device described in any one of the fourth aspect and the fourth aspect. Operations other than sending and receiving operations.
  • embodiments of the present application provide a computer-readable storage medium, including instructions or computer programs that, when run on a processor, execute the above first aspect and the method described in any one of the first aspects, Or perform the above second aspect and the method described in any one of the second aspect, or perform the above third aspect and the method described in any one of the third aspect, or perform the above fourth aspect and any one of the fourth aspect. method described.
  • embodiments of the present application provide a computer program product, including a computer program product that, when run on a processor, executes the above first aspect and the method described in any one of the first aspects, or executes the above The second aspect and the method described in any one of the second aspect, or perform the above third aspect and the method described in any one of the third aspect, or perform the above fourth aspect and the method described in any one of the fourth aspect .
  • embodiments of the present application provide a communication system, which includes at least two of the following: a first communication device that performs the above first aspect and the method described in any one of the above first aspects; The second communication device of the above second aspect and the method described in any one of the above second aspects.
  • embodiments of the present application provide a communication system, which includes at least two of the following: a first communication device that performs the above third aspect and the method described in any one of the above third aspects; The fourth aspect above and the second communication device of the method described in any one of the above fourth aspects.
  • Figure 1 is a schematic structural diagram of a network scenario applicable to the embodiment of the present application.
  • Figure 2a is a schematic diagram of using the current VXLAN6 encapsulation method to process L2 services in the scenario shown in Figure 1;
  • Figure 2b is a schematic diagram of using VXLAN6 encapsulation optimization method to process L2 services in the scenario shown in Figure 1;
  • Figure 3a is a schematic diagram of using the current VXLAN6 encapsulation method to process L3 services in the scenario shown in Figure 1;
  • Figure 3b is a schematic diagram of using VXLAN6 encapsulation optimization method to process L3 services in the scenario shown in Figure 1;
  • Figure 4a is a schematic diagram of the format of attributes carrying indication information 3 in the embodiment of the present application.
  • Figure 4b is a schematic format diagram of an example of attributes carrying indication information 3 in the embodiment of the present application.
  • Figure 5 is a schematic flowchart of the method 100 provided by the embodiment of the present application.
  • FIG. 6 is a schematic diagram of VXLAN information in an embodiment of the present application.
  • Figure 7 is a schematic structural diagram of a first communication device provided by an embodiment of the present application.
  • Figure 8 is a schematic structural diagram of a first communication device provided by an embodiment of the present application.
  • Figure 9 is a schematic structural diagram of a second communication device provided by an embodiment of the present application.
  • Figure 10 is a schematic structural diagram of a second communication device provided by an embodiment of the present application.
  • Figure 11 is a schematic structural diagram of a communication device provided by an embodiment of the present application.
  • Figure 12 is a schematic structural diagram of a communication device provided by an embodiment of the present application.
  • VXLAN technology is used in many networks (such as DCN).
  • the network underlay is IPv6 single stack (IPv6Only, also known as pure IPv6), and network devices are all IPv6 addresses;
  • the leaf nodes deploy IPv6 network virtual edge NVE (Network Virtualization Edge), IPv6NVE configures VTEP as an IPv6 address;
  • the IPv6 address of VTEP publishes Virtual Private Network (VPN) routes through the underlay protocol;
  • the aggregation node (Spine) serves as a route reflector (Route Reflector, RR),
  • the VPN routes published by Leaf are reflected to other Leaf, so that all Leaf learn the VPN routes published by other Leaf through RR, and create VXLAN6 tunnels based on the next hop and the encapsulation attributes specified by the route. In this way, the packets to be transmitted can be transmitted through the created VXLAN tunnel.
  • the process of using the VXLAN tunnel to forward the packets to be transmitted may include: the source VTEP of the VXLAN tunnel (which can also be called the head node of the VXLAN tunnel) encapsulates the VXLAN headers in sequence for the packets to be transmitted. , UDP header, IP header and outer Ethernet header to obtain the processed message, and forward the processed message in the VXLAN tunnel. It can be seen that packets are transmitted through VXLAN tunnels. According to the current processing method, the number of encapsulation layers required is large and complex, and the packet encapsulation efficiency is low.
  • VXLAN also gradually evolves from VXLAN4 to VXLAN6. If the encapsulation method for transmitting packets in VXLAN4 technology is directly applied to VXLAN6, because there are more headers encapsulated for VXLAN tunnels, the IPv6 header is more complex than the IPv4 header, and the IPv6 address is longer than the IPv4 address, etc. For this reason, the packet encapsulation efficiency will be further reduced.
  • VXLAN6 encapsulation optimization (which can also be called IPv6+ or VXLAN6+).
  • the VXLAN information is encapsulated in the IPv6 header of the packet that is about to enter the VXLAN tunnel through the source VTEP of the VXLAN tunnel. , forwarded to the destination VTEP of the VXLAN tunnel through the VXLAN tunnel, and the VXLAN information at least includes a VXLAN Network Identifier (VNI).
  • VNI VXLAN Network Identifier
  • this optimized VXLAN encapsulation method no longer needs to encapsulate UDP headers and VXLAN headers for packets that are about to enter the VXLAN tunnel, and can also carry the VXLAN information required for VXLAN tunnel forwarding in the packets. Send the message to the destination VTEP through the VXLAN tunnel to achieve the effect of transmitting the message in the VXLAN tunnel. It can be seen that the VXLAN encapsulation optimization method provided by the embodiment of this application can effectively improve the encapsulation efficiency of the message and enable efficient message processing. become possible.
  • this method makes the length of the packet transmitted in the VXLAN tunnel smaller, the source VTEP of the VXLAN tunnel encapsulates the packet faster, the source VTEP of the VXLAN tunnel and the intermediate node The processing speed of packets is faster, and the source of the VXLAN tunnel remains unchanged when the bandwidth is unchanged. VTEP and intermediate nodes can handle more packets.
  • the VTEP address of each communication device in the network is adjusted from 128 bits to a network segment address less than 128 bits, for example, adjusted to a 64-bit VTEP network segment address, so that when encapsulating the IPv6 header of the message, the The adjusted network segment address of the VTEP and the concatenated content of the VXLAN information are filled in the IPv6 header.
  • the adjusted content of the VTEP network segment address and the concatenated VXLAN information are filled in the IPv6 header to carry the address. field (destination IPv6 address field or source IPv6 address field).
  • VXLAN information can be carried to the destination VTEP that needs to use the VXLAN information in this efficient manner without encapsulating the UDP header and VXLAN header in the message, thereby improving and optimizing the VXLAN6 encapsulation efficiency.
  • the network scenarios to which the embodiments of this application are applicable may include the network scenario shown in Figure 1 .
  • the network scene includes: communication device 1, communication device 2, communication device 3, terminal device 4, terminal device 5 and communication device 6.
  • Terminal device 4 passes through communication device 1, communication device 3 and communication device 2 in sequence.
  • the terminal device 5 is connected, and the communication device 3 is also connected to the communication device 6 .
  • N (N is an integer greater than or equal to 0) intermediate communication devices may be included between communication device 1 and communication device 2.
  • communication device 1 and communication device 2 include A communication device 3 is taken as an example.
  • communication device 1 and communication device 2 may be Leaf, and communication device 3 may be Spine as an RR.
  • communication device 1 establishes a VXLAN6 tunnel to communication device 2.
  • Communication device 1 and communication device 2 serve as the source VTEP and destination VTEP of the VXLAN6 tunnel respectively, and the corresponding VTEP addresses are 10:1::1 and 10:2:: respectively.
  • BD Broadcast Domain
  • VNI Media Access Control
  • the Media Access Control (MAC) address of the interface on the communication device 1 for connecting to the communication device 3 is BB-1-1.
  • the MAC address of the interface of device 2 is AA-1-1
  • the MAC address of the interface on communication device 2 for connecting to communication device 3 is CC-1-1.
  • the MAC address of communication device 1 is A-A-A
  • the MAC address of communication device 2 is C-C-C
  • the MAC address of communication device 3 is B-B-B.
  • the IP address of terminal device 4 is 10.1.1.1 and the MAC address is 1-1-1
  • the IP address and MAC address of terminal device 5 is 10.1.1.2 and 2-2-2.
  • the process of transmitting messages in a VXLAN tunnel according to the current VXLAN6 encapsulation method may include: S11, the communication device 1 receives the message sent by the terminal device 4.
  • Message 1 can include destination MAC address (DMAC): 2-2-2, source MAC address (SMAC): 1-1-1, source IPv6 address (SIPv6): 10.1.1.1, destination IPv6 address (DIPv6 ): 10.1.1.2 and payload.
  • S12 Communication device 1 looks up the MAC table according to the destination MAC address of message 1, obtains the VXLAN6 information, and encapsulates message 1 to obtain message 2.
  • message 2 can include: payload, inner Ether header (Inner Eth), VXLAN header, UDP header, IPv6 header and outer Ether header (Outer Eth).
  • the inner Ether header includes DMAC: 2-2-2 and SMAC: 1-1-1
  • the VXLAN header may include but is not limited to at least one flag (Flag) and VNI: 1001;
  • the UDP header includes the source port (SPort) and the destination port (DPort), where the destination port is 4789, indicating This message is a VXLAN message;
  • the IPv6 header includes but is not limited to the Version field, the Flow Label field, the next header (NxtHdr) field, the source IPv6 address (SIPv6) field and the destination IPv6 address (DIPv6).
  • the header is a UDP header
  • the value of the source IPv6 address field is 10:1::1
  • the value of the destination IPv6 address field is 10:2::1
  • the outer Ethernet header includes the destination MAC address (DMAC): AA-1- 1 and source MAC address (SMAC): BB-1-1.
  • DMAC destination MAC address
  • SMAC source MAC address
  • Communication device 3 processes message 2 into message 3 according to the IPv6 header in message 2 and forwards it to communication device 2, where message 3 and message 2 The difference only includes: modifying the value of the DMAC field in the outer Ethernet header to the MAC address of communication device 2: CC-1-1, and modifying the value of the SMAC field to the MAC address of communication device 3: AA-1-1.
  • communication device 2 determines that message 3 is a VXLAN message based on the destination port 4789 in the UDP header, and then obtains VNI: 1001 from the VXLAN header of message 3, and searches based on VNI: 1001. For the corresponding BD, check the MAC in the BD to forward message 4.
  • Message 4 is the message obtained after peeling off the outer Ethernet header, IPv6 header, UDP header and VXLAN header of message 3. This message 4 can be combined with the message 4.
  • Text 1 includes the same content.
  • the terminal device 5 receives the message 4.
  • the process of transmitting messages in a VXLAN tunnel according to the VXLAN6 encapsulation optimization method provided by the embodiment of the present application may include, for example, the following S21 to S25.
  • the route is saved on the communication device 1 1.
  • Route 1 includes the association 1 of the network segment address 10:2::, VNI:1001 of the communication device 2 and the instruction information 1.
  • the instruction information 1 is used to instruct the packet to be encapsulated according to the VXLAN encapsulation optimization method.
  • Route 2 and Route 3 are saved on the communication device 2.
  • Route 2 is the host route.
  • Route 2 includes the association 2 between 10:2::1 and VNI:1001.
  • Route 3 is the network segment route.
  • Route 3 includes the network of the communication device 2. Association relationship 2 between segment address 10:2::, VNI:1001 and instruction information 2. Instruction information 2 is used to instruct packet decapsulation according to the VXLAN encapsulation optimization method.
  • S21 to S25 include, for example: S21, the communication device 1 receives the message 1 sent by the terminal device 4. S22, communication device 1 checks the MAC table according to the destination MAC address of message 1 to obtain VXLAN6 information; matches route 1 according to the destination IPv6 address of message 1: 10.1.1.2, and matches message 1 based on the indication information 1 in route 1 Encapsulate the VXLAN6 encapsulation optimization method and obtain message 2'.
  • message 2' can include: payload, inner Ethernet header, IPv6 header and outer Ethernet header.
  • the IPv6 header includes but is not limited to: Version field, Flow Label field, NxtHdr field, source IPv6 address (SIPv6) field and destination IPv6 address (DIPv6) field, where the value of the Version field is used to indicate that the applicable protocol version is IPv6 , the value of the NxtHdr field is used to indicate that the next header of the IPv6 header is an Ethernet header, the value of the source IPv6 address field is 10:1::1, the value of the destination IPv6 address field is 64-bit 10:2:: and VXLAN
  • the VXLAN information may include but is not limited to at least one Flag and VNI;
  • the outer Ethernet header includes the destination MAC address (DMAC): AA-1-1 and the source MAC address (SMAC): BB-1-1.
  • communication device 1 sends message 2' to communication device 3.
  • Communication device 3 processes message 2' into message 3' according to the IPv6 header in message 2' and forwards it to communication device 2, where message 3
  • the difference between 'and message 2' only includes: modifying the value of the DMAC field in the outer Ethernet header to the MAC address of communication device 2: CC-1-1, and modifying the value of the SMAC field to the MAC address of communication device 3: AA-1-1.
  • the communication device 2 matches the route 3 according to the destination IPv6 address field in the IPv6 header, thereby determining that the message 3' is a message encapsulated in the VXLAN6 encapsulation optimization method based on the indication information 2 in the route 3.
  • the terminal device 5 Based on the instruction information 2, obtain the VXLAN information from the destination IPv6 address field of the IPv6 header, then find the corresponding BD according to the VNI: 1001 in the VXLAN information, check the MAC in the BD to forward the message 4', and the message 4' is the message 3' is the message obtained after stripping off the outer Ethernet header and IPv6 header.
  • This message 4' can contain the same content as message 1.
  • S25 the terminal device 5 receives the message 4.
  • the VXLAN6 encapsulation optimization method provided by the embodiment of the present application This method can improve the encapsulation efficiency of packets, thereby improving the efficiency of packet processing.
  • the above takes the processing process of L2 service packets in the VXLAN tunnel as an example to introduce the current VXLAN6 encapsulation method and the VXLAN6 encapsulation optimization method provided by the embodiment of this application.
  • the VXLAN6 encapsulation optimization method provided by the embodiment of this application is also applicable to layer 3 (layer 3, L3) services.
  • the process of transmitting messages in a VXLAN tunnel according to the current VXLAN6 encapsulation method may include, for example: S31.
  • the communication device 1 receives the message 5 sent by the terminal device 4.
  • the message 5 may include the source IPv6 address (SIPv6): 10.1.1.1, destination IPv6 address (DIPv6): 10.1.1.2 and payload.
  • Communication device 1 searches the Forward Information Base (FIB) table according to the destination IPv6 address of message 5, obtains the VXLAN6 information, and encapsulates message 5 to obtain message 6.
  • message 6 can include: payload, inner Ethernet header, VXLAN header, UDP header, IPv6 header and outer Eth header (Outer Eth).
  • the inner Ethernet header includes destination MAC address: C-C-C, source MAC address: A-A-A,
  • the VXLAN header, UDP header, IPv6 header and outer Ethernet header correspond to the VXLAN header, UDP header, IPv6 header and outer Ethernet header in message 2 in Figure 2a.
  • communication device 1 sends message 6 to communication device 3.
  • Communication device 3 processes message 6 into message 7 according to the IPv6 header in message 6 and forwards it to communication device 2, where message 7 and message 6
  • the difference only includes: modifying the value of the DMAC field in the outer Ethernet header to the MAC address of communication device 2: CC-1-1, and modifying the value of the SMAC field to the MAC address of communication device 3: AA-1-1.
  • communication device 2 determines that message 7 is a VXLAN message based on the destination port 4789 in the UDP header, and then obtains VNI: 1001 from the VXLAN header of message 7, and searches based on VNI: 1001. For the corresponding Virtual Routing Forwarding (VRF) instance, check the MAC in the VRF instance to forward message 8.
  • VRF Virtual Routing Forwarding
  • Message 8 is obtained by stripping off the outer Ethernet header, IPv6 header, UDP header and VXLAN header of message 7. message, message 8 may contain the same content as message 5.
  • the terminal device 5 receives the message 8.
  • the process of transmitting messages in a VXLAN tunnel according to the VXLAN6 encapsulation optimization method provided by the embodiment of the present application may include, for example, the following S41 to S45.
  • the route is saved on the communication device 1 1.
  • Route 1 includes the association 1 of the network segment address 10:2::, VNI:1001 of the communication device 2 and the instruction information 1.
  • the instruction information 1 is used to instruct the packet to be encapsulated according to the VXLAN encapsulation optimization method.
  • Route 2 and Route 3 are saved on the communication device 2.
  • Route 2 is the host route.
  • Route 2 includes the association 2 between 10:2::1 and VNI:1001.
  • Route 3 is the network segment route.
  • Route 3 includes the network of the communication device 2. Association relationship 2 between segment address 10:2::, VNI:1001 and instruction information 2. Instruction information 2 is used to instruct packet decapsulation according to the VXLAN encapsulation optimization method.
  • S41 to S45 include, for example: S41, the communication device 1 receives the message 5 sent by the terminal device 4.
  • S42 communication device 1 checks the FIB table according to the destination IPv6 address of message 5 to obtain VXLAN6 information; matches route 1 according to the destination IPv6 address of message 5: 10.1.1.2, and matches message 5 based on the indication information 1 in route 1 Encapsulate the VXLAN6 encapsulation optimization method and obtain message 6'.
  • the message 6' may include: payload, inner Ether header, IPv6 header and outer Ether header (Outer Eth).
  • the IPv6 header includes but is not limited to: Version field, Flow Label field, NxtHdr field, source IPv6 address (SIPv6) field and destination IPv6 address (DIPv6) field, where the value of the Version field is used to indicate that the applicable protocol version is IPv6 , the value of the NxtHdr field is used to indicate that the next header of the IPv6 header is an Ethernet header, the value of the source IPv6 address field is 10:1::1, the value of the destination IPv6 address field is 64-bit 10:2:: and VXLAN The splicing result of the information.
  • the VXLAN information can include but is not limited to at least one Flag and VNI; the outer Ethernet header includes the destination MAC address. (DMAC): AA-1-1 and source MAC address (SMAC): BB-1-1. S43, communication device 1 sends message 6' to communication device 3. Communication device 3 processes message 6' into message 7' according to the IPv6 header in message 6' and forwards it to communication device 2, where message 7 The difference between 'and message 6' only includes: modifying the value of the DMAC field in the outer Ethernet header to the MAC address of communication device 2: CC-1-1, and modifying the value of the SMAC field to the MAC address of communication device 3: AA-1-1.
  • DMAC destination MAC address
  • SMAC source MAC address
  • the communication device 2 matches the route 3 according to the destination IPv6 address field in the IPv6 header, thereby determining that the message 7' is a message encapsulated in the VXLAN6 encapsulation optimization method based on the indication information 2 in the route 3.
  • the instruction information 2 obtain the VXLAN information from the destination IPv6 address field of the IPv6 header, then find the corresponding VRF instance according to the VNI: 1001 in the VXLAN information, check the MAC in the VRF instance to forward the message 8', and the message 8' is
  • Message 7' is the message obtained after stripping off the outer Ethernet header, IPv6 header, UDP header and VXLAN header. This message 8' may contain the same content as message 5.
  • the terminal device 5 receives the message 8'.
  • the VXLAN6 encapsulation optimization method provided by the embodiment of the present application can improve the encapsulation efficiency of packets, thereby improving the processing efficiency of packets.
  • the splicing of VXLAN information in the destination IPv6 address field of the IPv6 header is used as an example for description. This does not constitute a position limit for carrying VXLAN information in the IPv6 header.
  • the VXLAN information can also be spliced into the source IPv6 address field of the IPv6 header.
  • the indication information 1 and the indication information 2 can also indicate the position of the VXLAN information in the IPv6 header, so that the communication device 2 can accurately obtain the information from the received packet. The VXLAN information is restored in this article.
  • the specific route advertisement process may include: S51, for the VXLAN tunnel from communication device 1 to communication device 2, set the destination VTEP on communication device 2 The address is 10:2::1/64, and the source VTEP address is set to 10:1::1/64 on communication device 1; S52, a host route 2 and a 10:2::/64 are generated on communication device 2. Network segment route 3 of 10:2::1/128.
  • host route 2 can also include prefix length (PrefixLength): 128, network segment
  • PrefixLength PrefixLength
  • route 3 may also include indication information 2.
  • Instruction information 2 is used to indicate that packets hitting route 2 need to be encapsulated according to the VXLAN6 provided by the embodiment of this application. Optimized way to parse messages. S53, the communication device 2 generates a route advertisement message 1, which is used to publish the route 1.
  • the route advertisement message 1 carries the VNI 1001 for the terminal device 4 to access the BD, and the next hop uses the destination VTEP address segment.
  • the local address (i.e., 10:2::1) indicates that the encapsulation type is VXLAN and carries indication information 3.
  • Instruction information 3 can use the attributes in the route advertisement message 1 (such as the Border Gateway Protocol (BGP) ) attribute) or extended community attribute bearer, the indication information 3 is used to indicate that route 1 can perform the VXLAN6 encapsulation optimization provided by the embodiment of this application.
  • the communication device 2 can send the route advertisement message 1 to the communication device 3 through the Ethernet virtual private network (EVPN) neighbor, and the communication device 3 sends the route advertisement message to other communication devices (including the communication device 1) .
  • EVPN Ethernet virtual private network
  • the communication device 1 after receiving the route advertisement message 1, the communication device 1 notifies the creation of the VXLAN tunnel according to the content in the route advertisement message 1, and saves the route 1.
  • the route 1 includes Destination: 10:2::, VNI: 1001 and indication information 1.
  • the instruction information 1 is used to instruct the packet to be encapsulated according to the VXLAN encapsulation optimization method, where the instruction information 3 is determined based on the instruction information 3, that is, the route advertisement message 1 received by the communication device 1 includes the instruction information 3, then the communication When device 1 saves route 1 corresponding to route advertisement message 1, it generates indication information 1 related to indication information 3.
  • Figures 2b and 3b can be implemented is that the communication device 1 and the communication device support the VXLAN6 encapsulation optimization function provided by the embodiment of the present application.
  • the instruction information 3 issued by the communication device 2 through the route advertisement message is used to instruct the communication device 2 that it hopes that the source VTEP that receives the route advertisement message 1 adopts a specific method of VXLAN encapsulation optimization.
  • the source VTEP is communication device 1
  • communication device 1 can, based on the content indicated by indication information 3, associate the indication information 1 when generating the routing table and forwarding table of route 1 to guide the forwarding of packets that hit route 1.
  • the packet is processed in the VXLAN6 encapsulation optimization method according to instruction information 1.
  • the packets transmitted through the VXLAN tunnel can only be encapsulated and transmitted based on the current VXLAN encapsulation method.
  • the VXLAN encapsulation optimization method provided by the embodiment of this application cannot be used for encapsulation and transmission.
  • the communication device 6 does not support the function of VXLAN6 encapsulation optimization.
  • the communication device 2 supports the function of VXLAN6 encapsulation optimization, the VXLAN tunnel between the communication device 6 and the communication device 2 cannot be established according to the VXLAN6 encapsulation optimization method provided by the embodiment of the present application.
  • the current VXLAN6 encapsulation method can be used for packet encapsulation and transmission.
  • the communication device 6 to the communication device 2 is a VXLAN tunnel
  • the communication device 6 serves as the source VTEP of the VXLAN tunnel
  • the communication device 6 After receiving the route advertisement message 1 of the communication device 2 transmitted by the communication device 3, the communication device 6 parses the route advertisement message 1 normally and finds that the route advertisement message 1 includes the attribute or extended community attribute carrying the indication information 3, but because it does not recognize the route advertisement message 1 Attributes or extended community attributes are not processed and continue to be processed according to the current route analysis process, notifying the creation of a VXLAN tunnel from communication device 6 to communication device 2, and generating a routing table and a forwarding table. Afterwards, when the communication device 6 receives a message from the access host to access the host connected to the communication device 2, it performs a DMAC or DIPv6 table lookup on the communication device 6, obtains the route published by the communication device 2, and performs VXLAN tunnel encapsulation.
  • the route Since the route does not indicate encapsulation information according to the VXLAN6 encapsulation optimization method on the communication device 6, it is encapsulated according to the current VXLAN6 process, and DIPv6 is the host address of the communication device 2; after the encapsulated message is forwarded to the communication device 2, Communication device 2 determines that the DIPv6 of the received message hits host route 2 (i.e., route 2 of 10:2::1), and thus determines that it is a VXLAN message according to the UDP DPort: 4789 in the received message. The current VXLAN6 process is processed.
  • host route 2 i.e., route 2 of 10:2::1
  • the length of VXLAN information, the mode of VXLAN information, and the length of VNI can be statically configured on the entire network or the VTEP of a certain VXLAN tunnel, or they can be published through route advertisement messages.
  • the indication information 3 may also indicate one or more of the length of the VXLAN information, the mode of the VXLAN information, or the length of the VNI when VXLAN6 encapsulation is optimized.
  • the attributes carrying the indication information 3 in the route advertisement message 1 can be found in As shown in Figure 4a, it includes: type (Type) field and subtype (SubType) field, flag (Flag), locator length (Locator Length, LocLen) field and reserved (Reserved), where the Type field and the subtype SubType are identified together
  • This attribute is indication information 3, indicating VXLAN6 encapsulation optimization; the value of the LocLen field is used to indicate the length of the VTEP network segment address.
  • the value of the LocLen field is fixed to 64 bits.
  • the value of the LocLen field is fixed to 64 bits. The value of can be determined based on the length of the VXLAN information.
  • the length of the VXLAN information is 64 bits
  • the length of the VXLAN information is 18 bits.
  • the Reserved field in Figure 4a can also be extended with other indication fields according to requirements, which is not limited in the embodiment of this application.
  • the destination IPv6 address field of the IPv6 header of the message can be Take 10:2:0:0:0:0:0:1 (that is, 10:2::1).
  • the communication device 2 After the communication device 2 receives the message 7', based on the value of the destination IPv6 address field of the message 7' (such as 10:2:0:0:0:0:0003 :E900) hits the network segment route 3 and finds that the network segment route 3 includes indication information 2. Then, based on the indication information 2, it is determined that the message 7' is a message encapsulated according to the VXLAN6 encapsulation optimization method. At the same time, the encapsulated packet is saved locally. Specific methods (such as the mode of the VXLAN information, the length of the VXLAN information or the length of the VNI), thereby obtaining the VXLAN information from the message 7' and decapsulating the message 7'.
  • the value of the destination IPv6 address field of the message 7' such as 10:2:0:0:0:0:0003 :E900
  • the value of the destination IPv6 address field (such as 10:2:0:0:0:0:0:1) of the message received by communication device 2 hits host route 2, then communication device 2 can parse the received message.
  • the UDP header, VXLAN header, etc. in the packet are obtained, the VXLAN information is obtained, and the packet is decapsulated.
  • the communication device can generate a routing table and a forwarding table based on the route and then forward the message based on the forwarding table.
  • this process is simply described in the embodiment of this application as: the communication device saves the route and then forwards the message based on the route.
  • the text is processed, and in the embodiment of this application, the two have the same meaning.
  • the terminal device may be a host or a server, for example.
  • the communication device can be a network device such as a switch or a router; it can also be a part of the network device, such as a single board or line card on the network device; it can also be a functional module on the network device; it can also be used to implement
  • the chip of the method provided by the embodiment of the present application is not specifically limited by the embodiment of the present application.
  • the transceiver unit used to implement the method may be, for example, an interface circuit of the chip, and the processing unit may be a processing circuit with a processing function in the chip.
  • the communication devices may be directly connected through, but not limited to, Ethernet cables or optical cables.
  • FIG 5 is a schematic flowchart of the method 100 provided by the embodiment of the present application.
  • the embodiment of the present application is described based on the interaction between the first communication device and the second communication device.
  • the first communication device and A VXLAN tunnel is established between the second communication devices.
  • the first communication device is used as the source VTEP, and the second communication device is used as the destination VTEP.
  • the first communication device may correspond to the communication device 1 in Figure 1
  • the second communication device may correspond to the communication device 1 in Figure 1.
  • the communication device 2 in for specific implementation methods and related descriptions, please refer to the relevant content in Figure 2b and Figure 3b.
  • the method 100 may include, for example, the following S101 to S108:
  • the second communication device generates a route advertisement message.
  • the route advertisement message includes a route prefix, a next hop, a VNI and first information, where the next hop is the network segment address of the destination VTEP, and the first information indicates that the destination VTEP supports VXLAN encapsulation optimization.
  • the second communication device sends the route advertisement message to the first communication device.
  • the first communication device receives the route advertisement message sent by the second communication device.
  • the first communication device saves the association between the network segment address of the destination VTEP, the VNI, and second information.
  • the second information instructs the source VTEP to encapsulate the VXLAN information including the VNI in the IPv6 header.
  • VXLAN tunnels are encapsulated using the VXLAN6 encapsulation optimization method. Both the source VTEP and the destination VTEP of the VXLAN tunnel need to support the VXLAN6 encapsulation optimization function. The source VTEP needs to know whether the destination VTEP supports the VXLAN6 encapsulation optimization function.
  • the second communication device determines that it supports the function of VXLAN6 encapsulation optimization, it can let the first communication device know that the second communication device supports the function of VXLAN6 encapsulation optimization through a route advertisement message, that is, the route communication message carrying function in S101
  • a route advertisement message that is, the route communication message carrying function in S101
  • First information indicating that the destination VTEP (ie, the second communication device) supports VXLAN encapsulation optimization may be carried through attributes or extended community attributes in the route advertisement message.
  • the first information also indicates one or more of the following: a mode in which the IPv6 header carries the VXLAN information; a length of the VXLAN information; and a length of the VNI.
  • the route advertisement message may be an EVPN route, and the route type may be 1, 2, 3 or 5, for example.
  • the route advertisement message may carry the first information through a new extended attribute or an extended community attribute, and the type of the new extended attribute or extended community attribute is represented by VTEP supports VXLAN encapsulation optimization for indicated purposes.
  • the route advertisement message can carry the first information through the new extended attribute or the extended community attribute.
  • New extended attributes or extended community attributes may include but are not limited to: Type field and SubType field, Flag, LocLen field and Reserved, where the Type field and the subtype SubType together identify the attribute or extended community attribute as the first information, indicating VXLAN6 Encapsulation optimization; the value of the LocLen field is used to indicate the length of the VTEP network segment address.
  • the length of the VXLAN information is 8 bytes (i.e. 64 bits). That is, the format of the VXLAN information can be seen in the VXLAN header in Figure 2a or Figure 3a.
  • the VXLAN information can only contain an 8-bit Flag and M (M is an integer greater than 1) bits of VNI, where M can be defined according to the actual situation.
  • the VNI can be defined only by a length of 12 bits.
  • the first byte of the Reserved field can be used to indicate the length of the VNI.
  • the first information in the route advertisement message may correspond to the indication information 3 in the route advertisement message 1.
  • the format of the newly extended attributes or extended community attributes carrying the first information may be as shown in Figure 4a.
  • VXLAN information may also include one or more of the following: at least one Flag; Reserve field.
  • the length of the VXLAN information is 64 bits, and the length of the VNI is 24 bits. In another case, the length of the VXLAN information is greater than or equal to 24 bits, and the length of the VXLAN information is less than 64 bits, and the length of the VNI is 24 bits.
  • the VXLAN information may include an 8-bit Flag and a 24-bit Flag.
  • the first information may indicate that the mode in which the IPv6 header carries VXLAN information is the omitted reservation mode. In the omitted reservation mode, the length of the VXLAN information is 32 bits, and the length of the VNI is 24 bits.
  • the length of the VXLAN information is greater than or equal to M bits, and the length of the VXLAN information is less than 64 bits, the length of the VNI is M bits, and the M is an integer greater than or equal to 1, for example, VXLAN
  • the information may include an 8-bit Flag and an M-bit VNI.
  • the first information may indicate that the mode in which the IPv6 header carries the VXLAN information is the reduced compression mode.
  • the first information may also indicate that the length of the VNI is M, and the VXLAN information in the reduced compression mode is The length is (8+M) bits.
  • the following description takes as an example that the length of the VXLAN information in the omitted reservation mode is 32 bits and the length of the VXLAN information in the simplified compression mode is (8+M) bits.
  • the route advertisement message carries the first information to inform the second communication device at the opposite end of the first communication device of the specific method of VXLAN6 encapsulation optimization that it wishes to adopt (such as the length of the VXLAN information, the mode of the VXLAN information) and the length of the VNI).
  • the route advertisement message does not need to carry the first information.
  • the specific method of VXLAN6 encapsulation optimization can be statically configured on the VTEP of the entire network or a certain VXLAN tunnel, that is, on A specific method for configuring in the first communication device and the second communication device at least one VXLAN6 encapsulation optimization method supported by both.
  • the first communication device saves the association between the network segment address of the destination VTEP, the VNI and the second information, which may include: the first communication device saves the network segment address of the destination VTEP, the VNI and the second information.
  • the association relationship of the second information is saved to the forwarding surface. For example, after receiving the route advertisement message, the first communication device obtains the network segment address of the destination VTEP and the VNI by parsing the route advertisement message, and generates a route based on the network segment address of the destination VTEP and the VNI. table and forwarding table, and generate second information corresponding to the first information for the generated routing table and forwarding table.
  • the second information may be, for example, a mark in the generated routing table and forwarding table, indicating that the first communication device
  • the VXLAN information including the VNI is encapsulated in the IPv6 header of the received message matching the routing table or forwarding table.
  • the second information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI.
  • the second information may correspond to the indication information 1 of route 1 in the above scenario embodiment. For details, please refer to the relevant description of the indication information 1.
  • the first communication device supports the VXLAN6 encapsulation optimization method indicated in the received route advertisement message, and locally saves the association relationship between the network segment address of the destination VTEP, the VNI and the second information, and provides the information for later reception.
  • the packets transmitted through this VXLAN tunnel are ready to be encapsulated in the VXLAN6 encapsulation optimization method.
  • the second communication device in order to parse and process the packets encapsulated by the first communication device using the VXLAN6 encapsulation optimization method, the second communication device may also save the network segment address of the destination VTEP, the VNI and the third The correlation relationship of the information, the third information indicates that the VXLAN information including the VNI is encapsulated in the IPv6 header of the sixth version of the Internet Protocol.
  • the third information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI.
  • the third information may correspond to the indication information 2 of route 3 in the above scenario embodiment. For details, please refer to the relevant description of the indication information 2.
  • the above-mentioned S101 to S104 prepare for the adoption of the VXLAN6 encapsulation optimization method between the first communication device and the second communication device through the route advertisement method, so that the VXLAN6 encapsulation optimization method is adopted between the first communication device and the second communication device. It is possible to encapsulate messages and improve the efficiency of message encapsulation.
  • the first communication device obtains a first message, the first message includes an IPv6 header, the IPv6 header includes VXLAN information, and the VXLAN information includes a VNI.
  • S105 may include: S1051, the first communication device receives the second message; S1052, the first communication device matches the network segment address of the destination VTEP according to the destination address of the second message.
  • the network segment address of the destination VTEP the association between the VNI and the second information is obtained to obtain the VNI and the second information; S1053, the first communication device responds to the second report according to the instructions of the second information.
  • the message is encapsulated to obtain the first message.
  • the second message may correspond to message 1 in Figure 2b, and the first message corresponds to message 2' in Figure 2b.
  • the second message may correspond to message 5 in Figure 3b, and the first message corresponds to message 6' in Figure 3b.
  • the IPv6 header of the first message includes a destination IPv6 address
  • the destination IPv6 address includes the network segment address of the destination VTEP and the VXLAN information.
  • the first 64 bits may be used to carry the network segment address of the destination VTEP
  • the VXLAN information is carried in the last 64 bits of the destination IPv6 address.
  • the mode of carrying VXLAN information in the IPv6 header is all-bit mode, then all the last 64 bits of the destination IPv6 address are used to carry the VXLAN information; in another case, the VXLAN information is carried in the IPv6 header The mode is the omitted reservation mode, then 32 bits of the last 64 bits of the destination IPv6 address are used to carry the VXLAN information; in another case, the mode carrying VXLAN information in the IPv6 header is the streamlined compression mode, then , (8+M) bits among the last 64 bits of the destination IPv6 address are used to carry the VXLAN information.
  • the length of the network segment address of the destination VTEP in the destination IPv6 address can also be greater than 64 bits. For example, when the length of the VXLAN information is less than 64 bits, the length of the network segment address of the destination VTEP in the destination IPv6 address can be equal to 128 bits. Bit minus the length of the VXLAN message.
  • the IPv6 header of the first message includes a source IPv6 address
  • the source IPv6 address includes the network segment address of the source VTEP and the VXLAN information.
  • the first 64 bits of the source IPv6 address can be used for It carries the network segment address of the source VTEP, and the VXLAN information is carried in the last 64 bits of the source IPv6 address.
  • the mode of carrying VXLAN information in the IPv6 header is all-bit mode, then all the last 64 bits of the source IPv6 address are used to carry the VXLAN information; in another case, the VXLAN information is carried in the IPv6 header The mode is the omitted reservation mode, then 32 bits of the last 64 bits of the source IPv6 address are used to carry the VXLAN information; in another case, the mode carrying VXLAN information in the IPv6 header is the streamlined compression mode, then , (8+M) bits among the last 64 bits of the source IPv6 address are used to carry the VXLAN information. It should be noted that the length of the network segment address of the source VTEP in the source IPv6 address can also be greater than 64 bits.
  • the length of the VXLAN information when the length of the VXLAN information is less than 64 bits, the length of the network segment address of the destination VTEP in the source IPv6 address can be equal to 128 bits. Bit minus the length of the VXLAN message.
  • the first information, the second information and the third information may also indicate that the VXLAN information is in the source IPv6 address of the IPv6 header, so that the first communication device and the second communication device can optimize the VXLAN6 encapsulation based on the embodiments of the present application. method for efficient message processing.
  • S106 The first communication device sends the first message to the second communication device through the VXLAN tunnel.
  • the second communication device receives the first message sent by the first communication device through the VXLAN tunnel.
  • the first message includes an IPv6 header, the IPv6 header includes VXLAN information, and the VXLAN information includes a VNI.
  • S108 The second communication device processes the first message according to the VXLAN information.
  • the first message in S107 and S108 and the first message in S105 and S106 are the sources of the outer Ethernet header.
  • the MAC address and the destination MAC address are different, and other parts are the same; if there is no intermediate communication device between the first communication device and the second communication device, then the first message in S107 and S108 and the first message in S105 and S106 same.
  • S108 may include: S1081, the second communication device matches the network segment address of the destination VTEP according to the destination address of the first message, and the second communication device matches the network segment address of the destination VTEP according to the network segment address of the destination VTEP, the The correlation relationship between the VNI and the third information is obtained to obtain the VNI and the third information; S1082, the second communication device obtains the VNI and the third information from the IPv6 header of the first message based on the indication of the third information. VXLAN information; S1083, the second communication device strips off the IPv6 header of the second message and obtains a third message; S1084, the second communication device forwards the third message according to the VXLAN information.
  • the third information may correspond to the indication information 2 of route 3 in the above scenario embodiment.
  • the first message may correspond to the message 3' in Figure 2b, and the third message may correspond to the message 3' in Figure 2b.
  • the message corresponds to the message 4' in Figure 2b; in another case, the first message may correspond to the message 7' in Figure 3b, and the third message corresponds to the message 8' in Figure 3b.
  • the relevant descriptions in Figure 2b or Figure 3b please refer to the relevant descriptions in Figure 2b or Figure 3b.
  • S101 to S104 can be implemented individually as a route advertisement method, and S105 to S108 can also be implemented individually as a message processing method.
  • the operations performed by the first communication device and the second communication device may exist as one embodiment respectively, and do not affect the implementation of the VXLAN encapsulation optimization method provided by this application.
  • the operations performed by the first communication device and the second communication device may exist as one embodiment respectively, and do not affect the implementation of the VXLAN encapsulation optimization method provided by this application.
  • the source VTEP of the VXLAN tunnel encapsulates the VXLAN information in the IPv6 header of the packet that is about to enter the VXLAN tunnel, and forwards it to the destination VTEP of the VXLAN tunnel through the VXLAN tunnel.
  • the VXLAN information at least includes the VXLAN network Identifier (VXLAN Network Identifier, VNI). in this way, Compared with the current VXLAN encapsulation method, this optimized VXLAN encapsulation method no longer needs to encapsulate UDP headers and VXLAN headers for packets that are about to enter the VXLAN tunnel. It can also carry the VXLAN information required for VXLAN tunnel forwarding in the packet through VXLAN. The tunnel is sent to the destination VTEP to realize the effect of transmitting the packet in the VXLAN tunnel, which can effectively improve the encapsulation efficiency of the packet and make efficient packet processing possible.
  • VNI VXLAN Network Identifier
  • An embodiment of the present application also provides a first communication device, where the first communication device includes: a transceiver unit and a processing unit;
  • the transceiver unit is configured to perform the receiving and/or sending operations performed by the first communication device as described in the above method embodiment;
  • the processing unit is configured to perform operations other than the receiving and/or sending operations performed by the first communication device described in the above method embodiments.
  • FIG. 7 is a schematic structural diagram of a first communication device provided by an embodiment of the present application.
  • the first communication device 700 shown in FIG. 7 may include, for example, a processing unit 701 and a sending unit 702.
  • the processing unit 701 is used to obtain the first message, the first message includes the sixth version of the Internet Protocol IPv6 header, the IPv6 header includes virtual extended LAN VXLAN information, and the VXLAN information includes the VXLAN network identifier VNI;
  • the sending unit 702 is configured to send the first message to a second communication device through a VXLAN tunnel, and the second communication device serves as the destination VTEP.
  • the IPv6 header includes a destination IPv6 address
  • the destination IPv6 address includes the network segment address of the destination VTEP and the VXLAN information.
  • the VXLAN information is carried in the last 64 bits of the destination IPv6 address. For example, all the last 64 bits of the destination IPv6 address are used to carry the VXLAN information.
  • the IPv6 header includes a source IPv6 address
  • the source IPv6 address includes the network segment address of the source VTEP and the VXLAN information.
  • the VXLAN information is carried in the last 64 bits of the source IPv6 address. For example, all the last 64 bits of the source IPv6 address are used to carry the VXLAN information.
  • the length of the VNI is less than or equal to 24 bits.
  • the VXLAN information also includes one or more of the following: at least one Flag; a Reserve field.
  • the receiving unit is configured to receive a route advertisement message published by the destination VTEP.
  • the route advertisement message includes a route prefix, a next hop, the VNI and first information, wherein the next hop is the network segment address of the destination VTEP, and the first information indicates that the destination VTEP supports VXLAN encapsulation optimization;
  • the processing unit 701 is also used to save the network segment address of the destination VTEP, the VNI, and the second information
  • the second information indicates that the source VTEP encapsulates the VXLAN information including the VNI in the IPv6 header to obtain the first packet.
  • the processing unit 701 is specifically configured to save the association relationship between the network segment address of the destination VTEP, the VNI and the second information to the forwarding plane.
  • the first information is an attribute or an extended community attribute in the route advertisement message.
  • the first information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI.
  • the mode of the VXLAN information is the all-bit mode, the length of the VXLAN information is 64 bits, and the VNI length is 24 bits; or the mode of the VXLAN information is the omitted reservation mode, and the length of the VXLAN information is The length is 32 bits, and the length of the VNI is 24 bits; or, the mode of the VXLAN information is a streamlined compression mode, the VXLAN information includes 8-bit Flags and M-bit VNI, and the M is greater than or equal to 1 integer.
  • the processing unit 701 includes: a receiving subunit, used to receive the second message; a processing subunit, used to match the network segment address of the destination VTEP according to the destination address of the second message, Obtain the VNI and the second information according to the association relationship; the processing subunit is also configured to encapsulate the second message according to the instructions of the second information to obtain the first message. arts.
  • the second information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI.
  • the mode of the VXLAN information is the all-bit mode, the length of the VXLAN information is 64 bits, and the VNI length is 24 bits; or the mode of the VXLAN information is the omitted reservation mode, and the length of the VXLAN information is The length is 32 bits, and the length of the VNI is 24 bits; or, the mode of the VXLAN information is a streamlined compression mode, the VXLAN information includes 8-bit Flags and M-bit VNI, and the M is greater than or equal to 1 integer.
  • each unit of the first communication device 700 reference may be made to the relevant descriptions of the above method embodiments, and the description will not be repeated this time.
  • FIG. 8 is a schematic structural diagram of a first communication device provided by an embodiment of the present application.
  • the first communication device 800 shown in FIG. 8 may include, for example, a receiving unit 801 and a processing unit 802.
  • Receiving unit 801 configured to receive a route advertisement message sent by a second communication device, where the route advertisement message includes a route prefix, a next hop, a virtual extended local area network VXLAN network identifier VNI, and first information, wherein the second communication device Used as a destination VTEP, the next hop is the network segment address of the destination VTEP, and the first information indicates that the destination VTEP supports VXLAN encapsulation optimization;
  • the processing unit 802 is configured to save the association between the network segment address of the destination VTEP, the VNI, and second information.
  • the second information instructs the source VTEP to encapsulate the VXLAN information including the VNI in version 6. Internet Protocol IPv6 header.
  • the processing unit 802 is specifically configured to save the association relationship between the network segment address of the destination VTEP, the VNI and the second information to the forwarding plane.
  • the first information is an attribute or an extended community attribute in the route advertisement message.
  • the first information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI.
  • the second information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI.
  • the mode of the VXLAN information is an all-bit mode
  • the length of the VXLAN information is 64 bits
  • the length of the VNI is 24 bits
  • the mode of the VXLAN information is an omitted reservation mode
  • the VXLAN information is an omitted reservation mode.
  • the length of the information is 32 bits, and the length of the VNI is 24 bits; or, the mode of the VXLAN information is a simplified compression mode, the VXLAN information includes 8-bit Flags and M-bit VNI, and the M is greater than or An integer equal to 1.
  • the VXLAN information also includes one or more of the following: at least one Flag; a Reserve field.
  • the receiving unit 801 is also configured to receive the first message; the processing unit 802 is also configured to match the network segment address of the destination VTEP according to the destination address of the first message, Obtain the VNI and the second information according to the association relationship; the processing unit 802 is also configured to encapsulate the first message according to the instructions of the second information to obtain a second message,
  • the second message includes a first IPv6 header, the first IPv6 header includes VXLAN information, and the VXLAN information includes the VNI; a sending unit configured to send the first communication device to the second communication device through a VXLAN tunnel. Two messages.
  • the embodiment of the present application also provides a second communication device, the second communication device includes: a transceiver unit and a processing unit;
  • the transceiver unit is configured to perform the receiving and/or sending operations performed by the second communication device as described in the above method embodiment;
  • the processing unit is configured to perform operations other than the receiving and/or sending operations performed by the second communication device as described in the above method embodiments.
  • FIG. 9 is a schematic structural diagram of a second communication device provided by an embodiment of the present application.
  • the second communication device 900 shown in FIG. 9 may include, for example, a receiving unit 901 and a processing unit 902.
  • the receiving unit 901 is configured to receive the first message sent by the first communication device through the virtual extended local area network VXLAN tunnel.
  • the first message includes the sixth version of the Internet Protocol IPv6 header, and the IPv6 header includes VXLAN information.
  • the VXLAN The information includes a VXLAN network identification VNI, the first communications device serving as a source VTEP;
  • the processing unit 902 is configured to process the first packet according to the VXLAN information.
  • the IPv6 header includes a destination IPv6 address
  • the destination IPv6 address includes the network segment address of the destination VTEP and the VXLAN information.
  • the VXLAN information is carried in the last 64 bits of the destination IPv6 address. For example, all the last 64 bits of the destination IPv6 address are used to carry the VXLAN information.
  • the IPv6 header includes a source IPv6 address
  • the source IPv6 address includes the network segment address of the source VTEP and the VXLAN information.
  • the VXLAN information is carried in the last 64 bits of the source IPv6 address. For example, all the last 64 bits of the source IPv6 address are used to carry the VXLAN information.
  • the length of the VNI is less than or equal to 24 bits.
  • the VXLAN information also includes one or more of the following: at least one Flag; a Reserve field.
  • the sending unit is configured to publish a route advertisement message to the source VTEP.
  • the route advertisement message includes a route prefix, a next hop, the VNI and first information, wherein the next hop is the network segment address of the destination VTEP, and the first information indicates that the destination VTEP supports VXLAN encapsulation optimization.
  • the first information is an attribute or an extended community attribute in the route advertisement message.
  • the first information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI.
  • the mode of the VXLAN information is the all-bit mode, the length of the VXLAN information is 64 bits, and the VNI length is 24 bits; or the mode of the VXLAN information is the omitted reservation mode, and the length of the VXLAN information is The length of the VXLAN information is greater than or equal to 24 bits, and the length of the VXLAN information is less than 64 bits, and the length of the VNI is 24 bits; or the mode of the VXLAN information is a streamlined compression mode, and the length of the VXLAN information is greater than or equal to M bits, and the length of the VXLAN information is less than 64 bits, the length of the VNI is M bits, and M is an integer greater than or equal to 1.
  • the processing unit 902 is also configured to save the association between the network segment address of the destination VTEP, the VNI, and second information, where the second information indicates the VXLAN information encapsulation including the VNI. In the IPv6 header of the first packet.
  • the second information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI.
  • the mode of the VXLAN information is the all-bit mode, the length of the VXLAN information is 64 bits, and the VNI length is 24 bits; or the mode of the VXLAN information is the omitted reservation mode, and the length of the VXLAN information is The length of the VXLAN information is greater than or equal to 24 bits, and the length of the VXLAN information is less than 64 bits, and the length of the VNI is 24 bits; or the mode of the VXLAN information is a streamlined compression mode, and the length of the VXLAN information is greater than or equal to M bits, and the length of the VXLAN information is less than 64 bits, the length of the VNI is M bits, and M is an integer greater than or equal to 1.
  • the processing unit 902 includes: a matching subunit, configured to match the network segment address of the destination VTEP according to the destination address of the first message, and obtain the VNI and The second information; a first obtaining subunit, used to obtain the VXLAN information from the IPv6 header of the first message based on the indication of the second information; a second obtaining subunit, used to strip off all The IPv6 header of the second message is used to obtain the second message; the forwarding subunit is configured to forward the second message according to the VXLAN information.
  • each unit of the second communication device 900 reference may be made to the relevant descriptions of the above method embodiments, and the description will not be repeated this time.
  • FIG. 10 is a schematic structural diagram of a second communication device provided by an embodiment of the present application.
  • the second communication device 1000 shown in FIG. 10 may include, for example, a processing unit 1001 and a sending unit 1002.
  • the processing unit 1001 is configured to generate a route advertisement message.
  • the route advertisement message includes a route prefix, a next hop, a virtual extended LAN VXLAN network identifier VNI, and first information, where the next hop is the network of the destination VTEP. Segment address, the first information indicates that the destination VTEP supports VXLAN encapsulation optimization;
  • Sending unit 1002 configured to send the route advertisement message to a first communication device, where the first communication device is used as Source VTEP.
  • the first information is an attribute or an extended community attribute in the route advertisement message.
  • the first information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI.
  • the mode of the VXLAN information is the all-bit mode, the length of the VXLAN information is 64 bits, and the VNI length is 24 bits; or the mode of the VXLAN information is the omitted reservation mode, and the length of the VXLAN information is The length of the VXLAN information is greater than or equal to 24 bits, and the length of the VXLAN information is less than 64 bits, and the length of the VNI is 24 bits; or the mode of the VXLAN information is a streamlined compression mode, and the length of the VXLAN information is greater than or equal to M bits, and the length of the VXLAN information is less than 64 bits, the length of the VNI is M bits, and M is an integer greater than or equal to 1.
  • the VXLAN information also includes one or more of the following: at least one Flag; a Reserve field.
  • the processing unit 1001 is also configured to save the association between the network segment address of the destination VTEP, the VNI and second information, where the second information indicates the VXLAN information encapsulation including the VNI.
  • the second information indicates the VXLAN information encapsulation including the VNI.
  • the second information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI.
  • the mode of the VXLAN information is the all-bit mode, the length of the VXLAN information is 64 bits, and the VNI length is 24 bits; or the mode of the VXLAN information is the omitted reservation mode, and the length of the VXLAN information is The length of the VXLAN information is greater than or equal to 24 bits, and the length of the VXLAN information is less than 64 bits, and the length of the VNI is 24 bits; or the mode of the VXLAN information is a streamlined compression mode, and the length of the VXLAN information is greater than or equal to M bits, and the length of the VXLAN information is less than 64 bits, the length of the VNI is M bits, and M is an integer greater than or equal to 1.
  • the receiving unit is configured to receive the first message sent by the first communication device through the VXLAN tunnel, the first message includes an IPv6 header, and the IPv6 header includes the VXLAN information;
  • the processing unit 1001 is also configured to match the network segment address of the destination VTEP according to the destination address of the first message, and obtain the VNI and the second information according to the association relationship; the processing unit 1001 is also configured to Based on the indication of the second information, obtain the VXLAN information from the IPv6 header of the first message; the processing unit 1001 is also configured to strip the IPv6 header of the second message, Obtain the second message; the sending unit 1002 is further configured to forward the second message according to the VXLAN information.
  • FIG. 11 is a schematic structural diagram of a communication device provided by the embodiment of the present application.
  • the communication device 1100 includes a communication interface 1101 and a processor 1102 connected to the communication interface 1101.
  • the communication device 1100 can be used to perform the method 100 in the above embodiment.
  • the communication device 1100 can perform the method 100 in the above embodiment.
  • the communication device 1100 is equivalent to the first communication device in the method 100.
  • the communication interface 1101 is used to perform the sending and receiving operations performed by the first communication device in the method 100.
  • the processor 1102 is configured to perform operations other than the sending and receiving operations performed by the first communication device in the method 100. For example: the processor 1102 is used to obtain the first message, which carries VXLAN information through the IPv6 header, and the VXLAN information at least includes VNI; the communication interface Port 1101 is used to send the first message to the second communication device through the VXLAN tunnel.
  • the communication interface 1101 is used to receive a route advertisement message sent by the second communication device.
  • the route advertisement message includes a route prefix, a next hop, a virtual extended LAN VXLAN network identifier VNI and first information, wherein the second The communication device is used as a destination VTEP, the next hop is the network segment address of the destination VTEP, and the first information indicates that the destination VTEP supports VXLAN encapsulation optimization; the processor 1102 is used to save the network segment of the destination VTEP.
  • the association relationship between the address, the VNI and the second information, the second information instructs the source VTEP to encapsulate the VXLAN information including the VNI in the IPv6 header.
  • the communication device 1100 can perform the method 100 in the above embodiment.
  • the communication device 1000 is equivalent to the second communication device in the method 100.
  • the communication interface 1101 is used to perform the sending and receiving operations performed by the second communication device in the method 100.
  • the processor 1102 is configured to perform operations other than the sending and receiving operations performed by the second communication device in the method 100.
  • the communication interface 1101 is used to receive the first message sent by the first communication device through the VXLAN tunnel, the first message includes an IPv6 header, the IPv6 header includes VXLAN information, and the VXLAN information includes the VXLAN network identifier VNI,
  • the first communication device is used as a source VTEP;
  • the processor 1102 is used to process the first message according to the VXLAN information.
  • the processor 1102 is configured to generate a route advertisement message.
  • the route advertisement message includes a route prefix, a next hop, a VXLAN network identifier VNI, and first information, where the next hop is the network segment of the destination VTEP. address, the first information indicates that the destination VTEP supports VXLAN encapsulation optimization;
  • the communication interface 1101 is used to send the route advertisement message to the first communication device, and the first communication device serves as the source VTEP.
  • FIG. 12 is a schematic structural diagram of a communication device provided by the embodiment of the present application.
  • the communication device 1200 may be used to perform the method 100 in the above embodiment.
  • the communication device 1200 may include a processor 1210, a memory 1220 coupled to the processor 1210, and a transceiver 1230.
  • the transceiver 1230 may be, for example, a communication interface, an optical module, etc.
  • the processor 1210 may be a central processing unit (English: central processing unit, abbreviation: CPU), a network processor (English: network processor, abbreviation: NP) or a combination of CPU and NP.
  • the processor can also be an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof.
  • ASIC application-specific integrated circuit
  • PLD programmable logic device
  • the above-mentioned PLD can be a complex programmable logic device (English: complex programmable logic device, abbreviation: CPLD), a field-programmable gate array (English: field-programmable gate array, abbreviation: FPGA), a general array logic (English: generic array logic, abbreviation: GAL) or any combination thereof.
  • the processor 1210 may refer to one processor or may include multiple processors.
  • the memory 1220 may include volatile memory (English: volatile memory), such as random access memory (English: random-access memory, abbreviation: RAM); the memory may also include non-volatile memory (English: non-volatile memory) , such as read-only memory (English: read-only memory, abbreviation: ROM), flash memory (English: flash memory), hard disk (English: hard disk drive, abbreviation: HDD) or solid-state drive (English: solid-state drive , abbreviation: SSD); the memory 1220 may also include a combination of the above types of memories.
  • the memory 1220 may refer to one memory or may include multiple memories.
  • computer readable instructions are stored in memory 1220, and the computer
  • the computer-readable instructions include a plurality of software modules, such as a sending module 1221, a processing module 1222 and a receiving module 1223.
  • the processor 1210 can perform corresponding operations according to the instructions of each software module.
  • the operations performed by a software module actually refer to operations performed by the processor 1210 according to the instructions of the software module.
  • the communication device 1200 can perform the method 100 in the above embodiment.
  • the communication device 1200 is equivalent to the first communication device in the method 100.
  • the transceiver 1230 is used to perform the transceiver operation performed by the first communication device in the method 100.
  • the processor 1210 is configured to perform operations other than the sending and receiving operations performed by the first communication device in the method 100. For example: the processor 1210 is used to obtain a first message, the first message carries VXLAN information through an IPv6 header, and the VXLAN information at least includes VNI; the transceiver 1230 is used to send the first message to the second communication device through a VXLAN tunnel. message.
  • the transceiver 1230 is configured to receive a route advertisement message sent by the second communication device.
  • the route advertisement message includes a route prefix, a next hop, a virtual extended LAN VXLAN network identifier VNI, and first information, wherein the second The communication device is used as a destination VTEP, the next hop is the network segment address of the destination VTEP, and the first information indicates that the destination VTEP supports VXLAN encapsulation optimization; the processor 1210 is used to save the network segment of the destination VTEP.
  • the association relationship between the address, the VNI and the second information, the second information instructs the source VTEP to encapsulate the VXLAN information including the VNI in the IPv6 header.
  • the communication device 1200 can perform the method 100 in the above embodiment.
  • the communication device 1200 is equivalent to the second communication device in the method 100.
  • the transceiver 1230 is used to perform the transceiver operation performed by the second communication device in the method 100.
  • the processor 1210 is configured to perform operations other than the sending and receiving operations performed by the second communication device in the method 100.
  • the transceiver 1230 is configured to receive the first message sent by the first communication device through the VXLAN tunnel, the first message includes an IPv6 header, the IPv6 header includes VXLAN information, and the VXLAN information includes the VXLAN network identifier VNI,
  • the first communication device is used as a source VTEP;
  • the processor 1210 is used to process the first message according to the VXLAN information.
  • the processor 1210 is configured to generate a route advertisement message, which includes a route prefix, a next hop, a VXLAN network identifier VNI, and first information, where the next hop is the network segment of the destination VTEP. address, the first information indicates that the destination VTEP supports VXLAN encapsulation optimization;
  • the transceiver 1230 is configured to send the route advertisement message to the first communication device, and the first communication device serves as the source VTEP.
  • the present application also provides a computer-readable storage medium that stores instructions that, when run on a computer, cause the computer to execute the method described in the foregoing embodiments (for example, method 100 ) any one or more operations.
  • This application also provides a computer program product, which includes a computer program that, when run on a computer, causes the computer to perform any one or more operations in the method (eg, method 100) described in the previous embodiments.
  • the present application also provides a communication system, including the first communication device and the second communication device mentioned in the method 100 of the above embodiment.
  • This application also provides a communication system, including at least one memory and at least one processor.
  • the at least one memory stores instructions, and the at least one processor executes the instructions, so that the communication system executes the aforementioned embodiments of the application. Any one or more operations in the method described in any embodiment (eg, method 100).
  • the disclosed systems, devices and methods can be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of units is only a logical service division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or integrated. to another system, or some features can be ignored, or not implemented.
  • the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the devices or units may be in electrical, mechanical or other forms.
  • a unit described as a separate component may or may not be physically separate.
  • a component shown as a unit may or may not be a physical unit, that is, it may be located in one place, or it may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each business unit in various embodiments of this application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above integrated units can be implemented in the form of hardware or software business units.
  • Integrated units may be stored in a computer-readable storage medium when implemented in the form of software business units and sold or used as independent products.
  • the technical solution of the present application is essentially or contributes to the existing technology, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program code. .
  • Computer-readable media includes computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another.
  • Storage media can be any available media that can be accessed by a general purpose or special purpose computer.

Landscapes

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

Abstract

Disclosed in the present application are a packet processing method, a routing announcement method, and a related device. By means of a source VTEP of a VXLAN tunnel, VXLAN information is encapsulated in an IPv6 header of a packet that is about to enter the VXLAN tunnel, and is forwarded to a destination VTEP of the VXLAN tunnel on the basis of the VXLAN tunnel, wherein the VXLAN information at least comprises a VNI. In this way, by means of a VXLAN encapsulation optimization mode provided in the present application, a UDP header and a VXLAN header no longer need to be encapsulated for a packet that is about to enter a VXLAN tunnel, and required VXLAN information, which is forwarded by means of the VXLAN tunnel, can also be carried in an IPv6 header of the packet and is then sent to a destination VTEP by means of the VXLAN tunnel, such that the encapsulation efficiency of the packet is effectively improved, thereby making efficient packet processing possible.

Description

一种报文处理的方法、路由通告的方法及相关设备A message processing method, route advertisement method and related equipment
本申请要求于2022年03月15日提交中国国家知识产权局、申请号为202210250923.7、申请名称为“一种VXLAN6报文封装的方法和设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to the Chinese patent application submitted to the State Intellectual Property Office of China on March 15, 2022, with application number 202210250923.7 and application title "A method and device for VXLAN6 message encapsulation", the entire content of which is incorporated by reference. incorporated in this application.
本申请要求于2022年05月24日提交中国国家知识产权局、申请号为202210570065.4、申请名称为“一种报文处理的方法、路由通告的方法及相关设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application requests the priority of the Chinese patent application submitted to the State Intellectual Property Office of China on May 24, 2022, with the application number 202210570065.4 and the application title "A message processing method, a routing announcement method and related equipment", The entire contents of which are incorporated herein by reference.
技术领域Technical field
本申请涉及通信技术领域,特别是涉及一种报文处理的方法、路由通告的方法及相关设备。The present application relates to the field of communication technology, and in particular to a message processing method, a route advertisement method and related equipment.
背景技术Background technique
虚拟扩展局域网(Virtual Extensible Local Area Network,VXLAN),是网络中广泛使用的网络虚拟化技术,例如,数据通信网(data communication network,DCN)中大量使用VXLAN技术。VXLAN隧道的源虚拟扩展局域网隧道端点(VXLAN Tunnel EndPoint,VTEP)对所接收的报文,依次封装VXLAN头、用户数据报协议(User Datagram Protocol,UDP)头、互联网协议(Internet Protocol,IP)头和外层以太头,并将封装后的报文在VXLAN隧道转发,当封装后的报文到达VXLAN隧道的目的VTEP时,该目的VTEP基于所接收报文的VXLAN头中的VXLAN信息对所接收的报文进行处理。Virtual Extensible Local Area Network (VXLAN) is a network virtualization technology widely used in networks. For example, VXLAN technology is widely used in data communication networks (DCN). The source virtual extended LAN tunnel endpoint (VXLAN Tunnel EndPoint, VTEP) of the VXLAN tunnel encapsulates the VXLAN header, User Datagram Protocol (UDP) header, and Internet Protocol (Internet Protocol, IP) header in sequence for the received message. and the outer Ethernet header, and forwards the encapsulated packet in the VXLAN tunnel. When the encapsulated packet reaches the destination VTEP of the VXLAN tunnel, the destination VTEP pairs the received packet based on the VXLAN information in the VXLAN header of the received packet. messages are processed.
随着互联网协议(Internet Protocol,IP)从第四版互联网协议(Internet Protocol version 4,IPv4)逐渐向第六版互联网协议(Internet Protocol version 6,IPv6)的演进,VXLAN技术也逐渐从IPv4VXLAN演进到IPv6VXLAN(也可以记作VXLAN6)。VXLAN6按照上述处理方式对待通过VXLAN隧道传输的报文进行处理,存在报文封装效率低的问题。As the Internet Protocol (IP) gradually evolves from the fourth version of the Internet Protocol (Internet Protocol version 4, IPv4) to the sixth version of the Internet Protocol (Internet Protocol version 6, IPv6), VXLAN technology also gradually evolves from IPv4VXLAN to IPv6VXLAN (also known as VXLAN6). VXLAN6 processes packets transmitted through the VXLAN tunnel according to the above processing method, but there is a problem of low packet encapsulation efficiency.
发明内容Contents of the invention
基于此,本申请提供了一种报文处理的方法、路由通告的方法及相关设备,能够高效的进行VXLAN封装,提高报文封装效率,从而实现高效的报文处理。Based on this, this application provides a packet processing method, a route advertisement method and related equipment, which can efficiently perform VXLAN encapsulation, improve packet encapsulation efficiency, and thereby achieve efficient packet processing.
第一方面,本申请提供了一种报文处理的方法,应用于第一通信装置,该第一通信装置用作源VTEP,该方法例如可以包括:第一通信装置获得第一报文,该第一报文通过IPv6头携带VXLAN信息,该VXLAN信息至少包括VXLAN网络标识(VXLAN Network Identifier,VNI),从而,第一通信装置通过VXLAN隧道向第二通信装置发送所述第一报文,该第二通信装置用作目的VTEP。第一报文在IPv6头中封装VXLAN信息的方式可以记作VXLAN封装优化的方式,相比目前的VXLAN封装方式,该VXLAN封装优化的方式,无需再为即将进入VXLAN隧道的报文封装UDP头和VXLAN头,也能够将VXLAN隧道转发所需的VXLAN信息携带在报文中并通过该VXLAN隧道发送到目的VTEP,实现报文在VXLAN隧道中传输的效果,可见,本申请提供的方法,有效的提高报文的封装效率,使得VXLAN隧道中传输的报文长度变小,使得VXLAN隧道的源VTEP对报文的封装速度更快,VXLAN隧道的源VTEP和中间节点对报文的处理速度更快,在带宽不变的情况下VXLAN隧道的源VTEP和中间节点能够处理更多的报文,使得高效的报文处理 成为可能。In a first aspect, the present application provides a message processing method applied to a first communication device that serves as a source VTEP. For example, the method may include: the first communication device obtains a first message, and the first communication device serves as a source VTEP. The first message carries VXLAN information through the IPv6 header, and the VXLAN information at least includes a VXLAN Network Identifier (VNI). Therefore, the first communication device sends the first message to the second communication device through the VXLAN tunnel. The second communications device serves as the destination VTEP. The way in which the VXLAN information is encapsulated in the IPv6 header of the first packet can be recorded as the VXLAN encapsulation optimization method. Compared with the current VXLAN encapsulation method, the VXLAN encapsulation optimization method does not need to encapsulate the UDP header for the packet that is about to enter the VXLAN tunnel. and VXLAN header, it can also carry the VXLAN information required for VXLAN tunnel forwarding in the message and send it to the destination VTEP through the VXLAN tunnel, achieving the effect of transmitting the message in the VXLAN tunnel. It can be seen that the method provided by this application is effective It improves the encapsulation efficiency of packets, making the length of packets transmitted in the VXLAN tunnel smaller, making the source VTEP of the VXLAN tunnel encapsulate packets faster, and the source VTEP and intermediate nodes of the VXLAN tunnel processing packets faster. Fast. When the bandwidth remains unchanged, the source VTEP and intermediate nodes of the VXLAN tunnel can process more packets, enabling efficient packet processing. become possible.
在一些实现方式中,VXLAN信息可以承载于第一报文的IPv6头的目的IPv6地址中,即,第一报文的IPv6头包括目的IPv6地址,所述目的IPv6地址包括所述目的VTEP的网段地址和所述VXLAN信息。作为一个示例,所述VXLAN信息可以携带在所述目的IPv6地址的后64比特中。如果VXLAN信息的长度为64比特,那么,所述目的IPv6地址的后64比特全部用于携带所述VXLAN信息;如果VXLAN信息的长度小于64比特,那么,所述目的IPv6地址的后64比特的部分比特位用于携带所述VXLAN信息。In some implementations, the VXLAN information may be carried in the destination IPv6 address of the IPv6 header of the first message, that is, the IPv6 header of the first message includes the destination IPv6 address, and the destination IPv6 address includes the network of the destination VTEP. segment address and the VXLAN information. As an example, the VXLAN information may be carried in the last 64 bits of the destination IPv6 address. If the length of the VXLAN information is 64 bits, then the last 64 bits of the destination IPv6 address are all used to carry the VXLAN information; if the length of the VXLAN information is less than 64 bits, then the last 64 bits of the destination IPv6 address Some bits are used to carry the VXLAN information.
在另一些实现方式中,VXLAN信息可以承载于第一报文的IPv6头的源IPv6地址中,即,第一报文IPv6头包括源IPv6地址,所述源IPv6地址包括所述源VTEP的网段地址和所述VXLAN信息。作为一个示例,所述VXLAN信息可以携带在所述源IPv6地址的后64比特中。如果VXLAN信息的长度为64比特,那么,所述源IPv6地址的后64比特全部用于携带所述VXLAN信息;如果VXLAN信息的长度小于64比特,那么,所述源IPv6地址的后64比特的部分比特位用于携带所述VXLAN信息。In other implementations, the VXLAN information may be carried in the source IPv6 address of the IPv6 header of the first message. That is, the IPv6 header of the first message includes the source IPv6 address, and the source IPv6 address includes the network of the source VTEP. segment address and the VXLAN information. As an example, the VXLAN information may be carried in the last 64 bits of the source IPv6 address. If the length of the VXLAN information is 64 bits, then the last 64 bits of the source IPv6 address are all used to carry the VXLAN information; if the length of the VXLAN information is less than 64 bits, then the last 64 bits of the source IPv6 address Some bits are used to carry the VXLAN information.
其中,VXLAN信息中的VNI的长度可以小于或等于24比特,VXLAN信息还可以包括以下一项或多项:至少一个标志Flag;预留Reserve字段。例如,VXLAN信息可以参见目前VXLAN封装方式中VXLAN头中的VXLAN信息,包括8比特的Flags、24比特的VNI和32比特的Reserve字段。其中,8比特的Flag中除了第五比特位的Flag为I标记,I=1指示该VXLAN信息中的VNI字段有效,其他比特位为预留待被使用的状态。The length of the VNI in the VXLAN information may be less than or equal to 24 bits, and the VXLAN information may also include one or more of the following: at least one Flag; a Reserve field. For example, the VXLAN information can be found in the VXLAN information in the VXLAN header in the current VXLAN encapsulation method, including the 8-bit Flags, 24-bit VNI, and 32-bit Reserve fields. Among them, except for the fifth bit of Flag in the 8-bit Flag, which is an I flag, I=1 indicates that the VNI field in the VXLAN information is valid, and the other bits are reserved to be used.
在一些实现方式中,该方法还可以包括:第一通信装置接收所述目的VTEP发布的路由通告消息,所述路由通告消息包括路由前缀、下一跳、所述VNI和第一信息,其中,所述下一跳为所述目的VTEP的网段地址,所述第一信息指示所述目的VTEP支持VXLAN封装优化;从而,第一通信装置保存所述目的VTEP的网段地址、所述VNI和第二信息的关联关系,所述第二信息指示所述源VTEP将包括所述VNI的所述VXLAN信息封装在所述IPv6头中以获得所述第一报文。其中,第一通信装置保存所述目的VTEP的网段地址、所述VNI和所述第二信息的关联关系,例如可以包括:第一通信装置将所述目的VTEP的网段地址、所述VNI和所述第二信息的关联关系保存到转发面。这样,第一通信装置接收到路由通告消息并保存路由通告消息中的内容,为在转发面处理业务报文做好了准备,例如,可以基于所保存路由通告消息中的内容封装获得第一报文并转发。In some implementations, the method may further include: the first communication device receiving a route advertisement message published by the destination VTEP, where the route advertisement message includes a route prefix, the next hop, the VNI and the first information, wherein, The next hop is the network segment address of the destination VTEP, and the first information indicates that the destination VTEP supports VXLAN encapsulation optimization; thus, the first communication device saves the network segment address of the destination VTEP, the VNI and The association relationship of the second information, the second information instructs the source VTEP to encapsulate the VXLAN information including the VNI in the IPv6 header to obtain the first packet. Wherein, the first communication device saves the association relationship between the network segment address of the destination VTEP, the VNI and the second information. For example, it may include: the first communication device stores the network segment address of the destination VTEP, the VNI The association with the second information is saved to the forwarding side. In this way, the first communication device receives the route advertisement message and saves the content in the route advertisement message, and is ready to process the service message on the forwarding plane. For example, the first communication device can obtain the first report based on the content encapsulation in the saved route advertisement message. Text and forward.
作为一个示例,第一信息可以通过所述路由通告消息中的属性或扩展团体属性承载。As an example, the first information may be carried through attributes or extended community attributes in the route advertisement message.
其中,第一信息还指示以下一种或多种:所述IPv6头携带所述VXLAN信息的模式;所述VXLAN信息的长度;所述VNI的长度。所述第二信息还指示以下一种或多种:所述IPv6头携带所述VXLAN信息的模式;所述VXLAN信息的长度;所述VNI的长度。其中,所述VXLAN信息的模式为全比特模式,所述VXLAN信息的长度为64比特,所述VNI长度为24比特;或者,所述VXLAN信息的模式为省略预留模式,所述VXLAN信息的的长度大于或等于24比特,且所述VXLAN信息的长度小于64比特,所述VNI的长度为24比特,例如,省略预留模式下,所述VXLAN信息的长度为32比特,所述VNI的长度为24比特;或者,所述VXLAN信息的模式为精简压缩模式,所述VXLAN信息的长度大于 或等于M比特,且所述VXLAN信息的长度小于64比特,所述VNI的长度为M比特,所述M为大于或等于1的整数,例如,精简压缩模式下,所述VXLAN信息包括8比特的Flags和M比特的VNI。Wherein, the first information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI. The second information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI. Wherein, the mode of the VXLAN information is an all-bit mode, the length of the VXLAN information is 64 bits, and the VNI length is 24 bits; or the mode of the VXLAN information is an omitted reservation mode, and the length of the VXLAN information is The length is greater than or equal to 24 bits, and the length of the VXLAN information is less than 64 bits, and the length of the VNI is 24 bits. For example, in the omitted reservation mode, the length of the VXLAN information is 32 bits, and the length of the VNI The length is 24 bits; or, the mode of the VXLAN information is a simplified compression mode, and the length of the VXLAN information is greater than or equal to M bits, and the length of the VXLAN information is less than 64 bits, the length of the VNI is M bits, and the M is an integer greater than or equal to 1. For example, in simplified compression mode, the VXLAN information includes 8 bits Flags and M-bit VNI.
例如,路由通告消息中扩展的、用于承载第一信息的属性或扩展团体属性可以包括但不限于:Type字段和SubType字段、Flag、LocLen字段和Reserved,其中,Type字段和子类型SubType一起标识该属性或扩展团体属性为第一信息,指示进行VXLAN6封装优化;LocLen字段的值用于指示VTEP的网段地址的长度,一种情况下,LocLen字段的值固定等于64比特,另一种情况下,LocLen字段的值可以基于VXLAN信息的长度确定,例如,VXLAN信息的长度为64比特,那么,LocLen字段的值可以等于(128比特-64比特)=64比特,又例如,VXLAN信息的长度为18比特,那么,LocLen字段的值可以等于(128比特-18比特)=110比特;Flag的值用于指示IPv6头中携带VXLAN信息的模式,例如,Flag=1,可以指示全比特模式,该模式下VXLAN信息的长度为8字节(即64比特);Flag=2,可以指示省略预留模式,该模式下VXLAN信息的长度可以为4字节(即32比特),即,VXLAN信息包括8比特的Flag和24比特的VNI字段;Flag=3,可以指示精简压缩模式,该模式下VXLAN信息可以只包含8比特的Flag和M(M为大于1的整数)比特的VNI,其中,M可以根据实际情况定义,如,整个网络只有212=4096个VNI,那么,VNI可以仅通过12比特的长度定义,该情况下,例如可以采用Reserved字段的第一个字节指示VNI的长度。For example, the extended attributes or extended community attributes used to carry the first information in the route advertisement message may include but are not limited to: Type field and SubType field, Flag, LocLen field and Reserved, where the Type field and the subtype SubType together identify the The attribute or extended community attribute is the first information, indicating VXLAN6 encapsulation optimization; the value of the LocLen field is used to indicate the length of the network segment address of the VTEP. In one case, the value of the LocLen field is fixed to 64 bits. In the other case, the value of the LocLen field is fixed to 64 bits. , the value of the LocLen field can be determined based on the length of the VXLAN information. For example, the length of the VXLAN information is 64 bits, then the value of the LocLen field can be equal to (128 bits - 64 bits) = 64 bits. For example, the length of the VXLAN information is 18 bits, then the value of the LocLen field can be equal to (128 bits - 18 bits) = 110 bits; the value of Flag is used to indicate the mode of carrying VXLAN information in the IPv6 header. For example, Flag = 1 can indicate the all-bit mode. The length of VXLAN information in mode is 8 bytes (i.e. 64 bits); Flag=2 can indicate that the reserved mode is omitted. In this mode, the length of VXLAN information can be 4 bytes (i.e. 32 bits), that is, the VXLAN information includes 8-bit Flag and 24-bit VNI fields; Flag=3 can indicate the streamlined compression mode. In this mode, the VXLAN information can only contain an 8-bit Flag and M (M is an integer greater than 1) bits of VNI, where M It can be defined according to the actual situation. For example, if there are only 212=4096 VNIs in the entire network, then the VNI can be defined only by the length of 12 bits. In this case, for example, the first byte of the Reserved field can be used to indicate the length of the VNI.
作为一个示例,第一通信装置获得第一报文,例如可以包括:第一通信装置接收第二报文;第一通信装置根据所述第二报文的目的地址匹配所述目的VTEP的网段地址,根据所述关联关系获得所述VNI和所述第二信息;第一通信装置根据所述第二信息的指示,对所述第二报文进行封装,获得所述第一报文。如此,第一通信装置利用所保存的路由通告消息所发布的内容,对所接收的报文进行处理获得第一报文,实现了对所接收报文采用VXLAN封装优化的方式的优化封装。As an example, the first communication device obtaining the first message may include: the first communication device receiving the second message; and the first communication device matching the network segment of the destination VTEP according to the destination address of the second message. address, and obtain the VNI and the second information according to the association relationship; the first communication device encapsulates the second message according to the instructions of the second information, and obtains the first message. In this way, the first communication device uses the content published by the saved route advertisement message to process the received message to obtain the first message, thereby realizing optimized encapsulation of the received message using VXLAN encapsulation optimization.
第二方面,本申请还提供了一种报文处理的方法,应用于第二通信装置,所述第二通信装置用作目的VTEP,所述方法例如可以包括:第二通信装置通过VXLAN隧道接收第一通信装置发送的第一报文,所述第一报文包括IPv6头,所述IPv6头包括VXLAN信息,所述VXLAN信息包括VXLAN网络标识VNI,所述第一通信装置用作源VTEP;第二通信装置根据所述VXLAN信息对所述第一报文进行处理。如此,第一报文在IPv6头中封装VXLAN信息的方式可以记作VXLAN封装优化的方式,相比目前的VXLAN封装方式,该VXLAN封装优化的方式,无需再为即将进入VXLAN隧道的报文封装UDP头和VXLAN头,也能够将VXLAN隧道转发所需的VXLAN信息携带在报文中并通过该VXLAN隧道发送到目的VTEP,目的VTEP能够基于IPv6头携带的VXLAN信息对所接收的报文进行处理,实现报文在VXLAN隧道中传输的效果,由于目的VTEP支持本申请实施例提供的方法,所以使得源VTEP和中间节点高效的封装报文、以及高效的报文处理成为可能。In a second aspect, this application also provides a message processing method, applied to a second communication device, and the second communication device is used as a destination VTEP. The method may include, for example: the second communication device receives data through a VXLAN tunnel. The first message sent by the first communication device, the first message includes an IPv6 header, the IPv6 header includes VXLAN information, the VXLAN information includes the VXLAN network identifier VNI, and the first communication device serves as the source VTEP; The second communication device processes the first message according to the VXLAN information. In this way, the way in which the VXLAN information is encapsulated in the IPv6 header of the first packet can be recorded as a VXLAN encapsulation optimization method. Compared with the current VXLAN encapsulation method, this VXLAN encapsulation optimization method does not need to encapsulate the packets that are about to enter the VXLAN tunnel. The UDP header and VXLAN header can also carry the VXLAN information required for VXLAN tunnel forwarding in the message and send it to the destination VTEP through the VXLAN tunnel. The destination VTEP can process the received message based on the VXLAN information carried in the IPv6 header. , to achieve the effect of packet transmission in the VXLAN tunnel. Since the destination VTEP supports the method provided in the embodiment of this application, it is possible for the source VTEP and the intermediate node to efficiently encapsulate packets and process efficient packets.
在一些实现方式中,第一报文的IPv6头包括目的IPv6地址,所述目的IPv6地址包括所述目的VTEP的网段地址和所述VXLAN信息。作为一个示例,所述VXLAN信息携带 在所述目的IPv6地址的后64比特中。例如,所述目的IPv6地址的后64比特全部用于携带所述VXLAN信息。In some implementations, the IPv6 header of the first message includes a destination IPv6 address, and the destination IPv6 address includes the network segment address of the destination VTEP and the VXLAN information. As an example, the VXLAN information carries In the last 64 bits of the destination IPv6 address. For example, all the last 64 bits of the destination IPv6 address are used to carry the VXLAN information.
在另一些实现方式中,第一报文的IPv6头包括源IPv6地址,所述源IPv6地址包括所述源VTEP的网段地址和所述VXLAN信息。作为一个示例,所述VXLAN信息携带在所述源IPv6地址的后64比特中。例如,所述源IPv6地址的后64比特全部用于携带所述VXLAN信息。In other implementations, the IPv6 header of the first message includes a source IPv6 address, and the source IPv6 address includes the network segment address of the source VTEP and the VXLAN information. As an example, the VXLAN information is carried in the last 64 bits of the source IPv6 address. For example, all the last 64 bits of the source IPv6 address are used to carry the VXLAN information.
作为一个示例,VNI的长度为小于或等于24比特。As an example, the length of the VNI is less than or equal to 24 bits.
作为一个示例,VXLAN信息除了包括VNI,还可以包括以下一项或多项:至少一个标志Flag;预留Reserve字段。As an example, in addition to the VNI, the VXLAN information may also include one or more of the following: at least one Flag; a Reserve field.
在一些实现方式中,在第二通信装置接收到第一报文之前,该方法还可以包括:第二通信装置向所述源VTEP发布的路由通告消息,所述路由通告消息包括路由前缀、下一跳、所述VNI和第一信息,其中,所述下一跳为所述目的VTEP的网段地址,所述第一信息指示所述目的VTEP支持VXLAN封装优化。其中,第一信息可以通过路由通告消息中的属性或扩展团体属性携带。其中,所述第一信息还可以指示以下一种或多种:所述IPv6头携带所述VXLAN信息的模式;所述VXLAN信息的长度;所述VNI的长度。In some implementations, before the second communication device receives the first message, the method may further include: the second communication device publishes a route advertisement message to the source VTEP, where the route advertisement message includes a route prefix, a download link, and a routing prefix. One hop, the VNI and first information, wherein the next hop is the network segment address of the destination VTEP, and the first information indicates that the destination VTEP supports VXLAN encapsulation optimization. The first information may be carried through attributes or extended community attributes in the route advertisement message. The first information may also indicate one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI.
在一些实现方式中,该方法还可以包括:第二通信装置保存所述目的VTEP的网段地址、所述VNI和第二信息的关联关系,所述第二信息指示包括所述VNI的所述VXLAN信息封装在所述第一报文的所述IPv6头中。其中,第二信息还指示以下一种或多种:所述IPv6头携带所述VXLAN信息的模式;所述VXLAN信息的长度;所述VNI的长度。In some implementations, the method may further include: the second communication device saving the association relationship between the network segment address of the destination VTEP, the VNI and second information, where the second information indicates the link including the VNI. VXLAN information is encapsulated in the IPv6 header of the first message. Wherein, the second information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI.
其中,所述VXLAN信息的模式为全比特模式,所述VXLAN信息的长度为64比特,所述VNI长度为24比特;或者,所述VXLAN信息的模式为省略预留模式,所述VXLAN信息的的长度大于或等于24比特,且所述VXLAN信息的长度小于64比特,所述VNI的长度为24比特;或者,所述VXLAN信息的模式为精简压缩模式,所述VXLAN信息的长度大于或等于M比特,且所述VXLAN信息的长度小于64比特,所述VNI的长度为M比特,所述M为大于或等于1的整数。Wherein, the mode of the VXLAN information is an all-bit mode, the length of the VXLAN information is 64 bits, and the VNI length is 24 bits; or the mode of the VXLAN information is an omitted reservation mode, and the length of the VXLAN information is The length of the VXLAN information is greater than or equal to 24 bits, and the length of the VXLAN information is less than 64 bits, and the length of the VNI is 24 bits; or the mode of the VXLAN information is a streamlined compression mode, and the length of the VXLAN information is greater than or equal to M bits, and the length of the VXLAN information is less than 64 bits, the length of the VNI is M bits, and M is an integer greater than or equal to 1.
在一些实现方式中,第二通信装置根据所述VXLAN信息对所述第一报文进行处理,可以包括:第二通信装置根据所述第一报文的目的地址匹配所述目的VTEP的网段地址,根据所述关联关系获得所述VNI和所述第二信息;第二通信装置基于所述第二信息的指示,从所述第一报文的IPv6头中获得所述VXLAN信息;第二通信装置剥离所述第二报文的所述IPv6头,获得第二报文;第二通信装置根据所述VXLAN信息,转发所述第二报文。In some implementations, the second communication device processes the first message according to the VXLAN information, which may include: the second communication device matches the network segment of the destination VTEP according to the destination address of the first message. Address, obtain the VNI and the second information according to the association relationship; the second communication device obtains the VXLAN information from the IPv6 header of the first message based on the indication of the second information; second The communication device strips off the IPv6 header of the second message to obtain the second message; the second communication device forwards the second message according to the VXLAN information.
第三方面,本申请还提供了一种路由通告的方法,应用于第一通信装置,所述第一通信装置用作源VTEP,该方法例如可以包括:第一通信装置接收第二通信装置发送的路由通告消息,所述路由通告消息包括路由前缀、下一跳、虚拟扩展局域网VXLAN网络标识VNI和第一信息,其中,所述第二通信装置用作目的VTEP,所述下一跳为所述目的VTEP的网段地址,所述第一信息指示所述目的VTEP支持VXLAN封装优化;第一通信装置保存所述目的VTEP的网段地址、所述VNI和第二信息的关联关系,所述第二信息指示所述源VTEP将包括所述VNI的VXLAN信息封装在IPv6头中。可见,相比目前的VXLAN封 装方式,第一通信装置接收到第二通信装置通告的支持的VXLAN封装优化的方式,无需再为即将进入VXLAN隧道的报文封装UDP头和VXLAN头,也能够将VXLAN隧道转发所需的VXLAN信息携带在报文中通过VXLAN隧道发送到目的VTEP,实现该报文在VXLAN隧道中传输的效果,能够有效的提高报文的封装效率,使得高效的报文处理成为可能。In a third aspect, the present application also provides a route advertisement method, applied to a first communication device that serves as a source VTEP. For example, the method may include: the first communication device receives a message sent by a second communication device. The route advertisement message includes the route prefix, the next hop, the virtual extended LAN VXLAN network identifier VNI and the first information, wherein the second communication device is used as the destination VTEP, and the next hop is the The network segment address of the destination VTEP, the first information indicates that the destination VTEP supports VXLAN encapsulation optimization; the first communication device saves the association between the network segment address of the destination VTEP, the VNI and the second information, the The second information instructs the source VTEP to encapsulate VXLAN information including the VNI in an IPv6 header. It can be seen that compared with the current VXLAN seal In the installation mode, the first communication device receives the supported VXLAN encapsulation optimization method advertised by the second communication device. It no longer needs to encapsulate UDP headers and VXLAN headers for packets that are about to enter the VXLAN tunnel, and can also forward the VXLAN tunnel required for VXLAN. The information is carried in the packet and sent to the destination VTEP through the VXLAN tunnel to achieve the effect of transmitting the packet in the VXLAN tunnel, which can effectively improve the encapsulation efficiency of the packet and make efficient packet processing possible.
在一些实现方式中,所述保存所述目的VTEP的网段地址、所述VNI和第二信息的关联关系,可以包括:将所述目的VTEP的网段地址、所述VNI和所述第二信息的关联关系保存到转发面。In some implementations, the storing of the association between the network segment address of the destination VTEP, the VNI and the second information may include: storing the network segment address of the destination VTEP, the VNI and the second information. The association of information is saved to the forwarding surface.
作为一个示例,第一信息可以为所述路由通告消息中的属性或扩展团体属性。As an example, the first information may be attributes or extended community attributes in the route advertisement message.
其中,第一信息还指示以下一种或多种:所述IPv6头携带所述VXLAN信息的模式;所述VXLAN信息的长度;所述VNI的长度。第二信息还指示以下一种或多种:所述IPv6头携带所述VXLAN信息的模式;所述VXLAN信息的长度;所述VNI的长度。其中,所述VXLAN信息的模式为全比特模式,所述VXLAN信息的长度为64比特,所述VNI长度为24比特;或者,所述VXLAN信息的模式为省略预留模式,所述VXLAN信息的的长度大于或等于24比特,且所述VXLAN信息的长度小于64比特,所述VNI的长度为24比特;或者,所述VXLAN信息的模式为精简压缩模式,所述VXLAN信息的长度大于或等于M比特,且所述VXLAN信息的长度小于64比特,所述VNI的长度为M比特,所述M为大于或等于1的整数。Wherein, the first information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI. The second information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI. Wherein, the mode of the VXLAN information is an all-bit mode, the length of the VXLAN information is 64 bits, and the VNI length is 24 bits; or the mode of the VXLAN information is an omitted reservation mode, and the length of the VXLAN information is The length of the VXLAN information is greater than or equal to 24 bits, and the length of the VXLAN information is less than 64 bits, and the length of the VNI is 24 bits; or the mode of the VXLAN information is a streamlined compression mode, and the length of the VXLAN information is greater than or equal to M bits, and the length of the VXLAN information is less than 64 bits, the length of the VNI is M bits, and M is an integer greater than or equal to 1.
其中,VXLAN信息还包括以下一项或多项:至少一个标志Flag;预留Reserve字段。Among them, the VXLAN information also includes one or more of the following: at least one Flag; a Reserve field.
在一些实现方式中,该方法还可以包括:第一通信装置接收第一报文;第一通信装置根据所述第一报文的目的地址匹配所述目的VTEP的网段地址,根据所述关联关系获得所述VNI和所述第二信息;第一通信装置根据所述第二信息的指示,对所述第一报文进行封装,获得第二报文,所述第二报文包括第一IPv6头,所述第一IPv6头包括VXLAN信息,所述VXLAN信息包括所述VNI;第一通信装置通过VXLAN隧道向所述第二通信装置发送所述第二报文。如此,第一通信装置基于所保存的内容,能够对所接收的报文按照VXLAN封装优化的方式进行封装,提高了报文的封装效率。In some implementations, the method may further include: the first communication device receives the first message; the first communication device matches the network segment address of the destination VTEP according to the destination address of the first message, and the first communication device matches the network segment address of the destination VTEP according to the association. Obtain the relationship between the VNI and the second information; the first communication device encapsulates the first message according to the instruction of the second information, and obtains a second message, where the second message includes the first IPv6 header, the first IPv6 header includes VXLAN information, and the VXLAN information includes the VNI; the first communication device sends the second message to the second communication device through a VXLAN tunnel. In this way, based on the saved content, the first communication device can encapsulate the received message in a VXLAN encapsulation optimization manner, thereby improving the encapsulation efficiency of the message.
第四方面,本申请还提供了一种路由通告的方法,应用于第二通信装置,该第二通信装置用作目的VTEP,该方法例如可以包括:第二通信装置生成路由通告消息,所述路由通告消息包括路由前缀、下一跳、VXLAN网络标识VNI和第一信息,其中,所述下一跳为所述目的VTEP的网段地址,所述第一信息指示所述目的VTEP支持VXLAN封装优化;第二通信装置向第一通信装置发送所述路由通告消息,所述第一通信装置用作源VTEP。可见,相比目前的VXLAN封装方式,第二通信装置向第一通信装置通告支持VXLAN封装优化的方式,能够对将VXLAN隧道转发所需的VXLAN信息携带在报文的IPv6头中的报文进行处理,实现该报文在VXLAN隧道中有效传输的效果,能够有效的提高报文的封装效率,使得高效的报文处理成为可能。In a fourth aspect, the present application also provides a method for route advertisement, applied to a second communication device that serves as a destination VTEP. For example, the method may include: the second communication device generates a route advertisement message, said The route advertisement message includes a route prefix, a next hop, a VXLAN network identifier VNI, and first information, where the next hop is the network segment address of the destination VTEP, and the first information indicates that the destination VTEP supports VXLAN encapsulation. Optimize; the second communication device sends the route advertisement message to the first communication device, the first communication device serving as the source VTEP. It can be seen that compared with the current VXLAN encapsulation method, the second communication device notifies the first communication device of a method that supports VXLAN encapsulation optimization, and can carry out VXLAN information required for VXLAN tunnel forwarding in the IPv6 header of the packet. Processing, to achieve the effect of effective transmission of the message in the VXLAN tunnel, can effectively improve the encapsulation efficiency of the message, making efficient message processing possible.
在一些实现方式中,第一信息为所述路由通告消息中的属性或扩展团体属性。In some implementations, the first information is an attribute or an extended community attribute in the route advertisement message.
其中,第一信息还指示以下一种或多种:所述IPv6头携带所述VXLAN信息的模式; 所述VXLAN信息的长度;所述VNI的长度。Wherein, the first information also indicates one or more of the following: a mode in which the IPv6 header carries the VXLAN information; The length of the VXLAN information; the length of the VNI.
其中,VXLAN信息还可以包括以下一项或多项:至少一个标志Flag;预留Reserve字段。The VXLAN information may also include one or more of the following: at least one Flag; a Reserve field.
在一些实现方式中,该方法还可以包括:保存所述目的VTEP的网段地址、所述VNI和第二信息的关联关系,所述第二信息指示包括所述VNI的VXLAN信息封装在第六版互联网协议的IPv6头中。In some implementations, the method may further include: saving the association between the network segment address of the destination VTEP, the VNI and second information, the second information indicating that the VXLAN information including the VNI is encapsulated in the sixth version of the Internet Protocol in the IPv6 header.
其中,第二信息还指示以下一种或多种:所述IPv6头携带所述VXLAN信息的模式;所述VXLAN信息的长度;所述VNI的长度。Wherein, the second information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI.
例如,所述VXLAN信息的模式为全比特模式,所述VXLAN信息的长度为64比特,所述VNI长度为24比特;或者,所述VXLAN信息的模式为省略预留模式,所述VXLAN信息的的长度大于或等于24比特,且所述VXLAN信息的长度小于64比特,所述VNI的长度为24比特;或者,所述VXLAN信息的模式为精简压缩模式,所述VXLAN信息的长度大于或等于M比特,且所述VXLAN信息的长度小于64比特,所述VNI的长度为M比特,所述M为大于或等于1的整数。For example, the mode of the VXLAN information is the all-bit mode, the length of the VXLAN information is 64 bits, and the VNI length is 24 bits; or the mode of the VXLAN information is the omitted reservation mode, and the length of the VXLAN information is The length of the VXLAN information is greater than or equal to 24 bits, and the length of the VXLAN information is less than 64 bits, and the length of the VNI is 24 bits; or the mode of the VXLAN information is a streamlined compression mode, and the length of the VXLAN information is greater than or equal to M bits, and the length of the VXLAN information is less than 64 bits, the length of the VNI is M bits, and M is an integer greater than or equal to 1.
在一些实现方式中,该方法还可以包括:第二通信装置通过VXLAN隧道接收所述第一通信装置发送的第一报文,所述第一报文包括IPv6头,所述IPv6头包括所述VXLAN信息;根据所述第一报文的目的地址匹配所述目的VTEP的网段地址,根据所述关联关系获得所述VNI和所述第二信息;基于所述第二信息的指示,从所述第一报文的IPv6头中获得所述VXLAN信息;剥离所述第二报文的所述IPv6头,获得第二报文;根据所述VXLAN信息,转发所述第二报文。如此,第二通信装置基于所保存的内容,能够对所接收的报文按照VXLAN封装优化的方式进行解封装,提高了报文的处理效率。In some implementations, the method may further include: the second communication device receives the first message sent by the first communication device through the VXLAN tunnel, the first message includes an IPv6 header, and the IPv6 header includes the VXLAN information; match the network segment address of the destination VTEP according to the destination address of the first message, and obtain the VNI and the second information according to the association relationship; based on the indication of the second information, obtain the Obtain the VXLAN information from the IPv6 header of the first message; peel off the IPv6 header of the second message to obtain the second message; forward the second message according to the VXLAN information. In this way, based on the saved content, the second communication device can decapsulate the received message in a VXLAN encapsulation-optimized manner, thereby improving message processing efficiency.
第五方面,本申请实施例提供了一种通信装置,所述通信装置可以应用于第一通信装置,所述通信装置包括收发单元和处理单元。In a fifth aspect, embodiments of the present application provide a communication device, which can be applied to a first communication device. The communication device includes a transceiver unit and a processing unit.
在一个示例中:所述收发单元用于执行上述第一方面以及第一方面各种可能的实现方式中由所述第一通信装置所执行的接收和/或发送相关的操作;所述处理单元用于执行上述第一方面以及第一方面各种可能的实现方式中由所述第一通信装置所执行接收和/或发送相关的操作之外的操作。在具体实现中,所述收发单元可以包括接收单元和/或发送单元,接收单元用于执行接收相关的操作,发送单元用于执行发送相关的操作。In one example: the transceiver unit is configured to perform operations related to reception and/or transmission performed by the first communication device in the above first aspect and various possible implementations of the first aspect; the processing unit For performing operations other than reception and/or transmission-related operations performed by the first communication device in the above-mentioned first aspect and various possible implementations of the first aspect. In a specific implementation, the transceiver unit may include a receiving unit and/or a sending unit, the receiving unit is used to perform reception-related operations, and the sending unit is used to perform sending-related operations.
例如,处理单元,用于获得第一报文,所述第一报文包括第六版互联网协议IPv6头,所述IPv6头包括虚拟扩展局域网VXLAN信息,所述VXLAN信息包括VXLAN网络标识VNI;发送单元,用于通过VXLAN隧道向第二通信装置发送所述第一报文,所述第二通信装置用作目的VTEP。For example, the processing unit is configured to obtain a first message, the first message includes a sixth version of the Internet Protocol IPv6 header, the IPv6 header includes virtual extended LAN VXLAN information, and the VXLAN information includes a VXLAN network identifier VNI; send A unit configured to send the first message to a second communication device through a VXLAN tunnel, and the second communication device serves as the destination VTEP.
在一些实现方式中,IPv6头包括目的IPv6地址,所述目的IPv6地址包括所述目的VTEP的网段地址和所述VXLAN信息。作为一个示例,所述VXLAN信息携带在所述目的IPv6地址的后64比特中。例如,所述目的IPv6地址的后64比特全部用于携带所述VXLAN信息。In some implementations, the IPv6 header includes a destination IPv6 address, and the destination IPv6 address includes the network segment address of the destination VTEP and the VXLAN information. As an example, the VXLAN information is carried in the last 64 bits of the destination IPv6 address. For example, all the last 64 bits of the destination IPv6 address are used to carry the VXLAN information.
在另一些实现方式中,所述IPv6头包括源IPv6地址,所述源IPv6地址包括所述源VTEP 的网段地址和所述VXLAN信息。作为一个示例,所述VXLAN信息携带在所述源IPv6地址的后64比特中。例如,所述源IPv6地址的后64比特全部用于携带所述VXLAN信息。In other implementations, the IPv6 header includes a source IPv6 address, and the source IPv6 address includes the source VTEP The network segment address and the VXLAN information. As an example, the VXLAN information is carried in the last 64 bits of the source IPv6 address. For example, all the last 64 bits of the source IPv6 address are used to carry the VXLAN information.
其中,所述VNI的长度为小于或等于24比特。Wherein, the length of the VNI is less than or equal to 24 bits.
其中,所述VXLAN信息还包括以下一项或多项:至少一个标志Flag;预留Reserve字段。Wherein, the VXLAN information also includes one or more of the following: at least one Flag; a Reserve field.
在一些实现方式中,接收单元,用于接收所述目的VTEP发布的路由通告消息,所述路由通告消息包括路由前缀、下一跳、所述VNI和第一信息,其中,所述下一跳为所述目的VTEP的网段地址,所述第一信息指示所述目的VTEP支持VXLAN封装优化;处理单元,还用于保存所述目的VTEP的网段地址、所述VNI和第二信息的关联关系,所述第二信息指示所述源VTEP将包括所述VNI的所述VXLAN信息封装在所述IPv6头中以获得所述第一报文。作为一个示例,处理单元,具体用于:将所述目的VTEP的网段地址、所述VNI和所述第二信息的关联关系保存到转发面。其中,所述第一信息为所述路由通告消息中的属性或扩展团体属性。In some implementations, the receiving unit is configured to receive a route advertisement message published by the destination VTEP. The route advertisement message includes a route prefix, a next hop, the VNI and first information, wherein the next hop is the network segment address of the destination VTEP, and the first information indicates that the destination VTEP supports VXLAN encapsulation optimization; the processing unit is also used to save the association between the network segment address of the destination VTEP, the VNI, and the second information relationship, the second information instructs the source VTEP to encapsulate the VXLAN information including the VNI in the IPv6 header to obtain the first packet. As an example, the processing unit is specifically configured to: save the association relationship between the network segment address of the destination VTEP, the VNI and the second information to the forwarding plane. The first information is an attribute or an extended community attribute in the route advertisement message.
其中,所述第一信息还指示以下一种或多种:所述IPv6头携带所述VXLAN信息的模式;所述VXLAN信息的长度;所述VNI的长度。例如,所述VXLAN信息的模式为全比特模式,所述VXLAN信息的长度为64比特,所述VNI长度为24比特;或者,所述VXLAN信息的模式为省略预留模式,所述VXLAN信息的的长度大于或等于24比特,且所述VXLAN信息的长度小于64比特,所述VNI的长度为24比特;或者,所述VXLAN信息的模式为精简压缩模式,所述VXLAN信息的长度大于或等于M比特,且所述VXLAN信息的长度小于64比特,所述VNI的长度为M比特,所述M为大于或等于1的整数。Wherein, the first information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI. For example, the mode of the VXLAN information is the all-bit mode, the length of the VXLAN information is 64 bits, and the VNI length is 24 bits; or the mode of the VXLAN information is the omitted reservation mode, and the length of the VXLAN information is The length of the VXLAN information is greater than or equal to 24 bits, and the length of the VXLAN information is less than 64 bits, and the length of the VNI is 24 bits; or the mode of the VXLAN information is a streamlined compression mode, and the length of the VXLAN information is greater than or equal to M bits, and the length of the VXLAN information is less than 64 bits, the length of the VNI is M bits, and M is an integer greater than or equal to 1.
在一些实现方式中,处理单元,包括:接收子单元,用于接收第二报文;处理子单元,用于根据所述第二报文的目的地址匹配所述目的VTEP的网段地址,根据所述关联关系获得所述VNI和所述第二信息;所述处理子单元,还用于根据所述第二信息的指示,对所述第二报文进行封装,获得所述第一报文。In some implementations, the processing unit includes: a receiving subunit, configured to receive the second message; and a processing subunit, configured to match the network segment address of the destination VTEP according to the destination address of the second message. The association relationship obtains the VNI and the second information; the processing subunit is also configured to encapsulate the second message according to the instructions of the second information to obtain the first message .
其中,所述第二信息还指示以下一种或多种:所述IPv6头携带所述VXLAN信息的模式;所述VXLAN信息的长度;所述VNI的长度。例如,所述VXLAN信息的模式为全比特模式,所述VXLAN信息的长度为64比特,所述VNI长度为24比特;或者,所述VXLAN信息的模式为省略预留模式,所述VXLAN信息的的长度大于或等于24比特,且所述VXLAN信息的长度小于64比特,所述VNI的长度为24比特;或者,所述VXLAN信息的模式为精简压缩模式,所述VXLAN信息的长度大于或等于M比特,且所述VXLAN信息的长度小于64比特,所述VNI的长度为M比特,所述M为大于或等于1的整数。Wherein, the second information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI. For example, the mode of the VXLAN information is the all-bit mode, the length of the VXLAN information is 64 bits, and the VNI length is 24 bits; or the mode of the VXLAN information is the omitted reservation mode, and the length of the VXLAN information is The length of the VXLAN information is greater than or equal to 24 bits, and the length of the VXLAN information is less than 64 bits, and the length of the VNI is 24 bits; or the mode of the VXLAN information is a streamlined compression mode, and the length of the VXLAN information is greater than or equal to M bits, and the length of the VXLAN information is less than 64 bits, the length of the VNI is M bits, and M is an integer greater than or equal to 1.
在另一个示例中:所述收发单元用于执行上述第三方面以及第三方面各种可能的实现方式中由所述第一通信装置所执行的接收和/或发送相关的操作;所述处理单元用于执行上述第三方面以及第三方面各种可能的实现方式中由所述第一通信装置所执行接收和/或发送相关的操作之外的操作。在具体实现中,所述收发单元可以包括接收单元和/或发送单元,接收单元用于执行接收相关的操作,发送单元用于执行发送相关的操作。In another example: the transceiver unit is configured to perform reception and/or transmission related operations performed by the first communication device in the above third aspect and various possible implementations of the third aspect; the processing The unit is configured to perform operations other than the reception and/or transmission related operations performed by the first communication device in the above third aspect and various possible implementations of the third aspect. In a specific implementation, the transceiver unit may include a receiving unit and/or a sending unit, the receiving unit is used to perform reception-related operations, and the sending unit is used to perform sending-related operations.
例如,接收单元,用于接收第二通信装置发送的路由通告消息,所述路由通告消息包 括路由前缀、下一跳、虚拟扩展局域网VXLAN网络标识VNI和第一信息,其中,所述第二通信装置用作目的VTEP,所述下一跳为所述目的VTEP的网段地址,所述第一信息指示所述目的VTEP支持VXLAN封装优化;处理单元,用于保存所述目的VTEP的网段地址、所述VNI和第二信息的关联关系,所述第二信息指示所述源VTEP将包括所述VNI的VXLAN信息封装在第六版互联网协议IPv6头中。For example, the receiving unit is configured to receive a route advertisement message sent by the second communication device, where the route advertisement message package including route prefix, next hop, virtual extended local area network VXLAN network identification VNI and first information, wherein the second communication device is used as the destination VTEP, the next hop is the network segment address of the destination VTEP, and the The first information indicates that the destination VTEP supports VXLAN encapsulation optimization; the processing unit is configured to save the association between the network segment address of the destination VTEP, the VNI and the second information. The second information indicates that the source VTEP will The VXLAN information including the VNI is encapsulated in the Internet Protocol version 6 IPv6 header.
在一些实现方式中,所述处理单元,具体用于:将所述目的VTEP的网段地址、所述VNI和所述第二信息的关联关系保存到转发面。其中,所述第一信息为所述路由通告消息中的属性或扩展团体属性。In some implementations, the processing unit is specifically configured to save the association relationship between the network segment address of the destination VTEP, the VNI and the second information to the forwarding plane. The first information is an attribute or an extended community attribute in the route advertisement message.
其中,所述第一信息还指示以下一种或多种:所述IPv6头携带所述VXLAN信息的模式;所述VXLAN信息的长度;所述VNI的长度。其中,所述第二信息还指示以下一种或多种:所述IPv6头携带所述VXLAN信息的模式;所述VXLAN信息的长度;所述VNI的长度。例如,所述VXLAN信息的模式为全比特模式,所述VXLAN信息的长度为64比特,所述VNI长度为24比特;或者,所述VXLAN信息的模式为省略预留模式,所述VXLAN信息的的长度大于或等于24比特,且所述VXLAN信息的长度小于64比特,所述VNI的长度为24比特;或者,所述VXLAN信息的模式为精简压缩模式,所述VXLAN信息的长度大于或等于M比特,且所述VXLAN信息的长度小于64比特,所述VNI的长度为M比特,所述M为大于或等于1的整数。Wherein, the first information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI. Wherein, the second information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI. For example, the mode of the VXLAN information is the all-bit mode, the length of the VXLAN information is 64 bits, and the VNI length is 24 bits; or the mode of the VXLAN information is the omitted reservation mode, and the length of the VXLAN information is The length of the VXLAN information is greater than or equal to 24 bits, and the length of the VXLAN information is less than 64 bits, and the length of the VNI is 24 bits; or the mode of the VXLAN information is a streamlined compression mode, and the length of the VXLAN information is greater than or equal to M bits, and the length of the VXLAN information is less than 64 bits, the length of the VNI is M bits, and M is an integer greater than or equal to 1.
其中,所述VXLAN信息还包括以下一项或多项:至少一个标志Flag;预留Reserve字段。Wherein, the VXLAN information also includes one or more of the following: at least one Flag; a Reserve field.
在一些实现方式中,所述接收单元,还用于接收第一报文;所述处理单元,还用于根据所述第一报文的目的地址匹配所述目的VTEP的网段地址,根据所述关联关系获得所述VNI和所述第二信息;所述处理单元,还用于根据所述第二信息的指示,对所述第一报文进行封装,获得第二报文,所述第二报文包括第一IPv6头,所述第一IPv6头包括VXLAN信息,所述VXLAN信息包括所述VNI;发送单元,用于通过VXLAN隧道向所述第二通信装置发送所述第二报文。In some implementations, the receiving unit is further configured to receive the first message; the processing unit is further configured to match the network segment address of the destination VTEP according to the destination address of the first message. Obtain the VNI and the second information based on the association relationship; the processing unit is also configured to encapsulate the first message according to the instructions of the second information to obtain a second message. The second message includes a first IPv6 header, the first IPv6 header includes VXLAN information, and the VXLAN information includes the VNI; a sending unit configured to send the second message to the second communication device through a VXLAN tunnel. .
第六方面,本申请实施例提供了一种通信装置,所述通信装置可以应用于第二通信装置,所述通信装置包括收发单元和处理单元。In a sixth aspect, embodiments of the present application provide a communication device, which can be applied to a second communication device. The communication device includes a transceiver unit and a processing unit.
在一个示例中:所述收发单元用于执行上述第二方面以及第二方面各种可能的实现方式中由所述第二通信装置所执行的接收和/或发送相关的操作;所述处理单元用于执行上述第二方面以及第二方面各种可能的实现方式中由所述第二通信装置所执行接收和/或发送相关的操作之外的操作。在具体实现中,所述收发单元可以包括接收单元和/或发送单元,接收单元用于执行接收相关的操作,发送单元用于执行发送相关的操作。In one example: the transceiver unit is configured to perform reception and/or transmission-related operations performed by the second communication device in the above second aspect and various possible implementations of the second aspect; the processing unit For performing operations other than the reception and/or transmission-related operations performed by the second communication device in the above-mentioned second aspect and various possible implementations of the second aspect. In a specific implementation, the transceiver unit may include a receiving unit and/or a sending unit, the receiving unit is used to perform reception-related operations, and the sending unit is used to perform sending-related operations.
例如,接收单元,用于通过虚拟扩展局域网VXLAN隧道接收第一通信装置发送的第一报文,所述第一报文包括第六版互联网协议IPv6头,所述IPv6头包括VXLAN信息,所述VXLAN信息包括VXLAN网络标识VNI,所述第一通信装置用作源VTEP;处理单元,用于根据所述VXLAN信息对所述第一报文进行处理。For example, the receiving unit is configured to receive the first message sent by the first communication device through the virtual extended local area network VXLAN tunnel, the first message includes the sixth version of the Internet Protocol IPv6 header, the IPv6 header includes VXLAN information, and the The VXLAN information includes a VXLAN network identifier VNI, and the first communication device is used as a source VTEP; a processing unit is used to process the first message according to the VXLAN information.
在一些实现方式中,IPv6头包括目的IPv6地址,所述目的IPv6地址包括所述目的VTEP 的网段地址和所述VXLAN信息。作为一个示例,所述VXLAN信息携带在所述目的IPv6地址的后64比特中。例如,所述目的IPv6地址的后64比特全部用于携带所述VXLAN信息。In some implementations, the IPv6 header includes a destination IPv6 address, and the destination IPv6 address includes the destination VTEP. The network segment address and the VXLAN information. As an example, the VXLAN information is carried in the last 64 bits of the destination IPv6 address. For example, all the last 64 bits of the destination IPv6 address are used to carry the VXLAN information.
在另一些实现方式中,所述IPv6头包括源IPv6地址,所述源IPv6地址包括所述源VTEP的网段地址和所述VXLAN信息。作为一个示例,所述VXLAN信息携带在所述源IPv6地址的后64比特中。例如,所述源IPv6地址的后64比特全部用于携带所述VXLAN信息。In other implementations, the IPv6 header includes a source IPv6 address, and the source IPv6 address includes the network segment address of the source VTEP and the VXLAN information. As an example, the VXLAN information is carried in the last 64 bits of the source IPv6 address. For example, all the last 64 bits of the source IPv6 address are used to carry the VXLAN information.
其中,所述VNI的长度为小于或等于24比特。Wherein, the length of the VNI is less than or equal to 24 bits.
其中,所述VXLAN信息还包括以下一项或多项:至少一个标志Flag;预留Reserve字段。Wherein, the VXLAN information also includes one or more of the following: at least one Flag; a Reserve field.
在一些实现方式中,发送单元,用于向所述源VTEP发布的路由通告消息,所述路由通告消息包括路由前缀、下一跳、所述VNI和第一信息,其中,所述下一跳为所述目的VTEP的网段地址,所述第一信息指示所述目的VTEP支持VXLAN封装优化。其中,所述第一信息为所述路由通告消息中的属性或扩展团体属性。In some implementations, the sending unit is configured to publish a route advertisement message to the source VTEP. The route advertisement message includes a route prefix, a next hop, the VNI and first information, wherein the next hop is the network segment address of the destination VTEP, and the first information indicates that the destination VTEP supports VXLAN encapsulation optimization. The first information is an attribute or an extended community attribute in the route advertisement message.
其中,第一信息还指示以下一种或多种:所述IPv6头携带所述VXLAN信息的模式;所述VXLAN信息的长度;所述VNI的长度。例如,所述VXLAN信息的模式为全比特模式,所述VXLAN信息的长度为64比特,所述VNI长度为24比特;或者,所述VXLAN信息的模式为省略预留模式,所述VXLAN信息的的长度大于或等于24比特,且所述VXLAN信息的长度小于64比特,所述VNI的长度为24比特;或者,所述VXLAN信息的模式为精简压缩模式,所述VXLAN信息的长度大于或等于M比特,且所述VXLAN信息的长度小于64比特,所述VNI的长度为M比特,所述M为大于或等于1的整数。Wherein, the first information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI. For example, the mode of the VXLAN information is the all-bit mode, the length of the VXLAN information is 64 bits, and the VNI length is 24 bits; or the mode of the VXLAN information is the omitted reservation mode, and the length of the VXLAN information is The length of the VXLAN information is greater than or equal to 24 bits, and the length of the VXLAN information is less than 64 bits, and the length of the VNI is 24 bits; or the mode of the VXLAN information is a streamlined compression mode, and the length of the VXLAN information is greater than or equal to M bits, and the length of the VXLAN information is less than 64 bits, the length of the VNI is M bits, and M is an integer greater than or equal to 1.
在一些实现方式中,处理单元,还用于保存所述目的VTEP的网段地址、所述VNI和第二信息的关联关系,所述第二信息指示包括所述VNI的所述VXLAN信息封装在所述第一报文的所述IPv6头中。In some implementations, the processing unit is also configured to save the association between the network segment address of the destination VTEP, the VNI, and second information. The second information indicates that the VXLAN information including the VNI is encapsulated in in the IPv6 header of the first packet.
其中,第二信息还指示以下一种或多种:所述IPv6头携带所述VXLAN信息的模式;所述VXLAN信息的长度;所述VNI的长度。例如,所述VXLAN信息的模式为全比特模式,所述VXLAN信息的长度为64比特,所述VNI长度为24比特;或者,所述VXLAN信息的模式为省略预留模式,所述VXLAN信息的的长度大于或等于24比特,且所述VXLAN信息的长度小于64比特,所述VNI的长度为24比特;或者,所述VXLAN信息的模式为精简压缩模式,所述VXLAN信息的长度大于或等于M比特,且所述VXLAN信息的长度小于64比特,所述VNI的长度为M比特,所述M为大于或等于1的整数。Wherein, the second information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI. For example, the mode of the VXLAN information is the all-bit mode, the length of the VXLAN information is 64 bits, and the VNI length is 24 bits; or the mode of the VXLAN information is the omitted reservation mode, and the length of the VXLAN information is The length of the VXLAN information is greater than or equal to 24 bits, and the length of the VXLAN information is less than 64 bits, and the length of the VNI is 24 bits; or the mode of the VXLAN information is a streamlined compression mode, and the length of the VXLAN information is greater than or equal to M bits, and the length of the VXLAN information is less than 64 bits, the length of the VNI is M bits, and M is an integer greater than or equal to 1.
在一些实现方式中,所述处理单元,包括:匹配子单元,用于根据所述第一报文的目的地址匹配所述目的VTEP的网段地址,根据所述关联关系获得所述VNI和所述第二信息;第一获得子单元,用于基于所述第二信息的指示,从所述第一报文的IPv6头中获得所述VXLAN信息;第二获得子单元,用于剥离所述第二报文的所述IPv6头,获得第二报文;转发子单元,用于根据所述VXLAN信息,转发所述第二报文。In some implementations, the processing unit includes: a matching subunit, configured to match the network segment address of the destination VTEP according to the destination address of the first message, and obtain the VNI and the destination address according to the association relationship. the second information; the first obtaining subunit is used to obtain the VXLAN information from the IPv6 header of the first message based on the indication of the second information; the second obtaining subunit is used to strip the The IPv6 header of the second message is used to obtain the second message; the forwarding subunit is used to forward the second message according to the VXLAN information.
在另一个示例中:所述收发单元用于执行上述第四方面以及第四方面各种可能的实现方式中由所述第二通信装置所执行的接收和/或发送相关的操作;所述处理单元用于执行上 述第四方面以及第四方面各种可能的实现方式中由所述第二通信装置所执行接收和/或发送相关的操作之外的操作。在具体实现中,所述收发单元可以包括接收单元和/或发送单元,接收单元用于执行接收相关的操作,发送单元用于执行发送相关的操作。In another example: the transceiver unit is configured to perform reception and/or transmission-related operations performed by the second communication device in the above-mentioned fourth aspect and various possible implementations of the fourth aspect; the processing unit for execution Operations other than the receiving and/or sending related operations performed by the second communication device in the fourth aspect and various possible implementations of the fourth aspect. In a specific implementation, the transceiver unit may include a receiving unit and/or a sending unit, the receiving unit is used to perform reception-related operations, and the sending unit is used to perform sending-related operations.
例如,处理单元,用于生成路由通告消息,所述路由通告消息包括路由前缀、下一跳、虚拟扩展局域网VXLAN网络标识VNI和第一信息,其中,所述下一跳为所述目的VTEP的网段地址,所述第一信息指示所述目的VTEP支持VXLAN封装优化;发送单元,用于向第一通信装置发送所述路由通告消息,所述第一通信装置用作源VTEP。其中,第一信息为所述路由通告消息中的属性或扩展团体属性。For example, the processing unit is configured to generate a route advertisement message. The route advertisement message includes a route prefix, a next hop, a virtual extended LAN VXLAN network identifier VNI and first information, where the next hop is the destination VTEP. The network segment address, the first information indicates that the destination VTEP supports VXLAN encapsulation optimization; the sending unit is configured to send the route advertisement message to the first communication device, and the first communication device serves as the source VTEP. The first information is an attribute or an extended community attribute in the route advertisement message.
其中,所述第一信息还指示以下一种或多种:所述IPv6头携带所述VXLAN信息的模式;所述VXLAN信息的长度;所述VNI的长度。例如,所述VXLAN信息的模式为全比特模式,所述VXLAN信息的长度为64比特,所述VNI长度为24比特;或者,所述VXLAN信息的模式为省略预留模式,所述VXLAN信息的的长度大于或等于24比特,且所述VXLAN信息的长度小于64比特,所述VNI的长度为24比特;或者,所述VXLAN信息的模式为精简压缩模式,所述VXLAN信息的长度大于或等于M比特,且所述VXLAN信息的长度小于64比特,所述VNI的长度为M比特,所述M为大于或等于1的整数。Wherein, the first information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI. For example, the mode of the VXLAN information is the all-bit mode, the length of the VXLAN information is 64 bits, and the VNI length is 24 bits; or the mode of the VXLAN information is the omitted reservation mode, and the length of the VXLAN information is The length of the VXLAN information is greater than or equal to 24 bits, and the length of the VXLAN information is less than 64 bits, and the length of the VNI is 24 bits; or the mode of the VXLAN information is a streamlined compression mode, and the length of the VXLAN information is greater than or equal to M bits, and the length of the VXLAN information is less than 64 bits, the length of the VNI is M bits, and M is an integer greater than or equal to 1.
其中,VXLAN信息还包括以下一项或多项:至少一个标志Flag;预留Reserve字段。Among them, the VXLAN information also includes one or more of the following: at least one Flag; a Reserve field.
在一些实现方式中,所述处理单元,还用于保存所述目的VTEP的网段地址、所述VNI和第二信息的关联关系,所述第二信息指示包括所述VNI的VXLAN信息封装在第六版互联网协议的IPv6头中。In some implementations, the processing unit is also configured to save the association between the network segment address of the destination VTEP, the VNI, and second information. The second information indicates that the VXLAN information including the VNI is encapsulated in In the IPv6 header of Internet Protocol version 6.
其中,第二信息还指示以下一种或多种:所述IPv6头携带所述VXLAN信息的模式;所述VXLAN信息的长度;所述VNI的长度。例如,所述VXLAN信息的模式为全比特模式,所述VXLAN信息的长度为64比特,所述VNI长度为24比特;或者,所述VXLAN信息的模式为省略预留模式,所述VXLAN信息的的长度大于或等于24比特,且所述VXLAN信息的长度小于64比特,所述VNI的长度为24比特;或者,所述VXLAN信息的模式为精简压缩模式,所述VXLAN信息的长度大于或等于M比特,且所述VXLAN信息的长度小于64比特,所述VNI的长度为M比特,所述M为大于或等于1的整数。Wherein, the second information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI. For example, the mode of the VXLAN information is the all-bit mode, the length of the VXLAN information is 64 bits, and the VNI length is 24 bits; or the mode of the VXLAN information is the omitted reservation mode, and the length of the VXLAN information is The length of the VXLAN information is greater than or equal to 24 bits, and the length of the VXLAN information is less than 64 bits, and the length of the VNI is 24 bits; or the mode of the VXLAN information is a streamlined compression mode, and the length of the VXLAN information is greater than or equal to M bits, and the length of the VXLAN information is less than 64 bits, the length of the VNI is M bits, and M is an integer greater than or equal to 1.
在一些实现方式中,接收单元,用于通过VXLAN隧道接收所述第一通信装置发送的第一报文,所述第一报文包括IPv6头,所述IPv6头包括所述VXLAN信息;所述处理单元,还用于根据所述第一报文的目的地址匹配所述目的VTEP的网段地址,根据所述关联关系获得所述VNI和所述第二信息;所述处理单元,还用于基于所述第二信息的指示,从所述第一报文的IPv6头中获得所述VXLAN信息;所述处理单元,还用于剥离所述第二报文的所述IPv6头,获得第二报文;所述发送单元,还用于根据所述VXLAN信息,转发所述第二报文。In some implementations, the receiving unit is configured to receive the first message sent by the first communication device through the VXLAN tunnel, the first message includes an IPv6 header, and the IPv6 header includes the VXLAN information; The processing unit is also configured to match the network segment address of the destination VTEP according to the destination address of the first message, and obtain the VNI and the second information according to the association relationship; the processing unit is also configured to Based on the indication of the second information, obtain the VXLAN information from the IPv6 header of the first message; the processing unit is also configured to strip the IPv6 header of the second message to obtain the second message; the sending unit is further configured to forward the second message according to the VXLAN information.
第七方面,本申请提供了一种通信装置,所述通信装置包括存储器和处理器;所述存储器,用于存储程序代码;所述处理器,用于运行所述程序代码中的指令,使得所述通信装置执行以上第一方面以及第一方面任意一项所述的方法,或者,使得所述通信装置执行以上第二方面以及第二方面任意一项所述的方法,或者,使得所述通信装置执行以上第三 方面以及第三方面任意一项所述的方法,或者,使得所述通信装置执行以上第四方面以及第四方面任意一项所述的方法。In a seventh aspect, the present application provides a communication device. The communication device includes a memory and a processor; the memory is used to store program code; the processor is used to run instructions in the program code, so that The communication device performs the above first aspect and the method described in any one of the first aspects, or causes the communication device to perform the above second aspect and the method described in any one of the second aspects, or causes the The communication device performs the above third The method described in any one of the above aspects and the third aspect, or causing the communication device to perform the method described in any one of the above fourth aspect and the fourth aspect.
第八方面,本申请提供了一种通信装置,所述通信装置包括通信接口和处理器,通过所述通信接口和所述处理器,使得所述通信装置执行前述任一方面所述的方法以及任一方面所述的方法的任一实现方式的部分或全部操作。一种具体的实现方式中,所述通信接口用于执行以上第一方面以及第一方面任意一项所述的通信装置执行的收发操作,所述处理器用于执行以上第一方面以及第一方面任意一项所述的通信装置执行的除收发操作之外的其它操作;或者,所述通信接口用于执行以上第二方面以及第二方面任意一项所述的通信装置执行的收发操作,所述处理器用于执行以上第二方面以及第二方面任意一项所述的通信装置执行的除收发操作之外的其它操作;或者,所述通信接口用于执行以上第三方面以及第三方面任意一项所述的通信装置执行的收发操作,所述处理器用于执行以上第三方面以及第三方面任意一项所述的通信装置执行的除收发操作之外的其它操作;或者,所述通信接口用于执行以上第四方面以及第四方面任意一项所述的通信装置执行的收发操作,所述处理器用于执行以上第四方面以及第四方面任意一项所述的通信装置执行的除收发操作之外的其它操作。In an eighth aspect, the present application provides a communication device. The communication device includes a communication interface and a processor. Through the communication interface and the processor, the communication device is caused to execute the method described in any of the preceding aspects and Part or all of the operations of any implementation of the method described in any aspect. In a specific implementation manner, the communication interface is used to perform the sending and receiving operations performed by the communication device described in any one of the above first aspect and the first aspect, and the processor is used to perform the above first aspect and the first aspect. Other operations other than the transceiver operation performed by the communication device described in any one of the above; or, the communication interface is used to perform the transceiver operation performed by the communication device according to any one of the above second aspect and the second aspect, so The processor is used to perform other operations other than the sending and receiving operations performed by the communication device described in any one of the above second aspect and the second aspect; or, the communication interface is used to perform the above third aspect and any one of the third aspects. A transceiver operation performed by the communication device described in one of the above, the processor is configured to perform other operations other than the transceiver operation performed by the communication device described in any one of the above third aspect and the third aspect; or, the communication The interface is used to perform the transceiver operation performed by the communication device described in any one of the fourth aspect and the fourth aspect, and the processor is used to perform the except operation performed by the communication device described in any one of the fourth aspect and the fourth aspect. Operations other than sending and receiving operations.
第九方面,本申请实施例提供了一种计算机可读存储介质,包括指令或计算机程序,当其在处理器上运行时,执行以上第一方面以及第一方面任意一项所述的方法,或者执行以上第二方面以及第二方面任意一项所述的方法,或者执行以上第三方面以及第三方面任意一项所述的方法,或者执行以上第四方面以及第四方面任意一项所述的方法。In a ninth aspect, embodiments of the present application provide a computer-readable storage medium, including instructions or computer programs that, when run on a processor, execute the above first aspect and the method described in any one of the first aspects, Or perform the above second aspect and the method described in any one of the second aspect, or perform the above third aspect and the method described in any one of the third aspect, or perform the above fourth aspect and any one of the fourth aspect. method described.
第十方面,本申请实施例提供了一种计算机程序产品,包括计算机程序产品,当其在处理器上运行时,执行以上第一方面以及第一方面任意一项所述的方法,或者执行以上第二方面以及第二方面任意一项所述的方法,或者执行以上第三方面以及第三方面任意一项所述的方法,或者执行以上第四方面以及第四方面任意一项所述的方法。In a tenth aspect, embodiments of the present application provide a computer program product, including a computer program product that, when run on a processor, executes the above first aspect and the method described in any one of the first aspects, or executes the above The second aspect and the method described in any one of the second aspect, or perform the above third aspect and the method described in any one of the third aspect, or perform the above fourth aspect and the method described in any one of the fourth aspect .
第十一方面,本申请实施例提供了一种通信系统,所述通信系统包括以下至少两项:执行以上第一方面以及以上第一方面任意一项所述的方法的第一通信装置、执行以上第二方面以及以上第二方面任意一项所述的方法的第二通信装置。In an eleventh aspect, embodiments of the present application provide a communication system, which includes at least two of the following: a first communication device that performs the above first aspect and the method described in any one of the above first aspects; The second communication device of the above second aspect and the method described in any one of the above second aspects.
第十二方面,本申请实施例提供了一种通信系统,所述通信系统包括以下至少两项:执行以上第三方面以及以上第三方面任意一项所述的方法的第一通信装置、执行以上第四方面以及以上第四方面任意一项所述的方法的第二通信装置。In a twelfth aspect, embodiments of the present application provide a communication system, which includes at least two of the following: a first communication device that performs the above third aspect and the method described in any one of the above third aspects; The fourth aspect above and the second communication device of the method described in any one of the above fourth aspects.
附图说明Description of the drawings
图1为本申请实施例适用的网络场景的结构示意图;Figure 1 is a schematic structural diagram of a network scenario applicable to the embodiment of the present application;
图2a为图1所示的场景中采用目前的VXLAN6封装方式处理L2业务的示意图;Figure 2a is a schematic diagram of using the current VXLAN6 encapsulation method to process L2 services in the scenario shown in Figure 1;
图2b为图1所示的场景中采用VXLAN6封装优化方式处理L2业务的示意图;Figure 2b is a schematic diagram of using VXLAN6 encapsulation optimization method to process L2 services in the scenario shown in Figure 1;
图3a为图1所示的场景中采用目前的VXLAN6封装方式处理L3业务的示意图;Figure 3a is a schematic diagram of using the current VXLAN6 encapsulation method to process L3 services in the scenario shown in Figure 1;
图3b为图1所示的场景中采用VXLAN6封装优化方式处理L3业务的示意图;Figure 3b is a schematic diagram of using VXLAN6 encapsulation optimization method to process L3 services in the scenario shown in Figure 1;
图4a为本申请实施例中携带指示信息3的属性的格式示意图;Figure 4a is a schematic diagram of the format of attributes carrying indication information 3 in the embodiment of the present application;
图4b为本申请实施例中携带指示信息3的属性的一实例的格式示意图; Figure 4b is a schematic format diagram of an example of attributes carrying indication information 3 in the embodiment of the present application;
图5为本申请实施例提供的方法100的流程示意图;Figure 5 is a schematic flowchart of the method 100 provided by the embodiment of the present application;
图6为本申请实施例中一种VXLAN信息的示意图;Figure 6 is a schematic diagram of VXLAN information in an embodiment of the present application;
图7为本申请实施例提供的一种第一通信装置的结构示意图;Figure 7 is a schematic structural diagram of a first communication device provided by an embodiment of the present application;
图8为本申请实施例提供的一种第一通信装置的结构示意图;Figure 8 is a schematic structural diagram of a first communication device provided by an embodiment of the present application;
图9为本申请实施例提供的一种第二通信装置的结构示意图;Figure 9 is a schematic structural diagram of a second communication device provided by an embodiment of the present application;
图10为本申请实施例提供的一种第二通信装置的结构示意图;Figure 10 is a schematic structural diagram of a second communication device provided by an embodiment of the present application;
图11为本申请实施例提供的一种通信装置的结构示意图;Figure 11 is a schematic structural diagram of a communication device provided by an embodiment of the present application;
图12为本申请实施例提供的一种通信装置的结构示意图。Figure 12 is a schematic structural diagram of a communication device provided by an embodiment of the present application.
具体实施方式Detailed ways
许多网络(如DCN)中会使用VXLAN技术。以电信云的VXLAN6分布式方案组网为例,网络底层(underlay)为IPv6单栈(IPv6Only,也称为纯IPv6),网络设备均为IPv6地址;叶子节点(Leaf)部署IPv6网络虚拟边缘NVE(Network Virtualization Edge),IPv6NVE配置VTEP为IPv6地址;VTEP的IPv6地址通过underlay协议发布虚拟专用网(Virtual Private Network,VPN)路由;汇聚节点(Spine)作为路由反射器(Route Reflector,RR),将Leaf发布的VPN路由反射给其他的Leaf,使得所有Leaf通过RR学习到其他Leaf发布的VPN路由,并基于下一跳和路由指定的封装属性创建VXLAN6隧道。如此,待传输的报文即可通过所创建的VXLAN隧道传输。VXLAN technology is used in many networks (such as DCN). Taking the VXLAN6 distributed solution networking of Telecom Cloud as an example, the network underlay is IPv6 single stack (IPv6Only, also known as pure IPv6), and network devices are all IPv6 addresses; the leaf nodes (Leaf) deploy IPv6 network virtual edge NVE (Network Virtualization Edge), IPv6NVE configures VTEP as an IPv6 address; the IPv6 address of VTEP publishes Virtual Private Network (VPN) routes through the underlay protocol; the aggregation node (Spine) serves as a route reflector (Route Reflector, RR), The VPN routes published by Leaf are reflected to other Leaf, so that all Leaf learn the VPN routes published by other Leaf through RR, and create VXLAN6 tunnels based on the next hop and the encapsulation attributes specified by the route. In this way, the packets to be transmitted can be transmitted through the created VXLAN tunnel.
目前,在创建好VXLAN隧道后,利用该VXLAN隧道对待传输的报文进行转发的过程可以包括:VXLAN隧道的源VTEP(也可以称为VXLAN隧道的头节点)对待传输的报文依次封装VXLAN头、UDP头、IP头和外层以太头得到处理后的报文,并将该处理后的报文在VXLAN隧道转发。可见,报文通过VXLAN隧道传输,按照目前的处理方式,需要封装的层数较多且复杂,报文的封装效率较低。Currently, after a VXLAN tunnel is created, the process of using the VXLAN tunnel to forward the packets to be transmitted may include: the source VTEP of the VXLAN tunnel (which can also be called the head node of the VXLAN tunnel) encapsulates the VXLAN headers in sequence for the packets to be transmitted. , UDP header, IP header and outer Ethernet header to obtain the processed message, and forward the processed message in the VXLAN tunnel. It can be seen that packets are transmitted through VXLAN tunnels. According to the current processing method, the number of encapsulation layers required is large and complex, and the packet encapsulation efficiency is low.
特别是,随着IP从IPv4到IPv6的演进,VXLAN也从VXLAN4逐渐演进到VXLAN6。如果将VXLAN4技术中对待传输报文的封装方式,直接应用到VXLAN6中,由于针对VXLAN隧道所封装的头较多,且IPv6头相比IPv4头更为复杂,IPv6地址相比IPv4地址更长等原因,导致报文封装效率会进一步降低。In particular, as IP evolves from IPv4 to IPv6, VXLAN also gradually evolves from VXLAN4 to VXLAN6. If the encapsulation method for transmitting packets in VXLAN4 technology is directly applied to VXLAN6, because there are more headers encapsulated for VXLAN tunnels, the IPv6 header is more complex than the IPv4 header, and the IPv6 address is longer than the IPv4 address, etc. For this reason, the packet encapsulation efficiency will be further reduced.
基于此,本申请实施例提供了一种VXLAN6封装优化(也可以称为IPv6+或VXLAN6+)的技术方案,通过VXLAN隧道的源VTEP将VXLAN信息封装在即将进入该VXLAN隧道的报文的IPv6头中,通过VXLAN隧道转发到该VXLAN隧道的目的VTEP,该VXLAN信息中至少包括VXLAN网络标识(VXLAN Network Identifier,VNI)。如此,相比目前的VXLAN封装方式,该VXLAN封装优化的方式,无需再为即将进入VXLAN隧道的报文封装UDP头和VXLAN头,也能够将VXLAN隧道转发所需的VXLAN信息携带在报文中通过VXLAN隧道发送到目的VTEP,实现该报文在VXLAN隧道中传输的效果,可见,本申请实施例提供的VXLAN封装优化的方式,能够有效的提高报文的封装效率,使得高效的报文处理成为可能。其中,提高报文的封装效率,可以理解为:通过该方法使得VXLAN隧道中传输的报文长度变小,VXLAN隧道的源VTEP对报文的封装速度更快,VXLAN隧道的源VTEP和中间节点对报文的处理速度更快,在带宽不变的情况下VXLAN隧道的源 VTEP和中间节点能够处理更多的报文。Based on this, embodiments of this application provide a technical solution for VXLAN6 encapsulation optimization (which can also be called IPv6+ or VXLAN6+). The VXLAN information is encapsulated in the IPv6 header of the packet that is about to enter the VXLAN tunnel through the source VTEP of the VXLAN tunnel. , forwarded to the destination VTEP of the VXLAN tunnel through the VXLAN tunnel, and the VXLAN information at least includes a VXLAN Network Identifier (VNI). In this way, compared with the current VXLAN encapsulation method, this optimized VXLAN encapsulation method no longer needs to encapsulate UDP headers and VXLAN headers for packets that are about to enter the VXLAN tunnel, and can also carry the VXLAN information required for VXLAN tunnel forwarding in the packets. Send the message to the destination VTEP through the VXLAN tunnel to achieve the effect of transmitting the message in the VXLAN tunnel. It can be seen that the VXLAN encapsulation optimization method provided by the embodiment of this application can effectively improve the encapsulation efficiency of the message and enable efficient message processing. become possible. Among them, improving the packet encapsulation efficiency can be understood as: this method makes the length of the packet transmitted in the VXLAN tunnel smaller, the source VTEP of the VXLAN tunnel encapsulates the packet faster, the source VTEP of the VXLAN tunnel and the intermediate node The processing speed of packets is faster, and the source of the VXLAN tunnel remains unchanged when the bandwidth is unchanged. VTEP and intermediate nodes can handle more packets.
本申请实施例中,网络中各通信装置的VTEP地址从128比特调整为小于128比特的网段地址,例如调整为64比特的VTEP的网段地址,使得封装报文的IPv6头时,可以将调整后的VTEP的网段地址和VXLAN信息拼接后的内容填入该IPv6头中,例如,将该调整后的VTEP的网段地址和VXLAN信息拼接后的内容填入IPv6头中用于承载地址的字段(目的IPv6地址字段或源IPv6地址字段)。如此,无需在报文中再封装UDP头和VXLAN头,即可将VXLAN信息以该高效的方式携带到需要使用该VXLAN信息的目的VTEP,实现了VXLAN6封装效率的提升和优化。In the embodiment of the present application, the VTEP address of each communication device in the network is adjusted from 128 bits to a network segment address less than 128 bits, for example, adjusted to a 64-bit VTEP network segment address, so that when encapsulating the IPv6 header of the message, the The adjusted network segment address of the VTEP and the concatenated content of the VXLAN information are filled in the IPv6 header. For example, the adjusted content of the VTEP network segment address and the concatenated VXLAN information are filled in the IPv6 header to carry the address. field (destination IPv6 address field or source IPv6 address field). In this way, the VXLAN information can be carried to the destination VTEP that needs to use the VXLAN information in this efficient manner without encapsulating the UDP header and VXLAN header in the message, thereby improving and optimizing the VXLAN6 encapsulation efficiency.
下面以图1所示的网络场景,对目前的VXLAN6封装方式和本申请实施例提供的VXLAN6封装优化方式进行对比说明。The following uses the network scenario shown in Figure 1 to compare and explain the current VXLAN6 encapsulation method and the VXLAN6 encapsulation optimization method provided by the embodiment of this application.
举例来说,本申请实施例适用的网络场景例如可以包括图1所示的网络场景。参见图1,该网络场景中包括:通信装置1、通信装置2、通信装置3、终端设备4、终端设备5和通信装置6,终端设备4依次经过通信装置1、通信装置3、通信装置2连接终端设备5,通信装置3还连接通信装置6。图1所示的网络场景中,通信装置1和通信装置2之间可以包括N(N为大于或等于0的整数)个中间通信装置,图1中以通信装置1和通信装置2之间包括一个通信装置3为例说明。例如,通信装置1和通信装置2可以是Leaf,通信装置3可以是作为RR的Spine。For example, the network scenarios to which the embodiments of this application are applicable may include the network scenario shown in Figure 1 . Referring to Figure 1, the network scene includes: communication device 1, communication device 2, communication device 3, terminal device 4, terminal device 5 and communication device 6. Terminal device 4 passes through communication device 1, communication device 3 and communication device 2 in sequence. The terminal device 5 is connected, and the communication device 3 is also connected to the communication device 6 . In the network scenario shown in Figure 1, N (N is an integer greater than or equal to 0) intermediate communication devices may be included between communication device 1 and communication device 2. In Figure 1, communication device 1 and communication device 2 include A communication device 3 is taken as an example. For example, communication device 1 and communication device 2 may be Leaf, and communication device 3 may be Spine as an RR.
其中,通信装置1到通信装置2建立VXLAN6隧道,通信装置1、通信装置2分别作为该VXLAN6隧道的源VTEP和目的VTEP,对应的VTEP地址分别为10:1::1和10:2::1,属于广播域(Broadcast Domain,BD)1,VNI为1001。通信装置1上用于连接到通信装置3的接口的媒体存取控制(Media Access Control,MAC)地址为BB-1-1,通信装置3上用于连接通信装置1的接口以及用于连接通信装置2的接口的MAC地址为AA-1-1,通信装置2上用于连接通信装置3的接口的MAC地址为CC-1-1。通信装置1的MAC地址为A-A-A,通信装置2的MAC地址为C-C-C,通信装置3的MAC地址为B-B-B。终端设备4的IP地址为10.1.1.1,MAC地址为1-1-1,终端设备5的IP地址为10.1.1.2,MAC地址为2-2-2。Among them, communication device 1 establishes a VXLAN6 tunnel to communication device 2. Communication device 1 and communication device 2 serve as the source VTEP and destination VTEP of the VXLAN6 tunnel respectively, and the corresponding VTEP addresses are 10:1::1 and 10:2:: respectively. 1. It belongs to Broadcast Domain (BD) 1 and the VNI is 1001. The Media Access Control (MAC) address of the interface on the communication device 1 for connecting to the communication device 3 is BB-1-1. The interface on the communication device 3 for connecting to the communication device 1 and the interface for connecting communication The MAC address of the interface of device 2 is AA-1-1, and the MAC address of the interface on communication device 2 for connecting to communication device 3 is CC-1-1. The MAC address of communication device 1 is A-A-A, the MAC address of communication device 2 is C-C-C, and the MAC address of communication device 3 is B-B-B. The IP address of terminal device 4 is 10.1.1.1 and the MAC address is 1-1-1, and the IP address and MAC address of terminal device 5 is 10.1.1.2 and 2-2-2.
以二层(layer 2,L2)业务为例,如图2a所示,按照目前的VXLAN6封装方式在VXLAN隧道中传输报文的过程例如可以包括:S11,通信装置1接收终端设备4发送的报文1,报文1可以包括目的MAC地址(DMAC):2-2-2、源MAC地址(SMAC):1-1-1、源IPv6地址(SIPv6):10.1.1.1、目的IPv6地址(DIPv6):10.1.1.2和有效载荷(payload)。S12,通信装置1根据报文1的目的MAC地址查MAC表,获得VXLAN6信息,并对报文1进行封装获得报文2。其中,报文2可以包括:payload、内层以太头(Inner Eth)、VXLAN头、UDP头、IPv6头和外层以太头(Outer Eth),内层以太头包括包括DMAC:2-2-2和SMAC:1-1-1,VXLAN头可以包括但不限于至少一个标志(Flag)和VNI:1001;UDP头包括源端口(SPort)和目的端口(DPort),其中,目的端口为4789,指示该报文为VXLAN报文;IPv6头包括但不限于版本(Version)字段、流标签(Flow Label)字段、下一个头(NxtHdr)字段、源IPv6地址(SIPv6)字段和目的IPv6地址(DIPv6)字段,其中,版本字段的值用于指示适用的协议版本为IPv6,下一个头字段的值用于指示该IPv6头的下一 个头为UDP头,源IPv6地址字段的值为10:1::1,目的IPv6地址字段的值为10:2::1;外层以太头中包括目的MAC地址(DMAC):AA-1-1和源MAC地址(SMAC):BB-1-1。S13,通信装置1将报文2发送给通信装置3,通信装置3根据报文2中IPv6头将报文2处理为报文3并转发到通信装置2,其中,报文3和报文2的区别仅包括:将外层以太头中的DMAC字段的值修改为通信装置2的MAC地址:CC-1-1,SMAC字段的值修改为通信装置3的MAC地址:AA-1-1。S14,通信装置2接收到报文3后,根据UDP头中的目的端口4789确定该报文3为VXLAN报文,然后从报文3的VXLAN头中获得VNI:1001,从而根据VNI:1001查找对应的BD,在BD内查MAC进行转发报文4,报文4为报文3剥离了外层以太头、IPv6头、UDP头和VXLAN头后获得的报文,该报文4可以和报文1包括相同的内容。S15,终端设备5接收报文4。Taking layer 2 (L2) service as an example, as shown in Figure 2a, the process of transmitting messages in a VXLAN tunnel according to the current VXLAN6 encapsulation method may include: S11, the communication device 1 receives the message sent by the terminal device 4. Message 1, message 1 can include destination MAC address (DMAC): 2-2-2, source MAC address (SMAC): 1-1-1, source IPv6 address (SIPv6): 10.1.1.1, destination IPv6 address (DIPv6 ): 10.1.1.2 and payload. S12: Communication device 1 looks up the MAC table according to the destination MAC address of message 1, obtains the VXLAN6 information, and encapsulates message 1 to obtain message 2. Among them, message 2 can include: payload, inner Ether header (Inner Eth), VXLAN header, UDP header, IPv6 header and outer Ether header (Outer Eth). The inner Ether header includes DMAC: 2-2-2 and SMAC: 1-1-1, the VXLAN header may include but is not limited to at least one flag (Flag) and VNI: 1001; the UDP header includes the source port (SPort) and the destination port (DPort), where the destination port is 4789, indicating This message is a VXLAN message; the IPv6 header includes but is not limited to the Version field, the Flow Label field, the next header (NxtHdr) field, the source IPv6 address (SIPv6) field and the destination IPv6 address (DIPv6). field, where the value of the version field is used to indicate that the applicable protocol version is IPv6, and the value of the next header field is used to indicate the next step of the IPv6 header. The header is a UDP header, the value of the source IPv6 address field is 10:1::1, and the value of the destination IPv6 address field is 10:2::1; the outer Ethernet header includes the destination MAC address (DMAC): AA-1- 1 and source MAC address (SMAC): BB-1-1. S13, communication device 1 sends message 2 to communication device 3. Communication device 3 processes message 2 into message 3 according to the IPv6 header in message 2 and forwards it to communication device 2, where message 3 and message 2 The difference only includes: modifying the value of the DMAC field in the outer Ethernet header to the MAC address of communication device 2: CC-1-1, and modifying the value of the SMAC field to the MAC address of communication device 3: AA-1-1. S14, after receiving message 3, communication device 2 determines that message 3 is a VXLAN message based on the destination port 4789 in the UDP header, and then obtains VNI: 1001 from the VXLAN header of message 3, and searches based on VNI: 1001. For the corresponding BD, check the MAC in the BD to forward message 4. Message 4 is the message obtained after peeling off the outer Ethernet header, IPv6 header, UDP header and VXLAN header of message 3. This message 4 can be combined with the message 4. Text 1 includes the same content. S15, the terminal device 5 receives the message 4.
如图2b所示,按照本申请实施例提供的VXLAN6封装优化方式在VXLAN隧道中传输报文的过程例如可以包括下述S21~S25,但是,在S21~S25执行之前,通信装置1上保存路由1,路由1包括通信装置2的网段地址10:2::、VNI:1001和指示信息1的关联关系1,指示信息1用于指示按照VXLAN封装优化方式进行报文封装。通信装置2上保存路由2和路由3,路由2为主机路由,路由2包括10:2::1和VNI:1001的关联关系2,路由3为网段路由,路由3包括通信装置2的网段地址10:2::、VNI:1001和指示信息2的关联关系2,指示信息2用于指示按照VXLAN封装优化方式进行报文解封装。那么,S21~S25例如包括:S21,通信装置1接收终端设备4发送的报文1。S22,通信装置1根据报文1的目的MAC地址查MAC表,获得VXLAN6信息;根据报文1的目的IPv6地址:10.1.1.2匹配路由1,并基于路由1中的指示信息1对报文1进行VXLAN6封装优化方式的封装,获得报文2’。其中,报文2’可以包括:payload、内层以太头、IPv6头和外层以太头。其中,IPv6头包括但不限于:Version字段、Flow Label字段、NxtHdr字段、源IPv6地址(SIPv6)字段和目的IPv6地址(DIPv6)字段,其中,Version字段的值用于指示适用的协议版本为IPv6,NxtHdr字段的值用于指示该IPv6头的下一个头为以太头,源IPv6地址字段的值为10:1::1,目的IPv6地址字段的值为64比特的10:2::和VXLAN信息的拼接结果,VXLAN信息可以包括但不限于至少一个Flag和VNI;外层以太头中包括目的MAC地址(DMAC):AA-1-1和源MAC地址(SMAC):BB-1-1。S23,通信装置1将报文2’发送给通信装置3,通信装置3根据报文2’中IPv6头将报文2’处理为报文3’并转发到通信装置2,其中,报文3’和报文2’的区别仅包括:将外层以太头中的DMAC字段的值修改为通信装置2的MAC地址:CC-1-1,SMAC字段的值修改为通信装置3的MAC地址:AA-1-1。S24,通信装置2接收到报文3’后,根据IPv6头中的目的IPv6地址字段匹配路由3,从而基于路由3中的指示信息2确定报文3’为VXLAN6封装优化方式封装的报文,基于指示信息2从IPv6头的目的IPv6地址字段中获得VXLAN信息,然后根据VXLAN信息中的VNI:1001查找对应的BD,在BD内查MAC进行转发报文4’,报文4’为报文3’剥离了外层以太头、IPv6头后获得的报文,该报文4’可以和报文1包括相同的内容。S25,终端设备5接收报文4。As shown in Figure 2b, the process of transmitting messages in a VXLAN tunnel according to the VXLAN6 encapsulation optimization method provided by the embodiment of the present application may include, for example, the following S21 to S25. However, before S21 to S25 are executed, the route is saved on the communication device 1 1. Route 1 includes the association 1 of the network segment address 10:2::, VNI:1001 of the communication device 2 and the instruction information 1. The instruction information 1 is used to instruct the packet to be encapsulated according to the VXLAN encapsulation optimization method. Route 2 and Route 3 are saved on the communication device 2. Route 2 is the host route. Route 2 includes the association 2 between 10:2::1 and VNI:1001. Route 3 is the network segment route. Route 3 includes the network of the communication device 2. Association relationship 2 between segment address 10:2::, VNI:1001 and instruction information 2. Instruction information 2 is used to instruct packet decapsulation according to the VXLAN encapsulation optimization method. Then, S21 to S25 include, for example: S21, the communication device 1 receives the message 1 sent by the terminal device 4. S22, communication device 1 checks the MAC table according to the destination MAC address of message 1 to obtain VXLAN6 information; matches route 1 according to the destination IPv6 address of message 1: 10.1.1.2, and matches message 1 based on the indication information 1 in route 1 Encapsulate the VXLAN6 encapsulation optimization method and obtain message 2'. Among them, message 2' can include: payload, inner Ethernet header, IPv6 header and outer Ethernet header. Among them, the IPv6 header includes but is not limited to: Version field, Flow Label field, NxtHdr field, source IPv6 address (SIPv6) field and destination IPv6 address (DIPv6) field, where the value of the Version field is used to indicate that the applicable protocol version is IPv6 , the value of the NxtHdr field is used to indicate that the next header of the IPv6 header is an Ethernet header, the value of the source IPv6 address field is 10:1::1, the value of the destination IPv6 address field is 64-bit 10:2:: and VXLAN As a result of information splicing, the VXLAN information may include but is not limited to at least one Flag and VNI; the outer Ethernet header includes the destination MAC address (DMAC): AA-1-1 and the source MAC address (SMAC): BB-1-1. S23, communication device 1 sends message 2' to communication device 3. Communication device 3 processes message 2' into message 3' according to the IPv6 header in message 2' and forwards it to communication device 2, where message 3 The difference between 'and message 2' only includes: modifying the value of the DMAC field in the outer Ethernet header to the MAC address of communication device 2: CC-1-1, and modifying the value of the SMAC field to the MAC address of communication device 3: AA-1-1. S24, after receiving the message 3', the communication device 2 matches the route 3 according to the destination IPv6 address field in the IPv6 header, thereby determining that the message 3' is a message encapsulated in the VXLAN6 encapsulation optimization method based on the indication information 2 in the route 3. Based on the instruction information 2, obtain the VXLAN information from the destination IPv6 address field of the IPv6 header, then find the corresponding BD according to the VNI: 1001 in the VXLAN information, check the MAC in the BD to forward the message 4', and the message 4' is the message 3' is the message obtained after stripping off the outer Ethernet header and IPv6 header. This message 4' can contain the same content as message 1. S25, the terminal device 5 receives the message 4.
基于上述图2a和图2b所示的实施例可知,本申请实施例提供的VXLAN6封装优化方 式,能够提高报文的封装效率,从而提高报文的处理效率。Based on the above embodiments shown in Figure 2a and Figure 2b, it can be seen that the VXLAN6 encapsulation optimization method provided by the embodiment of the present application This method can improve the encapsulation efficiency of packets, thereby improving the efficiency of packet processing.
上述为以L2业务的报文在VXLAN隧道中的处理过程为例,对目前的VXLAN6封装方式和本申请实施例提供的VXLAN6封装优化方式进行介绍。本申请实施例提供的VXLAN6封装优化方式还适用三层(layer 3,L3)业务。The above takes the processing process of L2 service packets in the VXLAN tunnel as an example to introduce the current VXLAN6 encapsulation method and the VXLAN6 encapsulation optimization method provided by the embodiment of this application. The VXLAN6 encapsulation optimization method provided by the embodiment of this application is also applicable to layer 3 (layer 3, L3) services.
对于L3业务,如图3a所示,按照目前的VXLAN6封装方式在VXLAN隧道中传输报文的过程例如可以包括:S31,通信装置1接收终端设备4发送的报文5,报文5可以包括源IPv6地址(SIPv6):10.1.1.1、目的IPv6地址(DIPv6):10.1.1.2和有效载荷(payload)。S32,通信装置1根据报文5的目的IPv6地址查转发信息库(Forward Information dataBase,FIB)表,获得VXLAN6信息,并对报文5进行封装获得报文6。其中,报文6可以包括:payload、内层以太头、VXLAN头、UDP头、IPv6头和外层以太头(Outer Eth),内层以太头包括目的MAC地址:C-C-C,源MAC地址:A-A-A,VXLAN头、UDP头、IPv6头和外层以太头与图2a中报文2中的VXLAN头、UDP头、IPv6头和外层以太头对应相同。S33,通信装置1将报文6发送给通信装置3,通信装置3根据报文6中IPv6头将报文6处理为报文7并转发到通信装置2,其中,报文7和报文6的区别仅包括:将外层以太头中的DMAC字段的值修改为通信装置2的MAC地址:CC-1-1,SMAC字段的值修改为通信装置3的MAC地址:AA-1-1。S34,通信装置2接收到报文7后,根据UDP头中的目的端口4789确定该报文7为VXLAN报文,然后从报文7的VXLAN头中获得VNI:1001,从而根据VNI:1001查找对应的虚拟路由转发(Virtual Routing Forwarding,VRF)实例,在VRF实例内查MAC进行转发报文8,报文8为报文7剥离了外层以太头、IPv6头、UDP头和VXLAN头后获得的报文,该报文8可以和报文5包括相同的内容。S35,终端设备5接收报文8。For L3 services, as shown in Figure 3a, the process of transmitting messages in a VXLAN tunnel according to the current VXLAN6 encapsulation method may include, for example: S31. The communication device 1 receives the message 5 sent by the terminal device 4. The message 5 may include the source IPv6 address (SIPv6): 10.1.1.1, destination IPv6 address (DIPv6): 10.1.1.2 and payload. S32. Communication device 1 searches the Forward Information Base (FIB) table according to the destination IPv6 address of message 5, obtains the VXLAN6 information, and encapsulates message 5 to obtain message 6. Among them, message 6 can include: payload, inner Ethernet header, VXLAN header, UDP header, IPv6 header and outer Eth header (Outer Eth). The inner Ethernet header includes destination MAC address: C-C-C, source MAC address: A-A-A, The VXLAN header, UDP header, IPv6 header and outer Ethernet header correspond to the VXLAN header, UDP header, IPv6 header and outer Ethernet header in message 2 in Figure 2a. S33, communication device 1 sends message 6 to communication device 3. Communication device 3 processes message 6 into message 7 according to the IPv6 header in message 6 and forwards it to communication device 2, where message 7 and message 6 The difference only includes: modifying the value of the DMAC field in the outer Ethernet header to the MAC address of communication device 2: CC-1-1, and modifying the value of the SMAC field to the MAC address of communication device 3: AA-1-1. S34, after receiving message 7, communication device 2 determines that message 7 is a VXLAN message based on the destination port 4789 in the UDP header, and then obtains VNI: 1001 from the VXLAN header of message 7, and searches based on VNI: 1001. For the corresponding Virtual Routing Forwarding (VRF) instance, check the MAC in the VRF instance to forward message 8. Message 8 is obtained by stripping off the outer Ethernet header, IPv6 header, UDP header and VXLAN header of message 7. message, message 8 may contain the same content as message 5. S35, the terminal device 5 receives the message 8.
如图3b所示,按照本申请实施例提供的VXLAN6封装优化方式在VXLAN隧道中传输报文的过程例如可以包括下述S41~S45,但是,在S41~S45执行之前,通信装置1上保存路由1,路由1包括通信装置2的网段地址10:2::、VNI:1001和指示信息1的关联关系1,指示信息1用于指示按照VXLAN封装优化方式进行报文封装。通信装置2上保存路由2和路由3,路由2为主机路由,路由2包括10:2::1和VNI:1001的关联关系2,路由3为网段路由,路由3包括通信装置2的网段地址10:2::、VNI:1001和指示信息2的关联关系2,指示信息2用于指示按照VXLAN封装优化方式进行报文解封装。那么,S41~S45例如包括:S41,通信装置1接收终端设备4发送的报文5。S42,通信装置1根据报文5的目的IPv6地址查FIB表,获得VXLAN6信息;根据报文5的目的IPv6地址:10.1.1.2匹配路由1,并基于路由1中的指示信息1对报文5进行VXLAN6封装优化方式的封装,获得报文6’。其中,报文6’可以包括:payload、内层以太头、IPv6头和外层以太头(Outer Eth)。其中,IPv6头包括但不限于:Version字段、Flow Label字段、NxtHdr字段、源IPv6地址(SIPv6)字段和目的IPv6地址(DIPv6)字段,其中,Version字段的值用于指示适用的协议版本为IPv6,NxtHdr字段的值用于指示该IPv6头的下一个头为以太头,源IPv6地址字段的值为10:1::1,目的IPv6地址字段的值为64比特的10:2::和VXLAN信息的拼接结果,VXLAN信息可以包括但不限于至少一个Flag和VNI;外层以太头中包括目的MAC地址 (DMAC):AA-1-1和源MAC地址(SMAC):BB-1-1。S43,通信装置1将报文6’发送给通信装置3,通信装置3根据报文6’中IPv6头将报文6’处理为报文7’并转发到通信装置2,其中,报文7’和报文6’的区别仅包括:将外层以太头中的DMAC字段的值修改为通信装置2的MAC地址:CC-1-1,SMAC字段的值修改为通信装置3的MAC地址:AA-1-1。S44,通信装置2接收到报文7’后,根据IPv6头中的目的IPv6地址字段匹配路由3,从而基于路由3中的指示信息2确定报文7’为VXLAN6封装优化方式封装的报文,基于指示信息2从IPv6头的目的IPv6地址字段中获得VXLAN信息,然后根据VXLAN信息中的VNI:1001查找对应的VRF实例,在VRF实例内查MAC进行转发报文8’,报文8’为报文7’剥离了外层以太头、IPv6头、UDP头和VXLAN头后获得的报文,该报文8’可以和报文5包括相同的内容。S45,终端设备5接收报文8’。As shown in Figure 3b, the process of transmitting messages in a VXLAN tunnel according to the VXLAN6 encapsulation optimization method provided by the embodiment of the present application may include, for example, the following S41 to S45. However, before S41 to S45 are executed, the route is saved on the communication device 1 1. Route 1 includes the association 1 of the network segment address 10:2::, VNI:1001 of the communication device 2 and the instruction information 1. The instruction information 1 is used to instruct the packet to be encapsulated according to the VXLAN encapsulation optimization method. Route 2 and Route 3 are saved on the communication device 2. Route 2 is the host route. Route 2 includes the association 2 between 10:2::1 and VNI:1001. Route 3 is the network segment route. Route 3 includes the network of the communication device 2. Association relationship 2 between segment address 10:2::, VNI:1001 and instruction information 2. Instruction information 2 is used to instruct packet decapsulation according to the VXLAN encapsulation optimization method. Then, S41 to S45 include, for example: S41, the communication device 1 receives the message 5 sent by the terminal device 4. S42, communication device 1 checks the FIB table according to the destination IPv6 address of message 5 to obtain VXLAN6 information; matches route 1 according to the destination IPv6 address of message 5: 10.1.1.2, and matches message 5 based on the indication information 1 in route 1 Encapsulate the VXLAN6 encapsulation optimization method and obtain message 6'. Among them, the message 6' may include: payload, inner Ether header, IPv6 header and outer Ether header (Outer Eth). Among them, the IPv6 header includes but is not limited to: Version field, Flow Label field, NxtHdr field, source IPv6 address (SIPv6) field and destination IPv6 address (DIPv6) field, where the value of the Version field is used to indicate that the applicable protocol version is IPv6 , the value of the NxtHdr field is used to indicate that the next header of the IPv6 header is an Ethernet header, the value of the source IPv6 address field is 10:1::1, the value of the destination IPv6 address field is 64-bit 10:2:: and VXLAN The splicing result of the information. The VXLAN information can include but is not limited to at least one Flag and VNI; the outer Ethernet header includes the destination MAC address. (DMAC): AA-1-1 and source MAC address (SMAC): BB-1-1. S43, communication device 1 sends message 6' to communication device 3. Communication device 3 processes message 6' into message 7' according to the IPv6 header in message 6' and forwards it to communication device 2, where message 7 The difference between 'and message 6' only includes: modifying the value of the DMAC field in the outer Ethernet header to the MAC address of communication device 2: CC-1-1, and modifying the value of the SMAC field to the MAC address of communication device 3: AA-1-1. S44, after receiving the message 7', the communication device 2 matches the route 3 according to the destination IPv6 address field in the IPv6 header, thereby determining that the message 7' is a message encapsulated in the VXLAN6 encapsulation optimization method based on the indication information 2 in the route 3. Based on the instruction information 2, obtain the VXLAN information from the destination IPv6 address field of the IPv6 header, then find the corresponding VRF instance according to the VNI: 1001 in the VXLAN information, check the MAC in the VRF instance to forward the message 8', and the message 8' is Message 7' is the message obtained after stripping off the outer Ethernet header, IPv6 header, UDP header and VXLAN header. This message 8' may contain the same content as message 5. S45, the terminal device 5 receives the message 8'.
基于上述图3a和图3b所示的实施例可知,本申请实施例提供的VXLAN6封装优化方式,能够提高报文的封装效率,从而提高报文的处理效率。Based on the above embodiments shown in Figure 3a and Figure 3b, it can be seen that the VXLAN6 encapsulation optimization method provided by the embodiment of the present application can improve the encapsulation efficiency of packets, thereby improving the processing efficiency of packets.
上述图2b和图3b所示的实施例中,以VXLAN信息拼接在IPv6头的目的IPv6地址字段中为例进行描述,并不构成IPv6头中承载VXLAN信息的位置限定。例如,VXLAN信息还可以拼接在IPv6头的源IPv6地址字段中,那么,指示信息1和指示信息2还可以指示VXLAN信息在IPv6头中的位置,使得通信装置2可以准确的从所接收的报文中还原出VXLAN信息。In the above embodiments shown in Figures 2b and 3b, the splicing of VXLAN information in the destination IPv6 address field of the IPv6 header is used as an example for description. This does not constitute a position limit for carrying VXLAN information in the IPv6 header. For example, the VXLAN information can also be spliced into the source IPv6 address field of the IPv6 header. Then, the indication information 1 and the indication information 2 can also indicate the position of the VXLAN information in the IPv6 header, so that the communication device 2 can accurately obtain the information from the received packet. The VXLAN information is restored in this article.
对于图2b或图3b中关于通信装置1和通信装置2上保存的路由,具体的路由通告的过程可以包括:S51,针对通信装置1到通信装置2的VXLAN隧道,通信装置2上设置目的VTEP地址为10:2::1/64,通信装置1上设置源VTEP地址为10:1::1/64;S52,通信装置2上生成一条10:2::/64的主机路由2和一条10:2::1/128的网段路由3,其中,主机路由2除了包括目的(Destination):10:2::1和VNI:1001,还可以包括前缀长度(PrefixLength):128,网段路由3除了包括Destination:10:2::、VNI:1001和指示信息2,还可以包括指示信息2,指示信息2用于指示命中该路由2的报文需要按照本申请实施例提供的VXLAN6封装优化的方式进行报文解析。S53,通信装置2生成路由通告消息1,该路由通告消息1用于发布路由1,路由通告消息1中携带VNI为终端设备4接入BD的VNI 1001,下一跳使用该目的VTEP地址段内的本地地址(即,10:2::1),指示封装类型为VXLAN,同时携带指示信息3,指示信息3可以通过该路由通告消息1中的属性(如边界网关协议(Border Gateway Protocol,BGP)属性)或扩展团体属性承载,指示信息3用于指示路由1可执行本申请实施例提供的VXLAN6封装优化。S54,通信装置2可以通过以太网虚拟专用网(Ethernet virtual private network,EVPN)邻居向通信装置3发送路由通告消息1,由通信装置3将路由通告消息发送给其他通信装置(包括通信装置1)。S55,通信装置1接收到路由通告消息1后,根据路由通告消息1中的内容通知创建VXLAN隧道,并保存路由1,路由1中包括Destination:10:2::、VNI:1001和指示信息1,指示信息1用于指示按照VXLAN封装优化方式进行报文封装,其中,指示信息3是基于指示信息3确定的,即,通信装置1接收的路由通告消息1中包括指示信息3,那么,通信装置1保存该路由通告消息1对应的路由1时,生成与指示信息3相关的指示信息1。 For the routes saved on communication device 1 and communication device 2 in Figure 2b or Figure 3b, the specific route advertisement process may include: S51, for the VXLAN tunnel from communication device 1 to communication device 2, set the destination VTEP on communication device 2 The address is 10:2::1/64, and the source VTEP address is set to 10:1::1/64 on communication device 1; S52, a host route 2 and a 10:2::/64 are generated on communication device 2. Network segment route 3 of 10:2::1/128. In addition to destination: 10:2::1 and VNI: 1001, host route 2 can also include prefix length (PrefixLength): 128, network segment In addition to Destination: 10:2::, VNI: 1001 and indication information 2, route 3 may also include indication information 2. Instruction information 2 is used to indicate that packets hitting route 2 need to be encapsulated according to the VXLAN6 provided by the embodiment of this application. Optimized way to parse messages. S53, the communication device 2 generates a route advertisement message 1, which is used to publish the route 1. The route advertisement message 1 carries the VNI 1001 for the terminal device 4 to access the BD, and the next hop uses the destination VTEP address segment. The local address (i.e., 10:2::1) indicates that the encapsulation type is VXLAN and carries indication information 3. Instruction information 3 can use the attributes in the route advertisement message 1 (such as the Border Gateway Protocol (BGP) ) attribute) or extended community attribute bearer, the indication information 3 is used to indicate that route 1 can perform the VXLAN6 encapsulation optimization provided by the embodiment of this application. S54, the communication device 2 can send the route advertisement message 1 to the communication device 3 through the Ethernet virtual private network (EVPN) neighbor, and the communication device 3 sends the route advertisement message to other communication devices (including the communication device 1) . S55, after receiving the route advertisement message 1, the communication device 1 notifies the creation of the VXLAN tunnel according to the content in the route advertisement message 1, and saves the route 1. The route 1 includes Destination: 10:2::, VNI: 1001 and indication information 1. , the instruction information 1 is used to instruct the packet to be encapsulated according to the VXLAN encapsulation optimization method, where the instruction information 3 is determined based on the instruction information 3, that is, the route advertisement message 1 received by the communication device 1 includes the instruction information 3, then the communication When device 1 saves route 1 corresponding to route advertisement message 1, it generates indication information 1 related to indication information 3.
需要说明的是,图2b和图3b可以实施的前提在于:通信装置1和通信装置支持本申请实施例提供的VXLAN6封装优化的功能。通信装置2通过路由通告消息发布的指示信息3,用于指示通信装置2希望收到该路由通告消息1的源VTEP采用VXLAN封装优化的具体方式。对于源VTEP为通信装置1的情况,则,通信装置1可以基于指示信息3所指示的内容,在生成路由1的路由表和转发表时关联指示信息1,以指导转发面对命中路由1的报文按照指示信息1进行VXLAN6封装优化方式的处理。It should be noted that the premise that Figures 2b and 3b can be implemented is that the communication device 1 and the communication device support the VXLAN6 encapsulation optimization function provided by the embodiment of the present application. The instruction information 3 issued by the communication device 2 through the route advertisement message is used to instruct the communication device 2 that it hopes that the source VTEP that receives the route advertisement message 1 adopts a specific method of VXLAN encapsulation optimization. For the case where the source VTEP is communication device 1, communication device 1 can, based on the content indicated by indication information 3, associate the indication information 1 when generating the routing table and forwarding table of route 1 to guide the forwarding of packets that hit route 1. The packet is processed in the VXLAN6 encapsulation optimization method according to instruction information 1.
对于VXLAN隧道的源VTEP和目的VTEP中,只要有一个不支持本申请实施例提供的VXLAN6封装优化功能,那么,通过该VXLAN隧道传输的报文仅能基于目前的VXLAN封装方式进行封装和传输,无法使用本申请实施例提供的VXLAN封装优化方式进行封装和传输。例如,通信装置6不支持VXLAN6封装优化的功能,即使通信装置2支持VXLAN6封装优化的功能,也不能按照本申请实施例提供的VXLAN6封装优化方式在通信装置6和通信装置2之间的VXLAN隧道中进行报文的封装和传输,可以采用目前的VXLAN6封装方式进行报文的封装和传输。例如,通信装置6到通信装置2为VXLAN隧道,通信装置6作为该VXLAN隧道的源VTEP,设置主机地址20:1::1/128作为VTEP地址。通信装置6接收到通信装置3发射的通信装置2的路由通告消息1后,正常解析路由通告消息1,同时发现路由通告消息1包括携带指示信息3的属性或扩展团体属性,但因为不认识该属性或扩展团体属性,不做处理,继续按照目前的路由解析处理流程进行处理,通知创建通信装置6到通信装置2的VXLAN隧道,生成路由表和转发表。之后,通信装置6从接入主机收到访问通信装置2所连接主机的报文时,在通信装置6上进行DMAC或DIPv6查表,获取到通信装置2发布过来的路由,进行VXLAN隧道封装,由于该路由在通信装置6上没有指示按照VXLAN6封装优化方式封装的信息,所以,按照目前的VXLAN6流程进行封装,DIPv6为通信装置2的主机地址;封装后的报文转发到达通信装置2后,通信装置2确定所接收的报文的DIPv6命中了主机路由2(即10:2::1的路由2),从而根据所接收报文中的UDP的DPort:4789确定为VXLAN报文,从而按照目前的VXLAN6流程进行处理。As long as one of the source VTEP and destination VTEP of the VXLAN tunnel does not support the VXLAN6 encapsulation optimization function provided by the embodiment of this application, the packets transmitted through the VXLAN tunnel can only be encapsulated and transmitted based on the current VXLAN encapsulation method. The VXLAN encapsulation optimization method provided by the embodiment of this application cannot be used for encapsulation and transmission. For example, the communication device 6 does not support the function of VXLAN6 encapsulation optimization. Even if the communication device 2 supports the function of VXLAN6 encapsulation optimization, the VXLAN tunnel between the communication device 6 and the communication device 2 cannot be established according to the VXLAN6 encapsulation optimization method provided by the embodiment of the present application. For packet encapsulation and transmission, the current VXLAN6 encapsulation method can be used for packet encapsulation and transmission. For example, the communication device 6 to the communication device 2 is a VXLAN tunnel, the communication device 6 serves as the source VTEP of the VXLAN tunnel, and sets the host address 20:1::1/128 as the VTEP address. After receiving the route advertisement message 1 of the communication device 2 transmitted by the communication device 3, the communication device 6 parses the route advertisement message 1 normally and finds that the route advertisement message 1 includes the attribute or extended community attribute carrying the indication information 3, but because it does not recognize the route advertisement message 1 Attributes or extended community attributes are not processed and continue to be processed according to the current route analysis process, notifying the creation of a VXLAN tunnel from communication device 6 to communication device 2, and generating a routing table and a forwarding table. Afterwards, when the communication device 6 receives a message from the access host to access the host connected to the communication device 2, it performs a DMAC or DIPv6 table lookup on the communication device 6, obtains the route published by the communication device 2, and performs VXLAN tunnel encapsulation. Since the route does not indicate encapsulation information according to the VXLAN6 encapsulation optimization method on the communication device 6, it is encapsulated according to the current VXLAN6 process, and DIPv6 is the host address of the communication device 2; after the encapsulated message is forwarded to the communication device 2, Communication device 2 determines that the DIPv6 of the received message hits host route 2 (i.e., route 2 of 10:2::1), and thus determines that it is a VXLAN message according to the UDP DPort: 4789 in the received message. The current VXLAN6 process is processed.
需要说明的是,VXLAN6封装优化中,VXLAN信息的长度、VXLAN信息的模式以及VNI的长度,可以是整个网络或某个VXLAN隧道的VTEP上静态配置的,也可以是通过路由通告消息发布的,例如,指示信息3还可以指示VXLAN6封装优化时VXLAN信息的长度、VXLAN信息的模式或VNI的长度中的一个或多个,作为一个示例,路由通告消息1中承载指示信息3的属性例如可以参见图4a所示,包括:类型(Type)字段和子类型(SubType)字段、标志(Flag)、定位符长度(Locator Length,LocLen)字段和预留(Reserved),其中,Type字段和子类型SubType一起标识该属性为指示信息3,指示进行VXLAN6封装优化;LocLen字段的值用于指示VTEP的网段地址的长度,一种情况下,LocLen字段的值固定等于64比特,另一种情况下,LocLen字段的值可以基于VXLAN信息的长度确定,例如,VXLAN信息的长度为64比特,那么,LocLen字段的值可以等于(128比特-64比特)=64比特,又例如,VXLAN信息的长度为18比特,那么,LocLen字段的值可以等于(128比特-18比特)=110比特,本申请实施例中以LocLen字段的值为64比特为例进行说明;Flag的值用于指示VXLAN信息的模式,例如,Flag=1,可以指示全比特模式,该 模式下VXLAN信息的长度为8字节(即64比特),即,该VXLAN信息的格式可以参见图2a或图3a中VXLAN头,VXLAN信息包括了图2a或图3a中VXLAN头的全部内容;Flag=2,可以指示省略预留(Except Reserved)模式,该模式下VXLAN信息的长度为4字节(即32比特),即,VXLAN信息包括8比特的Flag和24比特的VNI字段;Flag=3,可以指示精简压缩模式,该模式下VXLAN信息只包含8比特的Flag和M(M为大于1的整数)比特的VNI,其中,M可以根据实际情况定义,如,整个网络只有212=4096个VNI,那么,VNI可以仅通过12比特的长度定义,该情况下,携带指示信息3的属性可以参见图4b所示,包括:Flag=3,LocLen=64,L=12,以及Reserved,其中,L为图4a中Reserved字段的第一个字节,当Flag=3时L的值用于指示VNI的长度。图4a中的Reserved字段还可以根据需求扩展其他的指示字段,本申请实施例不作限定。It should be noted that in VXLAN6 encapsulation optimization, the length of VXLAN information, the mode of VXLAN information, and the length of VNI can be statically configured on the entire network or the VTEP of a certain VXLAN tunnel, or they can be published through route advertisement messages. For example, the indication information 3 may also indicate one or more of the length of the VXLAN information, the mode of the VXLAN information, or the length of the VNI when VXLAN6 encapsulation is optimized. As an example, the attributes carrying the indication information 3 in the route advertisement message 1 can be found in As shown in Figure 4a, it includes: type (Type) field and subtype (SubType) field, flag (Flag), locator length (Locator Length, LocLen) field and reserved (Reserved), where the Type field and the subtype SubType are identified together This attribute is indication information 3, indicating VXLAN6 encapsulation optimization; the value of the LocLen field is used to indicate the length of the VTEP network segment address. In one case, the value of the LocLen field is fixed to 64 bits. In another case, the value of the LocLen field is fixed to 64 bits. The value of can be determined based on the length of the VXLAN information. For example, the length of the VXLAN information is 64 bits, then the value of the LocLen field can be equal to (128 bits - 64 bits) = 64 bits. For example, the length of the VXLAN information is 18 bits. Then, the value of the LocLen field can be equal to (128 bits - 18 bits) = 110 bits. In the embodiment of this application, the value of the LocLen field is 64 bits as an example for explanation; the value of Flag is used to indicate the mode of VXLAN information, for example, Flag=1, can indicate full bit mode, the The length of the VXLAN information in mode is 8 bytes (i.e. 64 bits). That is, the format of the VXLAN information can be seen in the VXLAN header in Figure 2a or Figure 3a. The VXLAN information includes the entire content of the VXLAN header in Figure 2a or Figure 3a; Flag=2 can indicate the Except Reserved mode. In this mode, the length of the VXLAN information is 4 bytes (that is, 32 bits). That is, the VXLAN information includes an 8-bit Flag and a 24-bit VNI field; Flag= 3. Can indicate simplified compression mode. In this mode, VXLAN information only contains 8-bit Flag and M (M is an integer greater than 1) bits of VNI. M can be defined according to the actual situation. For example, the entire network only has 212 = 4096 VNI, then the VNI can be defined only by the length of 12 bits. In this case, the attributes carrying indication information 3 can be seen in Figure 4b, including: Flag=3, LocLen=64, L=12, and Reserved, where , L is the first byte of the Reserved field in Figure 4a. When Flag=3, the value of L is used to indicate the length of the VNI. The Reserved field in Figure 4a can also be extended with other indication fields according to requirements, which is not limited in the embodiment of this application.
以图3b中的报文1为例,通信装置1根据DIPv6匹配到路由1,VNI为1001,指示信息3指示进行全比特模式的VXLAN封装优化方式的封装,LocLen=64,那么,报文6’的IPv6头中目的IPv6地址字段可以取10:2:0:0:0:0:0003:E900,其中,0003:E90为24比特的VNI。如果对于不支持本申请实施例提供的VXLAN6封装优化方式的通信装置6,接收到去往通信装置2的报文1后,按照目前的VXLAN6封装方式,报文的IPv6头的目的IPv6地址字段可以取10:2:0:0:0:0:0:1(即10:2::1)。Taking message 1 in Figure 3b as an example, communication device 1 matches route 1 according to DIPv6, VNI is 1001, and instruction information 3 indicates encapsulation in the full-bit mode VXLAN encapsulation optimization method, LocLen=64, then message 6 'The destination IPv6 address field in the IPv6 header can be 10:2:0:0:0:0:0003:E900, where 0003:E90 is the 24-bit VNI. If the communication device 6 does not support the VXLAN6 encapsulation optimization method provided by the embodiment of the present application, after receiving the message 1 destined for the communication device 2, according to the current VXLAN6 encapsulation method, the destination IPv6 address field of the IPv6 header of the message can be Take 10:2:0:0:0:0:0:1 (that is, 10:2::1).
以图3b中的报文7’为例,通信装置2接收到报文7’后,基于报文7’的目的IPv6地址字段的值(如10:2:0:0:0:0:0003:E900)命中网段路由3,发现该网段路由3中包括指示信息2,则,根据指示信息2确定报文7’为按照VXLAN6封装优化方式封装的报文,同时,本地保存了封装的具体方式(例如VXLAN信息的模式、VXLAN信息的长度或VNI的长度),从而,从报文7’中获得VXLAN信息,并对报文7’进行解封装。假设通信装置2所接收的报文的目的IPv6地址字段的值(如10:2:0:0:0:0:0:1)命中主机路由2,则,通信装置2可以解析所接收报文中的UDP头、VXLAN头等,获得VXLAN信息,并对该报文进行解封装。Taking the message 7' in Figure 3b as an example, after the communication device 2 receives the message 7', based on the value of the destination IPv6 address field of the message 7' (such as 10:2:0:0:0:0:0003 :E900) hits the network segment route 3 and finds that the network segment route 3 includes indication information 2. Then, based on the indication information 2, it is determined that the message 7' is a message encapsulated according to the VXLAN6 encapsulation optimization method. At the same time, the encapsulated packet is saved locally. Specific methods (such as the mode of the VXLAN information, the length of the VXLAN information or the length of the VNI), thereby obtaining the VXLAN information from the message 7' and decapsulating the message 7'. Assume that the value of the destination IPv6 address field (such as 10:2:0:0:0:0:0:1) of the message received by communication device 2 hits host route 2, then communication device 2 can parse the received message. The UDP header, VXLAN header, etc. in the packet are obtained, the VXLAN information is obtained, and the packet is decapsulated.
需要说明的是,通信装置基于路由可以生成路由表和转发表后基于转发表对报文进行转发,为了方便本申请实施例中将这一过程简单描述为:通信装置保存路由后基于路由对报文进行处理,在本申请实施例中,二者意思一致。It should be noted that the communication device can generate a routing table and a forwarding table based on the route and then forward the message based on the forwarding table. For convenience, this process is simply described in the embodiment of this application as: the communication device saves the route and then forwards the message based on the route. The text is processed, and in the embodiment of this application, the two have the same meaning.
需要说明的是,终端设备例如可以是主机或服务器。通信装置可以是交换机、路由器等网络设备;也可以是网络设备上的一部分组件,例如是网络设备上的单板,线卡;还可以是网络设备上的一个功能模块;还可以是用于实现本申请实施例所提供方法的芯片,本申请实施例不做具体限定。当通信装置是芯片时,用于实现方法的收发单元例如可以是芯片的接口电路,处理单元可以是芯片中具有处理功能的处理电路。通信装置之间例如可以但不限于通过以太网线或光缆直接连接。It should be noted that the terminal device may be a host or a server, for example. The communication device can be a network device such as a switch or a router; it can also be a part of the network device, such as a single board or line card on the network device; it can also be a functional module on the network device; it can also be used to implement The chip of the method provided by the embodiment of the present application is not specifically limited by the embodiment of the present application. When the communication device is a chip, the transceiver unit used to implement the method may be, for example, an interface circuit of the chip, and the processing unit may be a processing circuit with a processing function in the chip. The communication devices may be directly connected through, but not limited to, Ethernet cables or optical cables.
以上为以场景实施例的形式对本申请实施例的介绍,下面结合附图详细说明本申请实施例的具体实现方式。The above is an introduction to the embodiments of the present application in the form of scenario embodiments. The specific implementation manner of the embodiments of the present application will be described in detail below with reference to the accompanying drawings.
图5为本申请实施例提供的方法100的流程示意图。为了方便理解,该方法100中,以第一通信装置和第二通信装置的交互对本申请实施例进行描述。其中,第一通信装置和 第二通信装置之间建立VXLAN隧道,第一通信装置用作源VTEP,第二通信装置用作目的VTEP,第一通信装置可以对应图1中的通信装置1,第二通信装置可以对应图1中的通信装置2,具体实现方式以及相关说明可以参考图2b和图3b中的相关内容。Figure 5 is a schematic flowchart of the method 100 provided by the embodiment of the present application. For ease of understanding, in the method 100, the embodiment of the present application is described based on the interaction between the first communication device and the second communication device. Wherein, the first communication device and A VXLAN tunnel is established between the second communication devices. The first communication device is used as the source VTEP, and the second communication device is used as the destination VTEP. The first communication device may correspond to the communication device 1 in Figure 1, and the second communication device may correspond to the communication device 1 in Figure 1. For the communication device 2 in , for specific implementation methods and related descriptions, please refer to the relevant content in Figure 2b and Figure 3b.
如图5所示,该方法100例如可以包括下述S101~S108:As shown in Figure 5, the method 100 may include, for example, the following S101 to S108:
S101,第二通信装置生成路由通告消息,所述路由通告消息包括路由前缀、下一跳、VNI和第一信息,其中,下一跳为目的VTEP的网段地址,第一信息指示目的VTEP支持VXLAN封装优化。S101. The second communication device generates a route advertisement message. The route advertisement message includes a route prefix, a next hop, a VNI and first information, where the next hop is the network segment address of the destination VTEP, and the first information indicates that the destination VTEP supports VXLAN encapsulation optimization.
S102,第二通信装置向第一通信装置发送所述路由通告消息。S102. The second communication device sends the route advertisement message to the first communication device.
S103,第一通信装置接收第二通信装置发送的路由通告消息。S103. The first communication device receives the route advertisement message sent by the second communication device.
S104,第一通信装置保存所述目的VTEP的网段地址、所述VNI和第二信息的关联关系,所述第二信息指示源VTEP将包括所述VNI的VXLAN信息封装在IPv6头中。S104. The first communication device saves the association between the network segment address of the destination VTEP, the VNI, and second information. The second information instructs the source VTEP to encapsulate the VXLAN information including the VNI in the IPv6 header.
VXLAN隧道采用VXLAN6封装优化方式进行封装,需要VXLAN隧道的源VTEP和目的VTEP均支持该VXLAN6封装优化的功能,源VTEP需要知晓目的VTEP是否支持该VXLAN6封装优化的功能。VXLAN tunnels are encapsulated using the VXLAN6 encapsulation optimization method. Both the source VTEP and the destination VTEP of the VXLAN tunnel need to support the VXLAN6 encapsulation optimization function. The source VTEP needs to know whether the destination VTEP supports the VXLAN6 encapsulation optimization function.
对于S101,第二通信装置在确定自己支持VXLAN6封装优化的功能时,可以通过路由通告消息让第一通信装置知晓第二通信装置支持VXLAN6封装优化的功能,即,S101中的路由通信消息携带用于指示目的VTEP(即第二通信装置)支持VXLAN封装优化的第一信息,该第一信息可以通过所述路由通告消息中的属性或扩展团体属性携带。在一些实现方式中,所述第一信息还指示以下一种或多种:所述IPv6头携带所述VXLAN信息的模式;所述VXLAN信息的长度;所述VNI的长度。For S101, when the second communication device determines that it supports the function of VXLAN6 encapsulation optimization, it can let the first communication device know that the second communication device supports the function of VXLAN6 encapsulation optimization through a route advertisement message, that is, the route communication message carrying function in S101 First information indicating that the destination VTEP (ie, the second communication device) supports VXLAN encapsulation optimization, and the first information may be carried through attributes or extended community attributes in the route advertisement message. In some implementations, the first information also indicates one or more of the following: a mode in which the IPv6 header carries the VXLAN information; a length of the VXLAN information; and a length of the VNI.
路由通告消息可以是EVPN路由,路由类型例如可以是1、2、3或5。The route advertisement message may be an EVPN route, and the route type may be 1, 2, 3 or 5, for example.
作为一个示例,如果第一信息仅指示目的VTEP支持VXLAN封装优化,那么,路由通告消息可以通过新扩展的属性或扩展团体属性携带第一信息,所述新扩展的属性或扩展团体属性的类型用于指示目的VTEP支持VXLAN封装优化。As an example, if the first information only indicates that the destination VTEP supports VXLAN encapsulation optimization, then the route advertisement message may carry the first information through a new extended attribute or an extended community attribute, and the type of the new extended attribute or extended community attribute is represented by VTEP supports VXLAN encapsulation optimization for indicated purposes.
作为另一个示例,如果第一信息不仅指示目的VTEP支持VXLAN封装优化,还指示以下一种或多种:所述IPv6头携带所述VXLAN信息的模式;所述VXLAN信息的长度;所述VNI的长度,那么,路由通告消息可以通过新扩展的属性或扩展团体属性携带第一信息。新扩展的属性或扩展团体属性可以包括但不限于:Type字段和SubType字段、Flag、LocLen字段和Reserved,其中,Type字段和子类型SubType一起标识该属性或扩展团体属性为第一信息,指示进行VXLAN6封装优化;LocLen字段的值用于指示VTEP的网段地址的长度,一种情况下,LocLen字段的值固定等于64比特,另一种情况下,LocLen字段的值可以基于VXLAN信息的长度确定,例如,VXLAN信息的长度为64比特,那么,LocLen字段的值可以等于(128比特-64比特)=64比特,又例如,VXLAN信息的长度为18比特,那么,LocLen字段的值可以等于(128比特-18比特)=110比特,本申请实施例中以LocLen字段的值为64比特为例进行说明;Flag的值用于指示IPv6头中携带VXLAN信息的模式,例如,Flag=1,可以指示全比特模式,该模式下VXLAN信息的长度为8字节(即64比特),即,该VXLAN信息的格式可以参见图2a或图3a中VXLAN头,VXLAN信息包括了图 2a或图3a中VXLAN头的全部内容;Flag=2,可以指示省略预留模式,该模式下VXLAN信息的长度可以为4字节(即32比特),即,VXLAN信息包括8比特的Flag和24比特的VNI字段;Flag=3,可以指示精简压缩模式,该模式下VXLAN信息可以只包含8比特的Flag和M(M为大于1的整数)比特的VNI,其中,M可以根据实际情况定义,如,整个网络只有212=4096个VNI,那么,VNI可以仅通过12比特的长度定义,该情况下,例如可以采用Reserved字段的第一个字节指示VNI的长度。路由通告消息中的第一信息可以对应上述路由通告消息1中的指示信息3,承载第一信息所述新扩展的属性或扩展团体属性的格式可以参见上述图4a所示。As another example, if the first information not only indicates that the destination VTEP supports VXLAN encapsulation optimization, but also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; the length of the VNI length, then the route advertisement message can carry the first information through the new extended attribute or the extended community attribute. New extended attributes or extended community attributes may include but are not limited to: Type field and SubType field, Flag, LocLen field and Reserved, where the Type field and the subtype SubType together identify the attribute or extended community attribute as the first information, indicating VXLAN6 Encapsulation optimization; the value of the LocLen field is used to indicate the length of the VTEP network segment address. In one case, the value of the LocLen field is fixed to 64 bits. In another case, the value of the LocLen field can be determined based on the length of the VXLAN information. For example, if the length of the VXLAN information is 64 bits, then the value of the LocLen field can be equal to (128 bits - 64 bits) = 64 bits. For another example, if the length of the VXLAN information is 18 bits, then the value of the LocLen field can be equal to (128 bits). bits - 18 bits) = 110 bits. In the embodiment of this application, the value of the LocLen field is 64 bits. The value of Flag is used to indicate the mode of carrying VXLAN information in the IPv6 header. For example, Flag = 1 can indicate All-bit mode. In this mode, the length of the VXLAN information is 8 bytes (i.e. 64 bits). That is, the format of the VXLAN information can be seen in the VXLAN header in Figure 2a or Figure 3a. The VXLAN information includes the figure 2a or the entire content of the VXLAN header in Figure 3a; Flag = 2 can indicate that the reserved mode is omitted. In this mode, the length of the VXLAN information can be 4 bytes (that is, 32 bits), that is, the VXLAN information includes an 8-bit Flag and 24-bit VNI field; Flag=3, which can indicate the streamlined compression mode. In this mode, the VXLAN information can only contain an 8-bit Flag and M (M is an integer greater than 1) bits of VNI, where M can be defined according to the actual situation. For example, if there are only 212=4096 VNIs in the entire network, then the VNI can be defined only by a length of 12 bits. In this case, for example, the first byte of the Reserved field can be used to indicate the length of the VNI. The first information in the route advertisement message may correspond to the indication information 3 in the route advertisement message 1. The format of the newly extended attributes or extended community attributes carrying the first information may be as shown in Figure 4a.
VXLAN信息除了包括VNI,还可以包括以下一项或多项:至少一个标志Flag;预留Reserve字段。一种情况下,VXLAN信息包括目前VXLAN封装中VXLAN头的全部内容,那么,VXLAN信息的格式可以参见图6所示,包括:8比特的Flag、24比特的Reserved字段、24比特的VNI和8比特的Reserved字段。其中,8比特的Flag中除了第五比特位的Flag为I标记,I=1指示该VXLAN信息中的VNI字段有效,其他比特位为预留待被使用的状态。那么,第一信息可以指示IPv6头携带VXLAN信息的模式为全比特模式,全比特模式下VXLAN信息的长度为64比特,VNI长度为24比特。另一种情况下,VXLAN信息的长度大于或等于24比特,且所述VXLAN信息的长度小于64比特,所述VNI的长度为24比特,例如,VXLAN信息可以包括8比特的Flag和24比特的VNI,那么,第一信息可以指示IPv6头携带VXLAN信息的模式为省略预留模式,省略预留模式下VXLAN信息的长度为32比特,VNI的长度为24比特。又一种情况下,VXLAN信息的长度大于或等于M比特,且所述VXLAN信息的长度小于64比特,所述VNI的长度为M比特,所述M为大于或等于1的整数,例如,VXLAN信息可以包括8比特的Flag和M比特的VNI,那么,第一信息可以指示IPv6头携带VXLAN信息的模式为精简压缩模式,第一信息还可以指示VNI的长度为M,精简压缩模式下VXLAN信息的长度为(8+M)比特。下文中以省略预留模式下VXLAN信息的长度为32比特、精简压缩模式下VXLAN信息的长度为(8+M)比特为例进行说明。In addition to VNI, VXLAN information may also include one or more of the following: at least one Flag; Reserve field. In one case, the VXLAN information includes all the contents of the VXLAN header in the current VXLAN encapsulation. Then, the format of the VXLAN information can be seen in Figure 6, including: 8-bit Flag, 24-bit Reserved field, 24-bit VNI and 8-bit VNI. Reserved field of bits. Among them, except for the fifth bit of Flag in the 8-bit Flag, which is an I flag, I=1 indicates that the VNI field in the VXLAN information is valid, and the other bits are reserved to be used. Then, the first information may indicate that the mode in which the IPv6 header carries VXLAN information is the all-bit mode. In the all-bit mode, the length of the VXLAN information is 64 bits, and the length of the VNI is 24 bits. In another case, the length of the VXLAN information is greater than or equal to 24 bits, and the length of the VXLAN information is less than 64 bits, and the length of the VNI is 24 bits. For example, the VXLAN information may include an 8-bit Flag and a 24-bit Flag. VNI, then the first information may indicate that the mode in which the IPv6 header carries VXLAN information is the omitted reservation mode. In the omitted reservation mode, the length of the VXLAN information is 32 bits, and the length of the VNI is 24 bits. In another case, the length of the VXLAN information is greater than or equal to M bits, and the length of the VXLAN information is less than 64 bits, the length of the VNI is M bits, and the M is an integer greater than or equal to 1, for example, VXLAN The information may include an 8-bit Flag and an M-bit VNI. Then, the first information may indicate that the mode in which the IPv6 header carries the VXLAN information is the reduced compression mode. The first information may also indicate that the length of the VNI is M, and the VXLAN information in the reduced compression mode is The length is (8+M) bits. The following description takes as an example that the length of the VXLAN information in the omitted reservation mode is 32 bits and the length of the VXLAN information in the simplified compression mode is (8+M) bits.
需要说明的是,该方法100中以路由通告消息携带第一信息的方式告知第一通信装置对端的第二通信装置希望采用的VXLAN6封装优化的具体方式(如VXLAN信息的长度、VXLAN信息的模式以及VNI的长度),在其他实现方式中,路由通告消息中也可以不携带第一信息,VXLAN6封装优化的具体方式,可以是整个网络或某个VXLAN隧道的VTEP上静态配置的,即,在第一通信装置和第二通信装置中配置至少一种两者均支持的VXLAN6封装优化的具体方式。It should be noted that in the method 100, the route advertisement message carries the first information to inform the second communication device at the opposite end of the first communication device of the specific method of VXLAN6 encapsulation optimization that it wishes to adopt (such as the length of the VXLAN information, the mode of the VXLAN information) and the length of the VNI). In other implementations, the route advertisement message does not need to carry the first information. The specific method of VXLAN6 encapsulation optimization can be statically configured on the VTEP of the entire network or a certain VXLAN tunnel, that is, on A specific method for configuring in the first communication device and the second communication device at least one VXLAN6 encapsulation optimization method supported by both.
对于S104,第一通信装置保存所述目的VTEP的网段地址、所述VNI和第二信息的关联关系,可以包括:第一通信装置将所述目的VTEP的网段地址、所述VNI和所述第二信息的关联关系保存到转发面。例如,第一通信装置在接收到路由通告消息后,通过对路由通告消息的解析获得所述目的VTEP的网段地址和所述VNI,根据所述目的VTEP的网段地址和所述VNI生成路由表和转发表,并给所生成的路由表和转发表生成与第一信息对应的第二信息,第二信息例如可以是所生成的路由表和转发表中的标记,指示第一通信装置 将包括所述VNI的VXLAN信息封装在所接收的与该路由表或转发表匹配的报文的IPv6头中。此外,所述第二信息还指示以下一种或多种:所述IPv6头携带所述VXLAN信息的模式;所述VXLAN信息的长度;所述VNI的长度。第二信息可以对应上述场景实施例中路由1的指示信息1,具体可以参见指示信息1的相关描述。For S104, the first communication device saves the association between the network segment address of the destination VTEP, the VNI and the second information, which may include: the first communication device saves the network segment address of the destination VTEP, the VNI and the second information. The association relationship of the second information is saved to the forwarding surface. For example, after receiving the route advertisement message, the first communication device obtains the network segment address of the destination VTEP and the VNI by parsing the route advertisement message, and generates a route based on the network segment address of the destination VTEP and the VNI. table and forwarding table, and generate second information corresponding to the first information for the generated routing table and forwarding table. The second information may be, for example, a mark in the generated routing table and forwarding table, indicating that the first communication device The VXLAN information including the VNI is encapsulated in the IPv6 header of the received message matching the routing table or forwarding table. In addition, the second information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI. The second information may correspond to the indication information 1 of route 1 in the above scenario embodiment. For details, please refer to the relevant description of the indication information 1.
在一些实现方式中,第一通信装置支持所接收的路由通告消息中指示的VXLAN6封装优化方式,本地保存了目的VTEP的网段地址、所述VNI和第二信息的关联关系,为之后接收的通过该VXLAN隧道传输的报文进行VXLAN6封装优化方式的封装做好了准备。对于第二通信装置,为了能够对第一通信装置采用VXLAN6封装优化方式的封装的报文进行解析和处理,第二通信装置也可以保存所述目的VTEP的网段地址、所述VNI和第三信息的关联关系,所述第三信息指示包括所述VNI的VXLAN信息封装在第六版互联网协议的IPv6头中。此外,所述第三信息还指示以下一种或多种:所述IPv6头携带所述VXLAN信息的模式;所述VXLAN信息的长度;所述VNI的长度。第三信息可以对应上述场景实施例中路由3的指示信息2,具体可以参见指示信息2的相关描述。In some implementations, the first communication device supports the VXLAN6 encapsulation optimization method indicated in the received route advertisement message, and locally saves the association relationship between the network segment address of the destination VTEP, the VNI and the second information, and provides the information for later reception. The packets transmitted through this VXLAN tunnel are ready to be encapsulated in the VXLAN6 encapsulation optimization method. For the second communication device, in order to parse and process the packets encapsulated by the first communication device using the VXLAN6 encapsulation optimization method, the second communication device may also save the network segment address of the destination VTEP, the VNI and the third The correlation relationship of the information, the third information indicates that the VXLAN information including the VNI is encapsulated in the IPv6 header of the sixth version of the Internet Protocol. In addition, the third information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI. The third information may correspond to the indication information 2 of route 3 in the above scenario embodiment. For details, please refer to the relevant description of the indication information 2.
上述S101~S104,通过路由通告的方法为第一通信装置和第二通信装置之间采用VXLAN6封装优化的方式做好了准备,使得第一通信装置和第二通信装置之间采用VXLAN6封装优化方式封装报文,提高报文封装效率成为可能。The above-mentioned S101 to S104 prepare for the adoption of the VXLAN6 encapsulation optimization method between the first communication device and the second communication device through the route advertisement method, so that the VXLAN6 encapsulation optimization method is adopted between the first communication device and the second communication device. It is possible to encapsulate messages and improve the efficiency of message encapsulation.
S105,第一通信装置获得第一报文,所述第一报文包括IPv6头,所述IPv6头包括VXLAN信息,所述VXLAN信息包括VNI。S105. The first communication device obtains a first message, the first message includes an IPv6 header, the IPv6 header includes VXLAN information, and the VXLAN information includes a VNI.
作为一个示例,S105例如可以包括:S1051,第一通信装置接收第二报文;S1052,第一通信装置根据所述第二报文的目的地址匹配所述目的VTEP的网段地址,根据所述目的VTEP的网段地址、所述VNI和第二信息的关联关系,获得所述VNI和所述第二信息;S1053,第一通信装置根据所述第二信息的指示,对所述第二报文进行封装,获得所述第一报文。其中,第二报文可以对应上述图2b中的报文1,第一报文对应图2b中的报文2’。或者,第二报文可以对应上述图3b中的报文5,第一报文对应图3b中的报文6’。As an example, S105 may include: S1051, the first communication device receives the second message; S1052, the first communication device matches the network segment address of the destination VTEP according to the destination address of the second message. The network segment address of the destination VTEP, the association between the VNI and the second information is obtained to obtain the VNI and the second information; S1053, the first communication device responds to the second report according to the instructions of the second information. The message is encapsulated to obtain the first message. The second message may correspond to message 1 in Figure 2b, and the first message corresponds to message 2' in Figure 2b. Alternatively, the second message may correspond to message 5 in Figure 3b, and the first message corresponds to message 6' in Figure 3b.
在一些实现方式中,第一报文的IPv6头包括目的IPv6地址,所述目的IPv6地址包括所述目的VTEP的网段地址和所述VXLAN信息。其中,目的IPv6地址中,前64比特可以用于携带目的VTEP的网段地址,所述VXLAN信息携带在所述目的IPv6地址的后64比特中。一种情况下,IPv6头中携带VXLAN信息的模式为全比特模式,那么,所述目的IPv6地址的后64比特全部用于携带所述VXLAN信息;另一种情况下,IPv6头中携带VXLAN信息的模式为省略预留模式,那么,所述目的IPv6地址的后64比特中32比特用于携带所述VXLAN信息;再一种情况下,IPv6头中携带VXLAN信息的模式为精简压缩模式,那么,所述目的IPv6地址的后64比特中(8+M)比特用于携带所述VXLAN信息。需要说明的是,目的IPv6地址中目的VTEP的网段地址的长度也可以大于64比特,例如,当VXLAN信息的长度小于64比特时,目的IPv6地址中目的VTEP的网段地址的长度可以等于128比特减VXLAN信息的长度。In some implementations, the IPv6 header of the first message includes a destination IPv6 address, and the destination IPv6 address includes the network segment address of the destination VTEP and the VXLAN information. In the destination IPv6 address, the first 64 bits may be used to carry the network segment address of the destination VTEP, and the VXLAN information is carried in the last 64 bits of the destination IPv6 address. In one case, the mode of carrying VXLAN information in the IPv6 header is all-bit mode, then all the last 64 bits of the destination IPv6 address are used to carry the VXLAN information; in another case, the VXLAN information is carried in the IPv6 header The mode is the omitted reservation mode, then 32 bits of the last 64 bits of the destination IPv6 address are used to carry the VXLAN information; in another case, the mode carrying VXLAN information in the IPv6 header is the streamlined compression mode, then , (8+M) bits among the last 64 bits of the destination IPv6 address are used to carry the VXLAN information. It should be noted that the length of the network segment address of the destination VTEP in the destination IPv6 address can also be greater than 64 bits. For example, when the length of the VXLAN information is less than 64 bits, the length of the network segment address of the destination VTEP in the destination IPv6 address can be equal to 128 bits. Bit minus the length of the VXLAN message.
在另一些实现方式中,第一报文的IPv6头包括源IPv6地址,所述源IPv6地址包括所述源VTEP的网段地址和所述VXLAN信息。其中,源IPv6地址中,前64比特可以用于 携带源VTEP的网段地址,所述VXLAN信息携带在所述源IPv6地址的后64比特中。一种情况下,IPv6头中携带VXLAN信息的模式为全比特模式,那么,所述源IPv6地址的后64比特全部用于携带所述VXLAN信息;另一种情况下,IPv6头中携带VXLAN信息的模式为省略预留模式,那么,所述源IPv6地址的后64比特中32比特用于携带所述VXLAN信息;再一种情况下,IPv6头中携带VXLAN信息的模式为精简压缩模式,那么,所述源IPv6地址的后64比特中(8+M)比特用于携带所述VXLAN信息。需要说明的是,源IPv6地址中源VTEP的网段地址的长度也可以大于64比特,例如,当VXLAN信息的长度小于64比特时,源IPv6地址中目的VTEP的网段地址的长度可以等于128比特减VXLAN信息的长度。该情况下,第一信息、第二信息和第三信息还可以指示VXLAN信息在IPv6头的源IPv6地址中,使得第一通信装置和第二通信装置可以基于本申请实施例提供的VXLAN6封装优化方式进行有效的报文处理。In other implementations, the IPv6 header of the first message includes a source IPv6 address, and the source IPv6 address includes the network segment address of the source VTEP and the VXLAN information. Among them, the first 64 bits of the source IPv6 address can be used for It carries the network segment address of the source VTEP, and the VXLAN information is carried in the last 64 bits of the source IPv6 address. In one case, the mode of carrying VXLAN information in the IPv6 header is all-bit mode, then all the last 64 bits of the source IPv6 address are used to carry the VXLAN information; in another case, the VXLAN information is carried in the IPv6 header The mode is the omitted reservation mode, then 32 bits of the last 64 bits of the source IPv6 address are used to carry the VXLAN information; in another case, the mode carrying VXLAN information in the IPv6 header is the streamlined compression mode, then , (8+M) bits among the last 64 bits of the source IPv6 address are used to carry the VXLAN information. It should be noted that the length of the network segment address of the source VTEP in the source IPv6 address can also be greater than 64 bits. For example, when the length of the VXLAN information is less than 64 bits, the length of the network segment address of the destination VTEP in the source IPv6 address can be equal to 128 bits. Bit minus the length of the VXLAN message. In this case, the first information, the second information and the third information may also indicate that the VXLAN information is in the source IPv6 address of the IPv6 header, so that the first communication device and the second communication device can optimize the VXLAN6 encapsulation based on the embodiments of the present application. method for efficient message processing.
S106,第一通信装置通过VXLAN隧道向第二通信装置发送所述第一报文。S106: The first communication device sends the first message to the second communication device through the VXLAN tunnel.
S107,第二通信装置通过VXLAN隧道接收第一通信装置发送的第一报文,所述第一报文包括IPv6头,所述IPv6头包括VXLAN信息,所述VXLAN信息包括VNI。S107. The second communication device receives the first message sent by the first communication device through the VXLAN tunnel. The first message includes an IPv6 header, the IPv6 header includes VXLAN information, and the VXLAN information includes a VNI.
S108,第二通信装置根据所述VXLAN信息对所述第一报文进行处理。S108: The second communication device processes the first message according to the VXLAN information.
需要说明的是,如果第一通信装置和第二通信装置之间有中间通信装置,那么,S107和S108中的第一报文和S105和S106中的第一报文,外层以太头的源MAC地址和目的MAC地址不同,其他部分相同;如果第一通信装置和第二通信装置之间没有中间通信装置,那么,S107和S108中的第一报文和S105和S106中的第一报文相同。It should be noted that if there is an intermediate communication device between the first communication device and the second communication device, then the first message in S107 and S108 and the first message in S105 and S106 are the sources of the outer Ethernet header. The MAC address and the destination MAC address are different, and other parts are the same; if there is no intermediate communication device between the first communication device and the second communication device, then the first message in S107 and S108 and the first message in S105 and S106 same.
对于S108,例如可以包括:S1081,第二通信装置根据所述第一报文的目的地址匹配所述目的VTEP的网段地址,根据第二通信装置保存的所述目的VTEP的网段地址、所述VNI和第三信息的关联关系,获得所述VNI和所述第三信息;S1082,第二通信装置基于所述第三信息的指示,从所述第一报文的IPv6头中获得所述VXLAN信息;S1083,第二通信装置剥离所述第二报文的所述IPv6头,获得第三报文;S1084,第二通信装置根据所述VXLAN信息,转发所述第三报文。对应到图1所示的网络场景,第三信息可以对应上述场景实施例中路由3的指示信息2,一种情况下,第一报文可以对应图2b中的报文3’,第三报文对应图2b中的报文4’;另一种情况下,第一报文可以对应图3b中的报文7’,第三报文对应图3b中的报文8’。具体实现方式以及达到的效果可以参见图2b或图3b的相关说明。For example, S108 may include: S1081, the second communication device matches the network segment address of the destination VTEP according to the destination address of the first message, and the second communication device matches the network segment address of the destination VTEP according to the network segment address of the destination VTEP, the The correlation relationship between the VNI and the third information is obtained to obtain the VNI and the third information; S1082, the second communication device obtains the VNI and the third information from the IPv6 header of the first message based on the indication of the third information. VXLAN information; S1083, the second communication device strips off the IPv6 header of the second message and obtains a third message; S1084, the second communication device forwards the third message according to the VXLAN information. Corresponding to the network scenario shown in Figure 1, the third information may correspond to the indication information 2 of route 3 in the above scenario embodiment. In one case, the first message may correspond to the message 3' in Figure 2b, and the third message may correspond to the message 3' in Figure 2b. The message corresponds to the message 4' in Figure 2b; in another case, the first message may correspond to the message 7' in Figure 3b, and the third message corresponds to the message 8' in Figure 3b. For specific implementation methods and achieved effects, please refer to the relevant descriptions in Figure 2b or Figure 3b.
需要说明的是,S101~S104可以作为路由通告的方法单独实施,S105~S108也可以作为报文处理的方法单独实施。S101~S104中,第一通信装置和第二通信装置执行的操作可以分别作为一个实施例存在,不影响本申请提供的VXLAN封装优化方式的实现。S105~S108中,第一通信装置和第二通信装置执行的操作可以分别作为一个实施例存在,不影响本申请提供的VXLAN封装优化方式的实现。It should be noted that S101 to S104 can be implemented individually as a route advertisement method, and S105 to S108 can also be implemented individually as a message processing method. In S101 to S104, the operations performed by the first communication device and the second communication device may exist as one embodiment respectively, and do not affect the implementation of the VXLAN encapsulation optimization method provided by this application. In S105 to S108, the operations performed by the first communication device and the second communication device may exist as one embodiment respectively, and do not affect the implementation of the VXLAN encapsulation optimization method provided by this application.
可见,通过该方法100,VXLAN隧道的源VTEP将VXLAN信息封装在即将进入该VXLAN隧道的报文的IPv6头中,通过VXLAN隧道转发到该VXLAN隧道的目的VTEP,该VXLAN信息中至少包括VXLAN网络标识(VXLAN Network Identifier,VNI)。如此, 相比目前的VXLAN封装方式,该VXLAN封装优化的方式,无需再为即将进入VXLAN隧道的报文封装UDP头和VXLAN头,也能够将VXLAN隧道转发所需的VXLAN信息携带在报文中通过VXLAN隧道发送到目的VTEP,实现该报文在VXLAN隧道中传输的效果,能够有效的提高报文的封装效率,使得高效的报文处理成为可能。It can be seen that through this method 100, the source VTEP of the VXLAN tunnel encapsulates the VXLAN information in the IPv6 header of the packet that is about to enter the VXLAN tunnel, and forwards it to the destination VTEP of the VXLAN tunnel through the VXLAN tunnel. The VXLAN information at least includes the VXLAN network Identifier (VXLAN Network Identifier, VNI). in this way, Compared with the current VXLAN encapsulation method, this optimized VXLAN encapsulation method no longer needs to encapsulate UDP headers and VXLAN headers for packets that are about to enter the VXLAN tunnel. It can also carry the VXLAN information required for VXLAN tunnel forwarding in the packet through VXLAN. The tunnel is sent to the destination VTEP to realize the effect of transmitting the packet in the VXLAN tunnel, which can effectively improve the encapsulation efficiency of the packet and make efficient packet processing possible.
本申请实施例还提供了一种第一通信装置,所述第一通信装置包括:收发单元和处理单元;An embodiment of the present application also provides a first communication device, where the first communication device includes: a transceiver unit and a processing unit;
所述收发单元,用于执行以上方法实施例所述的由第一通信装置执行的接收和/或发送操作;The transceiver unit is configured to perform the receiving and/or sending operations performed by the first communication device as described in the above method embodiment;
所述处理单元,用于执行以上方法实施例所述的由第一通信装置执行的接收和/或发送操作之外的操作。The processing unit is configured to perform operations other than the receiving and/or sending operations performed by the first communication device described in the above method embodiments.
在一个具体的示例中,可参见图7,该图为本申请实施例提供的一种第一通信装置的结构示意图。图7所示的第一通信装置700,例如可以包括处理单元701和发送单元702。In a specific example, see FIG. 7 , which is a schematic structural diagram of a first communication device provided by an embodiment of the present application. The first communication device 700 shown in FIG. 7 may include, for example, a processing unit 701 and a sending unit 702.
在一些实施例中:In some embodiments:
处理单元701,用于获得第一报文,所述第一报文包括第六版互联网协议IPv6头,所述IPv6头包括虚拟扩展局域网VXLAN信息,所述VXLAN信息包括VXLAN网络标识VNI;The processing unit 701 is used to obtain the first message, the first message includes the sixth version of the Internet Protocol IPv6 header, the IPv6 header includes virtual extended LAN VXLAN information, and the VXLAN information includes the VXLAN network identifier VNI;
发送单元702,用于通过VXLAN隧道向第二通信装置发送所述第一报文,所述第二通信装置用作目的VTEP。The sending unit 702 is configured to send the first message to a second communication device through a VXLAN tunnel, and the second communication device serves as the destination VTEP.
在一些实现方式中,IPv6头包括目的IPv6地址,所述目的IPv6地址包括所述目的VTEP的网段地址和所述VXLAN信息。作为一个示例,所述VXLAN信息携带在所述目的IPv6地址的后64比特中。例如,所述目的IPv6地址的后64比特全部用于携带所述VXLAN信息。In some implementations, the IPv6 header includes a destination IPv6 address, and the destination IPv6 address includes the network segment address of the destination VTEP and the VXLAN information. As an example, the VXLAN information is carried in the last 64 bits of the destination IPv6 address. For example, all the last 64 bits of the destination IPv6 address are used to carry the VXLAN information.
在另一些实现方式中,所述IPv6头包括源IPv6地址,所述源IPv6地址包括所述源VTEP的网段地址和所述VXLAN信息。作为一个示例,所述VXLAN信息携带在所述源IPv6地址的后64比特中。例如,所述源IPv6地址的后64比特全部用于携带所述VXLAN信息。In other implementations, the IPv6 header includes a source IPv6 address, and the source IPv6 address includes the network segment address of the source VTEP and the VXLAN information. As an example, the VXLAN information is carried in the last 64 bits of the source IPv6 address. For example, all the last 64 bits of the source IPv6 address are used to carry the VXLAN information.
其中,所述VNI的长度为小于或等于24比特。Wherein, the length of the VNI is less than or equal to 24 bits.
其中,所述VXLAN信息还包括以下一项或多项:至少一个标志Flag;预留Reserve字段。Wherein, the VXLAN information also includes one or more of the following: at least one Flag; a Reserve field.
在一些实现方式中,接收单元,用于接收所述目的VTEP发布的路由通告消息,所述路由通告消息包括路由前缀、下一跳、所述VNI和第一信息,其中,所述下一跳为所述目的VTEP的网段地址,所述第一信息指示所述目的VTEP支持VXLAN封装优化;处理单元701,还用于保存所述目的VTEP的网段地址、所述VNI和第二信息的关联关系,所述第二信息指示所述源VTEP将包括所述VNI的所述VXLAN信息封装在所述IPv6头中以获得所述第一报文。作为一个示例,处理单元701,具体用于:将所述目的VTEP的网段地址、所述VNI和所述第二信息的关联关系保存到转发面。其中,所述第一信息为所述路由通告消息中的属性或扩展团体属性。 In some implementations, the receiving unit is configured to receive a route advertisement message published by the destination VTEP. The route advertisement message includes a route prefix, a next hop, the VNI and first information, wherein the next hop is the network segment address of the destination VTEP, and the first information indicates that the destination VTEP supports VXLAN encapsulation optimization; the processing unit 701 is also used to save the network segment address of the destination VTEP, the VNI, and the second information The second information indicates that the source VTEP encapsulates the VXLAN information including the VNI in the IPv6 header to obtain the first packet. As an example, the processing unit 701 is specifically configured to save the association relationship between the network segment address of the destination VTEP, the VNI and the second information to the forwarding plane. The first information is an attribute or an extended community attribute in the route advertisement message.
其中,所述第一信息还指示以下一种或多种:所述IPv6头携带所述VXLAN信息的模式;所述VXLAN信息的长度;所述VNI的长度。例如,所述VXLAN信息的模式为全比特模式,所述VXLAN信息的长度为64比特,所述VNI长度为24比特;或者,所述VXLAN信息的模式为省略预留模式,所述VXLAN信息的长度为32比特,所述VNI的长度为24比特;或者,所述VXLAN信息的模式为精简压缩模式,所述VXLAN信息包括8比特的Flags和M比特的VNI,所述M为大于或等于1的整数。Wherein, the first information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI. For example, the mode of the VXLAN information is the all-bit mode, the length of the VXLAN information is 64 bits, and the VNI length is 24 bits; or the mode of the VXLAN information is the omitted reservation mode, and the length of the VXLAN information is The length is 32 bits, and the length of the VNI is 24 bits; or, the mode of the VXLAN information is a streamlined compression mode, the VXLAN information includes 8-bit Flags and M-bit VNI, and the M is greater than or equal to 1 integer.
在一些实现方式中,处理单元701,包括:接收子单元,用于接收第二报文;处理子单元,用于根据所述第二报文的目的地址匹配所述目的VTEP的网段地址,根据所述关联关系获得所述VNI和所述第二信息;所述处理子单元,还用于根据所述第二信息的指示,对所述第二报文进行封装,获得所述第一报文。In some implementations, the processing unit 701 includes: a receiving subunit, used to receive the second message; a processing subunit, used to match the network segment address of the destination VTEP according to the destination address of the second message, Obtain the VNI and the second information according to the association relationship; the processing subunit is also configured to encapsulate the second message according to the instructions of the second information to obtain the first message. arts.
其中,所述第二信息还指示以下一种或多种:所述IPv6头携带所述VXLAN信息的模式;所述VXLAN信息的长度;所述VNI的长度。例如,所述VXLAN信息的模式为全比特模式,所述VXLAN信息的长度为64比特,所述VNI长度为24比特;或者,所述VXLAN信息的模式为省略预留模式,所述VXLAN信息的长度为32比特,所述VNI的长度为24比特;或者,所述VXLAN信息的模式为精简压缩模式,所述VXLAN信息包括8比特的Flags和M比特的VNI,所述M为大于或等于1的整数。Wherein, the second information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI. For example, the mode of the VXLAN information is the all-bit mode, the length of the VXLAN information is 64 bits, and the VNI length is 24 bits; or the mode of the VXLAN information is the omitted reservation mode, and the length of the VXLAN information is The length is 32 bits, and the length of the VNI is 24 bits; or, the mode of the VXLAN information is a streamlined compression mode, the VXLAN information includes 8-bit Flags and M-bit VNI, and the M is greater than or equal to 1 integer.
关于所述第一通信装置700的各个单元的具体实现,可以参考以上方法实施例的相关描述部分,此次不做重复描述。Regarding the specific implementation of each unit of the first communication device 700, reference may be made to the relevant descriptions of the above method embodiments, and the description will not be repeated this time.
在另一个具体的示例中,可参见图8,该图为本申请实施例提供的一种第一通信装置的结构示意图。图8所示的第一通信装置800,例如可以包括接收单元801和处理单元802。In another specific example, refer to FIG. 8 , which is a schematic structural diagram of a first communication device provided by an embodiment of the present application. The first communication device 800 shown in FIG. 8 may include, for example, a receiving unit 801 and a processing unit 802.
在一些实施例中:In some embodiments:
接收单元801,用于接收第二通信装置发送的路由通告消息,所述路由通告消息包括路由前缀、下一跳、虚拟扩展局域网VXLAN网络标识VNI和第一信息,其中,所述第二通信装置用作目的VTEP,所述下一跳为所述目的VTEP的网段地址,所述第一信息指示所述目的VTEP支持VXLAN封装优化;Receiving unit 801, configured to receive a route advertisement message sent by a second communication device, where the route advertisement message includes a route prefix, a next hop, a virtual extended local area network VXLAN network identifier VNI, and first information, wherein the second communication device Used as a destination VTEP, the next hop is the network segment address of the destination VTEP, and the first information indicates that the destination VTEP supports VXLAN encapsulation optimization;
处理单元802,用于保存所述目的VTEP的网段地址、所述VNI和第二信息的关联关系,所述第二信息指示所述源VTEP将包括所述VNI的VXLAN信息封装在第六版互联网协议IPv6头中。The processing unit 802 is configured to save the association between the network segment address of the destination VTEP, the VNI, and second information. The second information instructs the source VTEP to encapsulate the VXLAN information including the VNI in version 6. Internet Protocol IPv6 header.
在一些实现方式中,所述处理单元802,具体用于:将所述目的VTEP的网段地址、所述VNI和所述第二信息的关联关系保存到转发面。其中,所述第一信息为所述路由通告消息中的属性或扩展团体属性。In some implementations, the processing unit 802 is specifically configured to save the association relationship between the network segment address of the destination VTEP, the VNI and the second information to the forwarding plane. The first information is an attribute or an extended community attribute in the route advertisement message.
其中,所述第一信息还指示以下一种或多种:所述IPv6头携带所述VXLAN信息的模式;所述VXLAN信息的长度;所述VNI的长度。其中,所述第二信息还指示以下一种或多种:所述IPv6头携带所述VXLAN信息的模式;所述VXLAN信息的长度;所述VNI的长度。例如,所述VXLAN信息的模式为全比特模式,所述VXLAN信息的长度为64比特,所述VNI长度为24比特;或者,所述VXLAN信息的模式为省略预留模式,所述VXLAN 信息的长度为32比特,所述VNI的长度为24比特;或者,所述VXLAN信息的模式为精简压缩模式,所述VXLAN信息包括8比特的Flags和M比特的VNI,所述M为大于或等于1的整数。Wherein, the first information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI. Wherein, the second information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI. For example, the mode of the VXLAN information is an all-bit mode, the length of the VXLAN information is 64 bits, and the length of the VNI is 24 bits; or the mode of the VXLAN information is an omitted reservation mode, and the VXLAN information is an omitted reservation mode. The length of the information is 32 bits, and the length of the VNI is 24 bits; or, the mode of the VXLAN information is a simplified compression mode, the VXLAN information includes 8-bit Flags and M-bit VNI, and the M is greater than or An integer equal to 1.
其中,所述VXLAN信息还包括以下一项或多项:至少一个标志Flag;预留Reserve字段。Wherein, the VXLAN information also includes one or more of the following: at least one Flag; a Reserve field.
在一些实现方式中,所述接收单元801,还用于接收第一报文;所述处理单元802,还用于根据所述第一报文的目的地址匹配所述目的VTEP的网段地址,根据所述关联关系获得所述VNI和所述第二信息;所述处理单元802,还用于根据所述第二信息的指示,对所述第一报文进行封装,获得第二报文,所述第二报文包括第一IPv6头,所述第一IPv6头包括VXLAN信息,所述VXLAN信息包括所述VNI;发送单元,用于通过VXLAN隧道向所述第二通信装置发送所述第二报文。In some implementations, the receiving unit 801 is also configured to receive the first message; the processing unit 802 is also configured to match the network segment address of the destination VTEP according to the destination address of the first message, Obtain the VNI and the second information according to the association relationship; the processing unit 802 is also configured to encapsulate the first message according to the instructions of the second information to obtain a second message, The second message includes a first IPv6 header, the first IPv6 header includes VXLAN information, and the VXLAN information includes the VNI; a sending unit configured to send the first communication device to the second communication device through a VXLAN tunnel. Two messages.
关于所述第一通信装置800的各个单元的具体实现,可以参考以上方法实施例的相关描述部分,此次不做重复描述。Regarding the specific implementation of each unit of the first communication device 800, you may refer to the relevant descriptions of the above method embodiments, and the description will not be repeated this time.
本申请实施例还提供了一种第二通信装置,所述第二通信装置包括:收发单元和处理单元;The embodiment of the present application also provides a second communication device, the second communication device includes: a transceiver unit and a processing unit;
所述收发单元,用于执行以上方法实施例所述的由第二通信装置执行的接收和/或发送操作;The transceiver unit is configured to perform the receiving and/or sending operations performed by the second communication device as described in the above method embodiment;
所述处理单元,用于执行以上方法实施例所述的由第二通信装置执行的接收和/或发送操作之外的操作。The processing unit is configured to perform operations other than the receiving and/or sending operations performed by the second communication device as described in the above method embodiments.
在一个具体的示例中,可参见图9,该图为本申请实施例提供的一种第二通信装置的结构示意图。图9所示的第二通信装置900,例如可以包括接收单元901和处理单元902。In a specific example, see FIG. 9 , which is a schematic structural diagram of a second communication device provided by an embodiment of the present application. The second communication device 900 shown in FIG. 9 may include, for example, a receiving unit 901 and a processing unit 902.
在一些实施例中:In some embodiments:
接收单元901,用于通过虚拟扩展局域网VXLAN隧道接收第一通信装置发送的第一报文,所述第一报文包括第六版互联网协议IPv6头,所述IPv6头包括VXLAN信息,所述VXLAN信息包括VXLAN网络标识VNI,所述第一通信装置用作源VTEP;The receiving unit 901 is configured to receive the first message sent by the first communication device through the virtual extended local area network VXLAN tunnel. The first message includes the sixth version of the Internet Protocol IPv6 header, and the IPv6 header includes VXLAN information. The VXLAN The information includes a VXLAN network identification VNI, the first communications device serving as a source VTEP;
处理单元902,用于根据所述VXLAN信息对所述第一报文进行处理。The processing unit 902 is configured to process the first packet according to the VXLAN information.
在一些实现方式中,IPv6头包括目的IPv6地址,所述目的IPv6地址包括所述目的VTEP的网段地址和所述VXLAN信息。作为一个示例,所述VXLAN信息携带在所述目的IPv6地址的后64比特中。例如,所述目的IPv6地址的后64比特全部用于携带所述VXLAN信息。In some implementations, the IPv6 header includes a destination IPv6 address, and the destination IPv6 address includes the network segment address of the destination VTEP and the VXLAN information. As an example, the VXLAN information is carried in the last 64 bits of the destination IPv6 address. For example, all the last 64 bits of the destination IPv6 address are used to carry the VXLAN information.
在另一些实现方式中,所述IPv6头包括源IPv6地址,所述源IPv6地址包括所述源VTEP的网段地址和所述VXLAN信息。作为一个示例,所述VXLAN信息携带在所述源IPv6地址的后64比特中。例如,所述源IPv6地址的后64比特全部用于携带所述VXLAN信息。In other implementations, the IPv6 header includes a source IPv6 address, and the source IPv6 address includes the network segment address of the source VTEP and the VXLAN information. As an example, the VXLAN information is carried in the last 64 bits of the source IPv6 address. For example, all the last 64 bits of the source IPv6 address are used to carry the VXLAN information.
其中,所述VNI的长度为小于或等于24比特。Wherein, the length of the VNI is less than or equal to 24 bits.
其中,所述VXLAN信息还包括以下一项或多项:至少一个标志Flag;预留Reserve字段。 Wherein, the VXLAN information also includes one or more of the following: at least one Flag; a Reserve field.
在一些实现方式中,发送单元,用于向所述源VTEP发布的路由通告消息,所述路由通告消息包括路由前缀、下一跳、所述VNI和第一信息,其中,所述下一跳为所述目的VTEP的网段地址,所述第一信息指示所述目的VTEP支持VXLAN封装优化。其中,所述第一信息为所述路由通告消息中的属性或扩展团体属性。In some implementations, the sending unit is configured to publish a route advertisement message to the source VTEP. The route advertisement message includes a route prefix, a next hop, the VNI and first information, wherein the next hop is the network segment address of the destination VTEP, and the first information indicates that the destination VTEP supports VXLAN encapsulation optimization. The first information is an attribute or an extended community attribute in the route advertisement message.
其中,第一信息还指示以下一种或多种:所述IPv6头携带所述VXLAN信息的模式;所述VXLAN信息的长度;所述VNI的长度。例如,所述VXLAN信息的模式为全比特模式,所述VXLAN信息的长度为64比特,所述VNI长度为24比特;或者,所述VXLAN信息的模式为省略预留模式,所述VXLAN信息的的长度大于或等于24比特,且所述VXLAN信息的长度小于64比特,所述VNI的长度为24比特;或者,所述VXLAN信息的模式为精简压缩模式,所述VXLAN信息的长度大于或等于M比特,且所述VXLAN信息的长度小于64比特,所述VNI的长度为M比特,所述M为大于或等于1的整数。Wherein, the first information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI. For example, the mode of the VXLAN information is the all-bit mode, the length of the VXLAN information is 64 bits, and the VNI length is 24 bits; or the mode of the VXLAN information is the omitted reservation mode, and the length of the VXLAN information is The length of the VXLAN information is greater than or equal to 24 bits, and the length of the VXLAN information is less than 64 bits, and the length of the VNI is 24 bits; or the mode of the VXLAN information is a streamlined compression mode, and the length of the VXLAN information is greater than or equal to M bits, and the length of the VXLAN information is less than 64 bits, the length of the VNI is M bits, and M is an integer greater than or equal to 1.
在一些实现方式中,处理单元902,还用于保存所述目的VTEP的网段地址、所述VNI和第二信息的关联关系,所述第二信息指示包括所述VNI的所述VXLAN信息封装在所述第一报文的所述IPv6头中。In some implementations, the processing unit 902 is also configured to save the association between the network segment address of the destination VTEP, the VNI, and second information, where the second information indicates the VXLAN information encapsulation including the VNI. In the IPv6 header of the first packet.
其中,第二信息还指示以下一种或多种:所述IPv6头携带所述VXLAN信息的模式;所述VXLAN信息的长度;所述VNI的长度。例如,所述VXLAN信息的模式为全比特模式,所述VXLAN信息的长度为64比特,所述VNI长度为24比特;或者,所述VXLAN信息的模式为省略预留模式,所述VXLAN信息的的长度大于或等于24比特,且所述VXLAN信息的长度小于64比特,所述VNI的长度为24比特;或者,所述VXLAN信息的模式为精简压缩模式,所述VXLAN信息的长度大于或等于M比特,且所述VXLAN信息的长度小于64比特,所述VNI的长度为M比特,所述M为大于或等于1的整数。Wherein, the second information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI. For example, the mode of the VXLAN information is the all-bit mode, the length of the VXLAN information is 64 bits, and the VNI length is 24 bits; or the mode of the VXLAN information is the omitted reservation mode, and the length of the VXLAN information is The length of the VXLAN information is greater than or equal to 24 bits, and the length of the VXLAN information is less than 64 bits, and the length of the VNI is 24 bits; or the mode of the VXLAN information is a streamlined compression mode, and the length of the VXLAN information is greater than or equal to M bits, and the length of the VXLAN information is less than 64 bits, the length of the VNI is M bits, and M is an integer greater than or equal to 1.
在一些实现方式中,所述处理单元902,包括:匹配子单元,用于根据所述第一报文的目的地址匹配所述目的VTEP的网段地址,根据所述关联关系获得所述VNI和所述第二信息;第一获得子单元,用于基于所述第二信息的指示,从所述第一报文的IPv6头中获得所述VXLAN信息;第二获得子单元,用于剥离所述第二报文的所述IPv6头,获得第二报文;转发子单元,用于根据所述VXLAN信息,转发所述第二报文。In some implementations, the processing unit 902 includes: a matching subunit, configured to match the network segment address of the destination VTEP according to the destination address of the first message, and obtain the VNI and The second information; a first obtaining subunit, used to obtain the VXLAN information from the IPv6 header of the first message based on the indication of the second information; a second obtaining subunit, used to strip off all The IPv6 header of the second message is used to obtain the second message; the forwarding subunit is configured to forward the second message according to the VXLAN information.
关于所述第二通信装置900的各个单元的具体实现,可以参考以上方法实施例的相关描述部分,此次不做重复描述。Regarding the specific implementation of each unit of the second communication device 900, reference may be made to the relevant descriptions of the above method embodiments, and the description will not be repeated this time.
在另一个具体的示例中,可参见图10,该图为本申请实施例提供的一种第二通信装置的结构示意图。图10所示的第二通信装置1000,例如可以包括处理单元1001和发送单元1002。In another specific example, reference can be made to FIG. 10 , which is a schematic structural diagram of a second communication device provided by an embodiment of the present application. The second communication device 1000 shown in FIG. 10 may include, for example, a processing unit 1001 and a sending unit 1002.
在一些实施例中:In some embodiments:
处理单元1001,用于生成路由通告消息,所述路由通告消息包括路由前缀、下一跳、虚拟扩展局域网VXLAN网络标识VNI和第一信息,其中,所述下一跳为所述目的VTEP的网段地址,所述第一信息指示所述目的VTEP支持VXLAN封装优化;The processing unit 1001 is configured to generate a route advertisement message. The route advertisement message includes a route prefix, a next hop, a virtual extended LAN VXLAN network identifier VNI, and first information, where the next hop is the network of the destination VTEP. Segment address, the first information indicates that the destination VTEP supports VXLAN encapsulation optimization;
发送单元1002,用于向第一通信装置发送所述路由通告消息,所述第一通信装置用作 源VTEP。其中,第一信息为所述路由通告消息中的属性或扩展团体属性。Sending unit 1002, configured to send the route advertisement message to a first communication device, where the first communication device is used as Source VTEP. The first information is an attribute or an extended community attribute in the route advertisement message.
其中,所述第一信息还指示以下一种或多种:所述IPv6头携带所述VXLAN信息的模式;所述VXLAN信息的长度;所述VNI的长度。例如,所述VXLAN信息的模式为全比特模式,所述VXLAN信息的长度为64比特,所述VNI长度为24比特;或者,所述VXLAN信息的模式为省略预留模式,所述VXLAN信息的的长度大于或等于24比特,且所述VXLAN信息的长度小于64比特,所述VNI的长度为24比特;或者,所述VXLAN信息的模式为精简压缩模式,所述VXLAN信息的长度大于或等于M比特,且所述VXLAN信息的长度小于64比特,所述VNI的长度为M比特,所述M为大于或等于1的整数。Wherein, the first information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI. For example, the mode of the VXLAN information is the all-bit mode, the length of the VXLAN information is 64 bits, and the VNI length is 24 bits; or the mode of the VXLAN information is the omitted reservation mode, and the length of the VXLAN information is The length of the VXLAN information is greater than or equal to 24 bits, and the length of the VXLAN information is less than 64 bits, and the length of the VNI is 24 bits; or the mode of the VXLAN information is a streamlined compression mode, and the length of the VXLAN information is greater than or equal to M bits, and the length of the VXLAN information is less than 64 bits, the length of the VNI is M bits, and M is an integer greater than or equal to 1.
其中,VXLAN信息还包括以下一项或多项:至少一个标志Flag;预留Reserve字段。Among them, the VXLAN information also includes one or more of the following: at least one Flag; a Reserve field.
在一些实现方式中,所述处理单元1001,还用于保存所述目的VTEP的网段地址、所述VNI和第二信息的关联关系,所述第二信息指示包括所述VNI的VXLAN信息封装在第六版互联网协议的IPv6头中。In some implementations, the processing unit 1001 is also configured to save the association between the network segment address of the destination VTEP, the VNI and second information, where the second information indicates the VXLAN information encapsulation including the VNI. In the IPv6 header of version 6 of the Internet Protocol.
其中,第二信息还指示以下一种或多种:所述IPv6头携带所述VXLAN信息的模式;所述VXLAN信息的长度;所述VNI的长度。例如,所述VXLAN信息的模式为全比特模式,所述VXLAN信息的长度为64比特,所述VNI长度为24比特;或者,所述VXLAN信息的模式为省略预留模式,所述VXLAN信息的的长度大于或等于24比特,且所述VXLAN信息的长度小于64比特,所述VNI的长度为24比特;或者,所述VXLAN信息的模式为精简压缩模式,所述VXLAN信息的长度大于或等于M比特,且所述VXLAN信息的长度小于64比特,所述VNI的长度为M比特,所述M为大于或等于1的整数。Wherein, the second information also indicates one or more of the following: the mode in which the IPv6 header carries the VXLAN information; the length of the VXLAN information; and the length of the VNI. For example, the mode of the VXLAN information is the all-bit mode, the length of the VXLAN information is 64 bits, and the VNI length is 24 bits; or the mode of the VXLAN information is the omitted reservation mode, and the length of the VXLAN information is The length of the VXLAN information is greater than or equal to 24 bits, and the length of the VXLAN information is less than 64 bits, and the length of the VNI is 24 bits; or the mode of the VXLAN information is a streamlined compression mode, and the length of the VXLAN information is greater than or equal to M bits, and the length of the VXLAN information is less than 64 bits, the length of the VNI is M bits, and M is an integer greater than or equal to 1.
在一些实现方式中,接收单元,用于通过VXLAN隧道接收所述第一通信装置发送的第一报文,所述第一报文包括IPv6头,所述IPv6头包括所述VXLAN信息;所述处理单元1001,还用于根据所述第一报文的目的地址匹配所述目的VTEP的网段地址,根据所述关联关系获得所述VNI和所述第二信息;所述处理单元1001,还用于基于所述第二信息的指示,从所述第一报文的IPv6头中获得所述VXLAN信息;所述处理单元1001,还用于剥离所述第二报文的所述IPv6头,获得第二报文;所述发送单元1002,还用于根据所述VXLAN信息,转发所述第二报文。In some implementations, the receiving unit is configured to receive the first message sent by the first communication device through the VXLAN tunnel, the first message includes an IPv6 header, and the IPv6 header includes the VXLAN information; The processing unit 1001 is also configured to match the network segment address of the destination VTEP according to the destination address of the first message, and obtain the VNI and the second information according to the association relationship; the processing unit 1001 is also configured to Based on the indication of the second information, obtain the VXLAN information from the IPv6 header of the first message; the processing unit 1001 is also configured to strip the IPv6 header of the second message, Obtain the second message; the sending unit 1002 is further configured to forward the second message according to the VXLAN information.
关于所述第二通信装置1000的各个单元的具体实现,可以参考以上方法实施例的相关描述部分,此次不做重复描述。Regarding the specific implementation of each unit of the second communication device 1000, reference may be made to the relevant descriptions of the above method embodiments, and the description will not be repeated this time.
此外,本申请实施例还提供了一种通信装置1100,参见图11所示,图11为本申请实施例提供的一种通信装置的结构示意图。该通信装置1100包括通信接口1101和与通信接口1101连接的处理器1102。该通信装置1100可以用于执行以上实施例中的方法100。In addition, the embodiment of the present application also provides a communication device 1100, as shown in FIG. 11. FIG. 11 is a schematic structural diagram of a communication device provided by the embodiment of the present application. The communication device 1100 includes a communication interface 1101 and a processor 1102 connected to the communication interface 1101. The communication device 1100 can be used to perform the method 100 in the above embodiment.
在一个示例中,所述通信装置1100可以执行以上实施例中的方法100,当通信装置1100用于执行以上实施例中的方法100时,通信装置1100相当于方法100中的第一通信装置。通信接口1101用于执行方法100中第一通信装置执行的收发操作。处理器1102用于执行方法100中第一通信装置执行的除收发操作之外的操作。例如:处理器1102用于获得第一报文,该第一报文通过IPv6头携带VXLAN信息,该VXLAN信息至少包括VNI;通信接 口1101用于通过VXLAN隧道向第二通信装置发送所述第一报文。又例如,通信接口1101用于接收第二通信装置发送的路由通告消息,所述路由通告消息包括路由前缀、下一跳、虚拟扩展局域网VXLAN网络标识VNI和第一信息,其中,所述第二通信装置用作目的VTEP,所述下一跳为所述目的VTEP的网段地址,所述第一信息指示所述目的VTEP支持VXLAN封装优化;处理器1102用于保存所述目的VTEP的网段地址、所述VNI和第二信息的关联关系,所述第二信息指示所述源VTEP将包括所述VNI的VXLAN信息封装在IPv6头中。In one example, the communication device 1100 can perform the method 100 in the above embodiment. When the communication device 1100 is used to perform the method 100 in the above embodiment, the communication device 1100 is equivalent to the first communication device in the method 100. The communication interface 1101 is used to perform the sending and receiving operations performed by the first communication device in the method 100. The processor 1102 is configured to perform operations other than the sending and receiving operations performed by the first communication device in the method 100. For example: the processor 1102 is used to obtain the first message, which carries VXLAN information through the IPv6 header, and the VXLAN information at least includes VNI; the communication interface Port 1101 is used to send the first message to the second communication device through the VXLAN tunnel. For another example, the communication interface 1101 is used to receive a route advertisement message sent by the second communication device. The route advertisement message includes a route prefix, a next hop, a virtual extended LAN VXLAN network identifier VNI and first information, wherein the second The communication device is used as a destination VTEP, the next hop is the network segment address of the destination VTEP, and the first information indicates that the destination VTEP supports VXLAN encapsulation optimization; the processor 1102 is used to save the network segment of the destination VTEP. The association relationship between the address, the VNI and the second information, the second information instructs the source VTEP to encapsulate the VXLAN information including the VNI in the IPv6 header.
在一个示例中,所述通信装置1100可以执行以上实施例中的方法100,当通信装置1100用于执行以上实施例中的方法100时,通信装置1000相当于方法100中的第二通信装置。通信接口1101用于执行方法100中第二通信装置执行的收发操作。处理器1102用于执行方法100中第二通信装置执行的除收发操作之外的操作。例如:通信接口1101用于通过VXLAN隧道接收第一通信装置发送的第一报文,所述第一报文包括IPv6头,所述IPv6头包括VXLAN信息,所述VXLAN信息包括VXLAN网络标识VNI,所述第一通信装置用作源VTEP;处理器1102用于根据所述VXLAN信息对所述第一报文进行处理。又例如:处理器1102用于生成路由通告消息,所述路由通告消息包括路由前缀、下一跳、VXLAN网络标识VNI和第一信息,其中,所述下一跳为所述目的VTEP的网段地址,所述第一信息指示所述目的VTEP支持VXLAN封装优化;通信接口1101用于向第一通信装置发送所述路由通告消息,所述第一通信装置用作源VTEP。In one example, the communication device 1100 can perform the method 100 in the above embodiment. When the communication device 1100 is used to perform the method 100 in the above embodiment, the communication device 1000 is equivalent to the second communication device in the method 100. The communication interface 1101 is used to perform the sending and receiving operations performed by the second communication device in the method 100. The processor 1102 is configured to perform operations other than the sending and receiving operations performed by the second communication device in the method 100. For example: the communication interface 1101 is used to receive the first message sent by the first communication device through the VXLAN tunnel, the first message includes an IPv6 header, the IPv6 header includes VXLAN information, and the VXLAN information includes the VXLAN network identifier VNI, The first communication device is used as a source VTEP; the processor 1102 is used to process the first message according to the VXLAN information. For another example, the processor 1102 is configured to generate a route advertisement message. The route advertisement message includes a route prefix, a next hop, a VXLAN network identifier VNI, and first information, where the next hop is the network segment of the destination VTEP. address, the first information indicates that the destination VTEP supports VXLAN encapsulation optimization; the communication interface 1101 is used to send the route advertisement message to the first communication device, and the first communication device serves as the source VTEP.
此外,本申请实施例还提供了一种通信装置1200,参见图12所示,图12为本申请实施例提供的一种通信装置的结构示意图。该通信装置1200可以用于执行以上实施例中的方法100。In addition, the embodiment of the present application also provides a communication device 1200, as shown in FIG. 12. FIG. 12 is a schematic structural diagram of a communication device provided by the embodiment of the present application. The communication device 1200 may be used to perform the method 100 in the above embodiment.
如图12所示,通信装置1200可以包括处理器1210,与所述处理器1210耦合连接的存储器1220,收发器1230。收发器1230例如可以是通信接口,光模块等。处理器1210可以是中央处理器(英文:central processing unit,缩写:CPU),网络处理器(英文:network processor,缩写:NP)或者CPU和NP的组合。处理器还可以是专用集成电路(英文:application-specific integrated circuit,缩写:ASIC),可编程逻辑器件(英文:programmable logic device,缩写:PLD)或其组合。上述PLD可以是复杂可编程逻辑器件(英文:complex programmable logic device,缩写:CPLD),现场可编程逻辑门阵列(英文:field-programmable gate array,缩写:FPGA),通用阵列逻辑(英文:generic array logic,缩写:GAL)或其任意组合。处理器1210可以是指一个处理器,也可以包括多个处理器。存储器1220可以包括易失性存储器(英文:volatile memory),例如随机存取存储器(英文:random-access memory,缩写:RAM);存储器也可以包括非易失性存储器(英文:non-volatile memory),例如只读存储器(英文:read-only memory,缩写:ROM),快闪存储器(英文:flash memory),硬盘(英文:hard disk drive,缩写:HDD)或固态硬盘(英文:solid-state drive,缩写:SSD);存储器1220还可以包括上述种类的存储器的组合。存储器1220可以是指一个存储器,也可以包括多个存储器。在一个实施方式中,存储器1220中存储有计算机可读指令,所述计 算机可读指令包括多个软件模块,例如发送模块1221,处理模块1222和接收模块1223。处理器1210执行各个软件模块后可以按照各个软件模块的指示进行相应的操作。在本实施例中,一个软件模块所执行的操作实际上是指处理器1210根据所述软件模块的指示而执行的操作。As shown in Figure 12, the communication device 1200 may include a processor 1210, a memory 1220 coupled to the processor 1210, and a transceiver 1230. The transceiver 1230 may be, for example, a communication interface, an optical module, etc. The processor 1210 may be a central processing unit (English: central processing unit, abbreviation: CPU), a network processor (English: network processor, abbreviation: NP) or a combination of CPU and NP. The processor can also be an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The above-mentioned PLD can be a complex programmable logic device (English: complex programmable logic device, abbreviation: CPLD), a field-programmable gate array (English: field-programmable gate array, abbreviation: FPGA), a general array logic (English: generic array logic, abbreviation: GAL) or any combination thereof. The processor 1210 may refer to one processor or may include multiple processors. The memory 1220 may include volatile memory (English: volatile memory), such as random access memory (English: random-access memory, abbreviation: RAM); the memory may also include non-volatile memory (English: non-volatile memory) , such as read-only memory (English: read-only memory, abbreviation: ROM), flash memory (English: flash memory), hard disk (English: hard disk drive, abbreviation: HDD) or solid-state drive (English: solid-state drive , abbreviation: SSD); the memory 1220 may also include a combination of the above types of memories. The memory 1220 may refer to one memory or may include multiple memories. In one embodiment, computer readable instructions are stored in memory 1220, and the computer The computer-readable instructions include a plurality of software modules, such as a sending module 1221, a processing module 1222 and a receiving module 1223. After executing each software module, the processor 1210 can perform corresponding operations according to the instructions of each software module. In this embodiment, the operations performed by a software module actually refer to operations performed by the processor 1210 according to the instructions of the software module.
在一个示例中,所述通信装置1200可以执行以上实施例中的方法100,当通信装置1200用于执行以上实施例中的方法100时,通信装置1200相当于方法100中的第一通信装置。收发器1230用于执行方法100中第一通信装置执行的收发操作。处理器1210用于执行方法100中第一通信装置执行的除收发操作之外的操作。例如:处理器1210用于获得第一报文,该第一报文通过IPv6头携带VXLAN信息,该VXLAN信息至少包括VNI;收发器1230用于通过VXLAN隧道向第二通信装置发送所述第一报文。又例如,收发器1230用于接收第二通信装置发送的路由通告消息,所述路由通告消息包括路由前缀、下一跳、虚拟扩展局域网VXLAN网络标识VNI和第一信息,其中,所述第二通信装置用作目的VTEP,所述下一跳为所述目的VTEP的网段地址,所述第一信息指示所述目的VTEP支持VXLAN封装优化;处理器1210用于保存所述目的VTEP的网段地址、所述VNI和第二信息的关联关系,所述第二信息指示所述源VTEP将包括所述VNI的VXLAN信息封装在IPv6头中。In one example, the communication device 1200 can perform the method 100 in the above embodiment. When the communication device 1200 is used to perform the method 100 in the above embodiment, the communication device 1200 is equivalent to the first communication device in the method 100. The transceiver 1230 is used to perform the transceiver operation performed by the first communication device in the method 100. The processor 1210 is configured to perform operations other than the sending and receiving operations performed by the first communication device in the method 100. For example: the processor 1210 is used to obtain a first message, the first message carries VXLAN information through an IPv6 header, and the VXLAN information at least includes VNI; the transceiver 1230 is used to send the first message to the second communication device through a VXLAN tunnel. message. For another example, the transceiver 1230 is configured to receive a route advertisement message sent by the second communication device. The route advertisement message includes a route prefix, a next hop, a virtual extended LAN VXLAN network identifier VNI, and first information, wherein the second The communication device is used as a destination VTEP, the next hop is the network segment address of the destination VTEP, and the first information indicates that the destination VTEP supports VXLAN encapsulation optimization; the processor 1210 is used to save the network segment of the destination VTEP. The association relationship between the address, the VNI and the second information, the second information instructs the source VTEP to encapsulate the VXLAN information including the VNI in the IPv6 header.
在一个示例中,所述通信装置1200可以执行以上实施例中的方法100,当通信装置1200用于执行以上实施例中的方法100时,通信装置1200相当于方法100中的第二通信装置。收发器1230用于执行方法100中第二通信装置执行的收发操作。处理器1210用于执行方法100中第二通信装置执行的除收发操作之外的操作。例如:收发器1230用于通过VXLAN隧道接收第一通信装置发送的第一报文,所述第一报文包括IPv6头,所述IPv6头包括VXLAN信息,所述VXLAN信息包括VXLAN网络标识VNI,所述第一通信装置用作源VTEP;处理器1210用于根据所述VXLAN信息对所述第一报文进行处理。又例如:处理器1210用于生成路由通告消息,所述路由通告消息包括路由前缀、下一跳、VXLAN网络标识VNI和第一信息,其中,所述下一跳为所述目的VTEP的网段地址,所述第一信息指示所述目的VTEP支持VXLAN封装优化;收发器1230用于向第一通信装置发送所述路由通告消息,所述第一通信装置用作源VTEP。In one example, the communication device 1200 can perform the method 100 in the above embodiment. When the communication device 1200 is used to perform the method 100 in the above embodiment, the communication device 1200 is equivalent to the second communication device in the method 100. The transceiver 1230 is used to perform the transceiver operation performed by the second communication device in the method 100. The processor 1210 is configured to perform operations other than the sending and receiving operations performed by the second communication device in the method 100. For example: the transceiver 1230 is configured to receive the first message sent by the first communication device through the VXLAN tunnel, the first message includes an IPv6 header, the IPv6 header includes VXLAN information, and the VXLAN information includes the VXLAN network identifier VNI, The first communication device is used as a source VTEP; the processor 1210 is used to process the first message according to the VXLAN information. For another example, the processor 1210 is configured to generate a route advertisement message, which includes a route prefix, a next hop, a VXLAN network identifier VNI, and first information, where the next hop is the network segment of the destination VTEP. address, the first information indicates that the destination VTEP supports VXLAN encapsulation optimization; the transceiver 1230 is configured to send the route advertisement message to the first communication device, and the first communication device serves as the source VTEP.
本申请还提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得所述计算机执行前述实施例中所述的方法(例如方法100)中任意一个或多个操作。The present application also provides a computer-readable storage medium that stores instructions that, when run on a computer, cause the computer to execute the method described in the foregoing embodiments (for example, method 100 ) any one or more operations.
本申请还提供了一种计算机程序产品,包括计算机程序,当其在计算机上运行时,使得所述计算机执行前述实施例中所述的方法(例如方法100)中任意一个或多个操作。This application also provides a computer program product, which includes a computer program that, when run on a computer, causes the computer to perform any one or more operations in the method (eg, method 100) described in the previous embodiments.
本申请还提供了一种通信系统,包括以上实施例方法100中提及的第一通信装置和第二通信装置。The present application also provides a communication system, including the first communication device and the second communication device mentioned in the method 100 of the above embodiment.
本申请还提供了一种通信系统,包括至少一个存储器和至少一个处理器,该至少一个存储器存储有指令,该至少一个处理器执行所述指令,使得所述通信系统执行本申请前述实施例中任一实施例所述的方法(例如方法100)中任意一个或多个操作。This application also provides a communication system, including at least one memory and at least one processor. The at least one memory stores instructions, and the at least one processor executes the instructions, so that the communication system executes the aforementioned embodiments of the application. Any one or more operations in the method described in any embodiment (eg, method 100).
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四” 等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms “first”, “second”, “third” and “fourth” in the description and claims of this application and the above drawings etc. (if present) is used to distinguish similar objects and not necessarily to describe a specific order or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances so that the embodiments described herein can be practiced in sequences other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, e.g., a process, method, system, product, or apparatus that encompasses a series of steps or units and need not be limited to those explicitly listed. Those steps or elements may instead include other steps or elements not expressly listed or inherent to the process, method, product or apparatus.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be described again here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,单元的划分,仅仅为一种逻辑业务划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of units is only a logical service division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated. to another system, or some features can be ignored, or not implemented. On the other hand, the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the devices or units may be in electrical, mechanical or other forms.
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。A unit described as a separate component may or may not be physically separate. A component shown as a unit may or may not be a physical unit, that is, it may be located in one place, or it may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各业务单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件业务单元的形式实现。In addition, each business unit in various embodiments of this application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above integrated units can be implemented in the form of hardware or software business units.
集成的单元如果以软件业务单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。Integrated units may be stored in a computer-readable storage medium when implemented in the form of software business units and sold or used as independent products. Based on this understanding, the technical solution of the present application is essentially or contributes to the existing technology, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program code. .
本领域技术人员应该可以意识到,在上述一个或多个示例中,本发明所描述的业务可以用硬件、软件、固件或它们的任意组合来实现。当使用软件实现时,可以将这些业务存储在计算机可读介质中或者作为计算机可读介质上的一个或多个指令或代码进行传输。计算机可读介质包括计算机存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是通用或专用计算机能够存取的任何可用介质。Those skilled in the art should realize that in one or more of the above examples, the services described in the present invention can be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these services may be stored on or transmitted as one or more instructions or code on a computer-readable medium. Computer-readable media includes computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. Storage media can be any available media that can be accessed by a general purpose or special purpose computer.
以上的具体实施方式,对本发明的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上仅为本发明的具体实施方式而已。The above specific embodiments further describe the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific embodiments of the present invention.
以上,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施 例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。 Above, the above embodiments are only used to illustrate the technical solution of the present application, but not to limit it; although referring to the foregoing implementation This application has been described in detail in the examples. Those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent substitutions for some of the technical features; and these modifications or substitutions, This does not make the essence of the corresponding technical solution depart from the scope of the technical solution of each embodiment of the present application.

Claims (55)

  1. 一种报文处理的方法,其特征在于,应用于第一通信装置,所述第一通信装置用作源虚拟扩展局域网隧道端点VTEP,所述方法包括:A message processing method, characterized in that it is applied to a first communication device, and the first communication device is used as a source virtual extended LAN tunnel end point VTEP. The method includes:
    获得第一报文,所述第一报文包括第六版互联网协议IPv6头,所述IPv6头包括虚拟扩展局域网VXLAN信息,所述VXLAN信息包括VXLAN网络标识VNI;Obtain a first message, the first message includes a sixth version of the Internet Protocol IPv6 header, the IPv6 header includes virtual extended LAN VXLAN information, and the VXLAN information includes a VXLAN network identifier VNI;
    通过VXLAN隧道向第二通信装置发送所述第一报文,所述第二通信装置用作目的VTEP。The first message is sent to a second communication device through a VXLAN tunnel, and the second communication device serves as a destination VTEP.
  2. 根据权利要求1所述的方法,其特征在于,所述IPv6头包括目的IPv6地址,所述目的IPv6地址包括所述目的VTEP的网段地址和所述VXLAN信息。The method according to claim 1, characterized in that the IPv6 header includes a destination IPv6 address, and the destination IPv6 address includes the network segment address of the destination VTEP and the VXLAN information.
  3. 根据权利要求2所述的方法,其特征在于,所述VXLAN信息携带在所述目的IPv6地址的后64比特中。The method according to claim 2, characterized in that the VXLAN information is carried in the last 64 bits of the destination IPv6 address.
  4. 根据权利要求3所述的方法,其特征在于,所述目的IPv6地址的后64比特全部用于携带所述VXLAN信息。The method according to claim 3, characterized in that all the last 64 bits of the destination IPv6 address are used to carry the VXLAN information.
  5. 根据权利要求1所述的方法,其特征在于,所述IPv6头包括源IPv6地址,所述源IPv6地址包括所述源VTEP的网段地址和所述VXLAN信息。The method according to claim 1, wherein the IPv6 header includes a source IPv6 address, and the source IPv6 address includes the network segment address of the source VTEP and the VXLAN information.
  6. 根据权利要求5所述的方法,其特征在于,所述VXLAN信息携带在所述源IPv6地址的后64比特中。The method according to claim 5, characterized in that the VXLAN information is carried in the last 64 bits of the source IPv6 address.
  7. 根据权利要求6所述的方法,其特征在于,所述源IPv6地址的后64比特全部用于携带所述VXLAN信息。The method according to claim 6, characterized in that all the last 64 bits of the source IPv6 address are used to carry the VXLAN information.
  8. 根据权利要求1-7任一项所述的方法,其特征在于,所述VNI的长度为小于或等于24比特。The method according to any one of claims 1 to 7, characterized in that the length of the VNI is less than or equal to 24 bits.
  9. 根据权利要求1-8任一项所述的方法,其特征在于,所述VXLAN信息还包括以下一项或多项:The method according to any one of claims 1 to 8, characterized in that the VXLAN information also includes one or more of the following:
    至少一个标志Flag;At least one flag Flag;
    预留Reserve字段。Reserve the Reserve field.
  10. 根据权利要求1-9任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-9, characterized in that the method further includes:
    接收所述目的VTEP发布的路由通告消息,所述路由通告消息包括路由前缀、下一跳、所述VNI和第一信息,其中,所述下一跳为所述目的VTEP的网段地址,所述第一信息指示所述目的VTEP支持VXLAN封装优化;Receive a route advertisement message issued by the destination VTEP. The route advertisement message includes a route prefix, a next hop, the VNI and first information, where the next hop is the network segment address of the destination VTEP, so The first information indicates that the destination VTEP supports VXLAN encapsulation optimization;
    保存所述目的VTEP的网段地址、所述VNI和第二信息的关联关系,所述第二信息指示所述源VTEP将包括所述VNI的所述VXLAN信息封装在所述IPv6头中以获得所述第一报文。Save the association between the network segment address of the destination VTEP, the VNI and second information. The second information instructs the source VTEP to encapsulate the VXLAN information including the VNI in the IPv6 header to obtain The first message.
  11. 根据权利要求10所述的方法,其特征在于,所述保存所述目的VTEP的网段地址、所述VNI和所述第二信息的关联关系,包括:The method according to claim 10, characterized in that said saving the association relationship between the network segment address of the destination VTEP, the VNI and the second information includes:
    将所述目的VTEP的网段地址、所述VNI和所述第二信息的关联关系保存到转发面。The association relationship between the network segment address of the destination VTEP, the VNI and the second information is saved to the forwarding plane.
  12. 根据权利要求10或11所述的方法,其特征在于,所述第一信息为所述路由通告消息中的属性或扩展团体属性。 The method according to claim 10 or 11, characterized in that the first information is an attribute or an extended community attribute in the route advertisement message.
  13. 根据权利要求10-12任一项所述的方法,其特征在于,所述第一信息还指示以下一种或多种:The method according to any one of claims 10-12, characterized in that the first information also indicates one or more of the following:
    所述IPv6头携带所述VXLAN信息的模式;The IPv6 header carries the mode of the VXLAN information;
    所述VXLAN信息的长度;The length of the VXLAN information;
    所述VNI的长度。The length of the VNI.
  14. 根据权利要求13所述的方法,其特征在于,The method according to claim 13, characterized in that:
    所述VXLAN信息的模式为全比特模式,所述VXLAN信息的长度为64比特,所述VNI长度为24比特;The mode of the VXLAN information is an all-bit mode, the length of the VXLAN information is 64 bits, and the length of the VNI is 24 bits;
    或者,所述VXLAN信息的模式为省略预留模式,所述VXLAN信息的的长度大于或等于24比特,且所述VXLAN信息的长度小于64比特,所述VNI的长度为24比特;Alternatively, the mode of the VXLAN information is an omitted reservation mode, the length of the VXLAN information is greater than or equal to 24 bits, and the length of the VXLAN information is less than 64 bits, and the length of the VNI is 24 bits;
    或者,所述VXLAN信息的模式为精简压缩模式,所述VXLAN信息的长度大于或等于M比特,且所述VXLAN信息的长度小于64比特,所述VNI的长度为M比特,所述M为大于或等于1的整数。Alternatively, the mode of the VXLAN information is a simplified compression mode, the length of the VXLAN information is greater than or equal to M bits, and the length of the VXLAN information is less than 64 bits, the length of the VNI is M bits, and the M is greater than or an integer equal to 1.
  15. 根据权利要求10-14任一项所述的方法,其特征在于,所述获得第一报文,包括:The method according to any one of claims 10 to 14, characterized in that obtaining the first message includes:
    接收第二报文;Receive the second message;
    根据所述第二报文的目的地址匹配所述目的VTEP的网段地址,根据所述关联关系获得所述VNI和所述第二信息;Match the network segment address of the destination VTEP according to the destination address of the second message, and obtain the VNI and the second information according to the association relationship;
    根据所述第二信息的指示,对所述第二报文进行封装,获得所述第一报文。According to the indication of the second information, the second message is encapsulated to obtain the first message.
  16. 根据权利要求10-15任一项所述的方法,其特征在于,所述第二信息还指示以下一种或多种:The method according to any one of claims 10-15, characterized in that the second information also indicates one or more of the following:
    所述IPv6头携带所述VXLAN信息的模式;The IPv6 header carries the mode of the VXLAN information;
    所述VXLAN信息的长度;The length of the VXLAN information;
    所述VNI的长度。The length of the VNI.
  17. 一种报文处理的方法,其特征在于,应用于第二通信装置,所述第二通信装置用作目的虚拟扩展局域网隧道端点VTEP,所述方法包括:A message processing method, characterized in that it is applied to a second communication device, and the second communication device is used as a destination virtual extended LAN tunnel end point VTEP. The method includes:
    通过虚拟扩展局域网VXLAN隧道接收第一通信装置发送的第一报文,所述第一报文包括第六版互联网协议IPv6头,所述IPv6头包括VXLAN信息,所述VXLAN信息包括VXLAN网络标识VNI,所述第一通信装置用作源VTEP;The first message sent by the first communication device is received through the virtual extended LAN VXLAN tunnel. The first message includes the sixth version of the Internet Protocol IPv6 header. The IPv6 header includes VXLAN information. The VXLAN information includes the VXLAN network identifier VNI. , the first communication device serves as the source VTEP;
    根据所述VXLAN信息对所述第一报文进行处理。Process the first message according to the VXLAN information.
  18. 根据权利要求17所述的方法,其特征在于,所述IPv6头包括目的IPv6地址,所述目的IPv6地址包括所述目的VTEP的网段地址和所述VXLAN信息。The method according to claim 17, characterized in that the IPv6 header includes a destination IPv6 address, and the destination IPv6 address includes the network segment address of the destination VTEP and the VXLAN information.
  19. 根据权利要求18所述的方法,其特征在于,所述VXLAN信息携带在所述目的IPv6地址的后64比特中。The method according to claim 18, characterized in that the VXLAN information is carried in the last 64 bits of the destination IPv6 address.
  20. 根据权利要求19所述的方法,其特征在于,所述目的IPv6地址的后64比特全部用于携带所述VXLAN信息。The method according to claim 19, characterized in that all the last 64 bits of the destination IPv6 address are used to carry the VXLAN information.
  21. 根据权利要求17所述的方法,其特征在于,所述IPv6头包括源IPv6地址,所述源IPv6地址包括所述源VTEP的网段地址和所述VXLAN信息。 The method according to claim 17, wherein the IPv6 header includes a source IPv6 address, and the source IPv6 address includes the network segment address of the source VTEP and the VXLAN information.
  22. 根据权利要求21所述的方法,其特征在于,所述VXLAN信息携带在所述源IPv6地址的后64比特中。The method according to claim 21, characterized in that the VXLAN information is carried in the last 64 bits of the source IPv6 address.
  23. 根据权利要求22所述的方法,其特征在于,所述源IPv6地址的后64比特全部用于携带所述VXLAN信息。The method according to claim 22, characterized in that all the last 64 bits of the source IPv6 address are used to carry the VXLAN information.
  24. 根据权利要求17-23任一项所述的方法,其特征在于,所述VNI的长度为小于或等于24比特。The method according to any one of claims 17-23, characterized in that the length of the VNI is less than or equal to 24 bits.
  25. 根据权利要求17-24任一项所述的方法,其特征在于,所述VXLAN信息还包括以下一项或多项:The method according to any one of claims 17-24, characterized in that the VXLAN information further includes one or more of the following:
    至少一个标志Flag;At least one flag Flag;
    预留Reserve字段。Reserve the Reserve field.
  26. 根据权利要求17-25任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 17-25, characterized in that the method further includes:
    向所述源VTEP发布的路由通告消息,所述路由通告消息包括路由前缀、下一跳、所述VNI和第一信息,其中,所述下一跳为所述目的VTEP的网段地址,所述第一信息指示所述目的VTEP支持VXLAN封装优化。A route advertisement message issued to the source VTEP. The route advertisement message includes a route prefix, a next hop, the VNI and first information, where the next hop is the network segment address of the destination VTEP. The first information indicates that the destination VTEP supports VXLAN encapsulation optimization.
  27. 根据权利要求26所述的方法,其特征在于,所述第一信息为所述路由通告消息中的属性或扩展团体属性。The method according to claim 26, characterized in that the first information is an attribute or an extended community attribute in the route advertisement message.
  28. 根据权利要求26或27所述的方法,其特征在于,所述第一信息还指示以下一种或多种:The method according to claim 26 or 27, characterized in that the first information also indicates one or more of the following:
    所述IPv6头携带所述VXLAN信息的模式;The IPv6 header carries the mode of the VXLAN information;
    所述VXLAN信息的长度;The length of the VXLAN information;
    所述VNI的长度。The length of the VNI.
  29. 根据权利要求28所述的方法,其特征在于,The method according to claim 28, characterized in that:
    所述VXLAN信息的模式为全比特模式,所述VXLAN信息的长度为64比特,所述VNI长度为24比特;The mode of the VXLAN information is an all-bit mode, the length of the VXLAN information is 64 bits, and the length of the VNI is 24 bits;
    或者,所述VXLAN信息的模式为省略预留模式,所述VXLAN信息的的长度大于或等于24比特,且所述VXLAN信息的长度小于64比特,所述VNI的长度为24比特;Alternatively, the mode of the VXLAN information is an omitted reservation mode, the length of the VXLAN information is greater than or equal to 24 bits, and the length of the VXLAN information is less than 64 bits, and the length of the VNI is 24 bits;
    或者,所述VXLAN信息的模式为精简压缩模式,所述VXLAN信息的长度大于或等于M比特,且所述VXLAN信息的长度小于64比特,所述VNI的长度为M比特,所述M为大于或等于1的整数。Alternatively, the mode of the VXLAN information is a simplified compression mode, the length of the VXLAN information is greater than or equal to M bits, and the length of the VXLAN information is less than 64 bits, the length of the VNI is M bits, and the M is greater than or an integer equal to 1.
  30. 根据权利要求17-29任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 17-29, characterized in that the method further includes:
    保存所述目的VTEP的网段地址、所述VNI和第二信息的关联关系,所述第二信息指示包括所述VNI的所述VXLAN信息封装在所述第一报文的所述IPv6头中。Saving the association between the network segment address of the destination VTEP, the VNI and second information, the second information indicating that the VXLAN information including the VNI is encapsulated in the IPv6 header of the first message .
  31. 根据权利要求30所述的方法,其特征在于,所述第二信息还指示以下一种或多种:The method according to claim 30, characterized in that the second information also indicates one or more of the following:
    所述IPv6头携带所述VXLAN信息的模式;The IPv6 header carries the mode of the VXLAN information;
    所述VXLAN信息的长度;The length of the VXLAN information;
    所述VNI的长度。The length of the VNI.
  32. 根据权利要求30或31所述的方法,其特征在于,所述根据所述VXLAN信息对所 述第一报文进行处理,包括:The method according to claim 30 or 31, characterized in that: the said VXLAN information is The first message is processed, including:
    根据所述第一报文的目的地址匹配所述目的VTEP的网段地址,根据所述关联关系获得所述VNI和所述第二信息;Match the network segment address of the destination VTEP according to the destination address of the first message, and obtain the VNI and the second information according to the association relationship;
    基于所述第二信息的指示,从所述第一报文的IPv6头中获得所述VXLAN信息;Based on the indication of the second information, obtain the VXLAN information from the IPv6 header of the first message;
    剥离所述第二报文的所述IPv6头,获得第二报文;Strip the IPv6 header of the second message to obtain the second message;
    根据所述VXLAN信息,转发所述第二报文。Forward the second message according to the VXLAN information.
  33. 一种路由通告的方法,其特征在于,应用于第一通信装置,所述第一通信装置用作源虚拟扩展局域网隧道端点VTEP,所述方法包括:A method for route advertisement, characterized in that it is applied to a first communication device that is used as a source virtual extended LAN tunnel endpoint VTEP, and the method includes:
    接收第二通信装置发送的路由通告消息,所述路由通告消息包括路由前缀、下一跳、虚拟扩展局域网VXLAN网络标识VNI和第一信息,其中,所述第二通信装置用作目的VTEP,所述下一跳为所述目的VTEP的网段地址,所述第一信息指示所述目的VTEP支持VXLAN封装优化;Receive a route advertisement message sent by a second communication device, where the route advertisement message includes a route prefix, a next hop, a virtual extended LAN VXLAN network identifier VNI and first information, wherein the second communication device is used as a destination VTEP, so The next hop is the network segment address of the destination VTEP, and the first information indicates that the destination VTEP supports VXLAN encapsulation optimization;
    保存所述目的VTEP的网段地址、所述VNI和第二信息的关联关系,所述第二信息指示所述源VTEP将包括所述VNI的VXLAN信息封装在第六版互联网协议IPv6头中。The association relationship between the network segment address of the destination VTEP, the VNI and second information is saved, and the second information instructs the source VTEP to encapsulate the VXLAN information including the VNI in the sixth version of the Internet Protocol IPv6 header.
  34. 根据权利要求33所述的方法,其特征在于,所述保存所述目的VTEP的网段地址、所述VNI和第二信息的关联关系,包括:The method according to claim 33, characterized in that said saving the association relationship between the network segment address of the destination VTEP, the VNI and the second information includes:
    将所述目的VTEP的网段地址、所述VNI和所述第二信息的关联关系保存到转发面。The association relationship between the network segment address of the destination VTEP, the VNI and the second information is saved to the forwarding plane.
  35. 根据权利要求33或34所述的方法,其特征在于,所述第一信息为所述路由通告消息中的属性或扩展团体属性。The method according to claim 33 or 34, characterized in that the first information is an attribute or an extended community attribute in the route advertisement message.
  36. 根据权利要求33-35任一项所述的方法,其特征在于,所述第一信息还指示以下一种或多种:The method according to any one of claims 33-35, characterized in that the first information also indicates one or more of the following:
    所述IPv6头携带所述VXLAN信息的模式;The IPv6 header carries the mode of the VXLAN information;
    所述VXLAN信息的长度;The length of the VXLAN information;
    所述VNI的长度。The length of the VNI.
  37. 根据权利要求33-36任一项所述的方法,其特征在于,所述第二信息还指示以下一种或多种:The method according to any one of claims 33 to 36, characterized in that the second information also indicates one or more of the following:
    所述IPv6头携带所述VXLAN信息的模式;The IPv6 header carries the mode of the VXLAN information;
    所述VXLAN信息的长度;The length of the VXLAN information;
    所述VNI的长度。The length of the VNI.
  38. 根据权利要求36或37所述的方法,其特征在于,The method according to claim 36 or 37, characterized in that,
    所述VXLAN信息的模式为全比特模式,所述VXLAN信息的长度为64比特,所述VNI长度为24比特;The mode of the VXLAN information is an all-bit mode, the length of the VXLAN information is 64 bits, and the length of the VNI is 24 bits;
    或者,所述VXLAN信息的模式为省略预留模式,所述VXLAN信息的的长度大于或等于24比特,且所述VXLAN信息的长度小于64比特,所述VNI的长度为24比特;Alternatively, the mode of the VXLAN information is an omitted reservation mode, the length of the VXLAN information is greater than or equal to 24 bits, and the length of the VXLAN information is less than 64 bits, and the length of the VNI is 24 bits;
    或者,所述VXLAN信息的模式为精简压缩模式,所述VXLAN信息的长度大于或等于M比特,且所述VXLAN信息的长度小于64比特,所述VNI的长度为M比特,所述M为大于或等于1的整数。 Alternatively, the mode of the VXLAN information is a simplified compression mode, the length of the VXLAN information is greater than or equal to M bits, and the length of the VXLAN information is less than 64 bits, the length of the VNI is M bits, and the M is greater than or an integer equal to 1.
  39. 根据权利要求33-38任一项所述的方法,其特征在于,所述VXLAN信息还包括以下一项或多项:The method according to any one of claims 33-38, characterized in that the VXLAN information further includes one or more of the following:
    至少一个标志Flag;At least one flag Flag;
    预留Reserve字段。Reserve the Reserve field.
  40. 根据权利要求33-39任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 33-39, characterized in that the method further includes:
    接收第一报文;Receive the first message;
    根据所述第一报文的目的地址匹配所述目的VTEP的网段地址,根据所述关联关系获得所述VNI和所述第二信息;Match the network segment address of the destination VTEP according to the destination address of the first message, and obtain the VNI and the second information according to the association relationship;
    根据所述第二信息的指示,对所述第一报文进行封装,获得第二报文,所述第二报文包括第一IPv6头,所述第一IPv6头包括VXLAN信息,所述VXLAN信息包括所述VNI;According to the instruction of the second information, the first message is encapsulated to obtain a second message, the second message includes a first IPv6 header, the first IPv6 header includes VXLAN information, and the VXLAN The information includes the VNI;
    通过VXLAN隧道向所述第二通信装置发送所述第二报文。Send the second message to the second communication device through a VXLAN tunnel.
  41. 一种路由通告的方法,其特征在于,应用于第二通信装置,所述第二通信装置用作目的虚拟扩展局域网隧道端点VTEP,所述方法包括:A route advertisement method, characterized in that it is applied to a second communication device, and the second communication device is used as a destination virtual extended LAN tunnel end point VTEP. The method includes:
    生成路由通告消息,所述路由通告消息包括路由前缀、下一跳、虚拟扩展局域网VXLAN网络标识VNI和第一信息,其中,所述下一跳为所述目的VTEP的网段地址,所述第一信息指示所述目的VTEP支持VXLAN封装优化;Generate a route advertisement message, which includes a route prefix, a next hop, a virtual extended LAN VXLAN network identifier VNI, and first information, where the next hop is the network segment address of the destination VTEP, and the third 1. Information indicates that the destination VTEP supports VXLAN encapsulation optimization;
    向第一通信装置发送所述路由通告消息,所述第一通信装置用作源VTEP。The route advertisement message is sent to a first communications device serving as a source VTEP.
  42. 根据权利要求41所述的方法,其特征在于,所述第一信息为所述路由通告消息中的属性或扩展团体属性。The method according to claim 41, characterized in that the first information is an attribute or an extended community attribute in the route advertisement message.
  43. 根据权利要求41或42所述的方法,其特征在于,所述第一信息还指示以下一种或多种:The method according to claim 41 or 42, characterized in that the first information also indicates one or more of the following:
    所述IPv6头携带所述VXLAN信息的模式;The IPv6 header carries the mode of the VXLAN information;
    所述VXLAN信息的长度;The length of the VXLAN information;
    所述VNI的长度。The length of the VNI.
  44. 根据权利要求43所述的方法,其特征在于,The method according to claim 43, characterized in that:
    所述VXLAN信息的模式为全比特模式,所述VXLAN信息的长度为64比特,所述VNI长度为24比特;The mode of the VXLAN information is an all-bit mode, the length of the VXLAN information is 64 bits, and the length of the VNI is 24 bits;
    或者,所述VXLAN信息的模式为省略预留模式,所述VXLAN信息的的长度大于或等于24比特,且所述VXLAN信息的长度小于64比特,所述VNI的长度为24比特;Alternatively, the mode of the VXLAN information is an omitted reservation mode, the length of the VXLAN information is greater than or equal to 24 bits, and the length of the VXLAN information is less than 64 bits, and the length of the VNI is 24 bits;
    或者,所述VXLAN信息的模式为精简压缩模式,所述VXLAN信息的长度大于或等于M比特,且所述VXLAN信息的长度小于64比特,所述VNI的长度为M比特,所述M为大于或等于1的整数。Alternatively, the mode of the VXLAN information is a simplified compression mode, the length of the VXLAN information is greater than or equal to M bits, and the length of the VXLAN information is less than 64 bits, the length of the VNI is M bits, and the M is greater than or an integer equal to 1.
  45. 根据权利要求41-44任一项所述的方法,其特征在于,所述VXLAN信息还包括以下一项或多项:The method according to any one of claims 41-44, characterized in that the VXLAN information further includes one or more of the following:
    至少一个标志Flag;At least one flag Flag;
    预留Reserve字段。Reserve the Reserve field.
  46. 根据权利要求41-45任一项所述的方法,其特征在于,所述方法还包括: The method according to any one of claims 41-45, characterized in that the method further includes:
    保存所述目的VTEP的网段地址、所述VNI和第二信息的关联关系,所述第二信息指示包括所述VNI的VXLAN信息封装在第六版互联网协议的IPv6头中。The association relationship between the network segment address of the destination VTEP, the VNI and second information is saved, and the second information indicates that the VXLAN information including the VNI is encapsulated in the IPv6 header of the sixth version of the Internet Protocol.
  47. 根据权利要求46所述的方法,其特征在于,所述第二信息还指示以下一种或多种:The method of claim 46, wherein the second information also indicates one or more of the following:
    所述IPv6头携带所述VXLAN信息的模式;The IPv6 header carries the mode of the VXLAN information;
    所述VXLAN信息的长度;The length of the VXLAN information;
    所述VNI的长度。The length of the VNI.
  48. 根据权利要求46或47所述的方法,其特征在于,所述方法还包括:The method according to claim 46 or 47, characterized in that the method further includes:
    通过VXLAN隧道接收所述第一通信装置发送的第一报文,所述第一报文包括IPv6头,所述IPv6头包括所述VXLAN信息;Receive the first message sent by the first communication device through the VXLAN tunnel, the first message includes an IPv6 header, and the IPv6 header includes the VXLAN information;
    根据所述第一报文的目的地址匹配所述目的VTEP的网段地址,根据所述关联关系获得所述VNI和所述第二信息;Match the network segment address of the destination VTEP according to the destination address of the first message, and obtain the VNI and the second information according to the association relationship;
    基于所述第二信息的指示,从所述第一报文的IPv6头中获得所述VXLAN信息;Based on the indication of the second information, obtain the VXLAN information from the IPv6 header of the first message;
    剥离所述第二报文的所述IPv6头,获得第二报文;Strip the IPv6 header of the second message to obtain the second message;
    根据所述VXLAN信息,转发所述第二报文。Forward the second message according to the VXLAN information.
  49. 一种通信装置,其特征在于,应用于第一通信装置,所述通信装置包括:A communication device, characterized in that it is applied to a first communication device, and the communication device includes:
    收发单元和处理单元;transceiver unit and processing unit;
    所述收发单元,用于执行权利要求1-16或33-40任意一项所述的由所述第一通信装置执行的接收和/或发送操作;The transceiver unit is used to perform the receiving and/or transmitting operations performed by the first communication device according to any one of claims 1-16 or 33-40;
    所述处理单元用于执行权利要求1-16或33-40任意一项所述的由所述第一通信装置执行的接收和/或发送操作之外的操作。The processing unit is configured to perform operations other than the receiving and/or sending operations performed by the first communication device according to any one of claims 1-16 or 33-40.
  50. 一种通信装置,其特征在于,应用于第二通信装置,所述通信装置包括:A communication device, characterized in that it is applied to a second communication device, and the communication device includes:
    收发单元和处理单元;transceiver unit and processing unit;
    所述收发单元,用于执行权利要求17-32或41-48任意一项所述的由所述第二通信装置执行的接收和/或发送操作;The transceiver unit is used to perform the receiving and/or transmitting operations performed by the second communication device according to any one of claims 17-32 or 41-48;
    所述处理单元用于执行权利要求17-32或41-48任意一项所述的由所述第二通信装置执行的接收和/或发送操作之外的操作。The processing unit is configured to perform operations other than the receiving and/or sending operations performed by the second communication device according to any one of claims 17-32 or 41-48.
  51. 一种通信装置,其特征在于,所述通信装置包括存储器和处理器;A communication device, characterized in that the communication device includes a memory and a processor;
    所述存储器,用于存储程序代码;The memory is used to store program code;
    所述处理器,用于运行所述程序代码中的指令,使得所述通信装置执行以上权利要求1-16或33-40任意一项所述的方法。The processor is configured to run instructions in the program code, so that the communication device executes the method described in any one of claims 1-16 or 33-40.
  52. 一种通信装置,其特征在于,所述通信装置包括存储器和处理器;A communication device, characterized in that the communication device includes a memory and a processor;
    所述存储器,用于存储程序代码;The memory is used to store program code;
    所述处理器,用于运行所述程序代码中的指令,使得所述通信装置执行以上权利要求17-32或41-48任意一项所述的方法。The processor is configured to run instructions in the program code, so that the communication device performs the method described in any one of claims 17-32 or 41-48.
  53. 一种通信系统,其特征在于,所述通信系统包括第一通信装置和第二通信装置;A communication system, characterized in that the communication system includes a first communication device and a second communication device;
    所述第一通信装置,用于执行以上权利要求1-16或33-40任意一项所述的方法;The first communication device is used to perform the method described in any one of the above claims 1-16 or 33-40;
    所述第二通信装置,用于执行以上权利要求17-32或41-48任意一项所述的方法。 The second communication device is used to perform the method described in any one of claims 17-32 or 41-48.
  54. 一种计算机程序产品,其特征在于,包括程序,当所述程序在处理器上运行时,实现权利要求1-48任意一项所述的方法。A computer program product, characterized in that it includes a program, and when the program is run on a processor, the method of any one of claims 1-48 is implemented.
  55. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质包括指令,当其在处理器上运行时,实现以上权利要求1-48任一项所述的方法。 A computer-readable storage medium, characterized in that the computer-readable storage medium includes instructions that, when run on a processor, implement the method described in any one of claims 1-48 above.
PCT/CN2023/080968 2022-03-15 2023-03-13 Packet processing method, routing announcement method, and related device WO2023174188A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202210250923.7 2022-03-15
CN202210250923 2022-03-15
CN202210570065.4A CN116800559A (en) 2022-03-15 2022-05-24 Message processing method, route notification method and related equipment
CN202210570065.4 2022-05-24

Publications (1)

Publication Number Publication Date
WO2023174188A1 true WO2023174188A1 (en) 2023-09-21

Family

ID=88022232

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/080968 WO2023174188A1 (en) 2022-03-15 2023-03-13 Packet processing method, routing announcement method, and related device

Country Status (1)

Country Link
WO (1) WO2023174188A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105591874A (en) * 2015-12-22 2016-05-18 杭州华三通信技术有限公司 Data sending method and device
CN109936492A (en) * 2017-12-15 2019-06-25 华为技术有限公司 A kind of methods, devices and systems by tunnel transmission message
US20190215191A1 (en) * 2017-04-28 2019-07-11 Hewlett Packard Enterprise Development Lp Deployment Of Virtual Extensible Local Area Network
CN112929284A (en) * 2021-01-29 2021-06-08 烽火通信科技股份有限公司 ND message identification method and system under IPv6VXLAN scene

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105591874A (en) * 2015-12-22 2016-05-18 杭州华三通信技术有限公司 Data sending method and device
US20190215191A1 (en) * 2017-04-28 2019-07-11 Hewlett Packard Enterprise Development Lp Deployment Of Virtual Extensible Local Area Network
CN109936492A (en) * 2017-12-15 2019-06-25 华为技术有限公司 A kind of methods, devices and systems by tunnel transmission message
CN112929284A (en) * 2021-01-29 2021-06-08 烽火通信科技股份有限公司 ND message identification method and system under IPv6VXLAN scene

Similar Documents

Publication Publication Date Title
US11902049B2 (en) BIER packet sending method and apparatus
US11979322B2 (en) Method and apparatus for providing service for traffic flow
US11949585B2 (en) BIER packet sending method and apparatus
US8665887B2 (en) Number automatic routing method, updating method, withdrawing method, router and device
JP7140910B2 (en) COMMUNICATION METHOD, DEVICE AND SYSTEM
WO2018032962A1 (en) Method, device and system for information synchronization
EP4037267A1 (en) Method, apparatus and system for sending message
US20240154902A1 (en) Packet forwarding method and system, storage medium, and electronic device
US11895021B2 (en) Message sending and receiving method, apparatus, and system
US20210409318A1 (en) Packet Transmission Method and Device
US20220200820A1 (en) Packet Sending Method and Apparatus
CN112491706A (en) Data message processing method and device, storage medium and electronic device
EP4030698A1 (en) Packet processing method, device, system and apparatus as well as storage medium
WO2023174188A1 (en) Packet processing method, routing announcement method, and related device
JP2023530347A (en) BIER OAM detection method, device and system
CN116800559A (en) Message processing method, route notification method and related equipment
WO2024045537A1 (en) Message transmission method and network device
WO2023125774A1 (en) Vxlan packet transmission method, network device, and system
US20230318966A1 (en) Packet Transmission Method, Correspondence Obtaining Method, Apparatus, and System
WO2022237563A1 (en) Data forwarding method and apparatus, storage medium, and electronic apparatus
WO2022033449A1 (en) Method for sending multicast message, and method and apparatus for acquiring forwarding table entry
WO2022267875A1 (en) Packet transmission method and related device
WO2023125767A1 (en) Message transmission method, network device, and system
WO2023088145A1 (en) Packet processing method, apparatus and device
WO2024007762A1 (en) Route publishing method, and communication method and apparatus

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

Country of ref document: EP

Kind code of ref document: A1