[go: up one dir, main page]

WO2014094420A1 - Procédé et dispositif de traitement de messages - Google Patents

Procédé et dispositif de traitement de messages Download PDF

Info

Publication number
WO2014094420A1
WO2014094420A1 PCT/CN2013/079571 CN2013079571W WO2014094420A1 WO 2014094420 A1 WO2014094420 A1 WO 2014094420A1 CN 2013079571 W CN2013079571 W CN 2013079571W WO 2014094420 A1 WO2014094420 A1 WO 2014094420A1
Authority
WO
WIPO (PCT)
Prior art keywords
local area
area network
virtual local
port
identifier
Prior art date
Legal status (The legal status 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 status listed.)
Ceased
Application number
PCT/CN2013/079571
Other languages
English (en)
Chinese (zh)
Inventor
骆绍开
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of WO2014094420A1 publication Critical patent/WO2014094420A1/fr
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]

Definitions

  • the present invention relates to the field of network technologies, and in particular, to a packet processing method and apparatus. Background technique
  • VMM Virtual Machine Manager
  • the virtualization technology enables the virtual machine to communicate with other devices on the network after establishing a corresponding relationship through the physical NIC on the physical server.
  • the physical network card that provides virtualization functions is called a virtual network card.
  • a virtual local area network is a communication technology that logically divides a local area network device into multiple broadcast domains (multiple virtual local area networks).
  • VMM manages virtual machines and physical resources into two categories: front-end mode and pass-through mode.
  • the Xen platform is used as an example.
  • a virtual local area network (LAN) is configured in advance on Domain 0 for each DomainU NIC.
  • the DomainO writes the corresponding virtual LAN label to the packet according to the configuration, and then sends the packet through the network card.
  • the NIC sends the packet to the domain O.
  • the domain O is checked by the domain O.
  • the label is removed from the packet and sent to the DomainU. Otherwise, the packet is discarded.
  • Embodiments of the present invention provide a packet processing method and apparatus to improve security and network performance.
  • the present invention provides a method for processing a message, including:
  • Gen data acquisition corresponding to the 4-port port identifier Gen packets, searching the port identifier corresponding to the configuration information, the configuration information includes a specified virtual local area network identifier, the designated virtual local area network identifier is allowed to pass through the port Virtual local area network identifier;
  • the method before the acquiring the packet, the method further includes:
  • the port is an uplink port or a downlink port of the network device, where the network device is installed on a physical server, and the physical server passes the network device The external device is connected, the uplink port is a physical port that the network device is connected to the external device, and the lower link is a queue that the network device is connected to the physical server, where the external device includes a switch, a router, or another physical network card.
  • the network device is a physical network card in a virtualized scenario.
  • Determining, according to whether the packet carries a virtual local area network identifier, determining the target virtual local area network identifier from the specified virtual local area network identifier includes:
  • the default virtual local area network identifier corresponding to the port is determined as the target virtual local area network identifier, and the default virtual local area network identifier is in the designated virtual local area network identifier;
  • the packet When the packet carries the virtual local area network identifier, it is determined whether the virtual local area network identifier in the packet is in the specified virtual local area network identifier;
  • the default virtual local area network identifier corresponding to the port is determined as the target virtual local area network identifier.
  • the method further includes: receiving the packet by using the target virtual local area network, and writing the target virtual local area network identifier into the packet that does not carry the virtual local area network identifier.
  • the method when the packet is a packet to be sent, the sending the packet to the target virtual local area network Before the corresponding target virtual local area network is identified, the method further includes: when the virtual local area network identifier carried by the packet is the same as the default virtual local area network identifier corresponding to the port, deleting the virtual local area network label carried by the fourth file, Virtual office
  • the present invention provides a network device, including:
  • An obtaining unit configured to acquire a message
  • a searching unit configured to search for configuration information corresponding to the port identifier according to the port identifier corresponding to the port of the packet obtained by the acquiring unit, where the configuration information includes a specified virtual local area network identifier, where the designated virtual local area network identifier is The virtual local area network identifier that the port allows to pass;
  • a first processing unit configured to determine, according to whether the packet carries a virtual local area network identifier, the target virtual local area network identifier from the specified virtual local area network identifier found by the searching unit;
  • the network device further includes: a receiving unit, configured to receive preset configuration information corresponding to the port identifier from the management device.
  • the port of the network device is an uplink port or a downlink port, where the network device is installed on a physical server, and the physical server passes the network device The external device is connected, the uplink port is a physical port that the network device is connected to the external device, and the lower link is a queue that the network device is connected to the physical server, where the external device includes a switch, a router, or another physical network card.
  • the network device is a physical network card in a virtualized scenario.
  • the first processing unit includes:
  • a first determining module configured to determine whether the packet carries a virtual local area network identifier, where the first processing module is configured to: when the first determining module determines that the packet does not carry a virtual local area network identifier, Determining, by the default virtual local area network identifier, the target virtual local area network identifier, where the default virtual local area network identifier is in the specified virtual local area network identifier;
  • a second determining module configured to: when the first determining module determines that the packet carries a virtual local area network identifier, determine whether the virtual local area network identifier in the packet is in the specified virtual local area network identifier;
  • the network device when the packet is a packet to be received, the network device further includes:
  • the network device when the packet is a packet to be sent, the network device further includes:
  • a third processing unit configured to: when the virtual local area network identifier carried by the packet is the same as the default virtual local area network identifier corresponding to the port, delete the virtual local area carried by the fourth embodiment of the present invention.
  • the message processing method and device by acquiring the message, And determining, according to the port identifier corresponding to the port of the packet, the configuration information corresponding to the port identifier, and determining the target from the specified virtual local area network identifier in the configuration information according to whether the packet carries the virtual local area network identifier.
  • the virtual local area network identifier is sent to the target virtual local area network corresponding to the target virtual local area network identifier.
  • the embodiment of the present invention solves the problem that all the packets need to be transferred by the virtual machine manager and the network performance is not high when the virtual local area network is divided and the packet processing is performed by using the front-end mode in the prior art, and the security and network performance are improved. .
  • FIG. 1 is a flowchart of a method for processing a packet according to Embodiment 1 of the present invention
  • FIG. 2 is a schematic diagram of a connection relationship between a network device and a physical server and an external device according to Embodiment 1 of the present invention
  • FIG. 3 is a schematic diagram of a connection relationship between a physical network card and a physical server and an external device according to Embodiment 1 of the present invention
  • FIG. 4 is a flowchart of still another method for processing a packet according to Embodiment 1 of the present invention
  • FIG. 5 is a diagram showing an example of a configuration of configuration information of an uplink and a backup port according to Embodiment 1 of the present invention
  • 1 provides a flow chart of the physical network card entering from the physical port 1 when the virtual LAN attribute of the physical port 1 is a trunk port;
  • FIG. 7 is a flowchart of a physical network card from a physical port 1 when a virtual local area network attribute of the physical port 1 is a hybr i d port according to Embodiment 1 of the present invention
  • FIG. 8 is a flowchart of a physical network card from a physical port 1 when a virtual local area network attribute of the physical port 1 is an acce s s port according to Embodiment 1 of the present invention
  • FIG. 9 is a flowchart of still another method for processing a packet according to Embodiment 1 of the present invention
  • 10 is a flowchart of a physical network card from a queue 1 when a virtual local area network attribute of queue 1 is an acce ss port according to Embodiment 1 of the present invention
  • FIG. 11 is a flowchart of a physical network card from a queue 1 when a virtual local area network attribute of queue 1 is a t runk port according to Embodiment 1 of the present invention
  • FIG. 12 is a flowchart of a physical network card from a queue 1 when a virtual local area network attribute of queue 1 is a hybr i d port according to Embodiment 1 of the present invention
  • FIG. 13 is a structural diagram of a network device 13 according to Embodiment 1 of the present invention
  • FIG. 14 is a structural diagram of another network device 13 according to Embodiment 2 of the present invention
  • FIG. 16 is a structural diagram of another network device 13 according to Embodiment 2 of the present invention
  • FIG. 17 is a schematic diagram of another network device 17 according to Embodiment 1 of the present invention
  • FIG. 18 is a structural diagram of a network device 18 according to Embodiment 3 of the present invention.
  • a packet processing method is provided in the embodiment of the present invention.
  • the embodiment is applied to a network virtualization scenario, and the network device implements virtual local area network division and packet processing in a direct mode, as shown in FIG. Including the following steps:
  • the port is an uplink port or a downlink port
  • the uplink port is a physical port to which the network device is connected to the external device
  • the downlink The port is a queue in which the network device is connected to the physical server, that is, the queue is a channel through which the network device interacts with the physical server, and each queue corresponds to a virtual machine on the physical server
  • the report is The packet is received from the external device through the uplink port, and is sent to the physical server through the downlink interface, or received from the physical server through the downlink interface, and is received by the physical server. A message sent by the interface to the external device.
  • the configuration information may be configured in the form of a list, for example, including a port identifier in the list, and configuration information corresponding to the port identifier, including a specified virtual local area network identifier, where the specified virtual local area network identifier includes a default virtual local area network. Identification, and a list of virtual local area network IDs that are allowed to pass.
  • the configuration information also includes virtual local area network attributes.
  • virtual local area network attributes are classified into three categories: The port, the trunk port, and the hybrid port, the virtual LAN attribute included in the configuration information is any one of an access port, a trunk port, or a hybrid port.
  • the access port can only belong to one virtual local area network, and is generally used for the connection between the switch and the end user.
  • the trunk port can belong to multiple virtual local area networks, and can receive and send packets of multiple virtual local area networks, which are generally used in switches.
  • the hybrid port can belong to multiple virtual LANs. It can receive and send packets of multiple virtual LANs. It is generally used for connection between switches, and can also be used to connect users' computers.
  • the hybrid port can allow multiple ports. The packets of the virtual local area network are not carried with the virtual local area network label.
  • the default virtual local area network identifier corresponding to the port is determined as the target virtual local area network identifier, and the default virtual local area network identifier is in the designated virtual local area network identifier;
  • the packet When the packet carries the virtual local area network identifier, it is determined whether the virtual local area network identifier in the packet is in the specified virtual local area network identifier;
  • the default virtual local area network identifier corresponding to the port is determined as the target virtual local area network identifier.
  • step 1 04 is not performed.
  • the packet is sent to the target virtual local area network corresponding to the target virtual local area network identifier, and the packet is forwarded by the target virtual local area network.
  • the method for processing a packet obtains a packet, and searches for the configuration information corresponding to the port identifier according to the port identifier corresponding to the port that obtains the packet, and then, according to the packet, Whether the virtual local area network identifier is carried, the target virtual local area network identifier is determined from the specified virtual local area network identifier in the configuration information, and the information is sent to the target virtual local area network corresponding to the target virtual local area network identifier.
  • the embodiment of the present invention solves the problem that all the packets need to be transferred by the virtual machine manager and the network performance is not high when the virtual local area network is divided and the packet processing is performed by using the front-end mode in the prior art, and the security and network performance are improved.
  • a method for processing a packet is provided.
  • the virtual LAN segmentation and packet processing are implemented in the pass-through mode by the physical network card.
  • the pass-through mode is a mode in which the obtained packet does not need to be transferred by the virtual machine manager and directly forwarded by the physical network card.
  • the physical network card is connected to the physical port of the physical network card, and the external device is a switch, a router, another physical network card or other network device.
  • the physical network card is connected to the physical network card and the physical server.
  • a queue, that is, the queue is a channel through which the network device interacts with the physical server, and each queue corresponds to a virtual machine on the physical server.
  • the process of entering and leaving the physical network card into four physical processes is divided into four processes, as shown in Figure 3, which are 1 packet processing from the uplink port (physical port) into the physical network card, and 2 from the lower link port (queue) to the physical network card.
  • the processing of receiving a packet from the uplink port (physical port) into the physical network card is taken as an example, that is, the processing of receiving the packet from the uplink port is taken as an example.
  • the physical network card receives preset configuration information corresponding to the port identifier from a management device.
  • the configuration information corresponding to the port identifier is preset in the management device having the management function, and is sent to the physical network card by using the management device, for example, configuring configuration information of the upper and lower links through the virtual machine manager, and Sent to the physical network card.
  • the virtual machine manager is connected to the physical network card, and configured to set and manage configuration information in the physical network card.
  • the physical network card acquires a packet.
  • the packet is obtained by the physical network card from the external device through the uplink port (physical port), and the external device is a switch, a router, or another physical network card.
  • the physical network card searches for the configuration information corresponding to the port identifier according to the port identifier corresponding to the port that obtains the packet.
  • the configuration information may be in the form of a list, as shown in FIG. 5, in the list.
  • the port identifier includes the configuration information corresponding to the port identifier, and the configuration information includes a specified virtual local area network identifier, where the designated virtual local area network identifier is a virtual local area network identifier that the port allows to pass, and the allowed virtual local area network identifier A default virtual local area network identifier and a list of allowed virtual local area network identifiers.
  • the configuration information further includes a virtual local area network attribute, and a virtual local area network identifier list of the packet that does not carry the virtual local area network label, and the identifier in the virtual local area network identification list that is allowed to pass, including the allowed non-portable The identifier in the virtual local area network identifier list of the packets of the virtual local area network label.
  • the port identifier is an identifier that is set for each port of the physical NIC in advance.
  • the default virtual local area network identifier ranges from 0 to 4095.
  • the default virtual local area network identifier corresponding to the port can be set according to the range, for example, the physical There are four physical ports on the NIC. You can set the corresponding port IDs to 0, 1, 1, and 3 for the four physical ports in sequence.
  • the default virtual LAN IDs are 0, 1, 2, and 3.
  • the virtual local area network attributes are classified into three types: acce ss port, t runk port, and hy id port, and the acces s port can belong to only one virtual local area network, generally used for the switch.
  • the connection to the end user; t runk port can belong to multiple virtual local area networks, can receive and send multiple virtual LAN messages, generally used for connection between switches; hybr id port can belong to multiple virtual local area networks, can Receiving and sending packets of multiple virtual local area networks, generally used for connection between switches, can also be used to connect users' computers, and the hybrid id port can allow multiple virtual local area networks to transmit without carrying virtual local area network labels. .
  • the virtual local area network attribute is different, and the corresponding virtual local area network identifier list that is allowed to pass and the virtual local area network identification list of the packets that do not carry the virtual local area network label are different.
  • the virtual local area network attribute is the acce ss port
  • the corresponding virtual local area network identification list and the allowed virtual local area network identification list of the packets that do not carry the virtual local area network label are empty; when the virtual local area network attribute is the t runk port, The corresponding allowed virtual local area network identifier list is valid, and the port is connected.
  • the virtual local area network identifier in the virtual local area network identifier list is allowed to pass, and the virtual local area network identification list of the packet that does not carry the virtual local area network label is allowed to be empty; when the virtual local area network attribute is hybr When the id port is used, the corresponding virtual local area network identifier list and the virtual local area network identifier list of the packets that do not carry the virtual local area network label are allowed to pass, and the port is allowed to carry the virtual local area network when receiving and sending the message.
  • the virtual local area network identifier in the identification list is passed, and the virtual local area network identifier carried in the 4 ⁇ text is in the allowed virtual local area network identification list, and is not allowed in the port.
  • the packet can carry the virtual local area network label for transmission when the virtual local area network identifier list of the packet carrying the virtual local area network label is not received.
  • the corresponding allowed virtual local area network identifier list includes a corresponding default virtual local area network identifier.
  • the virtual LAN attribute of the physical port is set to t runk port or hybr i d port.
  • it can also be acce s s port, which is not limited here.
  • the physical network card determines, according to whether the packet carries a virtual local area network identifier, a target virtual local area network identifier from the designated virtual local area network identifier.
  • the physical network card sends the message to a target virtual office or network corresponding to the target virtual local area network identifier.
  • the physical network card receives the packet by using the target virtual local area network.
  • the physical network card from the physical port 1 obtains the packet according to the physical port 1 as shown in FIG. 6, FIG. 7 and FIG. Port ID 1 is used to find the configuration information corresponding to the port identifier 1.
  • the configuration information includes the specified virtual local area network identifier, where the specified virtual local area network identifier includes a default virtual local area network identifier of 1 and the allowed virtual local area network identifier list includes 1, 2, 3, and the configuration information further includes a virtual local area network attribute.
  • the virtual local area network identifier list of the packets that do not carry the virtual local area network label is empty.
  • the method includes the following steps: 601.
  • the physical network card determines whether the four-dimensional text carries a virtual local area network identifier.
  • the physical network card determines the default virtual local area network identifier corresponding to the port as the target virtual local area network identifier.
  • the packet header that does not carry the virtual local area network label includes the destination address (DMAC), the source address (SMAC), and the packet type (Ether-Type).
  • the packet type does not carry the identifier of the 8100.
  • the 8100 identifier indicates the location.
  • the message carries a virtual local area network label.
  • the physical network card finds that the corresponding virtual local area network attribute is a trunk port according to the port identifier 1 corresponding to the physical port 1 of the obtained port, and the default virtual local area network identifier is 1. Determining the virtual local area network 1 corresponding to the default virtual local area network identifier as the target virtual local area network, receiving the information by using the target virtual local area network, and writing the target virtual local area network identifier to the non-carrying virtual In the message of the LAN identifier. The default virtual local area network identifier is written into the file, and the destination address and source address are included in the header, and the 8100 type, priority (PRI), specification flag (CFI), and virtual are carried.
  • PRI priority
  • CFI specification flag
  • the local area network identifier where the destination address and the source address are both 6 bytes, the packet type carrying the 8100 is 1 byte, the priority is 3 bits (bits), the specification flag is lbit, and the virtual local area network identifier is 12 bits.
  • the provincial virtual local area network identifier is written in the 12-bit virtual local area network identifier.
  • the physical network card determines whether the virtual local area network identifier in the packet is in the allowed virtual local area network identifier list;
  • the physical network card determines the default virtual local area network identifier corresponding to the port as the target virtual local area network identifier.
  • the packet carries the virtual local area network label
  • the physical network card acquires the virtual local area network identifier in the virtual local area network label.
  • the physical port 1 pair The virtual local area network identifier list that is allowed to pass includes 1, 2, 3, and when the virtual local area network identifier carried by the message is 1, the corresponding port is corresponding to the allowed virtual local area network identifier list.
  • the default virtual local area network identifier 1 is determined as the target virtual local area network identifier, and the packet is received by the target virtual local area network corresponding to the target virtual local area network identifier.
  • the packet is discarded in the virtual local area network identifier list that is allowed to pass.
  • the virtual local area network attribute is a hybrid port
  • the allowed virtual local area network identification list includes 1, 2, 3, and the allowed non-transported virtual local area network label is allowed.
  • the virtual local area network identifier list adopted by the text is 1, 2, as shown in Figure 7, which specifically includes the following steps:
  • the physical network card determines whether the fourth file carries a virtual local area network identifier.
  • the physical network card determines the default virtual local area network identifier corresponding to the port as the target virtual local area network identifier.
  • the packet header that does not carry the virtual local area network label includes the destination address (DMAC), the source address (SMAC), and the packet type (Ether-Type).
  • the packet type does not carry the identifier of the 8100.
  • the 8100 identifier indicates the location.
  • the message carries a virtual local area network label.
  • the physical network card finds that the corresponding virtual local area network attribute is a hybrid port, and the default virtual local area network identifier is 1, according to the port identifier 1 corresponding to the physical port 1 of the obtained port.
  • the virtual local area network 1 corresponding to the default virtual local area network identifier is determined as the target virtual local area network, the packet is received by the target virtual local area network, and the target virtual local area network identifier is written into the non-carrying virtual local area network identifier.
  • the default virtual local area network identifier is written into the packet, and the packet header includes the destination address and the source address, and the packet type of the 8100 is carried.
  • Priority Priority
  • specification flag CF I
  • virtual local area network identifier where the destination address and source address are both 6 bytes, the packet type carrying 8100 is 1 byte, and the priority is 3b it (bit) ), the specification flag is lb it , the virtual local area network identifier is 12b it , and the default virtual local area network identifier is written in the virtual local area network identifier of 12b it.
  • the physical network card determines whether the virtual local area network identifier in the packet is in the allowed virtual local area network identifier list.
  • the physical network card determines the default virtual local area network identifier corresponding to the port as the target virtual local area network identifier.
  • the packet carries the virtual local area network label, and the virtual local area network identifier in the virtual local area network label is obtained.
  • the virtual local area network identifier list corresponding to the physical port 1 includes 1, 2, and 3, and when the virtual local area network identifier carried in the packet is 1, the virtual local area network identifier list is allowed to pass.
  • the default virtual office i or the network identifier 1 corresponding to the port is determined as the target virtual office i or the network identifier, and the target virtual local area network corresponding to the target virtual local area network identifier is received by the target virtual local area network.
  • the packet is discarded.
  • the configuration information corresponding to the physical port 1 is that the default virtual local area network identifier is 1 and the virtual local area network attribute is an acce ss port
  • the corresponding allowed virtual local area network identifier list and the allowed packets that do not carry the virtual local area network label are allowed to pass.
  • the virtual local area network identifier list is empty, as shown in Figure 8, which specifically includes the following steps:
  • the physical network card determines whether the fourth file carries a virtual local area network identifier.
  • the physical NIC determines the default virtual local area network identifier corresponding to the port as the target virtual local area network identifier. For the obtained packet header that does not carry the virtual LAN label, the destination address is included.
  • the 8100 identifier indicates that the packet carries the virtual local area network label.
  • the physical network card finds the corresponding virtual local area network attribute as the acce ss port according to the port identifier 1 corresponding to the physical port 1 of the obtained ⁇ ,, the default virtual office i or the network If the identifier is 1, the virtual local area network corresponding to the default virtual office i or the network identifier is determined as the target virtual local area network, the packet is received by the target virtual local area network, and the target virtual local area network identifier is written. The packet does not carry the virtual local area network identifier. The default virtual local area network identifier is written into the packet.
  • the packet header includes the destination address, the source address, the packet type carrying the 8100, the priority (PRI), the specification flag (CF I ), and the virtual local area network identifier.
  • the destination address and the source address are both 6 bytes
  • the packet type carrying 8100 is 1 byte
  • the priority is 3b it (bit)
  • the specification flag is lb it
  • the virtual local area network identifier is 12b it
  • the default virtual local area network identifier is written in the virtual local area network identifier of 12b it.
  • the physical network card determines whether the virtual local area network identifier in the text is the same as the default virtual local area network identifier corresponding to the port identifier, when the virtual local area network identifier is carried.
  • the packet carries the virtual local area network label, and the virtual local area network identifier in the virtual local area network label is obtained.
  • the default virtual local area network identifier corresponding to the physical port 1 is 1, and when the virtual local area network identifier carried by the fourth port is 1, the The virtual office i or the network identifier is the same as the default virtual office i or the network identifier corresponding to the port identifier, and the default virtual local area network identifier 1 corresponding to the port is determined as the target virtual local area network identifier, and the target virtual local area network identifier is determined by the target virtual area identifier.
  • a packet processing method is provided.
  • virtual local area network division and packet processing are implemented in a pass-through mode by using a physical network card, and the direct mode is The obtained packet does not need to be transferred by the virtual machine manager and directly forwarded by the physical network card.
  • the physical network card is connected to the physical port of the physical network card, and the external device is a switch, a router, another physical network card or other network device.
  • the physical network card is connected to the physical network card and the physical server.
  • a queue that is, the queue is a channel through which the network device interacts with the physical server, and each queue corresponds to a virtual machine on the physical server.
  • the process of entering and leaving the physical network card into four physical processes is divided into four processes, as shown in Figure 3, which are 1 packet processing from the uplink port (physical port) into the physical network card, and 2 from the lower link port (queue) to the physical network card. Packet processing, 3 processing from the lower joint port (queue) into the physical network card, 4 from the upper joint port (physical port) to the physical network card.
  • This implementation manner may be subsequent packet processing in the implementation manner shown in FIG. 4, that is, after the packet shown in FIG.
  • the physical network card sends the packet to the physical server, which is an example of the packet processing of the physical network card from the lower joint port (queue) in FIG.
  • the packet is determined by the destination address list in the physical network card.
  • the sent queue, and then the processing of sending the packet from the lower joint port, as shown in FIG. 9, the method includes:
  • the physical NIC receives, from the management device, configuration information corresponding to the port identifier that is preset.
  • the configuration information corresponding to the port identifier is preset by the management device having the management function, and is sent to the physical network card.
  • the configuration information of the upper and lower links is configured by the virtual machine manager, and sent to the physical Network card.
  • the virtual machine manager is connected to the physical network card, and configured to set and manage the physical network card.
  • the physical network card acquires a to-be-sent packet.
  • the packet to be sent from the physical network card carries a virtual local area network label, and the packet is a packet obtained from the downlink interface.
  • the physical network card searches for the configuration information corresponding to the port identifier according to the port identifier corresponding to the port that obtains the packet.
  • the configuration information may be in the form of a list. As shown in FIG. 5, the list includes a port identifier and configuration information corresponding to the port identifier, where the configuration information includes a specified virtual local area network identifier, and the specified virtual
  • the local area network identifier is a virtual local area network identifier that the port is allowed to pass, and the allowed virtual local area network identifier is a default virtual local area network identifier and a list of allowed virtual local area network identifiers.
  • the configuration information further includes a virtual local area network identifier, and a virtual local area network identifier list of the message that does not carry the virtual local area network label, and the virtual local area network identification list of the message that does not carry the virtual local area network label is allowed to be
  • the port of the virtual local area network identifier list that is allowed to pass, the port identifier is an identifier that is set for each queue of the physical network card in advance.
  • the default virtual local area network identifier ranges from 0 to 4095, and the default corresponding to the port can be set according to the range.
  • the virtual local area network identifier for example, has four queues of the physical network card, and the corresponding identifiers of the four queues may be set to 0, 1, 1, 3, and the default virtual local area network identifiers are 0, 1, 2, and 3.
  • the virtual local area network attributes are classified into three types: an access port, a trunk port, and a hybrid id port.
  • the access port can belong to only one virtual local area network, and is generally used for switches and end users.
  • the trunk port can belong to multiple virtual LANs. It can receive and send packets from multiple virtual LANs. It is generally used for connections between switches.
  • the hybrid port can belong to multiple virtual LANs and can receive and send multiple packets.
  • the packets of the virtual local area network are generally used for connecting between switches, and can also be used for connecting the user's computer, and the hybrid port can allow multiple virtual local area networks to transmit without carrying the virtual local area network label.
  • the virtual local area network attribute is different, and the corresponding virtual local area network identifier list that is allowed to pass and the virtual local area network identification list of the packets that do not carry the virtual local area network label are different.
  • the virtual local area network attribute is the access port
  • the corresponding virtual local area network identifier list and the allowed virtual local area network identifier list of the packets that do not carry the virtual local area network label are empty; when the virtual local area network attribute is a trunk port, the corresponding The virtual local area network identifier list that is allowed to pass is valid.
  • the port When the port receives and sends the message, the port is allowed to carry the virtual local area network identification message in the virtual local area network identifier list, and the allowed packet that does not carry the virtual local area network label is allowed to pass.
  • the virtual local area network identifier list is empty.
  • the corresponding allowed virtual local area network identifier list and the allowed virtual local area network identifier list of the packets that do not carry the virtual local area network label are valid, and the port is receiving.
  • the packet is sent, the virtual local area network identifier in the virtual local area network identifier list is allowed to pass, and the virtual local area network identifier carried in the 4 ⁇ text is allowed in the port when the port sends the message.
  • Virtual office Network identifier list does not allow the packets carrying no VLAN tag virtual local area network identifier list when the packets can carry a virtual LAN tags to transmit.
  • the corresponding allowed virtual local area network identifier list includes a corresponding default virtual local area network identifier.
  • the virtual LAN property of the queue is set to the access port, of course It can be a t runk port or a hyb rid port, which is not limited here.
  • the physical network card determines, according to whether the packet carries a virtual local area network identifier, a target virtual local area network identifier from the specified virtual local area network identifier.
  • the following takes the physical network card from the queue 1 as an example, as shown in FIG. 10, FIG. 1 1 and FIG. 12, as an example, when the queue 1 obtains the packet, according to the queue Port ID 1 of 1 searches for the configuration information corresponding to port ID 1.
  • the configuration information includes the specified virtual local area network identifier, where the specified virtual local area network identifier includes a default virtual local area network identifier of 1 and a virtual local area network identifier list that is allowed to pass, and the configuration information further includes a virtual local area network attribute of an ac ce ss port.
  • a virtual local area network identifier list of the packets that do not carry the virtual local area network label, and the list of the virtual local area network identifiers that are allowed to pass through and the virtual local area network identification list of the packets that do not carry the virtual local area network label are allowed to be empty, such as As shown in FIG. 10, the method includes the following steps: The default virtual local area network identifier corresponding to the port identifier is the same;
  • the physical network card determines the virtual local area network identifier in the information as the target virtual local area network identifier. .
  • the virtual local area network identifier in the message is the target virtual local area network identifier, the virtual local area network label carried in the packet is deleted, and the message is sent through the target virtual local area network.
  • the virtual local area network identifier in the four-dimensional text Comparing, by the physical network card, the virtual local area network identifier in the four-dimensional text with the default virtual local area network identifier corresponding to the port identifier, where the default virtual number corresponding to the queue 1 is The pseudo-local area network identifier is 1 and the virtual local area network identifier in the text is the same as the default virtual local area network identifier corresponding to the queue 1 when the virtual local area network identifier is 1 in the text, and the virtual local area network label is deleted.
  • the packet is sent to the physical server through the queue 1; when the virtual local area network identifier of the packet is 2, the virtual local area network identifier in the packet is different from the default virtual local area network identifier corresponding to the queue 1
  • the 4 files are discarded and are not sent to the physical server.
  • the allowed virtual local area network identifier list includes 1, 2, 3, and the virtual packets that are allowed to pass without carrying the virtual local area network label are virtual.
  • the method includes the following steps: The default virtual local area network identifier corresponding to the port identifier is the same.
  • the default virtual office corresponding to the port identifier of the virtual local area network identifier is the target virtual local area network identifier.
  • the physical network card deletes the virtual local area network label carried in the packet. And sent to the physical server through queue 1.
  • the virtual local area network identifier When the virtual local area network identifier is 2, the virtual local area network identifier and the default virtual local area network identifier corresponding to the queue 1 are different, and it is determined whether the virtual local area network identifier is allowed to pass in the queue 1
  • the physical network card determines the default virtual local area network identifier corresponding to the port as the target virtual local area network identifier.
  • the virtual local area network identifier When the virtual local area network identifier is 0, the virtual local area network identifier is different from the default virtual local area network identifier corresponding to the queue 1, but it is determined that the virtual local area network identifier is allowed to pass through the queue 1
  • the physical network card determines the default virtual local area network identifier corresponding to the port as the target virtual local area network identifier, and retains the virtual local area network label in the packet, and sends the packet Go to the target virtual local area network, and send the message to the physical server through the target virtual local area network.
  • the allowed virtual local area network identifier list includes 1, 2, 3, and the allowed virtual packets of the virtual local area network label are not allowed to pass.
  • the local area network identifier list is 1, 2, as shown in FIG. 12, and specifically includes the following steps: The virtual network local area identifier list corresponding to the port identifier is allowed to pass;
  • the physical network card determines the default virtual local area network identifier corresponding to the port as the target virtual local area network identifier. And the subsequent processing of the 4 ⁇ text.
  • the virtual local area network identifier When the virtual local area network identifier is 3, the virtual local area network identifier is in the virtual local area network identifier list corresponding to the queue 1 corresponding to the queue 1 After the virtual local area network identifier is 0, the virtual local area network identifier is not in the allowed virtual local area network identifier list corresponding to the queue 1, and the packet is discarded.
  • step 1 2 02 according to the settings in the virtual local area network identifier list of the packets that do not carry the virtual local area network label that are allowed to pass through the queue 1, the subsequent processing of the message is as follows:
  • a determining whether the virtual local area network identifier in the four-dimensional text is in the virtual local area network identifier list of the packet that does not carry the virtual local area network label corresponding to the port identifier; b. when the virtual local area network identifier is in the port And deleting the packet when the corresponding virtual network identifier list of the packet that does not carry the virtual local area network label is allowed to pass;
  • the virtual local area network identifier When the virtual local area network identifier is 2, the virtual local area network identifies the virtual office that is allowed to pass the packet that does not carry the virtual local area network label corresponding to the queue 1 and sends the virtual office to the physical server; When the virtual local area network identifier in the packet is 3, the virtual local area network identifier is not in the virtual local area network identifier list that passes the packet that does not carry the virtual local area network label corresponding to the queue 1 The message is sent to the physical server through queue 1.
  • the processing of the packet sent from the uplink interface to the physical NIC is similar to the processing of sending the packet from the lower interface as described in FIG. 9 to FIG. Narration.
  • a packet processing method is provided In the network virtualization scenario, the virtual LAN segmentation and packet processing are implemented in the pass-through mode by the physical network card.
  • the pass-through mode is a mode in which the obtained packet does not need to be transferred by the virtual machine manager and directly forwarded by the physical network card.
  • the physical network card is connected to the physical port of the physical network card, and the external device is a switch, a router, another physical network card or other network device.
  • the physical network card is connected to the physical network card and the physical server.
  • a queue that is, the queue is a channel through which the network device interacts with the physical server, and each queue corresponds to a virtual machine on the physical server.
  • the process of entering and leaving the physical network card into four physical processes is divided into four processes, as shown in Figure 3, which are 1 packet processing from the uplink port (physical port) into the physical network card, and 2 from the lower link port (queue) to the physical network card. Packet processing, 3 processing from the lower joint port (queue) into the physical network card, 4 from the upper joint port (physical port) to the physical network card.
  • the packet processing is performed on the physical network card from the uplink port (physical port) after the physical network card performs other processing.
  • the processing of the physical network card from the lower joint port (queue) it is similar to the processing of the packet from the upper joint port (physical port) to the physical network card as shown in Figure 4-8.
  • the packet processing of the physical NIC is similar to the processing of the physical NIC from the lower port (queue) shown in Figure 9-12.
  • the physical network cards including the physical network card from the uplink port (physical port) and the physical network card from the lower port (queue), it can be regarded as 4 from the peer device to the physical network card.
  • the implementation manner is that the packet is received from the downlink interface, and then the packet is sent from the uplink port, and the packet is received from the uplink port as described in FIG. 4-8 and FIG.
  • the processing of sending packets on the interface is similar, and is not mentioned here.
  • the embodiment of the present invention is not limited to a physical network card, and may be any network device capable of realizing virtual local area network division and processing.
  • the embodiments of the present invention can be applied to VEB (V i ua l E therne t Br i dge, virtual Ethernet bridge) and VEPA (V ir tua l
  • VEB V i ua l E therne t Br i dge, virtual Ethernet bridge
  • VEPA V ir tua l
  • the virtual machine 1 first sends a message to the physical network card, The physical network card sends the message to the virtual machine 2, that is, the VEB function is implemented; for the VEPA standard, after the physical network card receives the message sent by the virtual machine 1, the physical network card will The packet is sent to the external device connected to the physical network card, and is processed by the external device, and then returned to the physical network card.
  • the virtual local area network is divided in the network virtualization scenario, and the network is improved.
  • the security of management also encapsulates the configuration of virtual machine users, and at the same time realizes virtual LAN acceleration under the physical network card, improving network performance.
  • Example 2
  • the embodiment of the present invention provides a network device 13, as shown in FIG. 13, which includes an obtaining unit 131, a searching unit 132, a first processing unit 133, and a sending unit 134.
  • the obtaining unit 131 is configured to acquire a packet.
  • the searching unit 132 is configured to search for configuration information corresponding to the port identifier according to the port identifier corresponding to the port of the packet that is obtained by the acquiring unit, where the configuration information includes a specified virtual local area network identifier, and the specified virtual local area network identifier A virtual local area network identifier that is allowed to pass through for the port.
  • the first processing unit 133 is configured to determine, according to whether the packet carries a virtual local area network identifier, the target virtual local area network identifier from the specified virtual local area network identifier found by the searching unit;
  • the sending unit 134 is configured to send the packet to the target virtual office i or the target virtual office i or the network corresponding to the network identifier determined by the processing unit.
  • the packet is sent to the target virtual local area network corresponding to the target virtual local area network identifier, and the packet is forwarded by the target virtual local area network.
  • the network device provided by the embodiment of the present invention obtains the configuration information corresponding to the port identifier according to the port identifier corresponding to the port that obtains the port, and then according to whether the packet carries the virtual The local area network identifier is determined, and the target virtual local area network identifier is determined from the specified virtual local area network identifier in the configuration information, and the information is sent to the target virtual local area network corresponding to the target virtual local area network identifier.
  • the embodiment of the present invention solves the problem that all the packets need to be transferred by the virtual machine manager and the network performance is not high when the virtual local area network is divided and the packet processing is performed by using the front-end mode in the prior art, and the security and network performance are improved. .
  • the port is obtained by using a port in the network device, and the port is an uplink port or a downlink port, where the uplink port is a physical port connected to the external device, and the downlink port is the network device and the physical port.
  • a queue to which the server is connected that is, the queue is a channel through which the network device interacts with the physical server, and each queue corresponds to a virtual machine on the physical server, and the packet passes through the uplink port.
  • the configuration information may be configured in the form of a list, for example, including a port identifier in the list, and configuration information corresponding to the port identifier, including a specified virtual local area network identifier, where the specified virtual local area network identifier includes a default virtual local area network. Identification, and a list of virtual local area network IDs that are allowed to pass.
  • the configuration information further includes a virtual local area network attribute.
  • the virtual local area network attributes are classified into three categories: an acce ss port, a t runk port, and a hybrid id port.
  • the virtual local area network attribute included in the configuration information is any one of an acce ss port, a t runk port, or a hybrid id port.
  • the acce ss port can only belong to one virtual local area network, and is generally used for the connection between the switch and the end user.
  • the t runk port can belong to multiple virtual local area networks, and can receive and send multiple virtual local area network (LAN) packets, which are generally used for Connection between switches; hybr id
  • a port can belong to multiple virtual local area networks, can receive and send multiple virtual local area network messages, generally used for connection between switches, and can also be used to connect users' computers, and the hybrid id port can allow multiple virtual local area networks.
  • the virtual local area network label is not carried when the text is sent.
  • the port identifier is an identifier that is set for each port of the physical NIC in advance.
  • the default virtual local area network identifier ranges from 0 to 4095.
  • the default virtual local area network identifier corresponding to the port can be set according to the range, for example, the physical There are four physical ports on the NIC. You can set the corresponding port IDs to 0, 1, 1, and 3 for the four physical ports in sequence.
  • the default virtual LAN IDs are 0, 1, 2, and 3.
  • the virtual local area network attributes are different, and the corresponding virtual local area network identifier list that is allowed to pass and the virtual office i or network identification list that allows the passed packets that do not carry the virtual local area network label are also different.
  • the virtual office i or network attribute is an acce ss port
  • the corresponding allowed virtual local area network identifier list and the allowed virtual local area network identifier list of the packets that do not carry the virtual local area network label are empty; when the virtual local area network attribute is t runk
  • the corresponding virtual local area network identifier list is allowed to pass, and the port is allowed to carry the virtual local area network identification message in the virtual local area network identifier list when the port receives and sends the message, and the allowed non-carrying virtual local area network is allowed to pass.
  • the virtual local area network identifier list of the packet is empty.
  • the corresponding allowed virtual local area network identifier list and the allowed virtual local area network identifier list of the packets that do not carry the virtual local area network label are valid.
  • the port receives and sends a message
  • the port is allowed to carry the virtual local area network identifier in the virtual local area network identifier list, and the port only transmits the virtual data carried in the 4th text.
  • the local area network identifier is in the allowed virtual local area network identifier
  • the packet can carry the virtual local area network label for sending.
  • the corresponding allowed virtual local area network identifier list includes a corresponding default virtual local area network identifier.
  • the virtual LAN attribute of the physical port is set to t runk port or hybrid id port. Of course, it can also be acc ss port.
  • the virtual LAN attribute of the queue is set to acce ss port. Of course, it can also be t runk port or hybrid id port. , there is no limit here.
  • the network device further includes a receiving unit 1 35, configured to receive, from the management device, preset configuration information corresponding to the port identifier.
  • the configuration information corresponding to the port identifier is preset by the management device having the management function, and is sent to the physical network card, where the method can be sent once and supports the processing method of receiving the message, or can be modified.
  • the configuration information is sent, the updated configuration information is sent to the network device, and is not limited herein.
  • the network device receives the configuration information.
  • the configuration information of the upper and lower interfaces is configured by the virtual machine manager and sent to the physical network card.
  • the virtual machine manager is connected to the physical network card, and configured to set and manage the physical network card.
  • the first processing unit 1 33 includes:
  • the first determining module 151 is configured to determine whether the packet carries a virtual local area network identifier.
  • the first processing module 152 is configured to: when the first determining module determines that the packet does not carry a virtual local area network identifier, the port is Corresponding default virtual local area network identifier is determined as the target virtual local area network identifier, and the default virtual local area network identifier is in the designated virtual local area network identifier;
  • the packet header that does not carry the virtual local area network label includes the destination address (DMAC), the source address (SMAC), and the packet type (E ther-Type), and the packet type does not carry the identifier of the 8100.
  • the 8100 identifier indicates The message carries a virtual local area network label.
  • the packet header of the packet includes the packet type of the 8100
  • the packet carries the virtual local area network label, and the virtual office ID or the network identifier in the virtual local area network label is obtained.
  • the second determining module 153 is configured to: when the first determining module determines that the packet is carried When the virtual local area network identifier is used, it is determined whether the virtual local area network identifier in the four-dimensional text is in the specified virtual local area network identifier;
  • the second processing module 154 is configured to: when the second determining module determines that the virtual local area network identifier in the packet is in the specified virtual local area network identifier, determine a default virtual local area network identifier corresponding to the port as the Target virtual local area network identifier.
  • the network device when the packet is a packet to be received, the network device further includes:
  • the second processing unit 161 is configured to receive the packet by using the target virtual local area network, and write the target virtual local area network identifier into the packet that does not carry the virtual local area network identifier.
  • the default virtual local area network identifier is written into the packet.
  • the packet header includes the destination address, the source address, the packet type of the 8100, the priority (PRI), the specification flag (CFI), and the virtual local area network identifier.
  • the destination address and the source address are both 6 bytes.
  • the packet type carrying 8100 is 2 bytes, the priority is 3 bits (bits), the specification flag is lbit, and the virtual office i or network identifier is 12 bits.
  • the provincial virtual office i or network identifier is written in the 12-bit virtual local area network identifier.
  • the physical network card then performs subsequent processing in the prior art on the modified message.
  • the network device when the packet is a packet to be sent, the network device further includes:
  • the third processing unit 171 is configured to delete, when the virtual local area network identifier carried by the fourth file is the same as the default virtual local area network identifier corresponding to the port, delete the virtualized network device 13 in the foregoing embodiment. It is not limited to a physical NIC in a virtualization scenario, and may be any network device capable of realizing virtual LAN division and packet processing.
  • the embodiment of the present invention can be applied to a VEB (Virtual Ethernet Bridge) and VEPA (Virtual Ethernet Port Aggregator) standard, for example, when the virtual machine 1 on the physical server To be virtual
  • VEB Virtual Ethernet Bridge
  • VEPA Virtual Ethernet Port Aggregator
  • the virtual machine 1 first sends a message to the physical network card, and the physical network card sends the message to the virtual machine 2, that is, the VEB function is implemented; for the VEPA standard, when the physical After receiving the packet sent by the virtual machine 1, the physical network card sends the packet to an external device connected to the physical network card, and is processed by the external device, and then returned to the physical network card, and then The physical network card sends the processed packet to the virtual machine 2.
  • VEB Virtual Ethernet Bridge
  • VEPA Virtual Ethernet Port Aggregator
  • the embodiment of the invention realizes the virtual local area network division by using the through mode in the network virtualization scenario, improves the security of the network management, and also configures the configuration of the virtual machine user, and realizes the virtual local area network acceleration under the physical network card, thereby improving Network performance.
  • Example 3
  • the embodiment of the present invention provides a network device 1 8 , as shown in FIG. 18 , including a memory 1 8 1 and a processor 1 8 2 .
  • the memory 1 8 1 is configured to store the instruction, the obtained packet, and the configuration information corresponding to the port identifier;
  • the processor 1 82 is configured to execute the instruction in the memory 18 1 , and specifically:
  • Gen data acquisition corresponding to the 4-port port identifier Gen packets, searching the port identifier corresponding to the configuration information, the configuration information includes a specified virtual local area network identifier, the designated virtual local area network identifier is allowed to pass through the port Virtual local area network identifier;
  • the network device obtains the configuration information corresponding to the port identifier by acquiring the packet and obtaining the port identifier corresponding to the port corresponding to the port. Then, according to whether the packet carries the virtual local area network identifier, the target virtual local area network identifier is determined from the specified virtual local area network identifier in the configuration information, and the message is sent to the target virtual local area network corresponding to the target virtual local area network identifier.
  • the embodiment of the present invention solves the problem that all the packets need to be transferred by the virtual machine manager and the network performance is not high when the virtual local area network is divided and the packet processing is performed by using the front-end mode in the prior art, and the security and network performance are improved. .
  • the packets entering the network device including the network device from the uplink port (physical port) and the network device from the downlink port (queue)
  • outgoing network devices including the network device from the uplink port (physical port) and the network device from the downlink port (queue)
  • the external device is a switch, a router, or another physical network card.
  • the configuration information may be configured in the form of a list, for example, including a port identifier in the list, and configuration information corresponding to the port identifier, including a specified virtual local area network identifier, where the specified virtual local area network identifier includes a default virtual local area network. Identification, and a list of virtual local area network IDs that are allowed to pass.
  • the configuration information further includes a virtual local area network attribute.
  • the virtual local area network attributes are classified into three categories: an acce ss port, a t runk port, and a hybrid id port.
  • the virtual local area network attribute included in the configuration information is any one of an acce ss port, a t runk port, or a hybrid id port.
  • the acce ss port can only belong to one virtual local area network, and is generally used for the connection between the switch and the end user.
  • the t runk port can belong to multiple virtual local area networks, and can receive and send multiple virtual local area network (LAN) packets, which are generally used for The connection between the switches;
  • the hybr id port can belong to multiple virtual local area networks, can receive and send multiple virtual local area network messages, generally used for connection between switches, can also be used to connect users' computers, and hybrid id ports It is possible to allow multiple virtual local area networks to transmit without carrying a virtual local area network label.
  • the packet is sent to the target virtual local area network corresponding to the target virtual local area network identifier, and the packet is forwarded by the target virtual local area network.
  • the port identifier is an identifier that is set for each port of the physical NIC in advance.
  • the default virtual local area network identifier ranges from 0 to 4095.
  • the default virtual local area network identifier corresponding to the port can be set according to the range, for example, the physical There are four physical ports on the NIC. You can set the corresponding port IDs to 0, 1, 1, and 3 for the four physical ports in sequence.
  • the default virtual LAN IDs are 0, 1, 2, and 3.
  • the virtual local area network attributes are different, and the corresponding virtual local area network identifier list that is allowed to pass and the virtual office i or network identification list that allows the passed packets that do not carry the virtual local area network label are also different.
  • the virtual office i or network attribute is an acce ss port
  • the corresponding allowed virtual local area network identifier list and the allowed virtual local area network identifier list of the packets that do not carry the virtual local area network label are empty; when the virtual local area network attribute is t runk
  • the corresponding virtual local area network identifier list is allowed to pass, and the port is allowed to carry the virtual local area network identification message in the virtual local area network identifier list when the port receives and sends the message, and the allowed non-carrying virtual local area network is allowed to pass.
  • the virtual local area network identifier list of the packet is empty.
  • the corresponding allowed virtual local area network identifier list and the allowed virtual local area network identifier list of the packets that do not carry the virtual local area network label are valid.
  • the port receives and sends a message
  • the port is allowed to carry the virtual local area network identifier in the virtual local area network identifier list
  • the port is configured to send a message
  • only the virtual local area network identifier carried in the message is in the allowed virtual local area network identifier list, and is not in the virtual local area network identifier of the packet that does not carry the virtual local area network label.
  • the packet can carry the virtual local area network label for sending.
  • the corresponding allowed virtual local area network identifier list includes a corresponding default virtual local area network identifier.
  • the virtual LAN attribute of the physical port is set to t runk port or hybrid id port. Of course, it can also be acc ss port.
  • the virtual LAN attribute of the queue is set to acce ss port. Of course, it can also be t runk port or hybrid id port. , there is no limit here.
  • the processor 182 is further configured to: receive, from the management device, preset configuration information corresponding to the port identifier.
  • the configuration information corresponding to the port identifier is preset by the management device having the management function, and is sent to the physical network card, where the method can be sent once and supports the processing method of receiving the message, or can be modified.
  • the configuration information is sent, the updated configuration information is sent to the network device, and is not limited herein.
  • the network device receives the configuration information.
  • the configuration information of the upper and lower interfaces is configured by the virtual machine manager and sent to the physical network card.
  • the virtual machine manager is connected to the physical network card, and configured to set and manage the physical network card.
  • the processor 182 is further configured to:
  • the default virtual local area network identifier corresponding to the port is determined as the target virtual local area network identifier, and the default virtual local area network identifier is in the specified virtual local area network identifier.
  • the packet header that does not carry the virtual local area network label includes the destination address (DMAC), the source address (SMAC), and the packet type (E ther-Type), and the packet type does not carry the identifier of the 8100.
  • the 8100 identifier indicates The message carries a virtual local area network Label.
  • the packet header of the received packet includes the packet type of the 8100, the packet carries the virtual local area network label, and the virtual office i or the network identifier in the virtual local area network label is obtained.
  • the packet When the packet carries the virtual local area network identifier, it is determined whether the virtual local area network identifier in the packet is in the specified virtual local area network identifier;
  • the default virtual local area network identifier corresponding to the port is determined as the target virtual local area network identifier.
  • the message is discarded.
  • the processor 182 is further configured to:
  • the packet is received by the target virtual local area network, and the target virtual local area network identifier is written into the packet that does not carry the virtual local area network identifier.
  • the default virtual local area network identifier is written into the packet.
  • the packet header includes the destination address, the source address, the packet type of the 8100, the priority (PRI), the specification flag (CFI), and the virtual local area network identifier.
  • the destination address and the source address are both 6 bytes.
  • the packet type carrying 8100 is 2 bytes, the priority is 3 bits (bits), the specification flag is lbit, and the virtual office i or network identifier is 12 bits.
  • the provincial virtual office i or network identifier is written in the 12-bit virtual local area network identifier.
  • the physical network card then performs subsequent processing in the prior art on the modified message.
  • the processor 182 is further configured to:
  • the processor is further configured to execute: When the virtual local area network identifier is in the virtual local area network identifier list corresponding to the port identifier of the default virtual local area network corresponding to the port identifier;
  • the physical network card determines the default virtual local area network identifier corresponding to the port as the target virtual local area network identifier.
  • the message is discarded.
  • the processor is further executed according to the permission:
  • the network device 18 in the above embodiment is not limited to the physical network in the virtualization scenario.
  • the embodiment can be applied to VEB (Virtual Ethernet Bridge) and VEPA.
  • the virtual machine 1 on the physical server when the virtual machine 1 on the physical server is to communicate with the virtual machine 2, the virtual machine 1 first sends a message to the physical network card. Sending, by the physical network card, the packet to the virtual machine 2, that is, implementing the VEB function; For the VEPA standard, after the physical network card receives the packet sent by the virtual machine 1, the physical network card sends the packet to an external device connected to the physical network card, and is processed by the external device. Machine 2.
  • the embodiment of the invention realizes the virtual local area network division by using the through mode in the network virtualization scenario, improves the security of the network management, and also configures the configuration of the virtual machine user, and realizes the virtual local area network acceleration under the physical network card, thereby improving Network performance.
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the modules or units is only a logical function division.
  • there may be another division manner for example, multiple units or components may be used. Combined or can be integrated into another system, or some features can be ignored, or not executed.
  • the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be electrical, mechanical or otherwise.
  • the components displayed as the unit may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units.
  • the purpose of the embodiment of the present embodiment can be achieved by selecting some or all of the units according to actual needs.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or 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. It can also be implemented 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. Based on such understanding, the technical solution of the present invention may contribute 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.
  • the instructions include a plurality of instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (pr o ss or ) to perform all or part of the steps of the methods of the various embodiments of the present invention.
  • the foregoing storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Acce ss Memory), a magnetic disk or an optical disk, and the like, which can store program codes. Medium.

Landscapes

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

Abstract

L'invention concerne un procédé et un dispositif de traitement de messages, qui concernent le domaine technique des réseaux, et qui permettent de résoudre les problèmes survenant lorsqu'une division de réseau local virtuel et qu'un traitement de messages sont exécutés à l'aide de nœuds d'extrémité avant-arrière dans l'état antérieur de la technique, tous les messages doivent être transférés par un gestionnaire de machine virtuelle, et la performance réseau n'est pas élevée. Un dispositif réseau acquiert un message. Selon un identifiant de port correspondant au port au niveau duquel le message est acquis, des informations de configuration correspondant à l'identifiant de port sont recherchées. Si le message contient un identifiant de réseau local virtuel, un identifiant de réseau local virtuel cible est déterminé à partir de l'identifiant de réseau local virtuel désigné. Le message est envoyé à un réseau local virtuel cible correspondant à l'identifiant de réseau local virtuel cible. Les modes de réalisation de la présente invention sont utilisés dans un procédé de division de réseau local virtuel et de traitement de messages.
PCT/CN2013/079571 2012-12-20 2013-07-18 Procédé et dispositif de traitement de messages Ceased WO2014094420A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210556852.XA CN103051529B (zh) 2012-12-20 2012-12-20 一种报文的处理方法和装置
CN201210556852.X 2012-12-20

Publications (1)

Publication Number Publication Date
WO2014094420A1 true WO2014094420A1 (fr) 2014-06-26

Family

ID=48064034

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/079571 Ceased WO2014094420A1 (fr) 2012-12-20 2013-07-18 Procédé et dispositif de traitement de messages

Country Status (2)

Country Link
CN (1) CN103051529B (fr)
WO (1) WO2014094420A1 (fr)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103051529B (zh) * 2012-12-20 2016-03-30 华为技术有限公司 一种报文的处理方法和装置
CN104683428B (zh) 2013-11-26 2019-02-19 华为技术有限公司 网络业务处理方法与装置
CN105227499B (zh) * 2014-07-03 2019-01-18 新华三技术有限公司 虚拟边缘端口汇聚器控制方法及vepa控制器
CN106712988B (zh) 2015-08-25 2019-11-12 新华三技术有限公司 一种虚拟网络管理方法及装置
SG11201800101YA (en) 2016-11-09 2018-06-28 Huawei Tech Co Ltd Packet processing method in cloud computing system, host, and system
WO2018086014A1 (fr) 2016-11-09 2018-05-17 华为技术有限公司 Procédé de traitement de paquets dans un système informatique en nuage, hôte, et système
CN107483538B (zh) * 2017-07-06 2021-01-01 聚好看科技股份有限公司 一种在微服务集群的节点上处理访问请求包的方法和装置
CN109462535A (zh) * 2018-10-23 2019-03-12 新华三技术有限公司合肥分公司 一种报文处理方法及装置
CN113285877B (zh) * 2020-02-20 2024-09-06 华为技术有限公司 一种报文转发的控制方法及相关装置
CN114268519A (zh) * 2021-12-27 2022-04-01 成都康特软件科技开发有限公司 网络通信系统、数据传输方法及可读存储介质
CN117579712B (zh) * 2023-11-30 2024-08-16 深圳市皖通邮电科技有限公司 报文处理方法、装置及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101119276A (zh) * 2007-08-22 2008-02-06 杭州华三通信技术有限公司 一种实现vlan内下行用户隔离的方法及设备
US20100232412A1 (en) * 1999-05-13 2010-09-16 Broadcom Corporation Mobile virtual lan
CN101917298A (zh) * 2010-09-02 2010-12-15 杭州华三通信技术有限公司 一种基于vlan的环路监测方法和设备
CN103051529A (zh) * 2012-12-20 2013-04-17 华为技术有限公司 一种报文的处理方法和装置

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8670450B2 (en) * 2011-05-13 2014-03-11 International Business Machines Corporation Efficient software-based private VLAN solution for distributed virtual switches

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100232412A1 (en) * 1999-05-13 2010-09-16 Broadcom Corporation Mobile virtual lan
CN101119276A (zh) * 2007-08-22 2008-02-06 杭州华三通信技术有限公司 一种实现vlan内下行用户隔离的方法及设备
CN101917298A (zh) * 2010-09-02 2010-12-15 杭州华三通信技术有限公司 一种基于vlan的环路监测方法和设备
CN103051529A (zh) * 2012-12-20 2013-04-17 华为技术有限公司 一种报文的处理方法和装置

Also Published As

Publication number Publication date
CN103051529A (zh) 2013-04-17
CN103051529B (zh) 2016-03-30

Similar Documents

Publication Publication Date Title
WO2014094420A1 (fr) Procédé et dispositif de traitement de messages
US11463279B2 (en) Method and apparatus for implementing a flexible virtual local area network
US8670450B2 (en) Efficient software-based private VLAN solution for distributed virtual switches
US8660124B2 (en) Distributed overlay network data traffic management by a virtual server
US9565033B2 (en) Multicast processing method, apparatus and system
CN103404084B (zh) Mac地址强制转发装置及方法
US8837476B2 (en) Overlay network capable of supporting storage area network (SAN) traffic
US10686733B2 (en) System and method for virtual machine address association
CN103795602B (zh) 虚拟网络的网络策略配置方法及装置
US20140230044A1 (en) Method and Related Apparatus for Authenticating Access of Virtual Private Cloud
US20150271067A1 (en) Packet forwarding method and apparatus, and data center network
WO2015149253A1 (fr) Système de centre de données et procédé de gestion de réseau virtuel d'un centre de données
EP3461072A1 (fr) Contrôle d'accès
WO2018028606A1 (fr) Configuration de politique de transfert
CN105207873A (zh) 一种报文处理方法和装置
CN104243608B (zh) 一种通信方法、云管理服务器及虚拟交换机
CN106375176A (zh) 一种物理机接入云平台的方法
WO2014134919A1 (fr) Procédé pour une communication entre serveurs dans un même preneur, et dispositif de réseau
CN112583655B (zh) 数据传输方法、装置、电子设备及可读存储介质
CN103023779B (zh) 一种数据报文处理方法及装置
WO2015149343A1 (fr) Procédé de traitement de message dans un réseau, équipement de transfert de message dans un réseau et système de traitement de message dans un réseau
CN110768884A (zh) Vxlan报文封装及策略执行方法、设备、系统
CN103563304B (zh) 基于虚拟组网的交换机配置方法及集群管理设备
WO2018171722A1 (fr) Synchronisation d'adresse mac
CN105656744B (zh) 服务链路径的标识方法、设备和服务链

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13866106

Country of ref document: EP

Kind code of ref document: A1