Device for realizing upstream aggregation and downstream translation of a virtual local area network and method thereof

A device for realizing upstream aggregation and downstream translation of a virtual local area network (VLAN) includes a buffer and a processor. The buffer is used for storing an ingress VLAN translation table and an egress VLAN translation table. The processor is used for translating an upstream packet inputted from a first user port into an upstream translation packet according to the ingress VLAN translation table, and transmitting the upstream translation packet to the Internet through an internet port, and translating a first downstream packet inputted from the internet port into a first downstream translation packet according to the egress VLAN translation table, and transmitting the first downstream translation packet to a user device through a second user port.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a device for realizing upstream aggregation and downstream translation of a virtual local area network (VLAN) and a method thereof, and particularly to a device and a method thereof that can realize upstream aggregation and downstream translation of a VLAN according to an ingress VLAN translation table, an egress VLAN translation table, and a filtering database stored in a buffer.

2. Description of the Prior Art

“TR156: Using GPON Access in The Context of TR-101” and “CTC EPON Equipment Technical Requirement V3.0” define virtual local area network (VLAN) N:1 upstream aggregation (VLAN N:1). In addition, VLAN 1:N downstream translation (VLAN 1: N) is reverse mapping behavior of the VLAN N:1 upstream aggregation.

The “CTC EPON Equipment Technical Requirement V3.0” defines the VLAN N:1 upstream aggregation and the VLAN 1:N downstream translation as follows: the VLAN N:1 upstream aggregation is that a plurality of upstream packets (e.g. VLAN 1, 2, . . . , X) are aggregated to an upstream translation packet (e.g. VLAN Y), and the VLAN 1:N downstream translation is that a downstream packet (e.g. VLAN Y) is reversely mapped to a plurality of downstream translation packets (e.g. VLAN 1, 2, . . . , X).

The “CTC EPON Equipment Technical Requirement V3.0” describes the VLAN N:1 upstream aggregation as follows: in the N:1 VLAN upstream aggregation, an optical line terminal (OLT) or an optical network unit (ONU) can aggregate a plurality of upstream packets to an upstream translation packet (e.g. VLAN Y). The “CTC EPON Equipment Technical Requirement V3.0” describes the 1:N VLAN downstream translation as follows: a downstream packet (e.g. VLAN Y) inputted from an internet port can be reversely mapped to a plurality of downstream translation packets (e.g. VLAN 1, 2, . . . , X).

The N:1 VLAN upstream aggregation can be realized by an ingress VLAN translation table. The ingress VLAN translation table can set an upstream packet inputted from each user port to be translated into an upstream translation packet outputted through an internet port. Therefore, the ingress VLAN translation table can set a plurality of upstream packets (e.g. VLAN 1, 2, . . . , X) inputted from the same user port or different user ports to be translated into the same upstream translation packet (e.g. VLAN Y) to realize the N:1 VLAN upstream aggregation.

The 1:N VLAN downstream translation can be realized by an egress VLAN translation table. The egress VLAN translation table can set a downstream packet (e.g. VLAN Y) inputted from each internet port to be translated into a downstream translation packet (e.g. VLAN X) outputted through a user port. Therefore, the egress VLAN translation table can set a downstream packet to be translated into a downstream translation packet on different user ports. For examples, the egress VLAN translation table sets a downstream packet (e.g. VLAN Y) to be translated into a downstream translation packet (e.g. VLAN 1) on a first user port, and sets the downstream packet (e.g. VLAN Y) to be translated into another downstream translation packet (e.g. VLAN 2) on a second user port to realize the 1:N VLAN downstream translation.

The prior art can utilize the egress VLAN translation table to realize the 1:N VLAN downstream translation to translate a downstream packet into different downstream translation packets on different user ports, but only to translate a downstream packet into the same downstream translation packet on the same user port. For example, e.g. the prior art only translates the downstream packet (VLAN Y) into the downstream translation packet (VLAN 1) on the first user port. That is to say, the prior art can not translate a downstream packet (VLAN Y) into different downstream translation packets (e.g. VLAN 1 and VLAN 2) on the same user port (e.g. the first user port).

SUMMARY OF THE INVENTION

