BACKGROUND OF THE INVENTION

Field of the Invention

Various embodiments of the present invention generally relate to a Virtual Local Area Network (VLAN), and in particular, to a Layer 2 (L2) Virtual Ethernet over an underlying Layer 3 (L3) IP network.

Description of the Related Art

VLAN is widely used in traditional customer private networks. VLAN is a widely used mechanism to handle and implement isolation and connectivity. Broadcasting can be performed within VLANs, while machines/Virtual Machines (VMs) belonging to different VLANs cannot communicate with each other. Traffic among switches can carry VLAN tags to implement connections between members in the same VLAN but connected to different switches.

As application environments of VLAN are expanding, conventional VLAN implementations (such as IEEE 802.1Q, etc.) face various challenges. When the configuration structure and application scenario of a VLAN change, for example, when customers migrate their VLANs into a Data Center Network (DCN), many requirements are imposed on VLAN implementations. These requirements are needed to guarantee the security, robustness and scalability of a VLAN. Furthermore, devices and apparatuses in a VLAN are also required to keep working in the same way as they usually do in their private network.

On the other hand, in a multi-tenant environment, each tenant needs to define its own VLAN, and since both physical nodes and VM instances are increasing, the number of VLANs is also increasing rapidly. Identifiers currently available for VLANs (VLAN IDs) can be insufficient. In a modern data center, at any moment quite a few VMs can be in a migration state and VM migration across the VLAN boundary needs many configuration changes in switches. Due to the deployment of multi-platform applications from numerous tenants, isolation and connectivity are key factors to be considered, because isolation ensures the security, robustness and scalability, while connectivity ensures the dynamic resource allocation and scheduling. However, current deployment schemes and technical applications for VLANs cannot satisfy the abovementioned requirements, and accordingly, are unable to provide desired services to more users in a larger-scale network environment.

SUMMARY OF THE INVENTION

In view of the above reasons, the present invention proposes a solution for implementing a flexible virtual local area network, aiming to overcome at least one of problems existing in the prior arts.

According to a first aspect of the present invention, a method for implementing a VLAN is provided, the method comprising: determining a global VLAN for transmitting a data frame, in response to receiving the data frame at a first switch, wherein the data frame is from one of one or more first local VLANs served by the first switch; encapsulating the data frame based at least in part on the determination of the global VLAN; and transmitting the encapsulated data frame over the global VLAN for sending the data frame to at least one second switch, wherein the second switch serves one or more second local VLANs.

According to a second aspect of the present invention, an apparatus for implementing a VLAN is provided, the apparatus comprising: a determining unit configured to determine a global VLAN for transmitting a data frame, in response to receiving the data frame at a first switch, wherein the data frame is from one of one or more first local VLANs served by the first switch; an encapsulating unit configured to encapsulate the data frame based at least in part on the determination of the global VLAN; and a transmitting unit configured to transmit the encapsulated data frame over the global VLAN for sending the data frame to at least one second switch, wherein the second switch serves one or more second local VLANs.

According to a third aspect of the present invention, a method for implementing a VLAN is provided, the method comprising: receiving a data frame transmitted over a global VLAN, wherein the data frame is from one of one or more first local VLANs served by a first switch; obtaining an identifier of the global VLAN according to the data frame; and determining, based at least in part on the identifier of the global VLAN, an identifier of one of one or more second local VLANs served by a second switch to send the de-capsulated data frame to the second local VLAN identified by the determined identifier.

According to a fourth aspect of the present invention, an apparatus for implementing a VLAN is provided, the apparatus comprising: a receiving unit configured to receive a data frame transmitted over a global VLAN, wherein the data frame is from one of one or more first local VLANs served by a first switch; an obtaining unit configured to obtain an identifier of the global VLAN according to the data frame; and a determining unit configured to determine, based at least in part on the identifier of the global VLAN, an identifier of one of one or more second local VLANs served by a second switch to send the de-capsulated data frame to the second local VLAN identified by the determined identifier.

According to a fifth aspect of the present invention, a method for configuring a VLAN is provided, the method comprising: determining, in response to detecting that a host enters into a first local VLAN served by a first switch, a global VLAN to which the host belongs, for transmitting a data frame from the host to at least one second switch over the global VLAN, wherein the second switch serves one or more second local VLANs; adding an address of the first switch into a directory server to correspond to an address of the host stored on the directory server; and creating a mapping record at the first switch if the host is the first host in the first local VLAN, which records correspondence relationship between an identifier of the first local VLAN and an identifier of the global VLAN.

According to a sixth aspect of the present invention, an apparatus for configuring a VLAN is provided, the apparatus comprising: a determining unit configured to determine, in response to detecting that a host enters into a first local VLAN served by a first switch, a global VLAN to which the host belongs, for transmitting a data frame from the host to at least one second switch over the global VLAN, wherein the second switch serves one or more second local VLANs; an adding unit configured to add an address of the first switch into a directory server to correspond to an address of the host stored on the directory server; and a creating unit configured to create a mapping record at the first switch if the host is the first host in the first local VLAN, which records correspondence relationship between an identifier of the first local VLAN and an identifier of the global VLAN.

With the method and apparatus provided by the present invention, good compatibility with existing VLAN standards or protocols (such as IEEE 802.1Q, etc.) can be achieved, and requirements for isolation and connectivity of a VLAN in an application environment with a multi-tenant and multi-site data center can be satisfied.

