WO2017113306A1 - 可扩展虚拟局域网报文发送方法、计算机设备和可读介质 - Google Patents

可扩展虚拟局域网报文发送方法、计算机设备和可读介质 Download PDF

Info

Publication number
WO2017113306A1
WO2017113306A1 PCT/CN2015/100150 CN2015100150W WO2017113306A1 WO 2017113306 A1 WO2017113306 A1 WO 2017113306A1 CN 2015100150 W CN2015100150 W CN 2015100150W WO 2017113306 A1 WO2017113306 A1 WO 2017113306A1
Authority
WO
WIPO (PCT)
Prior art keywords
packet
vxlan
network card
encapsulated
encapsulation
Prior art date
Application number
PCT/CN2015/100150
Other languages
English (en)
French (fr)
Inventor
马振亮
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority to CN201580054394.1A priority Critical patent/CN107113240B/zh
Priority to CN202010969660.6A priority patent/CN112422393B/zh
Priority to EP19181136.3A priority patent/EP3633929B1/en
Priority to ES19181136T priority patent/ES2926345T3/es
Priority to EP15911932.0A priority patent/EP3273643B1/en
Priority to EP22171260.7A priority patent/EP4102780A1/en
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to ES15911932T priority patent/ES2750778T3/es
Priority to PCT/CN2015/100150 priority patent/WO2017113306A1/zh
Publication of WO2017113306A1 publication Critical patent/WO2017113306A1/zh
Priority to US16/019,003 priority patent/US10771286B2/en
Priority to US16/703,392 priority patent/US11283650B2/en
Priority to US17/687,399 priority patent/US20220191064A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • 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
    • H04L12/4633Interconnection of networks using encapsulation techniques, e.g. tunneling
    • 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
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • H04L49/9057Arrangements for supporting packet reassembly or resequencing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/10Mapping addresses of different types
    • H04L61/103Mapping addresses of different types across network layers, e.g. resolution of network layer into physical layer addresses or address resolution protocol [ARP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/2592Translation of Internet protocol [IP] addresses using tunnelling or encapsulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45595Network integration; Enabling network access in virtual machine instances
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2212/00Encapsulation of packets

Definitions

  • the present invention relates to the field of information technology, and in particular, to a method, a computer device, and a computer readable medium for transmitting a scalable virtual local area network VxLAN message.
  • VxLAN The Virtual eXtensible Local Area Network (VxLAN) adopts the technology of MAC (Media Access Control) Over UDP (User Datagram Protocol), which is an overlay network technology or tunnel technology.
  • VxLAN encapsulates the data packets sent by the virtual machine in UDP and encapsulates it using the Internet Protocol IP/MAC of the physical network as an outer-header, and then transmits it on the physical IP network. After reaching the destination, the tunnel endpoint decapsulates and data. Sent to the target virtual machine.
  • the message sent by the VxLAN technology is a VxLAN message, and the VxLAN message usually includes a VxLAN tunnel header and an original static load.
  • the VxLAN tunnel header includes: an external destination MAC address, an external source MAC address, an external destination Internet Protocol (IP) address, an external source IP address, an external UDP header, and a VxLAN Network Identifier (VNI, VXLAN Network Identifier);
  • the static load part includes: internal destination MAC address, internal source MAC address, internal 802.1Q, original Ethernet payload. To implement VxLAN packet transmission, you need to have the VxLAN tunnel header and the original payload.
  • the network card can identify and forward the virtual local area network (VLAN) message sent by the virtual machine.
  • VLAN virtual local area network
  • the NIC does not have the ability to obtain the information required for VxLAN packet forwarding.
  • the NIC cannot encapsulate and send VxLAN packets.
  • the embodiment of the invention provides a method for transmitting a VxLAN message, a computer device and a computer readable medium, so as to solve the problem that the network card cannot process the VxLAN message forwarding in the prior art.
  • a first aspect of the embodiments of the present invention provides a method for transmitting a scalable virtual local area network VxLAN message, where the method is applied to a computer device, where the computer device includes a central processing unit, a network card, and a virtual machine, where the network card includes a network card processor, the method comprising:
  • the network card processor determines whether the package information required for VxLAN encapsulation of the first packet is saved in the network card, where the encapsulation information includes an encapsulation medium access control MAC address and an encapsulated internet protocol IP address.
  • the encapsulated MAC address is a MAC address of a next hop device to be sent when the first packet is sent, and the encapsulated IP address is an IP address of a virtual extended LAN tunnel endpoint VTEP of the first packet destination end;
  • the network card When the network card stores the encapsulation information required for the VxLAN encapsulation of the first packet, the first packet is VxLAN encapsulated and sent according to the encapsulation information;
  • the network card When the network card does not save the encapsulation information required for performing VxLAN encapsulation on the first packet, sending an acquisition request to the central processor, acquiring the encapsulation information from the central processor, saving, and transmitting the The first packet is encapsulated by the VxLAN packet.
  • the network card includes at least one PF and at least one VF, and the virtual machine in the computer device directly sends the message to the network card through the VF and sends the packet through the network.
  • each virtual machine in the computer device uniquely corresponds to one VF, and the VF forwards the packet to the network card through the unique corresponding VF.
  • the network card processor determines whether the package information of the VxLAN encapsulation of the first packet is saved in the network card, and if the encapsulation information is saved, The first packet is encapsulated and sent by the VxLAN; if the encapsulation information is not saved, the encapsulation information is requested and saved by the central processing unit, and the VxLAN encapsulated packet is sent to the first packet.
  • the network card implements VxLAN encapsulation of the received message and send.
  • the method further includes:
  • the network card processor obtains the ID of the virtual function VF that forwards the first packet from the received first packet, and queries the attribute of the VF corresponding to the ID of the VF according to the ID of the VF. ;
  • the VxLAN network identifier VNI of the VF is acquired.
  • the network card processor may query the address forwarding table in the network card according to the VNI of the VF and the inner destination destination MAC address of the first packet, and determine whether the address forwarding table exists in the address forwarding table.
  • the network card processor determines whether the network card is saved in the network card.
  • the package information required for the VxLAN encapsulation of the first packet includes:
  • the network card processor queries, according to the VNI and the inner layer destination MAC address of the first packet, whether the VNIC of the VF and the inner layer destination MAC address of the first packet are present in the network card.
  • Package information
  • the network card When the network card has the package information corresponding to the VNI of the VF and the inner destination destination MAC address of the first packet, it is determined that the network card is required to perform VxLAN encapsulation on the first packet.
  • Package information When the network card has the package information corresponding to the VNI of the VF and the inner destination destination MAC address of the first packet, it is determined that the network card is required to perform VxLAN encapsulation on the first packet.
  • the number of times the network card queries the encapsulation information may also be recorded.
  • the number of records is incremented by one each time the encapsulation information is successfully queried.
  • the record of the package information with the smallest number of times of use can be deleted, so that the record of the package information newly sent by the central processing unit can be added, and the latest entry can be saved when the storage space of the network card is limited.
  • any of the first and second aspects of the first aspect In combination with the first aspect of the embodiments of the present invention, any of the first and second aspects of the first aspect In a third possible implementation manner of the first aspect of the embodiment of the present invention,
  • the manner in which the network card saves the encapsulation information required for the VxLAN encapsulation of the first packet includes:
  • the network card stores a mapping between the VNI of the VF that forwards the first packet and the inner destination destination MAC address of the first packet, and the tunnel identifier, and saves the tunnel identifier and the encapsulation information. Correspondence between the two.
  • the network card may directly save the correspondence between the VNI of the VF that forwards the first packet and the inner MAC address of the first packet, and the correspondence between the encapsulation information and the encapsulation information. relationship.
  • the sending, by the network card processor, the VxLAN encapsulated packet of the first packet includes:
  • the virtual switch in the network card receives the VxLAN encapsulated packet sent by the central processing unit and sends the packet, and sends the packet; or
  • the network card processor performs VxLAN encapsulation on the first packet according to the obtained encapsulation information required for VxLAN encapsulation of the first packet, and is sent by using a virtual switch in the network card.
  • the network card When the virtual switch in the network card receives the VxLAN encapsulated packet sent by the central processing unit and sends the packet, the network card sends the first packet and the VNI to the After the central processing unit is configured, the first packet is not saved, which saves the storage space of the network card occupied by saving the first packet, and improves the utilization of the storage space of the network card.
  • the method further includes:
  • the network card processor determines whether the network card saves the encapsulated MAC address and the encapsulated IP address in the second packet;
  • the second packet is sent to the central processor.
  • the related encapsulated IP address and the encapsulated MAC address in the central processing unit may also be saved in the central processing unit by an administrator pre-configured manner.
  • the NIC supports a single input/output virtualized SR-IOV and supports virtual switch vSwitch forwarding. And, the network card is connected to the central processor through a PCIe link.
  • a second aspect of the embodiments of the present invention provides a computer device, including a central processing unit, a network card, and a virtual machine, where the network card includes a network card processor, and the network card processor includes a message processing unit and an entry management unit;
  • the packet processing unit is configured to receive the first packet sent by the virtual machine, and determine whether the encapsulation information required for performing the scalable virtual local area network VxLAN encapsulation on the first packet is saved in the network card, where When the network card does not save the encapsulation information required for the VxLAN encapsulation of the first packet, the network card sends an acquisition request to the central processor, where the encapsulation information includes a package medium access control MAC address and an encapsulated internet protocol.
  • An IP address where the encapsulated MAC address is a MAC address of a next hop device to be sent when the first packet is sent, where the encapsulated IP address is a virtual extended LAN tunnel endpoint VTEP of the first packet destination end IP address;
  • the entry management unit is configured to receive and save the encapsulated MAC address and the encapsulated IP address required for the VxLAN encapsulation of the first packet sent by the central processing unit;
  • the network card processor is configured to send a VxLAN encapsulated message to the first packet.
  • the network card includes at least one PF and at least one VF, and the virtual machine directly sends the packet to the network card through the VF and sends the packet through the network.
  • the virtual machine uniquely corresponds to one VF, and the first packet is forwarded to the network card by using the unique corresponding VF.
  • the central processing unit includes a message receiving unit and an acquiring and sending unit;
  • the packet receiving unit is configured to receive an acquisition request sent by the packet processing unit, where the acquisition request includes the first packet and a VxLAN network identifier VNI that forwards the virtual function VF of the first packet;
  • the obtaining and sending unit is configured to obtain, according to the obtaining request received by the packet receiving unit, the encapsulation information of the VxLAN encapsulation of the first packet, and send the encapsulation information to the entry management unit.
  • the packet processing unit receives the first packet sent by the virtual machine, and determines whether the package information required for VxLAN encapsulation of the first packet is saved in the network card, if The encapsulation information is VxLAN encapsulated and sent by the first packet; if the encapsulation information is not saved, the encapsulation information is requested and saved by the central processor, and the first packet is sent and sent.
  • the NIC encapsulates and sends the received packet to the VxLAN.
  • the packet processing unit is further configured to: obtain an ID of the virtual function VF that forwards the first packet from the received first packet, and query an ID of the VF according to the ID of the VF. Corresponding VF attributes;
  • the VxLAN network identifier VNI of the VF is acquired.
  • the packet processing unit may query, according to the obtained VNI of the VF, and the inner layer destination MAC address of the first packet, whether the NIC needs to save the encapsulation required for VxLAN encapsulation of the first packet. information.
  • the packet processing unit determines whether the first packet is saved in the network card.
  • the package information required for the VxLAN package includes:
  • the packet processing unit queries, according to the VNI and the inner layer destination MAC address of the first packet, whether the VNI of the VF and the inner layer destination MAC address of the first packet exist in the network card. Corresponding package information;
  • the packet processing unit may further record the number of times the encapsulation information is queried.
  • the number of records is incremented by one each time the encapsulation information is successfully queried. In this way, when the storage space of the network card is limited, the record of the package information with the smallest number of times of use can be deleted, so that the record of the package information newly sent by the central processing unit can be added, and the latest entry can be saved when the storage space of the network card is limited. Improve the efficiency of the NIC to forward packets.
  • the encapsulating information required by the entry management unit to perform VxLAN encapsulation on the first packet includes:
  • the entry management unit saves a VNI that forwards the VF of the first packet, and an inner layer destination MAC address of the first packet, and a correspondence between the tunnel identifier, and saves the tunnel identifier and the Correspondence between package information.
  • the entry management unit may directly save the VNI of the VF that forwards the first packet and the inner destination destination MAC address of the first packet, and the correspondence between the encapsulated information and the encapsulated information. Correspondence between the two.
  • any one of the first to fourth possible implementation manners of the second aspect in a fifth possible implementation manner of the second aspect of the embodiment of the present invention,
  • the NIC processor further includes a virtual switch, and the NIC that sends the VxLAN encapsulation of the first packet includes:
  • the packet processing unit in the network card processor performs VxLAN encapsulation on the first packet and sends the packet through the virtual switch according to the encapsulated MAC address and the encapsulated IP address obtained by the entry management unit; or ,
  • the virtual switch in the network card processor receives the VxLAN encapsulated packet sent by the central processor and sends the packet.
  • the packet processing unit is configured to send the first packet and the VNI when the virtual switch in the network card receives the VxLAN encapsulated packet sent by the central processing unit and sends the packet. After being sent to the central processing unit, the network card does not need to save the first packet, which can save the storage space of the network card occupied by saving the first packet, and improve the utilization of the storage space of the network card.
  • the packet processing unit is further configured to receive a second packet that is sent to the virtual machine, where the second packet is a VxLAN packet, and determine whether the entry management unit saves the second packet.
  • the encapsulated MAC address and the encapsulated IP address when the entry management unit does not save the encapsulated MAC address and the encapsulated IP address of the second packet, the second packet is sent to the packet receiving unit;
  • the acquiring and sending unit is further configured to receive the second packet from the packet receiving unit, and obtain the encapsulated MAC address and the encapsulated IP address of the second packet.
  • the related encapsulated IP address and the encapsulated MAC address in the central processing unit may also be saved in the central processing unit by an administrator pre-configured manner.
  • the NIC supports a single input/output virtualized SR-IOV and supports virtual switch vSwitch forwarding. And, the network card is connected to the central processor through a PCIe link.
  • a third aspect of embodiments of the present invention provides a computer readable medium storing computer readable instructions, wherein the computer readable instructions are in a computer device When the processor executes, perform the following steps:
  • the encapsulation information required for performing the scalable virtual local area network VxLAN encapsulation on the first packet is saved, where the encapsulation information includes a package medium access control MAC address and an encapsulated internet protocol IP address.
  • the encapsulated MAC address is the MAC address of the next hop device to be sent when the first packet is sent, and the encapsulated IP address is the IP address of the virtual extension LAN tunnel endpoint VTEP of the first packet destination end;
  • the first packet is VxLAN encapsulated and sent according to the encapsulation MAC address and the encapsulation IP address;
  • the network card When the network card does not save the encapsulation information required for performing VxLAN encapsulation on the first packet, sending an acquisition request to a central processor in the computer device, acquiring the encapsulation information from the central processor, and saving And sending a VxLAN encapsulated message to the first packet.
  • the network card includes at least one PF and at least one VF, and the virtual machine in the computer device directly sends the message to the network card through the VF and sends the packet through the network.
  • each virtual machine in the computer device uniquely corresponds to one VF, and the VF forwards the packet to the network card through the unique corresponding VF.
  • the computer readable medium after receiving the first packet, determining whether the package information of the VxLAN encapsulation of the first packet is saved in the network card, and if the encapsulation information is saved, The first packet is encapsulated and sent by the VxLAN. If the encapsulation information is not saved, the encapsulation information is requested and saved by the central processing unit, and the VxLAN encapsulated packet is sent to the first packet.
  • the network card encapsulates and sends the received message to the VxLAN.
  • the processor performs, determining, in the network card, whether to perform VxLAN on the first packet. Before packaging the required package information, it also includes:
  • the VxLAN network identifier VNI of the VF is acquired.
  • the address forwarding table in the network card may be queried according to the VNI of the VF and the inner destination destination MAC address of the first packet, and whether the address forwarding table exists in the VNI of the VF is determined. Encapsulation information corresponding to the inner destination destination MAC address of the first packet.
  • the determining whether the network card exists includes:
  • VNI VxLAN network identifier
  • the processor may further record the number of times the encapsulation information is queried according to computer readable instructions in the computer readable medium.
  • the number of records is incremented by one each time the encapsulation information is successfully queried.
  • any one of the first to the second possible implementation manners of the third aspect, the third possible implementation manner of the third aspect of the embodiment of the present invention, the saving pair The manner in which the first packet performs the encapsulation information required for the VxLAN encapsulation includes:
  • the VNI of the VF that forwards the first packet may be directly saved.
  • the packet after the VxLAN encapsulation of the first packet includes:
  • the first packet and the VNI are sent to the central processor.
  • the first packet is not saved, and the storage space of the network card occupied by the first packet is saved, and the utilization of the storage space of the network card is improved.
  • the second packet is sent to the central processor.
  • a VxLAN packet encapsulation and forwarding method, a computer device, and a computer readable medium are provided by the embodiment of the present invention.
  • the network card determines whether the VxLAN is saved in the first packet. Encapsulating the encapsulation information, if the encapsulation information is saved, performing VxLAN encapsulation and sending the first packet; if the encapsulation information is not saved, requesting, by the central processor, the encapsulation information, saving, and sending The VxLAN encapsulated packet is sent to the first packet, and the network card performs VxLAN encapsulation and transmission on the received packet.
  • FIG. 1 is a schematic structural diagram of a computer device in the prior art
  • FIG. 2 is a schematic structural diagram of a computer device 200 according to an embodiment of the present invention.
  • FIG. 3 is a schematic structural diagram of a specific implementation of a computer device 200 according to an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of a specific implementation of a computer device 200 in a Linux operating environment according to an embodiment of the present invention
  • FIG. 5 is a schematic flowchart of a method for transmitting a VxLAN message of an expandable virtual local area network according to an embodiment of the present invention
  • FIG. 6 is a schematic structural diagram of a computer device 600 according to an embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of a specific implementation of a computer device 600 according to an embodiment of the present invention.
  • FIG. 1 is a schematic structural diagram of a computer device 100 in the prior art.
  • the computer device 100 includes a central processing unit 101 and a network card 102, and the network card 102 includes a network card processor 1021.
  • the NIC 102 supports the unloading of the forwarding function of the virtual switch (vSwitch, Virtual Switch) and supports the single-input-output virtualization (SR-IOV, Single-Root I/O Virtualization) function. Implement VLAN packet forwarding on the vSwitch.
  • vSwitch virtual switch
  • SR-IOV Single-Root I/O Virtualization
  • the unloading of the vSwitch forwarding function on the NIC means that the virtual local area network (VLAN) packet forwarding is implemented on the NIC.
  • the vSwitch is also called a virtual network switch. It works on a Layer 2 data network and implements the Layer 2 (and part 3) network functions of the physical switch through software. Compared with traditional physical switches, virtual switches have the advantages of flexible configuration and strong scalability. One ordinary server can be configured with dozens or even hundreds of virtual switches, and the number of ports can be flexibly selected. Moreover, virtual switches can achieve the performance that can be achieved by large physical switches through virtual switching.
  • the vSwitch is widely used in Internet services based on Infrastructure as a Service (IaaS).
  • IaaS Infrastructure as a Service
  • a virtual machine connects to the network through a vSwitch.
  • the vSwitch connects to the external network through the physical NIC on the physical host as the uplink.
  • Each vSwitch has the same number of ports as a physical switch.
  • the virtual port vPort set of the same feature is a virtual LAN VLAN. Packets in different VLANs are isolated from each other. Users in each VLAN cannot communicate with other VLANs. The user communicates directly.
  • the NIC supports the SR-IOV function, which means that the NIC is presented with multiple virtual NICs on the computer device (such as the server).
  • SR-IOV is a hardware-based virtualization solution that improves performance and scalability.
  • the SR-IOV standard allows high-speed sharing of Peripheral Component Interconnect Express (PCIe) devices between virtual machines.
  • PCIe Peripheral Component Interconnect Express
  • SR-IOV Peripheral Component Interconnect Express
  • a single input/output (I/O, Input/Output) resource can be shared by multiple virtual machines. Shared devices will provide dedicated resources and also use shared common resources. This way, each virtual machine has access to a unique resource. Therefore, a PCIe device (such as a network card) with SR-IOV enabled and with appropriate hardware and OS support can be displayed as multiple separate physical devices, each with its own PCIe configuration space.
  • PCIe Peripheral Component Interconnect Express
  • PF physical function
  • VF Virtual Function
  • PF is a full-featured PCIe function that can be discovered, managed and processed just like any other PCIe device.
  • PF has fully configured resources, Can be used to configure or control PCIe devices.
  • a VF is a function associated with a physical function PF that can share one or more physical resources with physical functions and other VFs associated with the same physical function. VF only allows possession of configuration resources for itself.
  • the network card is connected to other components in the computer device through the PCIe link, the computer device on which the network card is located presents multiple virtual PCIe network cards.
  • Multiple virtual PCIe NICs belong to hardware virtual NICs that can be assigned to common virtual machines on computer devices and managed virtual machines assigned to computer devices.
  • the NIC is connected to the management VM through the PF port and connected to the common VM through the VF port.
  • the management VM is used to manage the common VM.
  • the computer device where the network card is located needs to reserve bus resources and reserve BAR for the network card when performing BIOS (basic input/output system) scanning.
  • BIOS basic input/output system
  • Address register, base address register the operating system kernel of the computer device needs to support the function of starting SR-IOV.
  • the packets to be sent by the virtual machine are forwarded directly through the network card.
  • the network card 102 in the computer device 100 does not have the network card 102.
  • the ability to forward VxLAN packets does not allow efficient packet forwarding.
  • the embodiment of the invention provides a new computer device to solve the problem that the network card cannot implement the encapsulation and transmission of the VxLAN message in the prior art.
  • the VxLAN packet includes a VxLAN tunnel header and an original static load.
  • the VxLAN tunnel header includes: an external destination MAC address, an external source MAC address, an external destination IP address, an external source IP address, an external UDP header, and a VNI, and the original payload portion. Including: internal destination MAC address, internal source MAC address, internal 802.1Q, original Ethernet payload, etc.
  • the external destination MAC address is the MAC address of the next hop device to be forwarded when forwarding the VxLAN message, that is, the encapsulated MAC address; the external destination IP address is the virtual scalable LAN tunnel endpoint (VTEP, VxLAN Tunnel) that forwards the VxLAN message destination. End Point) IP address, which is the encapsulation IP address.
  • the next hop device to be forwarded when the VxLAN packet is forwarded is the next device that passes through the VxLAN packet.
  • the routing device is only used when the routing device 1 and the routing device 2 reach the destination device. 1 is the next hop device that the NIC will pass when forwarding VxLAN packets.
  • the external source MAC address in the VxLAN tunnel header is externally configured by the administrator when the VTEP is deployed.
  • the other fields of the external IP header and the external UDP header are encapsulated.
  • the VNI can be encapsulated according to the meaning of each field of the IP and UDP protocols.
  • the VNI is configured on the VF corresponding to the virtual machine, and the original static payload is the original packet sent by the virtual machine.
  • VxLAN packet forwarding is usually implemented by setting VTEP.
  • VTEP implements isolation between the virtual network and the physical network.
  • a tunnel is established between the VTEPs to transmit data frames of the virtual network on the physical network, and the physical network does not sense the virtual network.
  • VTEP can be implemented in a variety of ways, and can be implemented by the system hardware and software.
  • the function is to perform VxLAN encapsulation on the packets to be sent, and to receive VxLAN packet parsing, packet learning, and decapsulation. In a network composed of multiple computer devices, it can be logically regarded as a VxLAN tunnel established between multiple VTEPs.
  • the VTEP encapsulates the original payload into a tunnel header.
  • the tunnel header uses the UDP format and identifies the packet as a VxLAN type through the destination port number of the UDP.
  • IP (Internet Protocol) information in the encapsulated tunnel header is the IP address information of the local VTEP and the IP address information of the peer VTEP to be sent.
  • the source MAC address in the encapsulated tunnel header is the local VTEP.
  • MAC address, destination MAC address is the MAC address of the next hop device that the VTEP is going to the peer VTEP, that is, the MAC address of the next hop device forwarded by the VxLAN packet.
  • For intermediate devices in network transmission they only forward according to the network information of VTEP, and do not need to parse VNI and inner layer message information.
  • FIG. 2 is a schematic structural diagram of a computer device 200 according to an embodiment of the present invention.
  • the computer device 200 includes a central processing unit 201 and a network card 202, and the network card 202 includes NIC processor 2021.
  • the embodiment of the present invention implements data encapsulation, decapsulation, and forwarding functions of the VTEP on the network card 202, so as to implement encapsulation and forwarding of VxLAN packets by the network card. That is, when receiving the packet sent by the virtual machine, the network card 202 obtains the encapsulated MAC address and the encapsulated IP address required for the VxLAN encapsulation of the packet, and performs VxLAN encapsulation and transmission on the packet according to the encapsulated MAC address and the encapsulated IP address. .
  • the NIC 202 obtains the encapsulated MAC address and the encapsulated IP address.
  • the NIC 202 sends an acquisition request to the central processor 201 for a packet to be sent, requesting the encapsulated MAC address and the encapsulated IP address of the packet to be sent. That is, when the encapsulated MAC address and the encapsulated IP address associated with the packet to be sent are not saved in the network card 202, the network card 202 sends the information of the packet to be forwarded to the central CPU 201, and the central CPU 201 obtains the to-be-sent report.
  • the obtained encapsulated MAC address and the encapsulated IP address are sent to the network card 202, and the network card 202 saves the obtained encapsulated MAC address and encapsulated IP address according to the obtained package.
  • the MAC address and the encapsulated IP address are encapsulated and sent.
  • the NIC 202 can also forward the same packet that has the same destination MAC address as the VNI to be forwarded and the VNI that forwards the VF according to the saved encapsulation information (encapsulated MAC address and encapsulation IP address).
  • the forwarding VF is to forward the packet sent by the virtual machine to the VF of the network card.
  • Each virtual machine corresponds to a VF.
  • the virtual machine When a certain virtual machine in the computer device 200 needs to send a message to another device, the virtual machine sends a message to be sent to the network card 202.
  • the process of processing the received message by the network card 202 is as follows:
  • the network card 202 receives the first packet sent by the virtual machine.
  • the first message received by the network card 202 is a message sent by a virtual machine on the computer device 200.
  • the virtual machine on the computer device 200 sends the first packet by using the VF corresponding to the virtual machine, that is, the forwarding VF of the virtual machine sends the first packet to the network card 202.
  • the network card processor 2021 in the network card 202 acquires the VNI corresponding to the VF that forwards the first packet.
  • the network card processor 2021 obtains the ID of the VF that forwards the first packet, searches the VF configuration table according to the obtained VF ID, and obtains the VF attribute and the VTAG (when the VF attribute is a VLAN, the VTAG) Indicates the VLAN ID; when the attribute of the VF is VxLAN, VTAG indicates VNI). If the attribute of the VF is VxLAN, the VNI corresponding to the ID of the VF is the VNI of the VF.
  • the contents of the VF configuration table can be as shown in Table a:
  • the table a only lists the contents of the entry related to the solution, where the VTAG is an identifier corresponding to the ID and VF attributes of the VF, and has no specific meaning.
  • the first packet received by the network card 202 carries the ID of the VF that forwards the first packet.
  • the network card processor 2021 can know which VF to send the first packet.
  • each VF configuration table has information indicating whether the attribute of the VF is a VLAN type or a VxLAN type. If it is a VLAN type, the VTAG in the VF configuration table indicates the VLAN ID corresponding to the VF. If it is the VxLAN type, the VTAG in the VF configuration table indicates the VNI corresponding to the VF.
  • the NIC processor 2021 determines, according to the obtained ID of the VF in the first packet, whether the VF attribute corresponding to the ID of the VF is a VxLAN attribute, and if yes, acquires a corresponding VNI from the configuration table of the VF.
  • the VF attribute used by the virtual machine is usually configured during the initialization of the network card.
  • the administrator configures the VF attribute used by a virtual machine to be VxLAN when the network card is initialized.
  • the VNI is also pre-configured, and each VF whose attribute is VxLAN corresponds to a unique VNI.
  • the network card processor 2021 determines, according to the obtained VNI of the VF and the destination MAC address of the first packet, whether the encapsulated MAC address required for VxLAN encapsulation of the first packet is saved in the network card 202. And encapsulating an IP address, wherein the encapsulated MAC address is a MAC address of a next hop device to be sent when the first packet is sent, and the encapsulated IP address is an IP address of a destination VTEP of the first packet ;
  • the NIC processor 2021 may be in the network card 202 according to the obtained VNI that forwards the VF of the first packet and the inner destination destination MAC address of the first packet (may be a storage unit or a storage table of the network card 202) And searching for the encapsulated MAC address and the encapsulated IP address corresponding to the VNI of the VF of the first packet and the destination MAC address of the first packet, if it can be found, confirming that the network card 202 is saved.
  • the encapsulated MAC address and encapsulation IP address required for the VxLAN encapsulation of the first packet In the embodiment of the present invention, the memory MAC destination address refers to the destination MAC address in the original packet (that is, the original payload).
  • the network card processor 2021 acquires a packaged MAC address and an encapsulated IP address required for the VxLAN encapsulation of the first packet sent by the central processing unit 201, and sends a VxLAN encapsulation of the first packet. The message, and save the encapsulated MAC address and encapsulated IP address.
  • the sending, by the network card processor 2021, the VxLAN encapsulation of the first packet may include:
  • the NIC processor 2021 performs VxLAN encapsulation on the first packet according to the obtained encapsulated MAC address and the encapsulated IP address required for the VxLAN encapsulation of the first packet, and sends the encapsulated packet; or
  • the NIC processor 2021 receives the VxLAN encapsulated packet sent by the central processing unit 201, and sends a VxLAN encapsulated packet to the first packet.
  • the network card processor 2021 further includes a virtual switch, and the network card processor 2021 sends a message to the VxLAN encapsulation of the first packet, which may include:
  • the NIC processor 2021 performs VxLAN encapsulation on the first packet according to the obtained encapsulated MAC address and the encapsulated IP address required for the VxLAN encapsulation of the first packet, and sends the encapsulated packet through the virtual switch. or,
  • the virtual switch in the NIC processor 2021 receives the VxLAN encapsulated packet sent by the central processing unit 201 and sends the VxLAN encapsulated packet to the first packet.
  • the network card processor 2021 can obtain the encapsulated MAC address and the encapsulated IP address required for the VxLAN encapsulation of the first packet by the central processing unit 201, and can implement the first report according to the obtained encapsulated MAC address and the encapsulated IP address. Encapsulating and transmitting the VxLAN; and the network card processor 2021 saves the encapsulated MAC address and the encapsulated IP address, so that the network card 202 receives the same destination MAC address as the first packet, and forwards the packet When the VNI has the same VNI packet, the subsequent received packet can be VxLAN encapsulated and sent according to the obtained encapsulated MAC address and encapsulated IP address.
  • the first packet may be VxLAN encapsulated by the network card processor 2021, or the first packet may be VxLAN encapsulated by the central processor 201.
  • the network card processor 2021 sends the first message and the VNI of the VF of the first message to the central processor 201 to obtain the encapsulated MAC address and the encapsulated IP address.
  • the first packet is not cached, so that the memory space of the network card 202 can be saved. Improve the utilization of the memory space of the network card 202.
  • the network card 202 when the network card 202 saves the encapsulated MAC address and the encapsulated IP address required for VxLAN encapsulation of the first packet by using the address information table, the network card 202 can be implemented in multiple manners. It can be recorded in one form or in two forms. The embodiment of the present invention does not limit the form of the table in which the corresponding relationship is recorded, as long as the network card processor 2021 in the network card 202 can obtain the message to be encapsulated according to the form.
  • the encapsulated MAC address and encapsulation IP address corresponding to the destination MAC address can be used.
  • the following describes the manner in which the network card 202 stores the encapsulated MAC address and the encapsulated IP address required for VxLAN encapsulation of the first packet in a table format and two tabular forms, respectively.
  • the destination MAC address of the VNI and the inner layer packet, and the encapsulated MAC address and encapsulation IP corresponding to the destination MAC address of the VNI and the inner layer packet can be recorded in one table. address.
  • Table 1 is as follows:
  • a table can be used to record the VNI and the inner layer destination MAC address, and then a table record encapsulates the MAC address and the encapsulated IP address.
  • the two tables pass an identifier (for example, a tunnel). ID) Establish an association.
  • the correspondence between the VNI that forwards the VF and the destination MAC address and the tunnel ID (which is exemplified by the tunnel ID) can be as shown in Table 2:
  • Table 3 shows the mapping between the tunnel ID and the encapsulated MAC address and encapsulated IP address.
  • Table 3 above is a linear table.
  • the "tunnel ID" is used as the index of the entry.
  • Each entry in the table 3 stores the package information, including the encapsulated MAC address and the encapsulated IP address.
  • Each new entry will occupy an unused tunnel ID. For example, if Table 3 can store 1024 entries, the tunnel ID ranges from 0 to 1023. Initially, the contents of all entries (encapsulated MAC address and encapsulation IP address) are empty. When you need to save a package information, Take up one of the entries.
  • the VNI VNI and the inner layer destination MAC address are recorded in two forms, and the correspondence between the encapsulated MAC address and the encapsulated IP address can save the storage space of the network card 202, and avoid excessive correspondence table to store the network card 202. Occupy.
  • the VNI and the inner MAC address of the VF may be different, but the same encapsulated MAC address and encapsulated IP address are used, and the tunnel ID is used as an index to establish a correspondence, so that only one package can be saved.
  • each VNI-forwarding VNI and the inner-layer destination MAC address combination can obtain the corresponding encapsulated MAC address and encapsulated IP address according to their respective tunnel IDs. Avoid forwarding for each group Both the VNI's VNI and the inner destination destination MAC address maintain a packaged MAC address and encapsulated IP address, which saves the NIC storage space occupied by saving each encapsulated MAC address and encapsulated IP address.
  • the foregoing Table 2 may be a MAC address forwarding table.
  • the existing MAC address forwarding table may be extended, that is, the forwarding outlet in the MAC address forwarding table is extended, and the tunnel ID information is added.
  • the extended MAC address forwarding table is shown in Table 4:
  • Table 4 records the forwarding exits corresponding to the VTAG (the VTAG can be the VLAN ID of the existing MAC table, or the VNI in the present invention) and the destination MAC address.
  • the forwarding egress includes the virtual machine network port, physical port, or tunnel ID.
  • the network card processor 2021 records the corresponding in the MAC address forwarding table. Tunnel ID. That is, if the forwarding ID of the MAC address forwarding table contains the tunnel ID, the network card has forwarded the same inner destination destination MAC address and the VNI packet forwarding the VF.
  • Table 3 above may be a VTEP information table.
  • the VTEP information table is created by the network card 202. When the network card 202 has forwarded the same packet as the destination MAC address of the packet to be forwarded and the VNI that forwards the VF, a VTEP information table including the tunnel ID is created.
  • the table 2, the table 3, the MAC address forwarding table, and the VTEP information table are only listed.
  • the information related to the embodiment of the present invention is related to the information.
  • the MAC address forwarding table and the VTEP information table may further include other information, which is not specifically limited in the embodiment of the present invention.
  • the above table 2 is a MAC address forwarding table.
  • the above table 3 is a VTEP information table.
  • the network card processor 2021 determines whether the network card 202 stores the package according to the acquired VNI of the forwarded VF of the first packet and the inner destination destination MAC address of the first packet.
  • the encapsulated MAC address and the encapsulated IP address required by the first packet include:
  • the NIC processor 2021 checks the MAC address forwarding table according to the obtained VNI corresponding to the VF of the first packet and the inner destination destination MAC address of the first packet, and determines whether the forwarding and the obtained forwarding are performed. a MAC address forwarding table associated with the VNI of the VF of the message and the inner destination destination MAC address of the first message;
  • the VNI of the VF that forwards the first packet and the MAC address forwarding table related to the inner destination MAC address of the first packet, and the forwarding exit of the found MAC address forwarding table is a tunnel ID
  • Obtain the corresponding tunnel ID and then check the VTEP information table according to the obtained tunnel ID, and obtain the encapsulated MAC address and the encapsulated IP address corresponding to the tunnel ID recorded in the VTEP information table.
  • the network card 202 sends a request message to the central processing unit 201 to request a packaged MAC address and an encapsulated IP address required for VxLAN encapsulation of the first message.
  • the manner in which the central processing unit 201 obtains the encapsulated MAC address and the encapsulated IP address may be: the central processing unit 201 searches for the corresponding VNI based on the forwarded VF and the inner destination destination MAC address of the first packet.
  • the FDB (Forward Data Base) entry is obtained by obtaining the encapsulated IP address of the VxLAN encapsulation of the first packet from the found FDB entry. And obtaining an ARP entry according to the obtained encapsulated IP address, and obtaining a packaged MAC address for performing VxLAN encapsulation on the first packet.
  • the central processor 201 obtains a package IP of VxLAN encapsulation of the first packet. After the address and the encapsulated MAC address, the obtained encapsulated IP address and the encapsulated MAC address may be directly sent to the network card 202, or the VTEP information table including the encapsulated IP address and the encapsulated MAC address may be generated, and the generated VTEP is generated. The information table is sent to the network card 202.
  • FIG. 3 is a schematic structural diagram of a specific implementation of a computer device 200 according to an embodiment of the present invention.
  • the network card processor 2021 includes: a message processing unit 20211 and an entry management unit 20212;
  • the central processing unit 201 includes: a message receiving unit 2011 and an acquisition sending unit 2012;
  • the central processing unit 201 interconnects the PCIe channel with the network card 202 via a high speed shared fast peripheral component.
  • the packet processing unit 20211 is configured to determine, according to the received first packet, the VF attribute of the first packet, and if the VF attribute is a VxLAN attribute, obtain and forward the first report. And determining, according to the obtained VNI of the forwarded VF and the inner layer destination MAC address of the first packet, whether the network card 202 stores the encapsulated MAC address and the encapsulation required for encapsulating the first packet.
  • the IP address is sent to the message receiving unit 2011 in the central processing unit 201 to request a pair when the network card 202 does not save the encapsulated MAC address and the encapsulated IP address required to encapsulate the first packet.
  • the first packet performs a packaged MAC address and an encapsulated IP address required for VxLAN encapsulation.
  • the entry management unit 20212 is configured to receive and save the encapsulated MAC address and the encapsulated IP address required for the VxLAN encapsulation of the first packet sent by the central processing unit 201. Specifically, the entry management unit 20212 receives and stores the encapsulated MAC address and the encapsulated IP address from the acquisition and transmission unit 2012 in the central processing unit 201. Correspondingly, the packet processing unit 20211 may perform VxLAN encapsulation and transmission on the first packet according to the encapsulated MAC address and the encapsulated IP address obtained by the entry management unit 20212.
  • the packet processing unit 20211 may also forward the VNI of the VF to the first packet with the same inner destination destination MAC address according to the encapsulated MAC address and the encapsulated IP address obtained by the entry management unit 20212.
  • the way to encapsulate the MAC address and encapsulate the IP address in the VxLAN package has different implementations for different application environments. For example, when the computer device 200 runs the operating system of Windows, the implementation manner when running the Linux operating system is slightly different. In the embodiment of the present invention, when the computer device 200 runs the Linux operating system as an example, the manner in which the central processing unit 201 obtains the encapsulated MAC address and the encapsulated IP address of the VxLAN encapsulation of the first packet is described.
  • FIG. 4 is a schematic structural diagram of a specific implementation of a computer device 200 in a Linux operating environment according to an embodiment of the present invention.
  • the network card 202 in FIG. 4 supports the offloading of the vSwitch forwarding function and supports the SR-IOV function.
  • the network card 202 includes at least one physical function PF and at least one virtual function VF.
  • the network card 202 is connected to the central processing unit 201 through the PCIe channel, and is connected to the central processing unit 201 through the PCIe channel. Internet connection.
  • the processor 2021 in the network card 202 includes a message processing unit 20211, an entry management unit 20212, and a virtual switch 20213.
  • the central processing unit 201 runs the Linux operating system.
  • the Linux user state space and the Linux kernel state space are run.
  • the Linux user state space runs at least one virtual machine, and each virtual machine passes the unique VF and the network card 202.
  • the virtual switch 20213 is connected; the Linux kernel state space includes a message receiving unit 2011, an acquisition sending unit 2012, a virtual device 2013, and a protocol stack 2014.
  • the acquiring and sending The unit 2012 searches for a VxLAN device corresponding to the VNI in the Linux device linked list according to the VNI received by the message receiving unit 2011 (the VxLAN device is a virtual device, for example, may be a virtual device created by the VxLAN function provided by the Linux operating system).
  • the device searches for the corresponding FDB entry in the FDB table in the data space of the VxLAN device according to the inner destination destination MAC address of the first packet (each VxLAN device has a data space dedicated to the VxLAN device, The data space holds the FDB entry associated with the device, and the FDB entry is searched according to the MAC address to obtain the encapsulated IP address corresponding to the inner destination destination MAC address, that is, the IP address of the destination VTEP.
  • the FDB table can be as shown in Table 5:
  • the sending and sending unit 2012 uses the encapsulated IP address as the destination IP address of the first packet, and searches for the ARP entry in the protocol stack 2014 (ARP).
  • the entry records the correspondence between the encapsulated IP address and the MAC address of the next hop device to be passed, and obtains the MAC address of the next hop device to which the first packet is sent corresponding to the encapsulated IP address, thereby A complete information required for VxLAN encapsulation of the first message is obtained.
  • the ARP entry can be as shown in Table 6:
  • the obtaining and sending unit 2012 sends the obtained encapsulated MAC address and the encapsulated IP address to the network card 202, and may convert the encapsulated MAC address and the encapsulated IP address into a form stored by the network card 202, such as a MAC address forwarding table and The form of the VTEP information table is sent to the network card 202.
  • the encapsulated MAC address and the encapsulated IP address may also be directly sent to the network card 202.
  • the obtaining and transmitting unit 2012 may use the first packet and the encapsulation information (including but not limited to a source IP address, a destination IP address, a source MAC address, a destination MAC address, and a VNI, where the source IP address and the source MAC address.
  • the configuration is statically configured by the administrator, and is sent to the protocol stack 2014.
  • the protocol stack 2014 implements the VxLAN encapsulation of the first packet according to the encapsulation information, and sends the encapsulated VxLAN packet to the network card 202, and the network card 202 sends the encapsulation. After the VxLAN message.
  • the encapsulated MAC address obtained by the above is obtained by the central processing unit 201 from the ARP table. Therefore, when the VxLAN encapsulation information is statically configured by the administrator, the administrator only needs to configure the encapsulated IP address without configuring the encapsulated MAC address.
  • Tables 5 and 6 in the embodiments of the present invention only list information related to the present invention from a concise point of view. In specific implementation, these tables may also include other information, and the embodiment of the present invention does not. Make a limit.
  • the network card 202 also manages the received or already saved encapsulated MAC address and encapsulated IP address table. For example, the NIC 202 saves the encapsulated MAC address and the encapsulated IP address through the MAC address forwarding table and the VTEP information table. When the NIC 202 checks the MAC address forwarding table to encapsulate the VxLAN packet, the number of times the MAC address forwarding table is used. When the network card 202 receives the MAC address forwarding table and the storage address of the MAC address forwarding table is full, the network card 202 can actively aging (ie, deleting) the entry with the lowest frequency, so that the network card 202 can be inserted into the new network.
  • the network card 202 can actively aging (ie, deleting) the entry with the lowest frequency, so that the network card 202 can be inserted into the new network.
  • the MAC address forwarding table and the VTEP information table on the NIC are in one-to-one correspondence.
  • the creation and usage count of the VTEP information table is followed by the corresponding MAC address entry, which can further improve the space utilization of the NIC and the management efficiency of the entry.
  • a high-frequency entry can be continuously maintained on the NIC to improve the efficiency of the NIC to forward VxLAN packets.
  • the number of times the entries in the MAC address forwarding table are used may be recorded in the MAC address forwarding table.
  • the number of times the entries in the VTEP information table are used may be recorded in the VTEP information table.
  • the number of times of use and the number of entries in the VTEP information table is not limited in the embodiment of the present invention.
  • the following describes an example of a method for transmitting a VxLAN message according to an embodiment of the computer device shown in FIG. 4 .
  • the virtual machine 1 needs to send the first packet
  • the virtual machine 1 sends the packet to the network card 202 through the corresponding VF (the VF1 is taken as an example in the embodiment of the present invention).
  • the virtual switch 20213 in the network card 202 receives the virtual machine 1 transmission from the VF1.
  • the first packet is sent to the packet processing unit 20211.
  • the message processing unit 20211 determines, according to the obtained first packet, whether the attribute of the VF1 is a VxLAN attribute, and if it is a VxLAN attribute, whether the query entry management unit 20212 stores the VxLAN for the first message. Encapsulated package MAC address and package IP address.
  • the entry management unit 20212 includes the encapsulated MAC address and the encapsulated IP address of the VxLAN encapsulation of the first packet, the encapsulated MAC address and the encapsulated IP address in the entry management unit 20212 are compared.
  • the first packet is encapsulated in the VxLAN, and the first packet after the VxLAN encapsulation is sent to the port 2022 through the virtual switch 20213, and the first packet after the VxLAN encapsulation is passed through the network through the port 2022. send.
  • the packet processing unit 20211 passes the physical function PF (the PF of the embodiment of the present invention) N is an example.
  • the first message and the VNI of the VF1 are sent to the message receiving unit 2011 in the central processing unit 201.
  • the message receiving unit 2011 sends the first message and the VNI of the VF1 to the acquisition and transmission unit 2012, and the acquisition and transmission unit 2012 obtains the first message according to the FDB entry and the ARP entry.
  • the encapsulated MAC address and the encapsulated IP address of the VxLAN encapsulation are sent to the entry management unit 20212 by the PF (described by way of example of the PF2), and the entry management unit 20212 saves the acquisition from the The encapsulated MAC address and the encapsulated IP address obtained by the sending unit 2012.
  • the protocol stack 2014 may perform the VxLAN encapsulation on the first packet, and the PF is used as the PF.
  • the first packet sent by the VxLAN is sent to the virtual switch 20213.
  • the virtual switch 20213 sends the VxLAN encapsulated first packet to the network through the port 2022.
  • the obtaining and transmitting unit 2012 sends the first packet to the packet processing unit 20211 through the PF (for example, PF N), and the packet processing unit 20211 according to the encapsulated MAC address and the encapsulated IP address that have been saved by the entry management unit 20212 are performed on the first packet.
  • the VxLAN is encapsulated, and the first packet after VxLAN encapsulation is sent to the network through the virtual switch 20213 through the port 2022.
  • FDB entries there are two sources of FDB entries in the computer device 200: one is the configuration of the administrator, and the other is the learning of the VxLAN message sent by the network card. If all the FDB entries are configured by the administrator, when the computer device 200 receives a message from the network that the destination is a virtual machine on the computer device 200, since the forwarding entry is an administrator static The configuration is sent to the network card 202. After the network card 202 decapsulates the received VxLAN message and obtains the original internal static load, the original payload can be forwarded to the destination virtual machine according to the configured forwarding entry.
  • the network card 202 needs to determine the VTEP information and the MAC address included in the packet after receiving the VxLAN packet destined for a virtual machine on the computer device. Whether the forwarding information network card is included or not, if not included, the network card sends the VxLAN message to the central processing unit 201 for VxLAN message learning. In this way, whether the administrator configuration or the packet learning mode is adopted, the entries on the network card are all derived from the computer device 200 (ie, the central processing unit 201 in the computer device 200), and unified management of the computer device 200 can be implemented.
  • the process of the network card 202 sending the VxLAN message to the central CPU 201 for VxLAN message learning is as follows:
  • the network card 202 receives a second packet sent to the computer device 200 through a network, where the second packet destination is a virtual machine on the computer device;
  • the network card processor 2021 in the network card 202 determines whether the second packet is a VxLAN packet.
  • the determining whether the packet is a VxLAN packet may be determined by determining whether the UDP destination port number used in the second packet is 4789. If it is 4789, the second packet is determined to be a VxLAN packet. According to RFC 7348, UDP port number 4789 is used as the identifier of the VxLAN message.
  • the network card processor 2021 parses the first The second packet obtains the source MAC address, the destination MAC address, the source MAC address and the source IP address of the outer packet (VxLAN tunnel) of the VNI, the inner packet (original payload), and whether the network card 202 exists.
  • the encapsulated MAC address (the source MAC address of the outer packet) and the encapsulated IP address (the source IP address of the outer packet) corresponding to the second packet. If not, forwarding the second packet to the central processing unit 201; if it already exists, jumping directly to S210;
  • the network card 202 determines whether there is a packaged MAC address and an encapsulated IP address included in the second packet, first according to the second The source MAC address of the VNI and the inner layer packet in the packet is checked by the MAC address forwarding table. If found, the network card 202 includes the MAC address forwarding table corresponding to the second packet.
  • the VTEP information table is queried according to the tunnel ID indicated by the MAC address forwarding table, and the encapsulated IP address and the encapsulated MAC address in the VTEP information table are queried, and the outer packet source IP is obtained by parsing the second packet.
  • the address and the source MAC address are compared. If they are all the same, the network card 202 already includes the encapsulated IP address and the encapsulated MAC address included in the second packet. If there is no or different, it is determined that the network card 202 does not include the encapsulated IP address and the encapsulated MAC address included in the second packet.
  • the central processing unit 201 parses the second packet, and takes the embodiment shown in FIG. 4 as an example, and can perform the packet in the protocol stack 2014. After parsing, if the VxLAN packet is judged, the VxLAN packet is learned. If the FDB entry exists, the FDB entry is refreshed and the encapsulation IP address is updated. If not, the FDB entry is created for subsequent use.
  • the virtual machine in the computer device 200 uses a message to be used as a VxLAN package.
  • the acquisition and sending unit 2012 of the central processing unit 201 acquires the decapsulated VxLAN original payload, and sends the original payload and the VNI to the network card 202. That is, the original payload and the VNI of the acquired second packet by the obtaining and transmitting unit 2012 are sent to the packet processing unit 20211 in the network card processor 202 through the physical function PF.
  • the foregoing obtaining and sending unit 2012 obtains the original payload after decapsulation.
  • a virtual bridge created by Linux can be used to connect the VxLAN device corresponding to the VxLAN message to the virtual bridge, so that the original payload after decapsulation is Forwarded to the virtual bridge, the acquisition sending unit 2012 can obtain the original payload at the entrance of the virtual bridge.
  • the receiving process of the VxLAN device can also be modified to obtain the original payload after the VxLAN device completes packet learning and decapsulation.
  • the network card 202 searches the forwarding table to forward the inner layer original static load to the corresponding virtual machine according to the VNI of the second packet and the inner destination destination MAC address. That is, the packet processing unit 20211 in the NIC processor 2021 sends the second packet to the destination virtual machine through the virtual switch 20213 according to the VNI of the second packet and the destination MAC address of the inner packet.
  • step S204 after the packet processing unit 20211 in the network card processor 2021 sends the second packet to the central processing unit 201, the VNI and the inner layer destination MAC address of the second packet may also be directly used. Addressing, by the virtual switch 20213, the second packet is sent to the destination virtual machine, and the acquisition sending unit 2012 in the central processing unit 201 is not required to pass the original static load and the VNI of the second packet through the physical The function PF is sent to the message processing unit 20211 in the network card processor 202.
  • FIG. 5 is a schematic flowchart of a method for transmitting a VxLAN message of an expandable virtual local area network according to an embodiment of the present invention.
  • a method for transmitting a scalable virtual local area network (VxLAN) packet is applied to a computer device, where the computer device includes a central processing unit, a network card, and a virtual machine, and the network card includes a network card processor, as shown in FIG. , the method includes:
  • Step 500 The network card processor receives the first packet sent by the virtual machine.
  • Step 502 The network card processor determines whether the package information required for performing VxLAN encapsulation on the first packet is saved in the network card, where the encapsulation information includes a package medium access control MAC address and an encapsulated Internet protocol.
  • An IP address where the encapsulated MAC address is a MAC address of a next hop device to be sent when the first packet is sent, and the encapsulated IP address is an IP address of the destination VTEP of the first packet;
  • Step 504 When the network card stores the encapsulation information required for the VxLAN encapsulation of the first packet, the first packet is VxLAN encapsulated and sent according to the encapsulation information.
  • Step 506 When the network card does not save the encapsulation information required for VxLAN encapsulation of the first packet, send an acquisition request to the central processor, and obtain the encapsulation information from the central processor and save the information. And sending a VxLAN encapsulated packet to the first packet.
  • the network card is a network card that supports a single input/output virtualized SR-IOV and supports a virtual switch vSwitch forwarding function.
  • the virtual machine in the computer device directly sends the message to the network card through the VF and sends it through the network.
  • the network card includes at least one PF and at least one VF.
  • the network card processor determines whether the package information of the VxLAN encapsulation of the first packet is saved in the network card, and if the encapsulation information is saved, The first packet is encapsulated and sent by the VxLAN; if the encapsulation information is not saved, the encapsulation information is requested and saved by the central processing unit, and the VxLAN encapsulated packet is sent to the first packet.
  • the network card implements VxLAN encapsulation and transmission of the received message.
  • the method further includes:
  • Step 501 The network card processor obtains an ID of the virtual function VF that forwards the first packet from the received first packet, and queries the ID corresponding to the VF according to the ID of the VF.
  • the VxLAN network identifier VNI of the VF is acquired.
  • the network card processor determines whether the package information required for VxLAN encapsulation of the first packet is saved in the network card, including:
  • the network card processor queries, according to the VNI and the inner layer destination MAC address of the first packet, whether the VNIC of the VF and the inner layer destination MAC address of the first packet are present in the network card.
  • Package information
  • the network card When the network card has the package information corresponding to the VNI of the VF and the inner destination destination MAC address of the first packet, it is determined that the first packet is VxLAN encapsulated in the network card. The required package information.
  • the network card may query, by querying the related address information table (which may be the foregoing Table 1 or the foregoing Table 2 and Table 3), that the network card is configured to perform VxLAN encapsulation on the first packet.
  • the required package information Moreover, the network card can also record the number of times of use of the address information table.
  • the record address information table is obtained. The number of uses is increased by 1.
  • the entry of the address information table in the network card occupies the storage space that can be used by the network card, the entry with the smallest number of times can be deleted, so that the newly sent entry of the central processing unit can be added, and when the storage space of the network card is limited, The latest entries can be saved to improve the efficiency of the NIC to forward packets.
  • the manner in which the network card stores the encapsulation information required for the VxLAN encapsulation of the first packet may be in the manner of the foregoing Table 1, or may be in the manner of Table 2 and Table 3, for example, using a MAC forwarding table to store the forwarding device.
  • the correspondence between the VNI of the VF of the first packet and the inner destination destination MAC address of the first packet and the tunnel identifier is used, and the correspondence between the tunnel identifier and the encapsulation information is saved by using the VTEP information table. relationship.
  • the storage space of the NIC can be saved by using the methods of Table 2 and Table 3 (or the MAC forwarding table and the VTEP information table) to avoid the occupation of the NIC storage space by too many entries.
  • the network card in the computer device may further include a virtual switch.
  • the sending, by the network card processor, the VxLAN encapsulated packet of the first packet includes:
  • the virtual switch in the network card receives the VxLAN encapsulated packet sent by the central processing unit and sends the packet, and sends the packet; or
  • the network card processor performs VxLAN encapsulation on the first packet according to the obtained encapsulation information required for VxLAN encapsulation of the first packet, and is sent by using a virtual switch in the network card.
  • the virtual switch in the network card When the virtual switch in the network card receives the VxLAN encapsulated packet sent by the central processing unit and sends the packet, the first packet is saved in the network card, which saves saving.
  • the storage space of the network card occupied by the first packet improves the storage space of the network card. Utilization.
  • the method further includes:
  • the network card processor Receiving, by the network card, a second packet sent to the virtual machine, where the second packet is a VxLAN packet; the network card processor determining whether the network card saves a encapsulated MAC address in the second packet The IP address is encapsulated; when the network card does not save the encapsulated MAC address and the encapsulated IP address of the second packet, the second packet is sent to the central processor.
  • the central processor can obtain the encapsulated AMC address and the encapsulation in the second packet according to the received second packet. IP and save.
  • the encapsulated IP address is stored in the FDB entry, and the encapsulated MAC address is recorded in the ARP entry.
  • the central processor saves the encapsulated MAC address and the encapsulated IP address in the second packet, and may subsequently receive the network card acquisition request, requesting the same message as the VNI and the inner layer destination MAC address of the second packet.
  • the encapsulated information is sent to the network card according to the encapsulated MAC address and the encapsulated IP address of the saved second packet.
  • the related encapsulated IP address and the encapsulated MAC address in the central processing unit may also be saved in the central processing unit by an administrator pre-configured manner.
  • VxLAN packet forwarding method may be implemented by referring to the solution described in the foregoing embodiments of FIG. 2, FIG. 3 and FIG. 4, and details are not described herein.
  • FIG. 6 is a schematic structural diagram of a computer device 600 according to an embodiment of the present invention.
  • the computer device 600 includes a central processing unit 601, a network card 602, and a virtual machine 603.
  • the network card 602 includes a network card processor 6021, and the network card processor 6021 includes a message processing unit 60211 and an entry management unit 60212. ;
  • the packet processing unit 60211 is configured to receive the first packet sent by the virtual machine 603, and determine whether the encapsulation information required for VxLAN encapsulation of the first packet is saved in the network card 602.
  • the network card 602 sends an acquisition request to the central processing unit 601; wherein the encapsulation information packet Encapsulating a MAC address and a packaged IP address, where the encapsulated MAC address is a MAC address of a next hop device to be sent when the first packet is sent, and the encapsulated IP address is a destination of the first packet VTEP IP address;
  • the entry management unit 60212 is configured to receive and save the encapsulated MAC address and the encapsulated IP address required for the VxLAN encapsulation of the first packet sent by the central processing unit 601.
  • the network card processor 6021 is configured to send a VxLAN encapsulated message to the first packet.
  • the network card 602 supports a single input/output virtualized SR-IOV and supports a virtual switch vSwitch forwarding function.
  • the virtual machine 603 in the computer device 600 directly sends the message to the network card 602 through the VF and transmits it through the network.
  • the network card includes at least one PF and at least one VF.
  • the network card 602 is connected to the central processing unit 601 through a PCIe link.
  • the packet processing unit 60211 receives the first packet sent by the virtual machine 603, and determines whether the encapsulation information required for VxLAN encapsulation of the first packet is stored in the network card 602. If the encapsulation information is saved, the first packet is VxLAN encapsulated and sent; if the encapsulation information is not saved, the encapsulation information is requested from the central processing unit 601 and saved, and the transmission is performed.
  • the first packet carries the VxLAN encapsulated packet, and the network card 602 performs VxLAN encapsulation and transmission on the received packet.
  • FIG. 7 is a schematic structural diagram of a specific implementation of a computer device 600 according to an embodiment of the present invention.
  • the central processing unit 601 includes a message receiving unit 6011 and an acquisition transmitting unit 6012;
  • the message receiving unit 6011 is configured to receive an acquisition request sent by the packet processing unit 60211, where the acquisition request includes the first packet and a VNI that forwards the VF of the first packet;
  • the obtaining and sending unit 6012 is configured to obtain, according to the obtaining request received by the packet receiving unit 6011, the encapsulation information of the VxLAN encapsulation of the first packet, and send the encapsulation information to the entry management unit 60212.
  • the packet processing unit 60211 is further configured to receive the first packet from the received packet. Obtaining an ID of the VF that forwards the first packet, and querying an attribute of the VF corresponding to the ID of the VF according to the ID of the VF;
  • the VNI of the VF is acquired.
  • the packet processing unit 60211 may query, according to the obtained VNI of the VF, and the inner layer destination MAC address of the first packet, whether the network card 602 needs to save the VxLAN encapsulation required for the first packet.
  • Package information may be provided.
  • the packet processing unit 60211 determines whether the package information required for performing VxLAN encapsulation on the first packet in the network card 602 is:
  • the message processing unit 60211 queries, according to the VNI and the inner layer destination MAC address of the first packet, whether the VNI of the VF and the inner layer of the first packet are present in the network card 602. Encapsulation information corresponding to the MAC address;
  • the message processing unit 60211 can query whether there is a related address information table in the entry management unit 60212, for example, Table 1 in the above embodiment, or Table 2 and Table 3 in the foregoing embodiment, through related
  • the address information table queries whether the encapsulation information required for VxLAN encapsulation of the first packet exists in the entry management unit 60212 of the network card 602.
  • the number of times of use of the address information table (which may be Table 1 or Table 2 and Table 3) may be recorded, and the packet processing unit 60211 queries the entry management unit 60212 once.
  • the usage count of the record address information table is incremented by one.
  • the entry of the address information table in the entry management unit 60212 occupies the storage space that can be used by the network card 602
  • the entry with the smallest number of times of use can be deleted, so that the newly issued entry of the central processing unit 601 can be added to the entry.
  • the latest entries can be saved to improve the efficiency of the NIC to forward packets.
  • the entry management unit 60212 saves the first packet.
  • the package information required for the VxLAN package includes:
  • the entry management unit 60212 saves a VNI that forwards the VF of the first packet, and an inner layer destination MAC address of the first packet, and a correspondence between the tunnel identifier, and saves the tunnel identifier and the The correspondence between the package information.
  • the NIC 602 stores the encapsulation information required for the VxLAN encapsulation of the first packet, and may be in the manner of Table 1 or the foregoing Table 2 and Table 3, for example, using a MAC forwarding table to save and forward. Between the VNI of the VF of the first packet and the destination MAC address of the first packet, and the tunnel identifier, the VTEP information table is used to save the relationship between the tunnel identifier and the encapsulation information. Correspondence relationship. The storage space of the NIC can be saved by using the methods of Table 2 and Table 3 (or the MAC forwarding table and the VTEP information table) to avoid the occupation of the NIC storage space by too many entries.
  • the network card processor 6021 further includes a virtual switch 60213, and the network card processor 6021 sends a VxLAN encapsulated message to the first packet, including:
  • the packet processing unit 60211 in the network card processor 6021 performs VxLAN encapsulation on the first packet and passes the virtual switch according to the encapsulated MAC address and the encapsulated IP address obtained by the entry management unit 60212. 60213 sent; or,
  • the virtual switch 60213 in the network card processor 60211 receives the VxLAN encapsulated packet sent by the central processing unit 601 and sends the packet.
  • the packet processing unit 60211 is in the first packet when the virtual switch 60213 in the network card 602 receives the VxLAN encapsulated packet sent by the central processing unit 601 and sends the packet. After the VNI is sent to the central processing unit 601, the network card 602 does not need to save the first packet, which can save the storage space of the network card occupied by saving the first packet, and improve the utilization of the network card space.
  • the packet processing unit 60211 is further configured to receive a second packet that is sent to the virtual machine 603, where the second packet is a VxLAN packet, and determine whether the entry management unit 60212 saves The encapsulated MAC address and the encapsulated IP address in the second packet; when the entry management unit 60212 does not save the encapsulated MAC address and the encapsulated IP address of the second packet, the second report is The text is sent to the message receiving unit 6011;
  • the obtaining and sending unit 6012 is further configured to receive the second packet from the packet receiving unit 6011, and obtain the encapsulated MAC address and the encapsulated IP address of the second packet.
  • the central processing unit 601 can obtain the encapsulated AMC address in the second packet according to the received second packet. And package the IP and save it. For example, the encapsulated IP address is stored in the FDB entry, and the encapsulated MAC address is recorded in the ARP entry.
  • the central processing unit 601 saves the encapsulated MAC address and the encapsulated IP address in the second packet, and may subsequently receive the acquisition request of the network card 602, requesting the same VNI and the inner destination destination MAC address of the second packet.
  • the encapsulated information of the packet is sent to the network card 602 according to the encapsulated MAC address and the encapsulated IP address of the saved second packet.
  • the related encapsulated IP address and the encapsulated MAC address in the central processing unit 601 may also be saved in the central processing unit 601 by an administrator pre-configured manner.
  • the embodiment of the present invention further provides a computer readable medium storing computer readable instructions, when the computer readable instructions are executed by a processor in a computer device, performing the following steps:
  • the encapsulation information required for performing the scalable virtual local area network VxLAN encapsulation on the first packet is saved, where the encapsulation information includes a package medium access control MAC address and an encapsulated internet protocol IP address.
  • the encapsulated MAC address is the MAC address of the next hop device to be sent when the first packet is sent, and the encapsulated IP address is the IP address of the destination VTEP of the first packet;
  • the first packet is VxLAN encapsulated and sent according to the encapsulation MAC address and the encapsulation IP address;
  • the network card When the network card does not save the encapsulation information required for performing VxLAN encapsulation on the first packet, sending an acquisition request to a central processor in the computer device, acquiring the encapsulation information from the central processor, and saving And sending a VxLAN encapsulated message to the first packet.
  • the network card includes at least one PF and at least one VF, and the virtual machine in the computer device directly sends the message to the network card through the VF and sends the packet through the network.
  • each virtual machine in the computer device uniquely corresponds to one VF, and the VF forwards the packet to the network card through the unique corresponding VF.
  • the computer readable medium after receiving the first packet, determining whether the package information of the VxLAN encapsulation of the first packet is saved in the network card, and if the encapsulation information is saved, The first packet is encapsulated and sent by the VxLAN. If the encapsulation information is not saved, the encapsulation information is requested and saved by the central processing unit, and the VxLAN encapsulated packet is sent to the first packet.
  • the network card encapsulates and sends the received message to the VxLAN.
  • the method before the performing, by the processor, determining, by the network card, the encapsulation information required for performing VxLAN encapsulation on the first packet, the method further includes:
  • the VxLAN network identifier VNI of the VF is acquired.
  • the address forwarding table in the network card may be queried according to the VNI of the VF and the inner destination destination MAC address of the first packet, and whether the address forwarding table exists in the VNI of the VF is determined. Encapsulation information corresponding to the inner destination destination MAC address of the first packet.
  • the determining, by the network card, the encapsulation information required for performing VxLAN encapsulation on the first packet includes:
  • VNI VxLAN network identifier
  • the processor may further record the number of times the encapsulation information is queried according to computer readable instructions in the computer readable medium.
  • the number of records is incremented by one each time the encapsulation information is successfully queried.
  • the manner of saving the encapsulation information required for VxLAN encapsulation of the first packet includes:
  • the correspondence between the VNI of the VF that forwards the first packet and the inner destination destination MAC address of the first packet and the correspondence between the encapsulation information may be directly saved.
  • the sending the VxLAN encapsulated message to the first packet includes:
  • the first packet and the VNI are sent to the central processor.
  • the first packet is not saved, and the storage space of the network card occupied by the first packet is saved, and the utilization of the storage space of the network card is improved.
  • the processor is further configured to perform the following steps:
  • the second packet is sent to the central processor.
  • the disclosed systems, devices, and methods may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, or an electrical, mechanical or other form of connection.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the embodiments of the present invention.
  • each functional unit in various embodiments of the present invention may be integrated in one processing unit
  • each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • the technical solution of the present invention contributes in essence or to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium.
  • a number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .

Abstract

本发明实施例提供的一种VxLAN报文的发送方法、计算机设备和计算机可读介质,以解决现有技术中网卡无法处理报文VxLAN报文转发的问题。通过本发明实施例提供的VxLAN报文转发方法,网卡在接收到第一报文后,判断网卡中是否保存有对所述第一报文进行VxLAN封装的封装信息,如果保存有所述封装信息,则对所述第一报文进行VxLAN封装并发送;如果未保存有所述封装信息,则向中央处理器请求所述封装信息并保存,发送对所述第一报文进行VxLAN封装后的报文,实现了网卡对接收到的报文进行VxLAN的封装和发送。

Description

可扩展虚拟局域网报文发送方法、计算机设备和可读介质 技术领域
本发明涉及信息技术领域,特别涉及可扩展虚拟局域网VxLAN报文的发送方法、计算机设备和计算机可读介质。
背景技术
可扩展虚拟局域网(VxLAN,Virtual eXtensible Local Area Network)采用MAC(Media Access Control,媒体接入控制)Over UDP(User Datagram Protocol,用户数据报协议)的技术,是一种覆盖网络技术或隧道技术。VxLAN将虚拟机发出的数据包封装在UDP中,并使用物理网络的互联网协议IP/MAC作为outer-header进行封装,然后在物理IP网上传输,到达目的地后由隧道终结点解封并将数据发送给目标虚拟机。通过VxLAN技术发送的报文为VxLAN报文,VxLAN报文通常包括VxLAN隧道头和原始静荷两部分。其中,VxLAN隧道头包括:外部目的MAC地址,外部源MAC地址,外部目的互联网协议(IP,Internet Protocol)地址,外部源IP地址,外部UDP头和VxLAN网络标识(VNI,VXLAN Network Identifier);原始静荷部分包括:内部目的MAC地址,内部源MAC地址,内部802.1Q,原以太网有效载荷。实现VxLAN报文的发送,需要具备VxLAN隧道头和原始静荷两部分的信息才能实现。
现有技术中,在运行虚拟机业务的计算机设备上,网卡能够识别虚拟机发送的虚拟局域网(VLAN,Virtual Local Area Network)报文并进行转发。但对于VxLAN报文,网卡不具备获取VxLAN报文转发所需信息的能力,网卡不能进行VxLAN报文的封装和发送。
发明内容
本发明实施例提供一种VxLAN报文的发送方法、计算机设备和计算机可读介质,以解决现有技术中网卡无法处理报文VxLAN报文转发的问题。
本发明实施例的第一方面提供了一种可扩展虚拟局域网VxLAN报文的发送方法,所述方法应用于计算机设备中,所述计算机设备包括中央处理器、网卡和虚拟机,所述网卡包括网卡处理器,所述方法包括:
所述网卡处理器接收所述虚拟机发送的第一报文;
所述网卡处理器判断所述网卡中是否保存有对所述第一报文进行VxLAN封装所需的封装信息;其中,所述封装信息包括封装媒体接入控制MAC地址和封装互联网协议IP地址,所述封装MAC地址是发送所述第一报文时所要经过的下一跳设备的MAC地址,所述封装IP地址是所述第一报文目的端虚拟可扩展局域网隧道端点VTEP的IP地址;
在所述网卡保存有对所述第一报文进行VxLAN封装所需的封装信息时,根据所述封装信息对所述第一报文进行VxLAN封装并发送;
在所述网卡未保存对所述第一报文进行VxLAN封装所需的封装信息时,向所述中央处理器发送获取请求,从所述中央处理器获取所述封装信息并保存,并发送对所述第一报文进行VxLAN封装后的报文。
其中,所述网卡包括至少一个PF和至少一个VF,计算机设备中的虚拟机通过VF直接将报文发送到网卡并通过网络发送。可选的,所述计算机设备中的每个虚拟机唯一对应一个VF,其通过唯一对应的VF转发报文给网卡。
上述方法实施例中,所述网卡处理器在接收到第一报文后,判断网卡中是否保存有对所述第一报文进行VxLAN封装的封装信息,如果保存有所述封装信息,则对所述第一报文进行VxLAN封装并发送;如果未保存有所述封装信息,则向中央处理器请求所述封装信息并保存,发送对所述第一报文进行VxLAN封装后的报文,实现了网卡对接收到的报文进行VxLAN的封装和 发送。
结合本发明实施例的第一方面,本发明实施例的第一方面的第一种可能的实现方式中,在判断所述网卡中是否保存对所述第一报文进行VxLAN封装所需的封装信息之前,所述方法还包括:
所述网卡处理器从接收到的所述第一报文中获取转发所述第一报文的虚拟功能VF的ID,根据所述VF的ID,查询与所述VF的ID对应的VF的属性;
当所述VF的属性为VxLAN属性时,则获取所述VF的VxLAN网络标识VNI。
所述网卡处理器获取所述VF的VNI后,可以根据所述VF的VNI和所述第一报文的内层目的MAC地址查询网卡中的地址转发表,判断地址转发表中是否存在于所述VF的VNI和所述第一报文的内层目的MAC地址对应的封装信息。
结合本发明实施例的第一方面的第一种可能的实现方式,本发明实施例的第一方面的第二种可能的实现方式中,所述网卡处理器判断所述网卡中是否保存有对所述第一报文进行VxLAN封装所需的封装信息包括:
所述网卡处理器根据所述VNI以及所述第一报文的内层目的MAC地址,查询所述网卡中是否存在与所述VF的VNI和所述第一报文的内层目的MAC地址对应的封装信息;
在所述网卡中存在与所述VF的VNI和所述第一报文的内层目的MAC地址对应的封装信息时,判断所述网卡中保存有对所述第一报文进行VxLAN封装所需的封装信息。
本发明实施例中,还可以记录网卡查询封装信息的次数。每成功查询到封装信息,记录的次数加1。这样,当网卡中存储空间有限时,可以删除使用次数最小的封装信息的记录,从而可以加入中央处理器新下发的封装信息的记录,在网卡存储空间有限时,能够保存最新的表项,提高网卡转发报文的效率。
结合本发明实施例的第一方面,第一方面的第一种和第二种任一可能 的实现方式,本发明实施例的第一方面的第三种可能的实现方式中,
所述网卡保存对所述第一报文进行VxLAN封装所需的封装信息的方式包括:
所述网卡保存转发所述第一报文的VF的VNI和所述第一报文的内层目的MAC地址,与隧道标识之间的对应关系,以及保存所述隧道标识与所述封装信息之间的对应关系。
可选的,所述网卡也可以直接保存转发所述第一报文的VF的VNI和所述第一报文的内层目的MAC地址,与所述封装信息之间的对应关系之间的对应关系。
结合本发明实施例的第一方面,第一方面的第一种至第三种任一可能的实现方式,本发明实施例的第一方面的第四种可能的实现方式中,
所述网卡处理器发送对所述第一报文进行VxLAN封装后的报文包括:
所述网卡中的虚拟交换机接收所述中央处理器发送的对所述第一报文进行VxLAN封装后的报文并发送;或,
所述网卡处理器根据获取到的对所述第一报文进行VxLAN封装所需的封装信息,对所述第一报文进行VxLAN封装并通过所述网卡中的虚拟交换机发送。
其中,当网卡中的虚拟交换机接收所述中央处理器发送的对所述第一报文进行VxLAN封装后的报文并发送时,网卡在将所述第一报文和所述VNI发送给所述中央处理器后,就不需要保存所述第一报文,可以节省因保存第一报文所占用的网卡的存储空间,提高网卡的存储空间的利用率。
结合本发明实施例的第一方面,第一方面的第一种至第四种任一可能的实现方式,本发明实施例的第一方面的第五种可能的实现方式中,
所述方法还包括:
所述网卡接收发送给所述虚拟机的第二报文,所述第二报文为VxLAN报文;
所述网卡处理器判断所述网卡是否保存所述第二报文中的封装MAC地址和封装IP地址;
当所述网卡未保存所述第二报文的封装MAC地址和封装IP地址时,将所述第二报文发送给所述中央处理器。
可选的,上述中央处理器中相关的封装IP地址和封装MAC地址,也可以通过管理员预先配置的方式,保存在中央处理器中。
结合本发明实施例的第一方面,第一方面的第一种至第五种任一可能的实现方式,本发明实施例的第一方面的第六种可能的实现方式中,
所述网卡支持单根输入输出虚拟化SR-IOV,支持虚拟交换机vSwitch转发功能。并且,所述网卡与所述中央处理器通过PCIe链路连接。
本发明实施例的第二方面,提供了一种计算机设备,包括中央处理器、网卡和虚拟机,所述网卡包括网卡处理器,所述网卡处理器包括报文处理单元和表项管理单元;
所述报文处理单元,用于接收所述虚拟机发送的第一报文,判断所述网卡中是否保存有对所述第一报文进行可扩展虚拟局域网VxLAN封装所需的封装信息,在所述网卡未保存对所述第一报文进行VxLAN封装所需的封装信息时,向所述中央处理器发送获取请求;其中,所述封装信息包括封装媒体接入控制MAC地址和封装互联网协议IP地址,所述封装MAC地址是发送所述第一报文时所要经过的下一跳设备的MAC地址,所述封装IP地址是所述第一报文目的端虚拟可扩展局域网隧道端点VTEP的IP地址;
所述表项管理单元,用于接收所述中央处理器发送的对所述第一报文进行VxLAN封装所需的封装MAC地址和封装IP地址并保存;
所述网卡处理器,用于发送对所述第一报文进行VxLAN封装后的报文。
其中,所述网卡包括至少一个PF和至少一个VF,所述虚拟机通过VF直接将报文发送到网卡并通过网络发送。可选的,所述虚拟机唯一对应一个VF,其通过唯一对应的VF转发第一报文给网卡。
结合本发明实施例的第二方面,本发明实施例的第二方面的第一种可能的实现方式中,所述中央处理器包括报文接收单元和获取发送单元;
所述报文接收单元,用于接收所述报文处理单元发送的获取请求,所述获取请求包含所述第一报文和转发所述第一报文的虚拟功能VF的VxLAN网络标识VNI;
所述获取发送单元,用于根据所述报文接收单元接收到的获取请求,获取对所述第一报文进行VxLAN封装的封装信息,并发送给所述表项管理单元。
上述计算机设备中,所述报文处理单元接收所述虚拟机发送的第一报文,判断所述网卡中是否保存有对所述第一报文进行VxLAN封装所需的封装信息,如果保存有所述封装信息,则对所述第一报文进行VxLAN封装并发送;如果未保存有所述封装信息,则向中央处理器请求所述封装信息并保存,发送对所述第一报文进行VxLAN封装后的报文,实现了网卡对接收到的报文进行VxLAN的封装和发送。
结合本发明实施例的第二方面,第二方面的第一种可能的实现方式,本发明实施例的第二方面的第二种可能的实现方式中,
所述报文处理单元,还用于从接收到的所述第一报文中获取转发所述第一报文的虚拟功能VF的ID,根据所述VF的ID,查询与所述VF的ID对应的VF的属性;
当所述VF的属性为VxLAN属性时,则获取所述VF的VxLAN网络标识VNI。
所述报文处理单元可以根据获取到的所述VF的VNI,以及所述第一报文的内层目的MAC查询所述网卡中是否保存对所述第一报文进行VxLAN封装所需的封装信息。
结合本发明实施例第二方面的第二种可能的实现方式,本发明实施例的第二方面的第三种可能的实现方式中,
所述报文处理单元判断所述网卡中是否保存对所述第一报文进行 VxLAN封装所需的封装信息包括:
所述报文处理单元根据所述VNI以及所述第一报文的内层目的MAC地址,查询所述网卡中是否存在与所述VF的VNI和所述第一报文的内层目的MAC地址对应的封装信息;
在所述网卡中存在与所述VF的VNI和所述第一报文的内层目的MAC地址对应的封装信息时,判断所述网卡中存在对所述第一报文进行VxLAN封装所需的封装信息。
进一步的,所述报文处理单元还可以记录查询封装信息的次数。每成功查询到封装信息,记录的次数加1。这样,当网卡中存储空间有限时,可以删除使用次数最小的封装信息的记录,从而可以加入中央处理器新下发的封装信息的记录,在网卡存储空间有限时,能够保存最新的表项,提高网卡转发报文的效率。
结合本发明实施例的第二方面,第二方面的第一种至第三种任一可能的实现方式,本发明实施例的第二方面的第四种可能的实现方式中,
所述表项管理单元保存对所述第一报文进行VxLAN封装所需的所述封装信息包括:
所述表项管理单元保存转发所述第一报文的VF的VNI和所述第一报文的内层目的MAC地址,与隧道标识之间的对应关系,以及保存所述隧道标识与所述封装信息之间的对应关系。
可选的,所述表项管理单元也可以直接保存转发所述第一报文的VF的VNI和所述第一报文的内层目的MAC地址,与所述封装信息之间的对应关系之间的对应关系。
结合本发明实施例的第二方面,第二方面的第一种至第四种任一可能的实现方式,本发明实施例的第二方面的第五种可能的实现方式中,
所述网卡处理器还包括虚拟交换机,所述网卡处理器发送对所述第一报文进行VxLAN封装后的报文包括:
所述网卡处理器中的报文处理单元根据所述表项管理单元获取到的所述封装MAC地址和封装IP地址,对所述第一报文进行VxLAN封装并通过所述虚拟交换机发送;或,
所述网卡处理器中的虚拟交换机接收所述中央处理器发送的对所述第一报文进行VxLAN封装后的报文并发送。
其中,当网卡中的虚拟交换机接收所述中央处理器发送的对所述第一报文进行VxLAN封装后的报文并发送时,报文处理单元在将所述第一报文和所述VNI发送给所述中央处理器后,网卡就不需要保存所述第一报文,可以节省因保存第一报文所占用的网卡的存储空间,提高网卡的存储空间的利用率。
结合本发明实施例的第二方面,第二方面的第一种至第五种任一可能的实现方式,本发明实施例的第二方面的第六种可能的实现方式中,
所述报文处理单元,还用于接收发送给所述虚拟机的第二报文,所述第二报文为VxLAN报文,判断所述表项管理单元是否保存所述第二报文中的封装MAC地址和封装IP地址;当所述表项管理单元未保存所述第二报文的封装MAC地址和封装IP地址时,将所述第二报文发送给所述报文接收单元;
所述获取发送单元,还用于从所述报文接收单元接收所述第二报文,获取所述第二报文的封装MAC地址和封装IP地址。
可选的,上述中央处理器中相关的封装IP地址和封装MAC地址,也可以通过管理员预先配置的方式,保存在中央处理器中。
结合本发明实施例的第二方面,第二方面的第一种至第六种任一可能的实现方式,本发明实施例的第二方面的第七种可能的实现方式中,
所述网卡支持单根输入输出虚拟化SR-IOV,支持虚拟交换机vSwitch转发功能。并且,所述网卡与所述中央处理器之间通过PCIe链路连接。
本发明实施例的第三方面,提供了一种计算机可读介质,所述计算机可读介质存储有计算机可读指令,在所述计算机可读指令被计算机设备中 的处理器执行时,执行如下步骤:
接收虚拟机发送给网卡的第一报文;
判断所述网卡中是否保存有对所述第一报文进行可扩展虚拟局域网VxLAN封装所需的封装信息;其中,所述封装信息包括封装媒体接入控制MAC地址和封装互联网协议IP地址,所述封装MAC地址是发送所述第一报文时所要经过的下一跳设备的MAC地址,所述封装IP地址是所述第一报文目的端虚拟可扩展局域网隧道端点VTEP的IP地址;
在所述网卡保存对所述第一报文进行VxLAN封装所需的封装信息时,根据所述封装MAC地址和所述封装IP地址对所述第一报文进行VxLAN封装并发送;
在所述网卡未保存对所述第一报文进行VxLAN封装所需的封装信息时,向所述计算机设备中的中央处理器发送获取请求,从所述中央处理器获取所述封装信息并保存,发送对所述第一报文进行VxLAN封装后的报文。
其中,所述网卡包括至少一个PF和至少一个VF,计算机设备中的虚拟机通过VF直接将报文发送到网卡并通过网络发送。可选的,所述计算机设备中的每个虚拟机唯一对应一个VF,其通过唯一对应的VF转发报文给网卡。
上述计算机可读介质的实施例中,在接收到第一报文后,判断网卡中是否保存有对所述第一报文进行VxLAN封装的封装信息,如果保存有所述封装信息,则对所述第一报文进行VxLAN封装并发送;如果未保存有所述封装信息,则向中央处理器请求所述封装信息并保存,发送对所述第一报文进行VxLAN封装后的报文,实现了网卡对接收到的报文进行VxLAN的封装和发送。
结合本发明实施例的第三方面,本发明实施例的第三方面的第一种可能的实现方式中,在所述处理器执行判断所述网卡中是否保存对所述第一报文进行VxLAN封装所需的封装信息之前,还包括:
从接收到的所述第一报文中获取转发所述第一报文的虚拟功能VF的 ID,根据所述VF的ID,查询与所述VF的ID对应的VF的属性;
当所述VF的属性为VxLAN属性时,则获取所述VF的VxLAN网络标识VNI。
上述获取所述VF的VNI后,可以根据所述VF的VNI和所述第一报文的内层目的MAC地址查询网卡中的地址转发表,判断地址转发表中是否存在于所述VF的VNI和所述第一报文的内层目的MAC地址对应的封装信息。
结合本发明实施例的第三方面或第三方面的第一种可能的实现方式,本发明实施例的第三方面的第二种可能的实现方式中,所述判断所述网卡中是否存在对所述第一报文进行VxLAN封装所需的封装信息包括:
获取转发所述第一报文的VF的VxLAN网络标识VNI;
根据所述VNI以及所述第一报文的内层目的MAC地址,查询所述网卡中是否存在与所述VF的VNI和所述第一报文的内层目的MAC地址对应的封装信息;
在所述网卡中存在与所述VF的VNI和所述第一报文的内层目的MAC地址对应的封装信息时,判断所述网卡中存在对所述第一报文进行VxLAN封装所需的封装信息。
本发明实施例中,所述处理器还可以根据所述计算机可读介质中的计算机可读指令,记录查询封装信息的次数。每成功查询到封装信息,记录的次数加1。这样,当网卡中存储空间有限时,可以删除使用次数最小的封装信息的记录,从而可以加入中央处理器新下发的封装信息的记录,在网卡存储空间有限时,能够保存最新的表项,提高网卡转发报文的效率。
结合本发明实施例的第三方面,第三方面的第一种至第二种任一可能的实现方式,本发明实施例的第三方面的第三种可能的实现方式中,所述保存对所述第一报文进行VxLAN封装所需的封装信息的方式包括:
保存转发所述第一报文的VF的VNI和所述第一报文的内层目的MAC地址,与隧道标识之间的对应关系,以及保存所述隧道标识与所述封装信息之间的对应关系。可选的,也可以直接保存转发所述第一报文的VF的VNI和 所述第一报文的内层目的MAC地址,与所述封装信息之间的对应关系之间的对应关系。
结合本发明实施例的第三方面,第三方面的第一种至第三种任一可能的实现方式,本发明实施例的第三方面的第四种可能的实现方式中,所述发送对所述第一报文进行VxLAN封装后的报文包括:
接收所述中央处理器发送的对所述第一报文进行VxLAN封装后的报文并发送;或,
根据获取到的对所述第一报文进行VxLAN封装所需的封装信息,对所述第一报文进行VxLAN封装并发送。
其中,当接收所述中央处理器发送的对所述第一报文进行VxLAN封装后的报文并发送时,在将所述第一报文和所述VNI发送给所述中央处理器后,就不需要保存所述第一报文,可以节省因保存第一报文所占用的网卡的存储空间,提高网卡的存储空间的利用率。
结合本发明实施例的第三方面,第三方面的第一种至第四种任一可能的实现方式,本发明实施例的第三方面的第五种可能的实现方式中,所述处理器还用于执行如下步骤:
接收发送给所述虚拟机的第二报文,所述第二报文为VxLAN报文;
判断所述网卡是否保存所述第二报文中的封装MAC地址和封装IP地址;
当所述网卡未保存所述第二报文的封装MAC地址和封装IP地址时,将所述第二报文发送给所述中央处理器。
本发明实施例提供的一种VxLAN报文封装和转发的方法、计算机设备和计算机可读介质,网卡在接收到第一报文后,判断网卡中是否保存有对所述第一报文进行VxLAN封装的封装信息,如果保存有所述封装信息,则对所述第一报文进行VxLAN封装并发送;如果未保存有所述封装信息,则向中央处理器请求所述封装信息并保存,发送对所述第一报文进行VxLAN封装后的报文,实现了网卡对接收到的报文进行VxLAN的封装和发送。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为现有技术中一种计算机设备的结构示意图;
图2为本发明实施例一种计算机设备200的结构示意图;
图3为本发明实施例中计算机设备200的一种具体实现结构示意图;
图4为本发明实施例一种计算机设备200在Linux运行环境下一种具体实现结构示意图;
图5为本发明实施例一种可扩展虚拟局域网VxLAN报文的发送方法的流程示意图;
图6为本发明实施例一种计算机设备600的结构示意图;
图7为本发明实施例一种计算机设备600的一种具体实现结构示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明的一部分实施例,而不是全部实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都应属于本发明保护的范围。
参考图1,图1为现有技术中一种计算机设备100的结构示意图。计算机设备100包括中央处理器101和网卡102,网卡102包括网卡处理器1021。网卡102支持虚拟交换机(vSwitch,Virtual Switch)转发功能的卸载,支持单根输入输出虚拟化(SR-IOV,Single-Root I/O Virtualization)功能,能够基 于vSwitch实现VLAN报文转发。
其中,网卡支持vSwitch转发功能的卸载是指在网卡上实现虚拟局域网(VLAN,virtual local area network)报文转发。vSwitch也称为虚拟网络交换机,工作在二层数据网络,通过软件方式实现物理交换机的二层(和部分三层)网络功能。与传统物理交换机相比,虚拟交换机具备配置灵活、扩展性强的优点,一台普通的服务器可以配置几十台甚至上百台虚拟交换机,且端口数目可以灵活选择。并且,虚拟交换机通过虚拟交换,往往可以获得大型物理交换机才能达到的性能。vSwitch广泛应用在基于基础架构即服务(IaaS,Infrastructure as a Service)的Internet服务中。虚拟机(VM,Virtual Machine)通过vSwitch来连接网络,vSwitch则通过物理主机上的物理网卡作为上行链路与外界网络进行连接。每个vSwitch与物理交换机一样,包含一定数量的端口,相同特性的虚拟端口vPort集合就是虚拟局域网VLAN,不同VLAN内的报文在传输时是相互隔离的,各VLAN内的用户不能和其它VLAN内的用户直接通信。
网卡支持SR-IOV功能,是指网卡对所在的计算机设备(例如服务器)呈现多个虚拟的网卡。SR-IOV是一种基于硬件的虚拟化解决方案,可提高性能和可伸缩性。SR-IOV标准允许在虚拟机之间高速共享快速外设组件互连(PCIe,Peripheral Component Interconnect Express)设备。根据SR-IOV规范,单个输入输出(I/O,Input/Output)资源可由多个虚拟机共享。共享的设备将提供专用的资源,并且还使用共享的通用资源。这样,每个虚拟机都可访问唯一的资源。因此,启用了SR-IOV并且具有适当的硬件和OS支持的PCIe设备(例如网卡)可以显示为多个单独的物理设备,每个VM都具有自己的PCIe配置空间。
SR-IOV规范定义了两种功能类型:物理功能(PF,Physical Function)和虚拟功能(VF,Virtual Function)。其中:PF是全功能的PCIe功能,可以像其他任何PCIe设备一样被发现、管理和处理。PF拥有完全配置资源, 可以用于配置或控制PCIe设备。VF是与物理功能PF关联的一种功能,VF可以与物理功能以及与同一物理功能关联的其他VF共享一个或多个物理资源。VF仅允许拥有用于其自身的配置资源。当网卡通过PCIe链路与计算机设备中的其它部件连接时,网卡对所在的计算机设备呈现出多个虚拟的PCIe网卡。多个虚拟的PCIe网卡属于硬件虚拟网卡,这些硬件虚拟网卡可以分配给计算机设备上的普通虚拟机使用,以及分配给计算机设备的管理虚拟机使用。网卡通过PF端口与管理虚拟机连接,通过VF端口与普通虚拟机连接;其中,管理虚拟机用来实现对普通虚拟机的管理。
需要说明的是,当网卡支持SR-IOV功能时,需要网卡所在的计算机设备在进行BIOS(basic input/output system,基本输入输出程序)扫描时,为网卡预留总线资源和预留BAR(base address register,基地址寄存器)资源,计算机设备的操作系统内核需要支持启动SR-IOV的功能。
现有技术中,SR-IOV模式下,虚拟机待发送的报文直接通过网卡进行转发,当虚拟机需要待发送的报文需要进行VxLAN封装并发送时,计算机设备100中的网卡102不具备对VxLAN报文转发的能力,无法进行有效的报文转发。
本发明实施例提供一种新的计算机设备,以解决现有技术中网卡无法实现VxLAN报文的封装和发送的问题。
VxLAN报文包括VxLAN隧道头和原始静荷两部分,VxLAN隧道头包括:外部目的MAC地址,外部源MAC地址,外部目的IP地址,外部源IP地址,外部UDP头和VNI等;原始静荷部分包括:内部目的MAC地址,内部源MAC地址,内部802.1Q,原以太网有效载荷等。其中,外部目的MAC地址是转发VxLAN报文时所要经过的下一跳设备的MAC地址,即封装MAC地址;外部目的IP地址是转发VxLAN报文目的端的虚拟可扩展局域网隧道端点(VTEP,VxLAN Tunnel End Point)的IP地址,即封装IP地址。 其中,转发VxLAN报文时所要经过的下一跳设备,是转发VxLAN报文时经过的下一设备;以网卡转发VxLAN报文,只经过路由设备1和路由设备2到达目的设备时,路由设备1就是网卡转发VxLAN报文时所要经过的下一跳设备。
在对虚拟机发送的报文做VxLAN封装时,VxLAN隧道头中的外部源MAC地址,外部源IP地址是管理员在部署VTEP时静态配置的,外部IP头的其他字段以及外部UDP头在封装时可以根据IP、UDP协议各字段的含义进行封装,VNI配置在虚拟机所对应的VF上,原始静荷部分是虚拟机发送的原始报文。
VxLAN报文的转发通常是通过设置VTEP来实现的,VTEP实现了虚拟网络和物理网络的隔离。通过VTEP之间建立隧道,在物理网络上传输虚拟网络的数据帧,物理网络不感知虚拟网络。VTEP作为一个代理,可以有多种实现方式,并且可以由系统硬件、软件协同实现,作用是对待发送的报文进行VxLAN封装,对接收到的VxLAN报文解析、报文学习、解封装等。多个计算机设备组成的网络中,从逻辑上可以看成是在多个VTEP之间建立的VxLAN隧道。
VTEP将原始净荷封装一个隧道头,隧道头采用UDP格式,并通过UDP的目的端口号来标识报文是VxLAN类型。封装的隧道头中的IP(Internet Protocol,互联网协议)信息为本端VTEP的IP地址信息以及报文要发送的对端VTEP的IP地址信息;封装的隧道头中的源MAC地址为本端VTEP的MAC地址,目的MAC地址为本端VTEP去往对端VTEP的下一跳设备的MAC地址,即VxLAN报文转发的下一跳设备的MAC地址。对于网络传输中的中间设备来说,它们只根据VTEP的网络信息进行转发,不需要解析VNI及内层报文信息。
参考图2,图2为本发明实施例一种计算机设备200的结构示意图。如图2所示,计算机设备200包括中央处理器201和网卡202,网卡202包括 网卡处理器2021。
本发明实施例通过在网卡202上实现VTEP的数据封装、解封装、转发功能,以实现网卡对VxLAN报文的封装和转发。即网卡202在收到虚拟机发送的报文时,获取对该报文做VxLAN封装所需的封装MAC地址和封装IP地址,并根据封装MAC地址和封装IP地址对报文做VxLAN封装和发送。
网卡202获取封装MAC地址和封装IP地址的方式,是网卡202就某一待发送的报文向中央处理器201发送获取请求,请求该待发送的报文的封装MAC地址和封装IP地址。即在网卡202中未保存与待发送的报文相关的封装MAC地址和封装IP地址时,网卡202将待转发报文的信息发送给中央中央处理器201,中央中央处理器201获取待发送报文所需的封装MAC地址和封装IP地址后,将获取到的封装MAC地址和封装IP地址发送给所述网卡202,网卡202保存获取到的封装MAC地址和封装IP地址,根据获取到的封装MAC地址和封装IP地址,对待转发报文进行封装和发送。网卡202还可以根据保存的封装信息(封装MAC地址和封装IP地址),对后续接收到的与所述待转发报文具有相同目的MAC地址、且转发VF的VNI相同的报文进行转发。本发明实施例中,转发VF是将虚拟机发送的报文转发给网卡的VF。每个虚拟机对应一个VF,虚拟机在发送报文给网卡进行转发时,通过与其对应的VF将报文发送给网卡。
下面结合图2所示的计算机设备200的结构,以网卡202实现VxLAN报文的封装和发送为例,对本发明实施例的VxLAN报文的发送过程进行描述。
当计算机设备200中的某一个虚拟机需要向其它设备发送报文时,该虚拟机将要发送的报文发送给网卡202,网卡202对接收到的报文处理的过程如下:
S100:网卡202接收虚拟机发送的第一报文;
其中,网卡202接收的第一报文是计算机设备200上的一个虚拟机发送的报文。在SR-IOV模式下,计算机设备200上的虚拟机是通过与该虚拟机对应的VF发送所述第一报文,即该虚拟机的转发VF发送第一报文给所述网卡202。
S102:网卡202中的网卡处理器2021获取转发所述第一报文的VF对应的VNI;
具体的,可以是网卡处理器2021获取转发所述第一报文的VF的ID,根据获取到的VF的ID查找VF配置表,获取该VF的属性和VTAG(当VF属性为VLAN时,VTAG表示VLAN ID;当VF的属性为VxLAN时,VTAG表示VNI),如果该VF的属性为VxLAN,则与该VF的ID对应的VNI即为该VF的VNI。VF配置表的内容可以如表a所示:
表项名称 表项描述 输入/输出
VF ID VF的ID号 In
VF属性 VF的VLAN/VxLAN属性 Out
VTAG VF的VLAN ID or VNI Out
表a
本发明实施例中,表a仅列出了与本方案相关的表项内容,其中的VTAG为与VF的ID和VF属性对应的一个标识,不具有具体的含义。
网卡202接收的第一报文中会携带转发该第一报文的VF的ID,网卡202在接收到第一报文时,网卡处理器2021能够获知是从哪个VF发送的第一报文。并且,每个VF的配置表中有标识该VF的属性是VLAN类型还是VxLAN类型的信息。如果是VLAN类型,则VF的配置表中的VTAG表示VF对应的VLAN ID;如果是VxLAN类型,则VF的配置表中的VTAG表示VF对应的VNI。网卡处理器2021根据获取到的所述第一报文中的VF的ID,判断与该VF的ID对应的VF属性是否为VxLAN属性,如果是,则从VF的配置表中获取对应的VNI。
需要说明的是,虚拟机所使用的VF属性,通常是在网卡初始化时配置的,例如管理员在网卡初始化时通过配置,将某一虚拟机所使用的VF的属性配置为VxLAN。并且,VNI也是预先配置的,每个属性为VxLAN的VF对应一个唯一的VNI。
S104:网卡处理器2021根据获取到的所述VF的VNI和所述第一报文的目的MAC地址,判断网卡202中是否保存有对所述第一报文进行VxLAN封装所需的封装MAC地址和封装IP地址;其中,所述封装MAC地址是发送所述第一报文时所要经过的下一跳设备的MAC地址,所述封装IP地址是所述第一报文目的端VTEP的IP地址;
网卡处理器2021可以根据获取到的转发所述第一报文的VF的VNI和所述第一报文的内层目的MAC地址,在网卡202中(可以是网卡202的一个存储单元或存储表项中)查找与转发所述第一报文的VF的VNI和所述第一报文的目的MAC地址对应的封装MAC地址和封装IP地址,如果能够查到,则确认网卡202保存有对所述第一报文进行VxLAN封装所需的封装MAC地址和封装IP地址。本发明实施例中,内存MAC目的地址,是指报文原始报文(即原始静荷)中的目的MAC地址。
S106:在所述网卡202未保存对所述第一报文进行VxLAN封装所需的封装MAC地址和封装IP地址时,向所述中央处理器201发送请求消息,以请求对所述第一报文进行VxLAN封装所需的封装MAC地址和封装IP地址,所述请求消息携带所述第一报文以及与转发所述第一报文的VF的VNI;
S108:所述网卡处理器2021获取所述中央处理器201发送的对所述第一报文进行VxLAN封装所需的封装MAC地址和封装IP地址,发送对所述第一报文进行VxLAN封装的报文,并保存所述封装MAC地址和封装IP地址。
其中,网卡处理器2021发送对所述第一报文进行VxLAN封装的报文可以包括:
网卡处理器2021根据获取到的对所述第一报文进行VxLAN封装所需的封装MAC地址和封装IP地址对所述第一报文进行VxLAN封装,并发送封装后的报文;或,
网卡处理器2021接收所述中央处理器201发送的对所述第一报文进行VxLAN封装后的报文,并发送对所述第一报文进行VxLAN封装后的报文。
可选的,所述网卡处理器2021还包含虚拟交换机,则网卡处理器2021发送对所述第一报文进行VxLAN封装的报文可以包括:
网卡处理器2021根据获取到的对所述第一报文进行VxLAN封装所需的封装MAC地址和封装IP地址对所述第一报文进行VxLAN封装,并通过虚拟交换机发送封装后的报文;或,
网卡处理器2021中的虚拟交换机接收所述中央处理器201发送的对所述第一报文进行VxLAN封装后的报文,并发送对所述第一报文进行VxLAN封装后的报文。
上述网卡处理器2021通过向中央处理器201请求对所述第一报文进行VxLAN封装所需的封装MAC地址和封装IP地址,依据获取到的封装MAC地址和封装IP地址能够实现对第一报文进行VxLAN的封装和发送;并且,网卡处理器2021保存所述封装MAC地址和封装IP地址,使得所述网卡202在收到与所述第一报文的内层目的MAC地址相同、且转发VF的VNI相同的报文时,能够根据获取到的所述封装MAC地址和封装IP地址对后续收到的报文进行VxLAN封装和发送。
本发明实施例中,可以由所述网卡处理器2021对所述第一报文进行VxLAN封装,也可以由所述中央处理器201对所述第一报文进行VxLAN封装。当由所述中央处理器201进行封装时,网卡处理器2021向中央处理器201发送所述第一报文和转发所述第一报文的VF的VNI以获取封装MAC地址和封装IP地址后,不用再缓存所述第一报文,这样可以节省网卡202的内存空间, 提升网卡202内存空间的利用率。
本发明实施例中,所述网卡202通过地址信息表保存对所述第一报文进行VxLAN封装所需的封装MAC地址和封装IP地址时,可以通过多种方式实现。可以用一个表格记录,也可以用两个表格来记录,本发明实施例不限定具体的记录其对应关系的表格形式,只要网卡202中的网卡处理器2021能够根据表格获取与待封装报文的目的MAC地址对应的封装MAC地址和封装IP地址即可。下面分别以一个表格形式和两个表格形式对网卡202保存对所述第一报文进行VxLAN封装所需的封装MAC地址和封装IP地址的方式予以说明。
当网卡202用一个表格形式时,可以如表1所示,在一个表格中记录VNI和内层报文目的MAC地址,以及与VNI和内层报文目的MAC地址对应的封装MAC地址和封装IP地址。表1如下所示:
Figure PCTCN2015100150-appb-000001
表1
当网卡202用两个表格形式时,可以用一个表格记录转发VF的VNI和内层目的MAC地址,再用一个表格记录封装MAC地址和封装IP地址,两个表格之间通过一个标识(例如隧道ID)建立关联关系。其中,转发VF的VNI和内层目的MAC地址与隧道ID(以标识为隧道ID为例进行说明)的对应关系可以如表2所示:
Figure PCTCN2015100150-appb-000002
Figure PCTCN2015100150-appb-000003
表2
隧道ID与封装MAC地址、封装IP地址之间的对应关系如表3所示:
Figure PCTCN2015100150-appb-000004
表3
上述表3是一个线性表,由“隧道ID”作为表项索引,表3中每个表项存放有封装信息,包括封装MAC地址和封装IP地址。每新增一个表项,会占用一个未被使用的隧道ID。例如,假如表3可以存放1024个表项,隧道ID的取值范围为0至1023,初始时所有表项内容(封装MAC地址、封装IP地址)为空,每当需要保存一个封装信息时,占用其中一个表项。
通过两个表格记录转发VF的VNI和内层目的MAC地址,与封装MAC地址和封装IP地址之间的对应关系,可以节省网卡202的存储空间,避免过多的对应关系表格对网卡202存储空间的占用。例如对于两个以上的报文,其转发VF的VNI和内层目的MAC地址可能不同,但具有相同封装MAC地址和封装IP地址,通过隧道ID作为索引建立对应关系,就可以只保存一份封装MAC地址和封装IP地址,每一种转发VF的VNI和内层目的MAC地址组合根据其各自的隧道ID,都能够获取对应的封装MAC地址和封装IP地址。避免了为每一组转发 VF的VNI和内层目的MAC地址都保存一份封装MAC地址和封装IP地址,相应节省了因保存每一项封装MAC地址和封装IP地址所占用的网卡存储空间。
本发明实施例中,上述表2可以为MAC地址转发表。具体实现时,可以对现有的MAC地址转发表进行扩展,即对MAC地址转发表中的转发出口进行扩展,增加隧道ID的信息。经过扩展后的MAC地址转发表如表4所示:
Figure PCTCN2015100150-appb-000005
表4
表4记录了与VTAG(VTAG可以是现有MAC表的VLAN ID,或是本发明中的VNI)和目的MAC地址对应的转发出口。转发出口中,包括虚拟机网络端口、物理端口或隧道ID。当网卡202已经转发过与待转发的报文(例如所述第一报文)内层目的MAC地址以及转发VF的VNI相同的报文时,网卡处理器2021会在MAC地址转发表中记录相应的隧道ID。也就是说,如果MAC地址转发表的转发出口中包含隧道ID,说明网卡已经转发过相同内层目的MAC地址和转发VF的VNI的报文。
上述表3可以为VTEP信息表。VTEP信息表是由网卡202创建的,当网卡202已经转发过与待转发的报文内层目的MAC地址和转发VF的VNI相同的报文时,会创建包含隧道ID的VTEP信息表。
本发明实施例中,所述表2、表3、MAC地址转发表和VTEP信息表只列出 了本发明实施例强相关的信息,在具体实现时,所述MAC地址转发表和VTEP信息表还可以包括其它信息,本发明实施例不做具体的限定。
以上述表2为MAC地址转发表,上述表3为VTEP信息表为例,当网卡202通过两个表格记录内层目的MAC地址和转发VF的VNI,与封装MAC地址和封装IP地址之间的对应关系时,上述步骤S104中,网卡处理器2021根据获取到的转发所述第一报文的转发VF的VNI和所述第一报文的内层目的MAC地址,判断网卡202是否保存有封装所述第一报文所需的封装MAC地址和封装IP地址包括:
网卡处理器2021根据获取到的转发所述第一报文的VF对应的VNI和所述第一报文的内层目的MAC地址查MAC地址转发表,判断是否存在与获取到的转发所述第一报文的VF的VNI和所述第一报文的内层目的MAC地址相关的MAC地址转发表;
如果查到转发所述第一报文的VF的VNI和所述第一报文的内层目的MAC地址相关的MAC地址转发表,并且查找到的MAC地址转发表的转发出口为隧道ID,则获取对应的隧道ID,再根据获取到的隧道ID查VTEP信息表,获取VTEP信息表中记录的与所述隧道ID对应的封装MAC地址和封装IP地址。
在步骤S106中,所述网卡202向所述中央处理器201发送请求消息,请求对所述第一报文进行VxLAN封装所需的封装MAC地址和封装IP地址。所述中央处理器201获取封装MAC地址和封装IP地址的方式可以是:所述中央处理器201根据接收到的转发VF的VNI,以及所述第一报文的内层目的MAC地址查找对应的FDB(Forward Data Base,转发数据库)表项;从找到的FDB表项中获取对所述第一报文进行VxLAN封装的封装IP地址。并根据获取到的封装IP地址查找ARP表项,获取对所述第一报文进行VxLAN封装的封装MAC地址。
所述中央处理器201在获取到对所述第一报文进行VxLAN封装的封装IP 地址和封装MAC地址后,可以直接将获取到的封装IP地址和封装MAC地址发送给所述网卡202,也可以生成包含所述封装IP地址和封装MAC地址的VTEP信息表,并将生成的VTEP信息表发送给所述网卡202。
参考图3,图3为本发明实施例中计算机设备200的一种具体实现结构示意图。如图3所示,所述网卡处理器2021包括:报文处理单元20211和表项管理单元20212;所述中央处理器201包括:报文接收单元2011和获取发送单元2012;所述中央处理器201与所述网卡202通过高速共享快速外设组件互连PCIe通道连接。
其中,所述报文处理单元20211,用于根据接收到的所述第一报文,判断发送所述第一报文的VF属性,如果VF属性为VxLAN属性,则获取转发所述第一报文的VF的VNI;并根据获取到的转发VF的VNI和所述第一报文的内层目的MAC地址,判断网卡202是否保存有封装所述第一报文所需的封装MAC地址和封装IP地址;当所述网卡202未保存封装所述第一报文所需的封装MAC地址和封装IP地址时,向所述中央处理器201中的报文接收单元2011发送请求消息,以请求对所述第一报文进行VxLAN封装所需的封装MAC地址和封装IP地址。
所述表项管理单元20212用于接收所述中央处理器201发送的对所述第一报文进行VxLAN封装所需的封装MAC地址和封装IP地址并保存。具体的,所述表项管理单元20212是从所述中央处理器201中的获取发送单元2012接收所述封装MAC地址和封装IP地址并保存。相应的,所述报文处理单元20211可以根据所述表项管理单元20212获取到的所述封装MAC地址和封装IP地址,对所述第一报文进行VxLAN封装并发送。所述报文处理单元20211也可以根据所述表项管理单元20212获取到的所述封装MAC地址和封装IP地址,对与所述第一报文具有相同内层目的MAC地址且转发VF的VNI相同的报文,进行VxLAN封装和发送。
对于中央处理器201根据网卡处理器2021的请求获取对所述第一报文 进行VxLAN封装的封装MAC地址和封装IP地址的方式,对于不同的应用环境有不同的实现方式。例如计算机设备200运行Windows的操作系统时与运行Linux操作系统时的实现方式会略有不同。本发明实施例以计算机设备200运行Linux操作系统时为例,对中央处理器201获取对所述第一报文进行VxLAN封装的封装MAC地址和封装IP地址的方式进行说明。
参考图4,图4为本发明实施例一种计算机设备200在Linux运行环境下一种具体实现结构示意图。图4中的网卡202支持vSwitch转发功能的卸载,支持SR-IOV功能,网卡202包括至少一个物理功能PF和至少一个虚拟功能VF,网卡202通过PCIe通道与中央处理器201连接,通过端口2022与网络连接。网卡202中的处理器2021包括报文处理单元20211、表项管理单元20212和虚拟交换机20213。中央处理器201运行Linux操作系统,在运行Linux操作系统过程中,包括运行Linux用户态空间和Linux内核态空间;Linux用户态空间运行至少一个虚拟机,每个虚拟机通过唯一的VF与网卡202的虚拟交换机20213相连;Linux内核态空间包括报文接收单元2011、获取发送单元2012、虚拟设备2013和协议栈2014。
在所述中央处理器201中的报文接收单元2011接收到所述网卡处理器2021中的报文处理单元20211发送的所述转发VF的VNI以及所述第一报文时,所述获取发送单元2012根据报文接收单元2011接收到的VNI,在Linux设备链表中查找与该VNI对应的VxLAN设备(该VxLAN设备是一个虚拟设备,例如可以是通过Linux操作系统自带的VxLAN功能创建的虚拟设备),根据所述第一报文的内层目的MAC地址在该VxLAN设备的数据空间中的FDB表中查找对应的FDB表项(每个VxLAN设备都有专属于该VxLAN设备的数据空间,该数据空间保存着与本设备相关的FDB表项),根据MAC地址查找FDB表项,得到与内层目的MAC地址对应的封装IP地址,即目的端VTEP的IP地址。FDB表可以如表5所示:
Figure PCTCN2015100150-appb-000006
表5
获取发送单元2012获取到封装IP地址(即目的端VTEP的IP地址)后,将该封装IP地址作为封装所述第一报文的目的IP地址,并查找协议栈2014中的ARP表项(ARP表项记录封装IP地址与所要经过的下一跳设备的MAC地址的对应关系),获取与所述封装IP地址对应的发送所述第一报文所要经过的下一跳设备的MAC地址,从而得到完整的对所述第一报文进行VxLAN封装所需的信息。ARP表项可以如表6所示:
Figure PCTCN2015100150-appb-000007
表6
所述获取发送单元2012单元将获取到的所述封装MAC地址和封装IP地址发送给网卡202,可以是将上述封装MAC地址和封装IP地址转换成网卡202存储的形式,例如MAC地址转发表和VTEP信息表的形式,再并发送给网卡202;也可以将所述封装MAC地址和封装IP地址直接发送给网卡202。
并且,所述获取发送单元2012可以将所述第一报文和封装信息(包括但不限于源IP地址、目的IP地址、源MAC地址、目的MAC地址和VNI,其中源IP地址和源MAC地址是管理员静态配置的的)发送给协议栈2014,协议栈2014根据封装信息,实现所述第一报文的VxLAN封装,将封装完的VxLAN报文发送给网卡202,网卡202发送所述封装后的VxLAN报文。
上述获取到的封装MAC地址,是所述中央处理器201从ARP表中获取的,因此,当VxLAN封装信息由管理员静态配置时,管理员仅需要配置封装IP地址,而不需要配置封装MAC地址(封装MAC地址会随着下一跳设备的变化而变化,并由主机ARP动态维护)。这样,管理员配置会更简单、组网也会更灵活。
需要说明的是,本发明实施例中表5和表6,从简明的角度仅列出了与本发明相关的信息,在具体实现时,这些表中还可以包括其它信息,本发明实施例不做限定。
本发明实施例中,网卡202还对接收到的或已经保存的封装MAC地址和封装IP地址表进行管理。以网卡202通过MAC地址转发表和VTEP信息表保存封装MAC地址和封转IP地址为例,网卡202每查到一次MAC地址转发表进行VxLAN报文的封装时,该MAC地址转发表的使用次数加1;当网卡202接收到所述中央处理器201下发MAC地址转发表且MAC地址转发表存储空间已满时,可以主动老化(即删除)使用频率最低的表项,从而可以插入新下发的表项。这样就保证了当网卡202空间有限时,网卡202上仅保存使用频率最高的转发表项。网卡上的MAC地址转发表和VTEP信息表一一对应,VTEP信息表的创建和使用次数刷新跟随其对应的MAC地址表项,能够进一步提升网卡的空间利用率和表项的管理效率,对使用频率高的表项能够持续在网卡保持,提升网卡转发VxLAN报文的效率。上述MAC地址转发表中表项的使用次数可以记录在该MAC地址转发表中,VTEP信息表中表项的使用次数可以记录在该VTEP信息表中;也可以单独用一个表项记录MAC地址转发表和VTEP信息表中表项的使用次数,本发明实施例不做限定。
下面以图4所示的计算机设备的架构为例,对本发明实施例一种实现VxLAN报文的发送方法流程进行说明。当虚拟机1需要发送第一报文时,虚拟机1将报文通过与其对应的VF(本发明实施例以VF1为例进行说明)发送给网卡202。网卡202中的虚拟交换机20213从VF1接收到虚拟机1发送 的第一报文,将所述第一报文发送给报文处理单元20211。报文处理单元20211根据获取到的所述第一报文,判断VF1的属性是否是VxLAN属性,如果是VxLAN属性,则查询表项管理单元20212中是否保存有对所述第一报文进行VxLAN封装的封装MAC地址和封装IP地址。
如果所述表项管理单元20212中包含有对所述第一报文进行VxLAN封装的封装MAC地址和封装IP地址,则根据所述表项管理单元20212中的封装MAC地址和封装IP地址对所述第一报文进行VxLAN封装,并将进行VxLAN封装后的所述第一报文通过所述虚拟交换机20213发送到端口2022,通过端口2022将进行VxLAN封装后的所述第一报文通过网络发送。
如果所述表项管理单元20212中没有包含有对所述第一报文进行VxLAN封装的封装MAC地址和封装IP地址,则所述报文处理单元20211通过物理功能PF(本发明实施例以PF N为例进行说明)将所述第一报文以及所述VF1的VNI发送给中央处理器201中的报文接收单元2011。报文接收单元2011将接收到所述第一报文以及所述VF1的VNI发送给获取发送单元2012,获取发送单元2012根据通过查找FDB表项和ARP表项获取对所述第一报文进行VxLAN封装的封装MAC地址和封装IP地址,通过PF(以通过PF2为例进行说明)将所述封装MAC地址和封装IP地址发送给表项管理单元20212,表项管理单元20212保存从所述获取发送单元2012获取到的所述封装MAC地址和封装IP地址。当中央处理器201对所述第一报文进行VxLAN封装时,可以是所述协议栈2014对所述第一报文进行VxLAN封装,并通过PF(本发明实施例以PF 1为例进行说明)将进行VxLAN封装后的所述第一报文发送给虚拟交换机20213,所述虚拟交换机20213通过端口2022将进行VxLAN封装后的所述第一报文发送到网络。当所述第一报文通过所述网卡进行VxLAN封装时,获取发送单元2012将所述第一报文通过PF(例如PF N)发送给报文处理单元20211,报文处理单元20211根据所述表项管理单元20212已经保存的所述封装MAC地址和封装IP地址对所述第一报文进行 VxLAN封装,并通过虚拟交换机20213将进行VxLAN封装后的第一报文通过端口2022发送到网络。
本发明实施例中,计算机设备200中的FDB表项来源有两个:一个是管理员的配置,另一个是对网卡上送VxLAN报文的学习。如果所有FDB表项是由管理员配置的,则当所述计算机设备200从网络接收到目的地是所述计算机设备200上的某一虚拟机的报文时,由于转发表项是管理员静态配置下发给网卡202的,网卡202解封装接收到VxLAN报文获取内层原始静荷后,可以根据配置的转发表项转发原始净荷到目的虚拟机。如果FDB转发表项是通过VxLAN报文学习获得,则网卡202接收到目的地为所述计算机设备上的某个虚拟机的VxLAN报文后,需要判断该报文所包含的VTEP信息和MAC地址转发信息网卡是否已经包含,如果没有包含,则网卡将该VxLAN报文上送给中央中央处理器201进行VxLAN报文学习。这样,无论采用管理员配置还是报文学习的方式,网卡上的表项均来源于计算机设备200(即计算机设备200中的中央处理器201),能够实现计算机设备200的统一管理。
本发明实施例中,结合图4所示的计算机设备200,网卡202将VxLAN报文上送给中央中央处理器201进行VxLAN报文学习的过程如下:
S200:网卡202接收通过网络发送给所述计算机设备200的第二报文,所述第二报文目的地为所述计算机设备上的某个虚拟机;
S202:网卡202中的网卡处理器2021判断所述第二报文是否是VxLAN报文;
判断是否为VxLAN报文,可以通过判断所述第二报文中所使用的UDP目的端口号是否是4789来判断,如果是4789,即可判断所述第二报文为VxLAN报文。根据RFC 7348的规定,使用UDP端口号4789作为VxLAN报文的标识。
S204:在该第二报文是VxLAN报文时,所述网卡处理器2021解析所述第 二报文,得到VNI、内层报文(原始净荷)的源MAC地址、目的MAC地址和外层报文(VxLAN隧道)的源MAC地址、源IP地址信息;判断网卡202中是否存在该第二报文对应的封装MAC地址(外层报文的源MAC地址)和封装IP地址(外层报文的源IP地址)。如果不存在,将该第二报文转发到中央处理器201;如果已经存在,则直接跳转到S210;
以网卡通过VTEP信息表和MAC地址转发表记录封装IP地址和封装MAC地址为例,网卡202判断是否存在所述第二报文所包含封装MAC地址和封装IP地址时,首先根据所述第二报文中的VNI和内层报文的源MAC地址查MAC地址转发表;如果能找到,说明网卡202包含该第二报文所对应的MAC地址转发表。根据找到MAC地址转发表所指示的隧道ID,查询VTEP信息表,将查询到的VTEP信息表中的封装IP地址和封装MAC地址,与对所述第二报文解析得到外层报文源IP地址和源MAC地址进行比较,如果都相同,则说明网卡202已包含所述第二报文所包含的封装IP地址和封装MAC地址。如果没有或不同,则判定网卡202未包含所述第二报文所包含的封装IP地址和封装MAC地址。
S206:所述中央处理器201接收到虚拟交换机20213发送的第二报文后,对该第二报文进行解析,以图4所示实施例为例,可以在协议栈2014中对报文进行解析,解析后如果判断是VxLAN报文,则对该VxLAN报文进行学习:如果已存在FDB表项,则刷新FDB表项,更新封装IP地址;如果不存在,则创建FDB表项,供后续所述计算机设备200中的虚拟机发送报文做VxLAN封装时使用。
S208:所述中央处理器201的获取发送单元2012获取解封装的VxLAN原始净荷,并将原始净荷和VNI下发给网卡202。即所述获取发送单元2012将获取到的所述第二报文的原始净荷和VNI,通过物理功能PF发送给网卡处理器202中的报文处理单元20211。
需要说明的是,上述获取发送单元2012获取解封装后的原始净荷可以 有多种方法。以Linux操作系统实现的计算机设备为例:可以利用Linux创建的虚拟网桥,将处理该VxLAN报文对应的VxLAN设备挂接在虚拟网桥上,这样,解封装后的原始净荷就会被转发到虚拟网桥上,获取发送单元2012可以在虚拟网桥的入口获取原始净荷。当然,也可以修改VxLAN设备的接收处理流程,在VxLAN设备完成报文学习和解封装后,获取原始净荷。
S210:网卡202根据第二报文的VNI和内层目的MAC地址,查转发表将内层原始静荷转发给对应的虚拟机。即网卡处理器2021中的报文处理单元20211根据所述第二报文的VNI和内层目的MAC地址,通过所述虚拟交换机20213将所述第二报文发送给目的虚拟机。
上述步骤S204中,网卡处理器2021中的报文处理单元20211将所述第二报文发送给所述中央处理器201后,也可以直接根据所述第二报文的VNI和内层目的MAC地址,通过所述虚拟交换机20213将所述第二报文发送给目的虚拟机,不需要所述中央处理器201中的获取发送单元2012将所述第二报文的原始静荷和VNI通过物理功能PF发送给网卡处理器202中的报文处理单元20211。
参考图5,图5为本发明实施例一种可扩展虚拟局域网VxLAN报文的发送方法的流程示意图。本发明实施例的一种可扩展虚拟局域网VxLAN报文的发送方法应用于计算机设备中,所述计算机设备包括中央处理器、网卡和虚拟机,所述网卡包括网卡处理器,如图5所示,所述方法包括:
步骤500:所述网卡处理器接收所述虚拟机发送的第一报文;
步骤502:所述网卡处理器判断所述网卡中是否保存有对所述第一报文进行VxLAN封装所需的封装信息;其中,所述封装信息包括封装媒体接入控制MAC地址和封装互联网协议IP地址,所述封装MAC地址是发送所述第一报文时所要经过的下一跳设备的MAC地址,所述封装IP地址是所述第一报文目的端VTEP的IP地址;
步骤504:在所述网卡保存有对所述第一报文进行VxLAN封装所需的封装信息时,根据所述封装信息对所述第一报文进行VxLAN封装并发送;
步骤506:在所述网卡未保存对所述第一报文进行VxLAN封装所需的封装信息时,向所述中央处理器发送获取请求,从所述中央处理器获取所述封装信息并保存,并发送对所述第一报文进行VxLAN封装后的报文。
其中,所述网卡是支持单根输入输出虚拟化SR-IOV并且支持虚拟交换机vSwitch转发功能的网卡。计算机设备中的虚拟机通过VF直接将报文发送到网卡并通过网络发送,相应的,网卡包括至少一个PF和至少一个VF。
上述方法实施例中,所述网卡处理器在接收到第一报文后,判断网卡中是否保存有对所述第一报文进行VxLAN封装的封装信息,如果保存有所述封装信息,则对所述第一报文进行VxLAN封装并发送;如果未保存有所述封装信息,则向中央处理器请求所述封装信息并保存,发送对所述第一报文进行VxLAN封装后的报文,实现了网卡对接收到的报文进行VxLAN的封装和发送。
可选的,在所述步骤502之前,所述方法还包括:
步骤501:所述网卡处理器从接收到的所述第一报文中获取转发所述第一报文的虚拟功能VF的ID,根据所述VF的ID,查询与所述VF的ID对应的VF的属性;
当所述VF的属性为VxLAN属性时,则获取所述VF的VxLAN网络标识VNI。
相应的,所述网卡处理器判断所述网卡中是否保存有对所述第一报文进行VxLAN封装所需的封装信息包括:
所述网卡处理器根据所述VNI以及所述第一报文的内层目的MAC地址,查询所述网卡中是否存在与所述VF的VNI和所述第一报文的内层目的MAC地址对应的封装信息;
在所述网卡中存在与所述VF的VNI和所述第一报文的内层目的MAC地址对应的封装信息时,判断所述网卡中保存有对所述第一报文进行VxLAN封装 所需的封装信息。
可选的,所述网卡可以通过查询相关的地址信息表(可以是上述表1,也可以是上述表2、表3)来查询所述网卡中保存有对所述第一报文进行VxLAN封装所需的封装信息。并且,所述网卡还可以记录上述地址信息表的使用次数,所述网卡每查询一次地址信息表,且查询到对需要转发的报文进行VxLAN封装所需的封装信息时,使记录地址信息表的使用次数加1。这样,当网卡中地址信息表的表项占满网卡可使用的存储空间时,可以删除使用次数最小的表项,从而可以加入中央处理器新下发的表项,在网卡存储空间有限时,能够保存最新的表项,提高网卡转发报文的效率。
所述网卡保存对所述第一报文进行VxLAN封装所需的封装信息的方式,可以采用上述表1的方式,也可以采用上述表2和表3的方式,例如用MAC转发表保存转发所述第一报文的VF的VNI和所述第一报文的内层目的MAC地址,与隧道标识之间的对应关系,用VTEP信息表保存所述隧道标识与所述封装信息之间的对应关系。通过表2、表3(或MAC转发表、VTEP信息表)的方式,能够节省网卡的存储空间,避免过多表项对网卡存储空间的占用。
在图5所示的方法实施例中,所述计算机设备中的网卡还可以包括虚拟交换机。相应的,所述网卡处理器发送对所述第一报文进行VxLAN封装后的报文包括:
所述网卡中的虚拟交换机接收所述中央处理器发送的对所述第一报文进行VxLAN封装后的报文并发送;或,
所述网卡处理器根据获取到的对所述第一报文进行VxLAN封装所需的封装信息,对所述第一报文进行VxLAN封装并通过所述网卡中的虚拟交换机发送。
其中,当网卡中的虚拟交换机接收所述中央处理器发送的对所述第一报文进行VxLAN封装后的报文并发送时,不需要网卡中保存所述第一报文,可以节省因保存第一报文所占用的网卡的存储空间,提高网卡的存储空间 的利用率。
当所述网卡接收到从网络侧发送给所述计算机设备中的某一虚拟机的第二报文时,所述方法还包括:
所述网卡接收发送给所述虚拟机的第二报文,所述第二报文为VxLAN报文;所述网卡处理器判断所述网卡是否保存所述第二报文中的封装MAC地址和封装IP地址;当所述网卡未保存所述第二报文的封装MAC地址和封装IP地址时,将所述第二报文发送给所述中央处理器。
所述网卡处理器将所述第二报文发送给所述中央处理器后,所述中央处理器能够根据接收到的第二报文,获取所述第二报文中的封装AMC地址和封装IP并保存。例如将封装IP地址保存在FDB表项中,将封装MAC地址记录在ARP表项中。中央处理器保存所述第二报文中的封装MAC地址和封装IP地址,可以在后续收到网卡的获取请求,请求与所述第二报文的VNI和内层目的MAC地址相同的报文的封装信息时,根据保存的所述第二报文的封装MAC地址和封装IP地址发送给网卡。可选的,上述中央处理器中相关的封装IP地址和封装MAC地址,也可以通过管理员预先配置的方式,保存在中央处理器中。
上述实现VxLAN报文转发方法的实施例,还可以参考上述图2、图3和图4相关的实施例描述的方案实现,不再赘述。
参考图6,图6为本发明实施例一种计算机设备600的结构示意图。如图6所示,计算机设备600包括中央处理器601、网卡602和虚拟机603,所述网卡602包括网卡处理器6021,所述网卡处理器6021包括报文处理单元60211和表项管理单元60212;
所述报文处理单元60211,用于接收所述虚拟机603发送的第一报文,判断所述网卡602中是否保存有对所述第一报文进行VxLAN封装所需的封装信息,在所述网卡602未保存对所述第一报文进行VxLAN封装所需的封装信息时,向所述中央处理器601发送获取请求;其中,所述封装信息包 括封装MAC地址和封装IP地址,所述封装MAC地址是发送所述第一报文时所要经过的下一跳设备的MAC地址,所述封装IP地址是所述第一报文目的端VTEP的IP地址;
所述表项管理单元60212,用于接收所述中央处理器601发送的对所述第一报文进行VxLAN封装所需的封装MAC地址和封装IP地址并保存;
所述网卡处理器6021,用于发送对所述第一报文进行VxLAN封装后的报文。
其中,所述网卡602支持单根输入输出虚拟化SR-IOV,支持虚拟交换机vSwitch转发功能。计算机设备600中的虚拟机603通过VF直接将报文发送到网卡602并通过网络发送,相应的,网卡包括至少一个PF和至少一个VF。所述网卡602与所述中央处理器601通过PCIe链路连接。
上述计算机设备600中,所述报文处理单元60211接收所述虚拟机603发送的第一报文,判断所述网卡602中是否保存有对所述第一报文进行VxLAN封装所需的封装信息,如果保存有所述封装信息,则对所述第一报文进行VxLAN封装并发送;如果未保存有所述封装信息,则向中央处理器601请求所述封装信息并保存,发送对所述第一报文进行VxLAN封装后的报文,实现了网卡602对接收到的报文进行VxLAN的封装和发送。
参考图7,图7为本发明实施例一种计算机设备600的一种具体实现结构示意图。如图7所示,所述中央处理器601包括报文接收单元6011和获取发送单元6012;
所述报文接收单元6011,用于接收所述报文处理单元60211发送的获取请求,所述获取请求包含所述第一报文和转发所述第一报文的VF的VNI;
所述获取发送单元6012,用于根据所述报文接收单元6011接收到的获取请求,获取对所述第一报文进行VxLAN封装的封装信息,并发送给所述表项管理单元60212。
可选的,所述报文处理单元60211,还用于从接收到的所述第一报文中 获取转发所述第一报文的VF的ID,根据所述VF的ID,查询与所述VF的ID对应的VF的属性;
当所述VF的属性为VxLAN属性时,则获取所述VF的VNI。
所述报文处理单元60211可以根据获取到的所述VF的VNI,以及所述第一报文的内层目的MAC查询所述网卡602中是否保存对所述第一报文进行VxLAN封装所需的封装信息。
相应的,所述报文处理单元60211判断所述网卡602中是否保存对所述第一报文进行VxLAN封装所需的封装信息包括:
所述报文处理单元60211根据所述VNI以及所述第一报文的内层目的MAC地址,查询所述网卡602中是否存在与所述VF的VNI和所述第一报文的内层目的MAC地址对应的封装信息;
在所述网卡中存在与所述VF的VNI和所述第一报文的内层目的MAC地址对应的封装信息时,判断所述网卡中存在对所述第一报文进行VxLAN封装所需的封装信息。
具体的,所述报文处理单元60211可以通过在表项管理单元60212查询是否存在相关的地址信息表,例如上述实施例中表1,或上述实施例中的表2、表3,通过相关的地址信息表,查询网卡602的表项管理单元60212中是否存在对所述第一报文进行VxLAN封装所需的封装信息。
可选的,本发明实施例中还可以记录地址信息表(可以是表1,也可以是表2、表3)的使用次数,所述报文处理单元60211每查询一次表项管理单元60212的地址信息表,且查询到对需要转发的报文进行VxLAN封装所需的封装信息时,使记录地址信息表的使用次数加1。这样,当表项管理单元60212中地址信息表的表项占满网卡602可使用的存储空间时,可以删除使用次数最小的表项,从而可以加入中央处理器601新下发的表项,在网卡602存储空间有限时,能够保存最新的表项,提高网卡转发报文的效率。
本发明实施例中,所述表项管理单元60212保存对所述第一报文进行 VxLAN封装所需的所述封装信息包括:
所述表项管理单元60212保存转发所述第一报文的VF的VNI和所述第一报文的内层目的MAC地址,与隧道标识之间的对应关系,以及保存所述隧道标识与所述封装信息之间的对应关系。
所述网卡602保存对所述第一报文进行VxLAN封装所需的封装信息的方式,可以采用上述表1的方式,也可以采用上述表2和表3的方式,例如用MAC转发表保存转发所述第一报文的VF的VNI和所述第一报文的内层目的MAC地址,与隧道标识之间的对应关系,用VTEP信息表保存所述隧道标识与所述封装信息之间的对应关系。通过表2、表3(或MAC转发表、VTEP信息表)的方式,能够节省网卡的存储空间,避免过多表项对网卡存储空间的占用。
可选的,所述网卡处理器6021还包括虚拟交换机60213,所述网卡处理器6021发送对所述第一报文进行VxLAN封装后的报文包括:
所述网卡处理器6021中的报文处理单元60211根据所述表项管理单元60212获取到的所述封装MAC地址和封装IP地址,对所述第一报文进行VxLAN封装并通过所述虚拟交换机60213发送;或,
所述网卡处理器60211中的虚拟交换机60213接收所述中央处理器601发送的对所述第一报文进行VxLAN封装后的报文并发送。
其中,当网卡602中的虚拟交换机60213接收所述中央处理器601发送的对所述第一报文进行VxLAN封装后的报文并发送时,报文处理单元60211在将所述第一报文和所述VNI发送给所述中央处理器601后,网卡602就不需要保存所述第一报文,可以节省因保存第一报文所占用的网卡的存储空间,提高网卡空间的利用率。
可选的,所述报文处理单元60211,还用于接收发送给所述虚拟机603的第二报文,所述第二报文为VxLAN报文,判断所述表项管理单元60212是否保存所述第二报文中的封装MAC地址和封装IP地址;当所述表项管理单元60212未保存所述第二报文的封装MAC地址和封装IP地址时,将所述第二报 文发送给所述报文接收单元6011;
所述获取发送单元6012,还用于从所述报文接收单元6011接收所述第二报文,获取所述第二报文的封装MAC地址和封装IP地址。
所述网卡处理器6021将所述第二报文发送给所述中央处理器后,所述中央处理器601能够根据接收到的第二报文,获取所述第二报文中的封装AMC地址和封装IP并保存。例如将封装IP地址保存在FDB表项中,将封装MAC地址记录在ARP表项中。中央处理器601保存所述第二报文中的封装MAC地址和封装IP地址,可以在后续收到网卡602的获取请求,请求与所述第二报文的VNI和内层目的MAC地址相同的报文的封装信息时,根据保存的所述第二报文的封装MAC地址和封装IP地址发送给网卡602。可选的,上述中央处理器601中相关的封装IP地址和封装MAC地址,也可以通过管理员预先配置的方式,保存在中央处理器601中。
上述计算机设备600的具体实现方式,还可以参考上述图2、图3和图4相关的实施例描述的方案实现,不再赘述。
本发明实施例还提供了一种计算机可读介质,所述计算机可读介质存储有计算机可读指令,在所述计算机可读指令被计算机设备中的处理器执行时,执行如下步骤:
接收虚拟机发送给网卡的第一报文;
判断所述网卡中是否保存有对所述第一报文进行可扩展虚拟局域网VxLAN封装所需的封装信息;其中,所述封装信息包括封装媒体接入控制MAC地址和封装互联网协议IP地址,所述封装MAC地址是发送所述第一报文时所要经过的下一跳设备的MAC地址,所述封装IP地址是所述第一报文目的端VTEP的IP地址;
在所述网卡保存对所述第一报文进行VxLAN封装所需的封装信息时,根据所述封装MAC地址和所述封装IP地址对所述第一报文进行VxLAN封装并发送;
在所述网卡未保存对所述第一报文进行VxLAN封装所需的封装信息时,向所述计算机设备中的中央处理器发送获取请求,从所述中央处理器获取所述封装信息并保存,发送对所述第一报文进行VxLAN封装后的报文。
其中,所述网卡包括至少一个PF和至少一个VF,计算机设备中的虚拟机通过VF直接将报文发送到网卡并通过网络发送。可选的,所述计算机设备中的每个虚拟机唯一对应一个VF,其通过唯一对应的VF转发报文给网卡。
上述计算机可读介质的实施例中,在接收到第一报文后,判断网卡中是否保存有对所述第一报文进行VxLAN封装的封装信息,如果保存有所述封装信息,则对所述第一报文进行VxLAN封装并发送;如果未保存有所述封装信息,则向中央处理器请求所述封装信息并保存,发送对所述第一报文进行VxLAN封装后的报文,实现了网卡对接收到的报文进行VxLAN的封装和发送。
可选的,在所述处理器执行判断所述网卡中是否保存对所述第一报文进行VxLAN封装所需的封装信息之前,还包括:
从接收到的所述第一报文中获取转发所述第一报文的虚拟功能VF的ID,根据所述VF的ID,查询与所述VF的ID对应的VF的属性;
当所述VF的属性为VxLAN属性时,则获取所述VF的VxLAN网络标识VNI。
上述获取所述VF的VNI后,可以根据所述VF的VNI和所述第一报文的内层目的MAC地址查询网卡中的地址转发表,判断地址转发表中是否存在于所述VF的VNI和所述第一报文的内层目的MAC地址对应的封装信息。
其中,所述判断所述网卡中是否存在对所述第一报文进行VxLAN封装所需的封装信息包括:
获取转发所述第一报文的VF的VxLAN网络标识VNI;
根据所述VNI以及所述第一报文的内层目的MAC地址,查询所述网卡中是否存在与所述VF的VNI和所述第一报文的内层目的MAC地址对应的封装信息;
在所述网卡中存在与所述VF的VNI和所述第一报文的内层目的MAC地址对应的封装信息时,判断所述网卡中存在对所述第一报文进行VxLAN封装所需的封装信息。
本发明实施例中,所述处理器还可以根据所述计算机可读介质中的计算机可读指令,记录查询封装信息的次数。每成功查询到封装信息,记录的次数加1。这样,当网卡中存储空间有限时,可以删除使用次数最小的封装信息的记录,从而可以加入中央处理器新下发的封装信息的记录,在网卡存储空间有限时,能够保存最新的表项,提高网卡转发报文的效率。
本发明实施例的关于计算机可读介质中,所述保存对所述第一报文进行VxLAN封装所需的封装信息的方式包括:
保存转发所述第一报文的VF的VNI和所述第一报文的内层目的MAC地址,与隧道标识之间的对应关系,以及保存所述隧道标识与所述封装信息之间的对应关系。可选的,也可以直接保存转发所述第一报文的VF的VNI和所述第一报文的内层目的MAC地址,与所述封装信息之间的对应关系之间的对应关系。
上述计算机可读介质的实施例中,所述发送对所述第一报文进行VxLAN封装后的报文包括:
接收所述中央处理器发送的对所述第一报文进行VxLAN封装后的报文并发送;或,
根据获取到的对所述第一报文进行VxLAN封装所需的封装信息,对所述第一报文进行VxLAN封装并发送。
其中,当接收所述中央处理器发送的对所述第一报文进行VxLAN封装后的报文并发送时,在将所述第一报文和所述VNI发送给所述中央处理器后,就不需要保存所述第一报文,可以节省因保存第一报文所占用的网卡的存储空间,提高网卡的存储空间的利用率。
上述计算机可读介质的实施例中,所述处理器还用于执行如下步骤:
接收发送给所述虚拟机的第二报文,所述第二报文为VxLAN报文;
判断所述网卡是否保存所述第二报文中的封装MAC地址和封装IP地址;
当所述网卡未保存所述第二报文的封装MAC地址和封装IP地址时,将所述第二报文发送给所述中央处理器。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口、装置或单元的间接耦合或通信连接,也可以是电的,机械的或其它的形式连接。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本发明实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元 中,也可以是各个单元单独物理存在,也可以是两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分,或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求的保护范围为准。

Claims (21)

  1. 一种可扩展虚拟局域网VxLAN报文的发送方法,所述方法应用于计算机设备中,所述计算机设备包括中央处理器、网卡和虚拟机,所述网卡包括网卡处理器,其特征在于:
    所述网卡处理器接收所述虚拟机发送的第一报文;
    所述网卡处理器判断所述网卡中是否保存有对所述第一报文进行VxLAN封装所需的封装信息;其中,所述封装信息包括封装媒体接入控制MAC地址和封装互联网协议IP地址,所述封装MAC地址是发送所述第一报文时所要经过的下一跳设备的MAC地址,所述封装IP地址是所述第一报文目的端虚拟可扩展局域网隧道端点VTEP的IP地址;
    在所述网卡保存有对所述第一报文进行VxLAN封装所需的封装信息时,根据所述封装信息对所述第一报文进行VxLAN封装并发送;
    在所述网卡未保存对所述第一报文进行VxLAN封装所需的封装信息时,向所述中央处理器发送获取请求,从所述中央处理器获取所述封装信息并保存,并发送对所述第一报文进行VxLAN封装后的报文。
  2. 根据权利要求1所述的VxLAN报文发送方法,其特征在于,在判断所述网卡中是否保存对所述第一报文进行VxLAN封装所需的封装信息之前,所述方法还包括:
    所述网卡处理器从接收到的所述第一报文中获取转发所述第一报文的虚拟功能VF的ID,根据所述VF的ID,查询与所述VF的ID对应的VF的属性;
    当所述VF的属性为VxLAN属性时,则获取所述VF的VxLAN网络标识VNI。
  3. 根据权利要求2所述的VxLAN报文发送方法,其特征在于,所述网卡处理器判断所述网卡中是否保存有对所述第一报文进行VxLAN封装所需的封装信息包括:
    所述网卡处理器根据所述VNI以及所述第一报文的内层目的MAC地址,查询所述网卡中是否存在与所述VF的VNI和所述第一报文的内层目的MAC地 址对应的封装信息;
    在所述网卡中存在与所述VF的VNI和所述第一报文的内层目的MAC地址对应的封装信息时,判断所述网卡中保存有对所述第一报文进行VxLAN封装所需的封装信息。
  4. 根据权利要求1-3任一所述的VxLAN报文发送方法,其特征在于,
    所述网卡保存对所述第一报文进行VxLAN封装所需的封装信息的方式包括:
    所述网卡保存转发所述第一报文的VF的VNI和所述第一报文的内层目的MAC地址,与隧道标识之间的对应关系,以及保存所述隧道标识与所述封装信息之间的对应关系。
  5. 根据权利要求1-4任一所述的VxLAN报文发送方法,其特征在于,所述网卡处理器发送对所述第一报文进行VxLAN封装后的报文包括:
    所述网卡中的虚拟交换机接收所述中央处理器发送的对所述第一报文进行VxLAN封装后的报文并发送;或,
    所述网卡处理器根据获取到的对所述第一报文进行VxLAN封装所需的封装信息,对所述第一报文进行VxLAN封装并通过所述网卡中的虚拟交换机发送。
  6. 根据权利要求1-5任一所述的VxLAN报文发送方法,其特征在于,所述方法还包括:
    所述网卡接收发送给所述虚拟机的第二报文,所述第二报文为VxLAN报文;
    所述网卡处理器判断所述网卡是否保存所述第二报文中的封装MAC地址和封装IP地址;
    当所述网卡未保存所述第二报文的封装MAC地址和封装IP地址时,将所述第二报文发送给所述中央处理器。
  7. 根据权利要求1-6任一所述的VxLAN报文发送方法,其特征在于,所 述网卡支持单根输入输出虚拟化SR-IOV,支持虚拟交换机vSwi tch转发功能。
  8. 一种计算机设备,包括中央处理器、网卡和虚拟机,所述网卡包括网卡处理器,其特征在于,所述网卡处理器包括报文处理单元和表项管理单元;
    所述报文处理单元,用于接收所述虚拟机发送的第一报文,判断所述网卡中是否保存有对所述第一报文进行可扩展虚拟局域网VxLAN封装所需的封装信息,在所述网卡未保存对所述第一报文进行VxLAN封装所需的封装信息时,向所述中央处理器发送获取请求;其中,所述封装信息包括封装媒体接入控制MAC地址和封装互联网协议IP地址,所述封装MAC地址是发送所述第一报文时所要经过的下一跳设备的MAC地址,所述封装IP地址是所述第一报文目的端虚拟可扩展局域网隧道端点VTEP的IP地址;
    所述表项管理单元,用于接收所述中央处理器发送的对所述第一报文进行VxLAN封装所需的封装MAC地址和封装IP地址并保存;
    所述网卡处理器,用于发送对所述第一报文进行VxLAN封装后的报文。
  9. 根据权利要求8所述的计算机设备,其特征在于,所述中央处理器包括报文接收单元和获取发送单元;
    所述报文接收单元,用于接收所述报文处理单元发送的获取请求,所述获取请求包含所述第一报文和转发所述第一报文的虚拟功能VF的VxLAN网络标识VNI;
    所述获取发送单元,用于根据所述报文接收单元接收到的获取请求,获取对所述第一报文进行VxLAN封装的封装信息,并发送给所述表项管理单元。
  10. 根据权利要求8或9所述的计算机设备,其特征在于,
    所述报文处理单元,还用于从接收到的所述第一报文中获取转发所述第一报文的虚拟功能VF的ID,根据所述VF的ID,查询与所述VF的ID对应的 VF的属性;当所述VF的属性为VxLAN属性时,则获取所述VF的VxLAN网络标识VNI。
  11. 根据权利要求10所述的计算机设备,其特征在于,所述报文处理单元判断所述网卡中是否保存对所述第一报文进行VxLAN封装所需的封装信息包括:
    所述报文处理单元根据所述VNI以及所述第一报文的内层目的MAC地址,查询所述网卡中是否存在与所述VF的VNI和所述第一报文的内层目的MAC地址对应的封装信息;
    在所述网卡中存在与所述VF的VNI和所述第一报文的内层目的MAC地址对应的封装信息时,判断所述网卡中存在对所述第一报文进行VxLAN封装所需的封装信息。
  12. 根据权利要求8-11任一所述的计算机设备,其特征在于,
    所述表项管理单元保存对所述第一报文进行VxLAN封装所需的所述封装信息包括:
    所述表项管理单元保存转发所述第一报文的VF的VNI和所述第一报文的内层目的MAC地址,与隧道标识之间的对应关系,以及保存所述隧道标识与所述封装信息之间的对应关系。
  13. 根据权利要求8-12任一所述的计算机设备,其特征在于,所述网卡处理器还包括虚拟交换机,所述网卡处理器发送对所述第一报文进行VxLAN封装后的报文包括:
    所述网卡处理器中的报文处理单元根据所述表项管理单元获取到的所述封装MAC地址和封装IP地址,对所述第一报文进行VxLAN封装并通过所述虚拟交换机发送;或,
    所述网卡处理器中的虚拟交换机接收所述中央处理器发送的对所述第一报文进行VxLAN封装后的报文并发送。
  14. 根据权利要求8-13任一所述的计算机设备,其特征在于:
    所述报文处理单元,还用于接收发送给所述虚拟机的第二报文,所述第二报文为VxLAN报文,判断所述表项管理单元是否保存所述第二报文中的封装MAC地址和封装IP地址;当所述表项管理单元未保存所述第二报文的封装MAC地址和封装IP地址时,将所述第二报文发送给所述报文接收单元;
    所述获取发送单元,还用于从所述报文接收单元接收所述第二报文,获取所述第二报文的封装MAC地址和封装IP地址。
  15. 根据权利要求8-14任一所述的计算机设备,其特征在于:
    所述网卡支持单根输入输出虚拟化SR-IOV,支持虚拟交换机vSwi tch转发功能。
  16. 一种计算机可读介质,其特征在于,所述计算机可读介质存储有计算机可读指令,在所述计算机可读指令被计算机设备中的处理器执行时,执行如下步骤:
    接收虚拟机发送给网卡的第一报文;
    判断所述网卡中是否保存有对所述第一报文进行可扩展虚拟局域网VxLAN封装所需的封装信息;其中,所述封装信息包括封装媒体接入控制MAC地址和封装互联网协议IP地址,所述封装MAC地址是发送所述第一报文时所要经过的下一跳设备的MAC地址,所述封装IP地址是所述第一报文目的端虚拟可扩展局域网隧道端点VTEP的IP地址;
    在所述网卡保存对所述第一报文进行VxLAN封装所需的封装信息时,根据所述封装MAC地址和所述封装IP地址对所述第一报文进行VxLAN封装并发送;
    在所述网卡未保存对所述第一报文进行VxLAN封装所需的封装信息时,向所述计算机设备中的中央处理器发送获取请求,从所述中央处理器获取所述封装信息并保存,发送对所述第一报文进行VxLAN封装后的报文。
  17. 根据权利要求16所述的计算机可读介质,在所述处理器执行判断所述网卡中是否保存对所述第一报文进行VxLAN封装所需的封装信息之前, 还包括:
    从接收到的所述第一报文中获取转发所述第一报文的虚拟功能VF的ID,根据所述VF的ID,查询与所述VF的ID对应的VF的属性;
    当所述VF的属性为VxLAN属性时,则获取所述VF的VxLAN网络标识VNI。
  18. 根据权利要求16或17所述的计算机可读介质,其特征在于,所述判断所述网卡中是否存在对所述第一报文进行VxLAN封装所需的封装信息包括:
    获取转发所述第一报文的VF的VxLAN网络标识VNI;
    根据所述VNI以及所述第一报文的内层目的MAC地址,查询所述网卡中是否存在与所述VF的VNI和所述第一报文的内层目的MAC地址对应的封装信息;
    在所述网卡中存在与所述VF的VNI和所述第一报文的内层目的MAC地址对应的封装信息时,判断所述网卡中存在对所述第一报文进行VxLAN封装所需的封装信息。
  19. 根据权利要求16-17任一所述的计算机可读介质,其特征在于,所述保存对所述第一报文进行VxLAN封装所需的封装信息的方式包括:
    保存转发所述第一报文的VF的VNI和所述第一报文的内层目的MAC地址,与隧道标识之间的对应关系,以及保存所述隧道标识与所述封装信息之间的对应关系。
  20. 根据权利要求16-19任一所述的计算机可读介质,其特征在于,所述发送对所述第一报文进行VxLAN封装后的报文包括:
    接收所述中央处理器发送的对所述第一报文进行VxLAN封装后的报文并发送;或,
    根据获取到的对所述第一报文进行VxLAN封装所需的封装信息,对所述第一报文进行VxLAN封装并发送。
  21. 根据权利要求16-20任一所述的计算机可读介质,其特征在于,所 述处理器还用于执行如下步骤:
    接收发送给所述虚拟机的第二报文,所述第二报文为VxLAN报文;
    判断所述网卡是否保存所述第二报文中的封装MAC地址和封装IP地址;
    当所述网卡未保存所述第二报文的封装MAC地址和封装IP地址时,将所述第二报文发送给所述中央处理器。
PCT/CN2015/100150 2015-12-31 2015-12-31 可扩展虚拟局域网报文发送方法、计算机设备和可读介质 WO2017113306A1 (zh)

Priority Applications (11)

Application Number Priority Date Filing Date Title
CN202010969660.6A CN112422393B (zh) 2015-12-31 2015-12-31 可扩展虚拟局域网报文发送方法、计算机设备和可读介质
EP19181136.3A EP3633929B1 (en) 2015-12-31 2015-12-31 Method for sending virtual extensible local area network packet, computer device, and computer readable medium
ES19181136T ES2926345T3 (es) 2015-12-31 2015-12-31 Método para enviar un paquete de red de área local extensible virtual, dispositivo informático y medio legible por ordenador
EP15911932.0A EP3273643B1 (en) 2015-12-31 2015-12-31 Method for sending virtual extensible local area network packet, computer device, and readable medium
EP22171260.7A EP4102780A1 (en) 2015-12-31 2015-12-31 Method for sending virtual extensible local area network packet, computer device, and readable medium
CN201580054394.1A CN107113240B (zh) 2015-12-31 2015-12-31 可扩展虚拟局域网报文发送方法、计算机设备和可读介质
ES15911932T ES2750778T3 (es) 2015-12-31 2015-12-31 Método para enviar un paquete de red de área local extensible virtual, dispositivo informático y medio legible por ordenador
PCT/CN2015/100150 WO2017113306A1 (zh) 2015-12-31 2015-12-31 可扩展虚拟局域网报文发送方法、计算机设备和可读介质
US16/019,003 US10771286B2 (en) 2015-12-31 2018-06-26 Method for sending virtual extensible local area network packet, computer device, and computer readable medium
US16/703,392 US11283650B2 (en) 2015-12-31 2019-12-04 Method for sending virtual extensible local area network packet, computer device, and computer readable medium
US17/687,399 US20220191064A1 (en) 2015-12-31 2022-03-04 Method for sending virtual extensible local area network packet, computer device, and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2015/100150 WO2017113306A1 (zh) 2015-12-31 2015-12-31 可扩展虚拟局域网报文发送方法、计算机设备和可读介质

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/019,003 Continuation US10771286B2 (en) 2015-12-31 2018-06-26 Method for sending virtual extensible local area network packet, computer device, and computer readable medium

Publications (1)

Publication Number Publication Date
WO2017113306A1 true WO2017113306A1 (zh) 2017-07-06

Family

ID=59224325

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/100150 WO2017113306A1 (zh) 2015-12-31 2015-12-31 可扩展虚拟局域网报文发送方法、计算机设备和可读介质

Country Status (5)

Country Link
US (3) US10771286B2 (zh)
EP (3) EP3633929B1 (zh)
CN (2) CN107113240B (zh)
ES (2) ES2750778T3 (zh)
WO (1) WO2017113306A1 (zh)

Families Citing this family (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017113306A1 (zh) * 2015-12-31 2017-07-06 华为技术有限公司 可扩展虚拟局域网报文发送方法、计算机设备和可读介质
CN107770031A (zh) * 2017-10-26 2018-03-06 郑州云海信息技术有限公司 一种可扩展虚拟局域网vxlan报文处理方法和装置
CN114095427A (zh) * 2017-12-29 2022-02-25 西安华为技术有限公司 一种处理数据报文的方法和网卡
CN108989248B (zh) * 2018-06-11 2020-07-07 华为技术有限公司 传输报文的方法、网络边缘设备与报文传输系统
US11012259B1 (en) * 2018-09-13 2021-05-18 Ca, Inc. Systems and methods for preserving system contextual information in an encapsulated packet
CN111147369B (zh) * 2018-11-05 2022-02-08 中国电信股份有限公司 路由系统、路由方法和服务器
WO2020132681A1 (en) 2018-12-21 2020-06-25 Cylera, Inc. A system and method for non-invasive networked device inspection based on passively-captured device traffic
US11394693B2 (en) * 2019-03-04 2022-07-19 Cyxtera Cybersecurity, Inc. Establishing network tunnel in response to access request
US10880211B2 (en) * 2019-05-06 2020-12-29 Seth Gregory Friedman Transaction encoding and verification by way of data-link layer fields
CN110688237B (zh) * 2019-06-25 2024-02-09 华为技术有限公司 转发报文的方法、中间设备和计算机设备
US11005806B1 (en) * 2019-08-16 2021-05-11 Cylera, Inc. Methods and apparatus for deep packet inspection to identify intermediate network devices
CN110955517B (zh) * 2019-09-03 2021-08-20 华为技术有限公司 报文转发的方法、计算机设备和中间设备
US10868707B1 (en) 2019-09-16 2020-12-15 Liquid-Markets-Holdings, Incorporated Zero-latency message processing with validity checks
US11935120B2 (en) 2020-06-08 2024-03-19 Liquid-Markets GmbH Hardware-based transaction exchange
US11811559B2 (en) 2020-07-21 2023-11-07 Vmware, Inc. Logical network packet handling on physical network interface controller (PNIC)
US11750532B2 (en) * 2020-07-21 2023-09-05 Vmware, Inc. Logical network packet handling on physical network interface controller (PNIC)
CN112152900A (zh) * 2020-09-24 2020-12-29 盛科网络(苏州)有限公司 VxLAN场景中的报文转发方法和装置
CN112311680B (zh) * 2020-10-30 2022-07-12 新华三技术有限公司合肥分公司 一种报文转发方法及装置
CN112737915B (zh) * 2020-12-29 2022-10-25 优刻得科技股份有限公司 基于智能网卡的内网隧道跨域网关转发方法、系统、设备和介质
US11902184B2 (en) 2021-05-20 2024-02-13 Pensando Systems Inc. Methods and systems for providing a virtualized NVMe over fabric service
US11895027B2 (en) * 2021-05-20 2024-02-06 Pensando Systems Inc. Methods and systems for service distribution using data path state replication and intermediate device mapping
US11593294B2 (en) 2021-05-20 2023-02-28 Pensando Systems Inc. Methods and systems for loosely coupled PCIe service proxy over an IP network
US11949589B2 (en) 2021-05-20 2024-04-02 Pensando Systems Inc. Methods and systems for service state replication using original data packets
CN113259220B (zh) * 2021-07-14 2021-09-10 武汉绿色网络信息服务有限责任公司 共享报文中私有信息的方法和服务器
CN116455704B (zh) * 2023-06-15 2023-08-11 北京城建智控科技股份有限公司 基于vxlan的报文发送方法、接收方法及装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140059111A1 (en) * 2012-08-27 2014-02-27 Vmware, Inc. Method and system for enabling multi-core processing of vxlan traffic
US20150350081A1 (en) * 2014-05-30 2015-12-03 International Business Machines Corporation Virtual network data control with network interface card
CN105162674A (zh) * 2015-10-16 2015-12-16 上海斐讯数据通信技术有限公司 一种物理机访问虚拟网络的方法及网卡
CN105207873A (zh) * 2015-08-31 2015-12-30 华为技术有限公司 一种报文处理方法和装置

Family Cites Families (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101696472B1 (ko) * 2010-06-18 2017-01-16 삼성전자주식회사 이동 통신 시스템에서 로컬 라우팅 장치 및 방법
US8923149B2 (en) * 2012-04-09 2014-12-30 Futurewei Technologies, Inc. L3 gateway for VXLAN
US20140086253A1 (en) * 2012-09-26 2014-03-27 Futurewei Technologies, Inc. Overlay Virtual Gateway for Overlay Networks
US9036639B2 (en) * 2012-11-29 2015-05-19 Futurewei Technologies, Inc. System and method for VXLAN inter-domain communications
CN103905283B (zh) * 2012-12-25 2017-12-15 华为技术有限公司 基于可扩展虚拟局域网的通信方法及装置
CN103905309A (zh) * 2012-12-28 2014-07-02 中国电信股份有限公司 虚拟机之间的数据交换方法和系统
US9008097B2 (en) * 2012-12-31 2015-04-14 Mellanox Technologies Ltd. Network interface controller supporting network virtualization
US9112801B2 (en) * 2013-03-15 2015-08-18 International Business Machines Corporation Quantized congestion notification in a virtual networking system
CN104468358B (zh) * 2013-09-25 2018-05-11 新华三技术有限公司 分布式虚拟交换机系统的报文转发方法及设备
CN104601427B (zh) * 2013-10-31 2018-03-06 新华三技术有限公司 数据中心网络中的报文转发方法及装置
EP3070887B1 (en) * 2013-12-11 2017-08-09 Huawei Technologies Co., Ltd. Communication method, device and system for virtual extensible local area network
CN103873374B (zh) * 2014-03-27 2017-08-11 新华三技术有限公司 虚拟化系统中的报文处理方法及装置
WO2015180084A1 (zh) * 2014-05-29 2015-12-03 华为技术有限公司 一种报文转发方法和VxLAN网关
US9692698B2 (en) * 2014-06-30 2017-06-27 Nicira, Inc. Methods and systems to offload overlay network packet encapsulation to hardware
CN104506408B (zh) * 2014-12-31 2018-02-06 新华三技术有限公司 基于sdn的数据传输的方法及装置
CN105162647A (zh) * 2015-07-31 2015-12-16 上海斐讯数据通信技术有限公司 一种检测adsl语音分离器系统性能的方法及系统
WO2017113306A1 (zh) * 2015-12-31 2017-07-06 华为技术有限公司 可扩展虚拟局域网报文发送方法、计算机设备和可读介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140059111A1 (en) * 2012-08-27 2014-02-27 Vmware, Inc. Method and system for enabling multi-core processing of vxlan traffic
US20150350081A1 (en) * 2014-05-30 2015-12-03 International Business Machines Corporation Virtual network data control with network interface card
CN105207873A (zh) * 2015-08-31 2015-12-30 华为技术有限公司 一种报文处理方法和装置
CN105162674A (zh) * 2015-10-16 2015-12-16 上海斐讯数据通信技术有限公司 一种物理机访问虚拟网络的方法及网卡

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3273643A4 *

Also Published As

Publication number Publication date
CN112422393B (zh) 2022-03-25
CN112422393A (zh) 2021-02-26
CN107113240A (zh) 2017-08-29
EP3273643B1 (en) 2019-08-21
ES2750778T3 (es) 2020-03-27
CN107113240B (zh) 2020-09-29
US10771286B2 (en) 2020-09-08
EP3273643A4 (en) 2018-02-07
US11283650B2 (en) 2022-03-22
EP4102780A1 (en) 2022-12-14
ES2926345T3 (es) 2022-10-25
EP3273643A1 (en) 2018-01-24
US20220191064A1 (en) 2022-06-16
US20200112457A1 (en) 2020-04-09
EP3633929A1 (en) 2020-04-08
EP3633929B1 (en) 2022-06-08
US20180309595A1 (en) 2018-10-25

Similar Documents

Publication Publication Date Title
WO2017113306A1 (zh) 可扩展虚拟局域网报文发送方法、计算机设备和可读介质
US10205657B2 (en) Packet forwarding in data center network
US10044568B2 (en) Network extension groups of global VLANs in a fabric switch
US8819267B2 (en) Network virtualization without gateway function
EP2874359B1 (en) Extended ethernet fabric switches
US20150358232A1 (en) Packet Forwarding Method and VXLAN Gateway
US10193707B2 (en) Packet transmission method and apparatus
WO2017113231A1 (zh) 一种报文传输的方法、装置和系统
CN107113241B (zh) 路由确定方法、网络配置方法以及相关装置
WO2016192686A1 (zh) 数据报文转发
CN108632145B (zh) 一种报文转发方法和叶子节点设备
WO2015149253A1 (zh) 数据中心的虚拟网络管理方法及数据中心系统
WO2021139289A1 (zh) 报文发送方法、路由表项的生成方法、装置及存储介质
US8687649B2 (en) Message forwarding toward a source end node in a converged network environment
WO2014134919A1 (zh) 同一租户内服务器间的通信控制方法及网络设备
WO2021083332A1 (zh) 发送报文的方法、装置及系统
US20180159758A1 (en) Virtual media access control addresses for hosts
WO2018103043A1 (zh) 云计算系统中的报文处理方法及设备
US20230318974A1 (en) BIER Packet Forwarding Method, Device, and System
US9847929B2 (en) Cluster and forwarding method
US11799929B1 (en) Efficient multicast control traffic management for service discovery
US20240022513A1 (en) Communication Method and Apparatus
WO2013053293A1 (zh) 一种标识网与传统网络互联互通的方法、asr及isr

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

Country of ref document: EP

Kind code of ref document: A1

REEP Request for entry into the european phase

Ref document number: 2015911932

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE