The present invention relates to computer networks, particularly to private virtual local area networks (PVLAN), and more particularly, to a PVLAN switch and method of its connecting to a non-PVLAN device.
As known in the field of computer network, a single Layer Two (L2) network, may be partitioned into a plurality of broadcast domains which are isolated from each other, so that data frames may be transferred between them only via one or more routers. Such a domain is called a virtual local area network (VLAN). Currently the most common protocol for configuring a VLAN is IEEE 802.1Q, according to which each Ethernet frame is added with a VLAN tag, which includes the identification (ID) of the VLAN to which the frame belongs, so that devices such as switches may determine the VLAN to which the frame belongs according to the VLAN ID.
PVLAN is a VLAN-based computer networking technology for implementing communication isolation among ports. PVLAN relates to several concepts and understanding these concepts will facility better understanding of the present invention. The following will introduce the involved concepts one by one.
PVLAN includes three different types of sub-VLANs, which are primary VLANs, community VLANs, and isolated VLANs. Community VLANs and isolated VLANs are collectively called secondary VLANs. In the three types of VLANs included in a PVLAN, one of the VLANs may communicate with all the other VLANs, and it is called a primary VLAN. Usually the primary VLAN may also be used to represent the entire PVLAN. If all the ports in a VLAN may communicate with each other and also communicate with a port in the primary VLAN, this VLAN is called a community VLAN. If all the ports in a VLAN cannot communicate with each other and may only communicate with a port in the primary VLAN, this VLAN is called an isolated VLAN. In a PVLAN, a community VLAN and an isolated VLAN are subordinate to the primary VLAN, or in other words, the community VLAN and the isolated VLAN are related to the primary VLAN. This is the reason why the community VLAN and the isolated VLAN are called secondary VLANs.
The ports included in a primary VLAN are called promiscuous ports, which are usually connected to uplink routers, firewalls and servers. The ports included in a community VLAN are called community ports. The ports included in an isolated VLAN are called isolated ports. Community ports and isolated ports are also called host ports, because these ports are usually connected to downlink hosts. A PVLAN switch may include several promiscuous ports, several community ports and several isolated ports.
The communication isolation rules in a PVLAN are as follows:
1) The promiscuous ports may communicate with all the community ports and isolated ports.
2) The community ports may communicate with all the ports in the same community VLAN, and may also communicate with the promiscuous ports. However, they cannot communicate with the ports in a different community VLAN.
3) The isolated ports may only communicate with the promiscuous ports.
According to the above rules, flows may be isolated within the switch.
When ports are in a plurality of VLANs simultaneously, they are called trunk ports. That is, promiscuous ports simultaneously in a plurality of primary VLANs are called trunk promiscuous ports; community ports simultaneously in a plurality of community VLANs are called trunk community ports; isolated ports simultaneously in a plurality of isolated VLANs are called trunk isolated ports; and trunk community ports and trunk isolated ports are also collectively called trunk host ports.
In the present invention, references to promiscuous ports, community ports, isolated ports, trunk promiscuous ports, trunk community ports, and trunk isolated ports are meant to be PVLAN promiscuous ports, PVLAN community ports, PVLAN isolated ports, PVLAN trunk promiscuous ports, PVLAN trunk community ports, and PVLAN trunk isolated ports. The omission of the prefix PVLAN is only for convenience.
Currently there are two types of PVLAN trunk ports, i.e., the above-mentioned PVLAN trunk promiscuous ports and PVLAN trunk isolated ports. When a frame from a PVLAN trunk isolated port is to be transmitted from a PVLAN trunk promiscuous port, the 802.1Q tag of the frame will be rewritten with a proper primary VLAN ID. When a PVLAN trunk promiscuous port receives a frame from the primary VLAN, the 802.1Q tag of the primary VLAN ID carried by the frame will be re-written with the isolated VLAN ID.
Thus a PVLAN trunk promiscuous port may simultaneously transmit information from a plurality of primary VLANs from the PVLAN switch to a non-PVLAN device, and a PVLAN isolated port may simultaneously transmit information from a plurality of isolated VLANs to a non-PVLAN device. However, the two current PVLAN trunk ports cannot simultaneously transmit information from a plurality of community VLAN from the PVLAN switch to a non-PVLAN device.
It can be seen that an improved PVLAN switch and a method of its connecting to a non-PVLAN device may be advantageous in the field, so that during deployment, even if the PVLAN switch is connected to a non-PVLAN device, community VLAN information may be transmitted from the PVLAN switch to the non-PVLAN device.
Embodiments of the present invention disclose a method and PVLAN switch for connecting a private virtual local area network PVLAN switch to a non-PVLAN device, where the PVLAN switch is configured as a primary VLAN with at least two secondary VLANs related to the primary VLAN, the primary VLAN includes at least one promiscuous port, each of the at least two secondary VLANs includes at least one smart PVLAN trunk port, and the at least one smart PVLAN trunk port is included in at least two secondary VLANs wherein the smart PVLAN trunk port and the promiscuous port are for connecting non-PVLAN devices. A first frame is received on a smart PVLAN trunk port sent from a non-PVLAN device connected to the smart PVLAN trunk port, the first frame including a destination address and a secondary VLAN ID. Based on the destination address of the first frame, the PVLAN switch port ID corresponding to the first frame, and the primary VLAN ID related to the secondary VLAN ID are identified. In response to determining that the PVLAN switch port corresponding to the first frame is a non-isolated port, the secondary VLAN ID in the first frame is modified to be the primary VLAN ID related to the secondary VLAN, and the modified first frame is sent to another non-PVLAN device connected to the PVLAN switch port corresponding to the first frame from the PVALN switch port corresponding to the first frame. A second frame is received on the promiscuous port sent from a non-PVLAN device connected to the promiscuous port, the second frame including a destination address and a primary VLAN ID. The PVLAN switch port ID corresponding to the second frame, and the secondary VLAN ID related to the primary VLAN ID, are identified, based on the destination address of the second frame. In response to determining that the PVLAN switch port corresponding to the second frame is one of a promiscuous port and a smart PVLAN trunk port, the primary VLAN ID in the second frame is modified to be a secondary VLAN ID related to the second frame. The modified second frame is sent to the non-PVLAN device connected to the PVLAN switch port corresponding to the second frame from the PVLAN switch port corresponding to the second frame. In response to determining that the second frame comprises the primary VLAN ID, and that the secondary VLAN ID related to the primary VLAN ID cannot be obtained based on the destination address of the second frame, using a default entry to process.
The solutions according to embodiments of the present invention may connect information from all types of secondary VLANs, including isolated secondary VLANs and the community secondary VLANs, from the PVLAN switch to non-PVLAN devices.
The above and other objects, features and advantages of the present disclosure will become more apparent through the more detailed description of embodiments of the present disclosure in conjunction with the accompanying drawings, wherein like reference numerals generally refers to like components in the embodiments of the present disclosure.
Some preferred embodiments will be described in more detail with reference to the accompanying drawings, in which the preferred embodiments of the present disclosure have been illustrated. However, the present disclosure can be implemented in various manners, and thus should not be construed to be limited to the embodiments disclosed herein. On the contrary, those embodiments are provided for a thorough and complete understanding of the present disclosure, and for completely conveying the scope of the present disclosure to those skilled in the art.
In order to solve the technical problem presented in the background art, the present invention defines a smart PVLAN trunk port. The port can not only transfer community VLAN information from the PVLAN switch to a non-PVLAN device, but also transfer information from an isolated VLAN and a community VLAN to a non-PVLAN device. That is, the smart PVLAN trunk port may only belong to a plurality of community VLANs, or belong to a plurality of community VLANs and isolated VLANs simultaneously.
Referring to
If there is no smart PVLAN trunk port proposed by the present invention, P1 and P2 in
Those skilled in the art may appreciate that the above described and illustrated PVLAN switch and its operation environment according to the embodiment of the present invention are merely exemplary, rather than limitation to the present invention. For example, the PVLAN switch may also be configured with other promiscuous ports or trunk promiscuous port, and correspondingly, may be configured with other primary VLANs. The PVLAN switch may also be configured with any other number and types of secondary VLANs. The PVLAN switch may be configured with any other number and types of community ports, trunk community ports, isolation ports, trunk isolation ports (additionally, the PVLAN switch may also be configured with trunk ports for connecting to other PVLAN switches, and configured with ordinary VLAN ports outside of PVLAN). The PVLAN switch may connect to any other number of other non-PVLAN switches, and each non-PVLAN switch may connect to any other number of VMs, and the VMs may be divided into any secondary VLAN.
In summary, the improvement of the PVLAN switch according to the present invention mainly lies in the tag rewriting executed by its smart PVLAN trunk port: the smart PVLAN trunk port may smartly rewrite the VLAN tag in the frame before sending the frame.
According to
At step S201, receive a first frame on a smart PVLAN trunk port sent from the non-PVLAN device connected to the smart PVLAN trunk port.
At step S203, in response to that the first frame includes the secondary VLAN ID, the PVLAN switch port ID corresponding to the first frame and the primary VLAN ID related to the secondary VLAN ID included in the first frame can be obtained based on the destination address of the first frame, and the PVLAN switch port corresponding to the first frame is a non-isolated port: modify the secondary VLAN ID in the first frame into the primary VLAN ID related to the secondary VLAN ID; and send the modified first frame to the non-PVLAN device connected to the PVLAN switch port corresponding to the first frame from the PVLAN switch port corresponding to the first frame.
According to an embodiment of the present invention, the non-isolated port is one of: a promiscuous port; and a smart PVLAN trunk port.
In a preferred embodiment of the present invention, the method further comprises step S202 (not shown in
Referring to
As the example shown in
In embodiments of the present invention, the PVLAN switch usually use a MAC address table to store the MAC address, VLAN ID, and port ID. Those skilled in the art know that other mapping relationships, e.g., arrays and linked list, may also be used to store them. Here the MAC address table in the PVLAN switch is improved. As can be known by those skilled in the art, the MAC address table is part of the MAC learning mechanism of the PVLAN switch, and it stores the mapping relationships between the source MAC address extracted from the received frame, the ID of the VLAN to which the frame belongs and the receive port for future frame forwarding.
The structure of a traditional MAC address table is as shown in Table 1:
wherein the MAC address column is for storing the source MAC address of the received frame, the VLAN ID column is for storing the ID of the VLAN to which the frame belongs, and the port ID column is for storing the port receiving the frame.
The structure of the MAC address table improved according to an embodiment of the present invention is as shown in Table 2:
It can be seen that compared with the traditional MAC address table, an original VLAN ID column is added in the improved MAC address table. If the smart PVLAN trunk port receives a frame, then the ID of the primary VLAN is stored in the VLAN ID column, and the ID of the secondary VLAN to which the frame belongs is stored in the original VLAN ID column; if a frame is received on a promiscuous port, then the ID of the primary VLAN to which the frame belongs is stored in both the VLAN ID column and the original VLAN ID column.
As shown in
Assuming previously a frame sent to a community secondary VLAN (e.g., VLAN 101) and/or an isolated secondary VLAN (e.g., VLAN 102) from the smart PVLAN trunk port P1 was received on the promiscuous port, and the destination MAC address of the frame was B, its source MAC address was A, its VLAN ID was 100, the MAC address learning mechanism in the PVLAN switch obtained the source MAC address A of the frame, the ID 100 of the primary VLAN to which the frame belongs, the receive port number P3 of the frame, and the primary VLAN ID of the frame which was also 100, and inserted them into the MAC address table, i.e., Table 4, as an entry.
Then for the frame sent to the promiscuous port P3 and including the secondary VLAN ID with the destination MAC address A, the source MAC address B, the VLAN ID 101, at step S203, the address table is queried according to the destination MAC address to get the primary VLAN ID 100 corresponding to the secondary VLAN ID 101, and the VLAN ID of the frame is modified as 100 corresponding to the VLAN ID in the address table, and then it is sent to port P3 corresponding to the port ID in the address table.
In an embodiment, the method shown in
In a preferred embodiment, the method shown in
Now referring to
Above is described the improved MAC address learning and forwarding process of frames transmitted between a smart PVLAN trunk port and a promiscuous port of the PVLAN switch according to an embodiment of the present invention. The MAC address learning process and forwarding process of frames transmitted between two smart PVLAN trunk ports of the PVLAN switch (i.e., transmitted in the same secondary VLAN) is the same as described above, and is omitted here.
In an embodiment, the method shown in
In an embodiment, the method shown in
In an embodiment, the method shown in
Now refer to
These default entries may be automatically generated and updated when the user configures related contents of the PVLAN (e.g., creating or deleting the secondary VLANs or the primary VLAN, adding or deleting a VLAN from the VLANs).
Above is described the flow of a method of connecting PVLAN switch to a non-PVLAN device according to an embodiment of the present invention with reference to the accompanying drawings. It should be pointed out that the above description is merely exemplary, rather than limitation to the present invention. In addition, as those skilled in the art may appreciate, the above description actually also discloses a PVLAN switch. In the following, referring to
According to the embodiment of the present invention, the PVLAN switch 600 is configured as a primary VLAN and at least two secondary VLANs related to the primary VLAN, the primary VLAN comprises at least one promiscuous port, each of the at least two secondary VLANs comprises at least one smart PVLAN trunk port, and the smart PVLAN trunk port is included in the at least two secondary VLANs, wherein the smart PVLAN trunk port and the promiscuous port are for connecting the non-PVLAN device. As shown in
According to an embodiment of the present invention, the PVLAN switch further comprises: storing means (not shown in
According to an embodiment of the present invention, the receiving means 601 is further configured to receive a second frame on the promiscuous port sent by the non-PVLAN device connected to the promiscuous port; in response to that the second frame comprises a primary VLAN ID, the PVLAN switch port ID corresponding to the second frame and the secondary VLAN ID related to the primary VLAN ID can be obtained based on the destination address of the second frame, and the PVLAN switch port corresponding to the second frame is one of: a promiscuous port; and a smart PVLAN trunk port; the modifying means 602 is further configured to modify the primary VLAN ID in the second frame into a secondary VLAN ID related to the second frame; the sending means 603 is further configured to send the modified second frame to the non-PVLAN device connected to the PVLAN switch port corresponding to the second frame from the PVLAN switch port corresponding to the second frame.
According to an embodiment of the present invention, the storing device is further configured to store the source address of the frame of the primary VLAN ID of the second frame, the primary VLAN ID and its related secondary VLAN ID, and the PVLAN switch port ID corresponding to the second frame.
According to an embodiment of the present invention, the PVLAN switch further comprises: default entry processing means (not shown in
According to an embodiment of the present invention, the default entry processing mean is further configured to, in response to that the second frame comprises the primary VLAN ID and the secondary VLAN ID related to the primary VLAN ID cannot be obtained based on the destination address of the second frame, use a default entry to process.
According to an embodiment of the present invention, the default entry processing means is further configured to, in response to that the received frame is a broadcast frame, use a default entry to process, wherein the received frame is one of: a first frame; and a second frame.
According to an embodiment of the present invention, the default entry comprises a plurality of options, and the default entry processing device is further configured to: for each option, generate a copy of the frame, and modify the VLAN ID in the copy into the rewritten VLAN ID in the corresponding option, and send the modified copy from the PVLAN switch port designated in the corresponding option.
According to the embodiment of the present invention, the non-isolated port is one of: a promiscuous port; a smart PVLAN trunk port.
Above is described a method and a PVLAN switch according to embodiments of the present invention. It should be pointed out that the above description is merely exemplary, rather than limitation to the present invention. In other embodiments of the present invention, the method may have more, less or different steps, and the relationships of sequence, inclusion, function among the steps may be different from that is described; the PVLAN switch may have more, less or different modules, and the relationships of connection, inclusion, function among the modules may be different from that is described.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or computer program product. Accordingly, aspects of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, micro-code, etc.) or an embodiment combining software and hardware aspects that may all generally be referred to herein as a “circuit,” “module” or “system.” Furthermore, aspects of the present invention may take the form of a computer program product embodied in one or more computer readable medium(s) having computer readable program code embodied thereon.
Any combination of one or more computer readable medium(s) may be utilized. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the “C” programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet Service Provider).
Aspects of the present invention are described below with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer readable medium that can direct a computer, other programmable data processing apparatus, or other devices to function in a particular manner, such that the instructions stored in the computer readable medium produce an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
The descriptions of the various embodiments of the present invention have been presented for purposes of illustration, but are not intended to be exhaustive or limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein was chosen to best explain the principles of the embodiments, the practical application or technical improvement over technologies found in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.
Number | Date | Country | Kind |
---|---|---|---|
201410068890.X | Feb 2014 | CN | national |
Number | Date | Country | |
---|---|---|---|
Parent | 15822299 | Nov 2017 | US |
Child | 16009764 | US | |
Parent | 15421538 | Feb 2017 | US |
Child | 15822299 | US | |
Parent | 14609495 | Jan 2015 | US |
Child | 15421538 | US |