An embodiment provides a device for realizing upstream aggregation and downstream translation of a virtual local area network (VLAN). The device includes a buffer and a processor. The buffer is used for storing an ingress VLAN translation table and an egress VLAN translation table. The processor is used for translating an upstream packet inputted from a first user port into an upstream translation packet according to the ingress VLAN translation table, and transmitting the upstream translation packet to the Internet through an internet port, and translating a first downstream packet inputted from the internet port into a first downstream translation packet according to the egress VLAN translation table, and transmitting the first downstream translation packet to a user device through a second user port.

Another embodiment provides a method for realizing upstream aggregation of a VLAN. The method includes translating an upstream packet inputted from a user port into an upstream translation packet according to an ingress VLAN translation table; and transmitting the upstream translation packet to the Internet through an internet port.

Another embodiment provides a method for realizing downstream translation of a VLAN. The method includes translating a downstream packet inputted from an internet port into a downstream translation packet according to a downstream translation table; and transmitting the downstream translation packet to a user device through a user port.

The present invention provides a device for realizing upstream aggregation and downstream translation of a VLAN and a method thereof. The device and the method utilize a processor to translate an upstream packet inputted from a user port into an upstream translation packet, and translate a downstream packet inputted from an internet port into a downstream translation packet according to an ingress VLAN translation table, an egress VLAN translation table, and a filtering database stored in a buffer to realize the upstream aggregation and the downstream translation of the VLAN. Therefore, compared to the prior art, because the filtering database can learn and record information of a packet inputted from a user port, the present invention not only translates a downstream packet into different downstream translation packets on the same user port, but also translates a downstream packet into different downstream translation packets on different user ports.

DETAILED DESCRIPTION

Please refer toFIG. 1.FIG. 1is a diagram illustrating a device100for realizing upstream aggregation and downstream translation of a virtual local area network (VLAN) according to an embodiment. The device100includes a buffer102and a processor104. The buffer102stores an ingress VLAN translation table1022, an egress VLAN translation table1024, and a filtering database1026. The processor104can translate an upstream packet inputted from a first user port of the device100into an upstream translation packet according to the ingress VLAN translation table1022, and transmit the upstream translation packet to the Internet106through an internet port110of the device100. The ingress VLAN translation table1022includes corresponding relationships of the first user port, the upstream packet, and the upstream translation packet. In addition, the processor104can also translate a downstream packet inputted from the internet port110into a downstream translation packet according to the egress VLAN translation table1024, and transmit the downstream translation packet to the user device108through a second user port. The egress VLAN translation table1024includes corresponding relationships of the second user port, the downstream packet, and the downstream translation packet.

Please refer toFIG. 2.FIG. 2is a diagram illustrating the ingress VLAN translation table1022. As shown inFIG. 2, the ingress VLAN translation table1022sets two ingress VLAN translation entries (e.g. a VLAN100packet is translated into a VLAN1000packet, and a VLAN200packet is translated into the VLAN1000packet) on a user port112, and sets two ingress VLAN translation entries (e.g. a VLAN100packet is translated into the VLAN1000packet, and a VLAN200packet is translated into a VLAN2000packet) on a user port114. Therefore, as shown inFIG. 1andFIG. 2, the processor104can translate a VLAN100packet inputted from the user port112into a VLAN1000packet, a VLAN200packet inputted from the user port112into the VLAN1000packet, a VLAN100packet inputted from the user port114into the VLAN1000packet, and a VLAN200packet inputted from the user port114into the VLAN2000packet according to the ingress VLAN translation table1022. Thus, the VLAN100packet and the VLAN200packet inputted from the user port112, and the VLAN100packet inputted from the user port114are aggregated into the VLAN1000packet. However, the VLAN200packet inputted from the user port114is based on an independent translation instead of the upstream aggregation of the VLAN. Then, the processor104transmits the VLAN1000packet and the VLAN2000packet to the Internet106through the internet port110. Thus, the device100can realize the upstream aggregation of the VLAN. In addition, the present invention is not limited to the ingress VLAN translation table1022shown inFIG. 2, the device100only including the two user ports112and114, and the device100only including one internet port110.

Please refer toFIG. 3.FIG. 3is a diagram illustrating the egress VLAN translation table1024. As shown inFIG. 3, the egress VLAN translation table1024sets an egress VLAN translation entry (e.g. a VLAN1000packet inputted from the internet port110is translated into a VLAN100packet) on the user port112, and sets an egress VLAN translation entry (e.g. the VLAN1000packet inputted from the internet port110is translated into a VLAN200packet) on the user port114. Therefore, as shown inFIG. 1andFIG. 3, the processor104can translate a VLAN1000packet (outputted through the user port112) inputted from the internet port110into a VLAN100packet, and the VLAN1000packet (outputted through the user port114) inputted from the internet port110into a VLAN200packet according to the egress VLAN translation table1024. Therefore, when a VLAN1000packet inputted from the internet port110is outputted through the user port112, the VLAN1000packet inputted from the internet port110is translated into a VLAN100packet by the processor104; and when the VLAN1000packet inputted from the internet port110is outputted through the user port114, the VLAN1000packet inputted from the internet port110is translated into a VLAN200packet by the processor104. Thus, the device100can realize the downstream translation of the VLAN. In addition, the present invention is not limited to the egress VLAN translation table1024shown inFIG. 3.

Please refer toFIG. 4.FIG. 4is a diagram illustrating the filtering database1026. The filtering database1026can learn and record information of a packet inputted from a user port of the device100, where the information of the packet includes the user port inputting the packet, a source address corresponding to the packet, and a downstream translation packet corresponding to the packet. As shown inFIG. 4, if the device100receives a VLAN100packet including a source address 00-00-00-00-00-01 from the user port112, a VLAN200packet including a source address 00-00-00-00-00-02 from the user port112, a VLAN100packet including a source address 00-00-00-00-00-03 from the user port114, and a VLAN200packet including a source address 00-00-00-00-00-04 from the user port114, the filtering database1026can learn and record information of the VLAN100packet including the source address 00-00-00-00-00-01 and the VLAN200packet including the source address 00-00-00-00-00-02 inputted from the user port112, and the VLAN100packet including the source address 00-00-00-00-00-03 and the VLAN200packet including the source address 00-00-00-00-00-04 inputted from the user port114.

Therefore, when the device100receives a VLAN1000packet including a destination address 00-00-00-00-00-01 from the internet port110, the processor104translates the VLAN1000packet including the destination address 00-00-00-00-00-01 into a VLAN100packet according to the filtering database1026, and transmits the VLAN100packet through the user port112; when the device100receives a VLAN1000packet including a destination address 00-00-00-00-00-02 from the internet port110, the processor104translates the VLAN1000packet including the destination address 00-00-00-00-00-02 into a VLAN200packet according to the filtering database1026, and transmits the VLAN200packet through the user port112; when the device100receives a VLAN1000packet including a destination address 00-00-00-00-00-03 from the internet port110, the processor104translates the VLAN1000packet including the destination address 00-00-00-00-00-03 into a VLAN100packet according to the filtering database1026, and transmits the VLAN100packet through the user port114; when the device100receives a VLAN1000packet including a destination address 00-00-00-00-00-04 from the internet port110, the processor104translates the VLAN1000packet including the destination address 00-00-00-00-00-04 into a VLAN200packet according to the filtering database1026, and transmits the VLAN200packet through the user port114. Thus, when a VLAN1000packet inputted from the internet port110is outputted through the user port112, the VLAN1000packet inputted from the internet port110can be translated into a VLAN100packet and a VLAN200packet according to destination addresses (00-00-00-00-00-01 and 00-00-00-00-00-02) by the processor104, respectively; and when a VLAN1000packet inputted from the internet port110is outputted through the user port114, the VLAN1000packet inputted from the internet port110can be translated into a VLAN100packet and a VLAN200packet according to destination addresses (00-00-00-00-00-03 and 00-00-00-00-00-04) by the processor104, respectively. Thus, the device100can realize the downstream translation of the VLAN. In addition, the present invention is not limited to the filtering database1026shown inFIG. 4.

Please refer toFIG. 1,FIG. 2, andFIG. 5.FIG. 5is a flowchart illustrating method for realizing upstream aggregation of a VLAN according to another embodiment. The method inFIG. 5is illustrated using the device100inFIG. 1and the ingress VLAN translation table1022inFIG. 2. Detailed steps are as follows:

Step502: The processor104translates an upstream packet inputted from a user port into an upstream translation packet according to the ingress VLAN translation table1022.

Step504: The processor104transmits the upstream translation packet to the Internet106through the internet port110.

In Step502, the ingress VLAN translation table1022includes corresponding relationships of the user port inputting the upstream packet, the upstream packet, and the upstream translation packet. Therefore, the processor104can translate the upstream packet inputted from the user port into the upstream translation packet according to the ingress VLAN translation table1022. For example, the ingress VLAN translation table1022sets two ingress VLAN translation entries on the user port112, that is, an upstream packet (a VLAN100packet) is translated into an upstream translation packet (a VLAN1000packet), and an upstream packet (a VLAN200packet) is translated into an upstream translation packet (a VLAN1000packet); and the ingress VLAN translation table1022sets two ingress VLAN translation entries on the user port114, that is, an upstream packet (a VLAN100packet) is translated into an upstream translation packet (a VLAN1000packet), and an upstream packet (a VLAN200packet) is translated into an upstream translation packet (a VLAN2000packet). Therefore, as shown inFIG. 1andFIG. 2, the processor104can translate the upstream packet (the VLAN100packet) inputted from the user port112into the upstream translation packet (the VLAN1000packet), the upstream packet (the VLAN200packet) inputted from the user port112into the upstream translation packet (the VLAN1000packet), the upstream packet (the VLAN100packet) inputted from the user port114into the upstream translation packet (the VLAN1000packet), and the upstream packet (the VLAN200packet) inputted from the user port114into the upstream translation packet (the VLAN2000packet) according to the ingress VLAN translation table1022. Thus, the upstream packets (the VLAN100packet and the VLAN200packet) inputted from the user port112, and the upstream packet (the VLAN100packet) inputted from the user port114are aggregated to the VLAN1000packet. However, the upstream packet (the VLAN200packet) inputted from the user port114is based on an independent translation instead of the upstream aggregation of the VLAN. In Step504, the processor104can transmit the upstream translation packet (the VLAN1000packet) and the upstream translation packet (the VLAN2000packet) to the Internet106through the internet port110.

Please refer toFIG. 1,FIG. 3,FIG. 4, andFIG. 6.FIG. 6is a flowchart illustrating method for realizing downstream translation of a VLAN according to another embodiment. The method inFIG. 6is illustrated using the device100inFIG. 1, the egress VLAN translation table1024inFIG. 3, and the filtering database1026inFIG. 4. Detailed steps are as follows:

Step602: The processor104translates a downstream packet inputted from the internet port110into a downstream translation packet according to a downstream translation table.

Step604: The processor104transmits the downstream translation packet to the user device108through a user port.

Please refer toFIG. 1andFIG. 3. In Step602and Step604, the downstream translation table is the egress VLAN translation table1024, where the egress VLAN translation table1024includes corresponding relationships of the user port outputting the downstream translation packet, the downstream packet, and the downstream translation packet. Therefore, the processor104can translate the downstream packet inputted from the internet port110into the downstream translation packet according to the egress VLAN translation table1024. For example, the egress VLAN translation table1024sets an egress VLAN translation entry on the user port112, that is, a downstream packet (a VLAN1000packet) inputted from the internet port110is translated into a downstream translation packet (a VLAN100packet) outputted through the user port112; and the egress VLAN translation table1024sets an egress VLAN translation entry on the user port114, that is, a downstream packet (a VLAN1000packet) inputted from the internet port110is translated into a downstream translation packet (a VLAN200packet) outputted through the user port114. Therefore, as shown inFIG. 1andFIG. 3, the processor104can translate the downstream packet (the VLAN1000packet outputted through the user port112) inputted from the internet port110into the downstream translation packet (the VLAN100packet), and translate the downstream packet (the VLAN1000packet outputted through the user port114) inputted from the internet port110into the downstream translation packet (the VLAN200packet) according to the egress VLAN translation table1024. Therefore, when the downstream packet (the VLAN1000packet) inputted from the internet port110is outputted through the user port112to the user device108, the VLAN1000packet inputted from the internet port110is translated into the downstream translation packet (the VLAN100packet) by the processor104; and when the VLAN1000packet inputted from the internet port110is outputted through the user port114to the user device108, the VLAN1000packet inputted from the internet port110is translated into the downstream translation packet (the VLAN200packet) by the processor104.

Please refer toFIG. 1andFIG. 4. In Step602and Step604, the downstream translation table is the filtering database1026, where the filtering database1026can learn and record information of a packet inputted from a user port of the device100, and the information of the packet includes the user port inputting the packet, a source address corresponding to the packet, and a downstream translation packet corresponding to the packet. As shown inFIG. 4, if the device100receives a VLAN100packet including a source address 00-00-00-00-00-01 from the user port112, a VLAN200packet including a source address 00-00-00-00-00-02 from the user port112, a VLAN100packet including a source address 00-00-00-00-00-03 from the user port114, and a VLAN200packet including a source address 00-00-00-00-00-04 from the user port114, the filtering database1026can learn and record information of the VLAN100packet including the source address 00-00-00-00-00-01 and the VLAN200packet including the source address 00-00-00-00-00-02 inputted from the user port112, and the VLAN100packet including the source address 00-00-00-00-00-03 and the VLAN200packet including the source address 00-00-00-00-00-04 inputted from the user port114.

Therefore, when the device100receives a downstream packet (a VLAN1000packet) including a destination address 00-00-00-00-00-01 from the internet port110, the processor104translates the downstream packet (the VLAN1000packet) including the destination address 00-00-00-00-00-01 into a downstream translation packet (a VLAN100packet) according to the filtering database1026, and transmits the downstream translation packet (the VLAN100packet) to the user device108through the user port112; when the device100receives a downstream packet (a VLAN1000packet) including a destination address 00-00-00-00-00-02 from the internet port110, the processor104translates the downstream packet (the VLAN1000packet) including the destination address 00-00-00-00-00-02 into a downstream translation packet (a VLAN200packet) according to the filtering database1026, and transmits the downstream translation packet (the VLAN200packet) to the user device108through the user port112; when the device100receives a downstream packet (a VLAN1000packet) including a destination address 00-00-00-00-00-03 from the internet port110, the processor104translates the downstream packet (the VLAN1000packet) including the destination address 00-00-00-00-00-03 into a downstream translation packet (a VLAN100packet) according to the filtering database1026, and transmits the downstream translation packet (the VLAN100packet) to the user device108through the user port114; when the device100receives a downstream packet (a VLAN1000packet) including a destination address 00-00-00-00-00-04 from the internet port110, the processor104translates the downstream packet (the VLAN1000packet) including the destination address 00-00-00-00-00-04 into a downstream translation packet (a VLAN200packet) according to the filtering database1026, and transmits the downstream translation packet (the VLAN200packet) to the user device108through the user port114. Thus, when the downstream packet (the VLAN1000packet) inputted from the internet port110is outputted through the user port112, the downstream. packet (the VLAN1000packet) inputted from the internet port110can be translated into the VLAN100packet and the VLAN200packet by the processor104according to the destination addresses (00-00-00-00-00-01 and 00-00-00-00-00-02), respectively; and when the downstream packet (the VLAN1000packet) inputted from the internet port110is outputted through the user port114, the downstream packet (the VLAN1000packet) inputted from the internet port110can be translated into the VLAN100packet and the VLAN200packet by the processor104according to the destination addresses (00-00-00-00-00-03 and 00-00-00-00-00-04), respectively. Thus, the device100can realize the downstream translation of the VLAN.

To sum up, the device for realizing the upstream aggregation and the downstream translation of the VLAN and the method thereof utilize the processor to translate an upstream packet inputted from a user port into an upstream translation packet, and translate a downstream packet inputted from an internet port into a downstream translation packet according to the ingress VLAN translation table, the egress VLAN translation table, and the filtering database stored in the buffer to realize the upstream aggregation and the downstream translation of the VLAN. Therefore, compared to the prior art, because the filtering database can learn and record information of a packet inputted from a user port, the present invention not only translates a downstream packet into different downstream translation packets on the same user port, but also translates a downstream packet into different downstream translation packets on different user ports.