Patent Description:
A core layer of a network device performs a routing process (determines a transmission path of a packet) and a tunneling process (builds a tunnel) for a received packet according to a routing table, when a routing is operated in a wireless network. However, it costs lots of time for the core layer to perform the routing process and the tunneling process for every packet. Thus, how to improve the packet tunnel to handle the routing of the packet efficiently is an important problem to be solved. There is still room for improvement when it comes to methods in the prior art (e.g., Document DI (<CIT>)).

The application aims at providing a network device and a method of handling a packet tunnel to solve the abovementioned problem.

This is achieved by a network device of handling a packet tunnel according to the independent claim here below. The dependent claims pertain to corresponding further developments and improvements.

<FIG> is a schematic diagram of a communication system <NUM> according to an example of the present invention. The communication system <NUM> may be any communication system using an orthogonal frequency-division multiplexing (OFDM) technique (or termed as discrete multi-tone modulation (DMT) technique), and is briefly composed of a transmitter TX and a receiver RX. In <FIG>, the transmitter TX and the receiver RX are simply utilized for illustrating the structure of the communication system <NUM>. For example, the communication system <NUM> may be any wired communication system such as an asymmetric digital subscriber line (ADSL) system, a power line communication (PLC) system or an Ethernet over coax (EOC), or may be any wireless communication system such as a wireless local area network (WLAN), a Digital Video Broadcasting (DVB) system, a Long Term Evolution (LTE) system, a Long Term Evolution-advanced (LTE-A) system or a 5th generation (<NUM>) system. For example, the transmitter TX may be an access point (AP) in the WLAN. In addition, the transmitter TX and the receiver RX may be installed in a device such as a mobile phone, a laptop, a tablet computer, etc., and are not limited herein.

<FIG> is a schematic diagram of a network device according to an example of the present invention, and can be utilized in the transmitter TX or the receiver RX of <FIG>. The network device may comprise a transceiving module <NUM>, a query module <NUM>, a processing module <NUM>, an input port <NUM> and an output port <NUM>. The transceiving module <NUM> may comprise a receiving module <NUM> and a transmitting module <NUM>. In detail, the receiving module <NUM> receives a packet PKT from the input port <NUM>. The query module <NUM> is coupled to the receiving module <NUM>, for querying a mapping table according to the input port <NUM> and a header of the packet PKT, to generate a query result. The processing module <NUM> is coupled to the query module <NUM>, for performing instructions of determining a transformed header and an output port (e.g., the output port <NUM>) according to the querying result; and replacing the header with the transformed header, to generate a transformed packet (e.g., a packet PKTM shown in <FIG>). The transmitting module <NUM> is coupled to the processing module, for transmitting the transformed packet via the output port.

In one example, the network device <NUM> further comprises a storage module <NUM>. The storage module <NUM> is coupled to the query module <NUM> and the processing module <NUM>, for storing the mapping table. In one example, the instruction of determining the transformed header and the output port according to the querying result comprises a tunnel message comprising the transformed header and the output port when the querying result indicates that the mapping table comprises the tunnel message comprising the input port <NUM> and the header, and determining the transformed header and the output port according to the input port <NUM> and the header when the querying result indicates that the mapping table does not comprise the tunnel message comprising the input port <NUM> and the header. That is, when he mapping table comprises information corresponding to the input port and the header, the processing module <NUM> can directly utilize the information for transmitting the packet. When he mapping table lacks the information corresponding to the input port and the header, the processing module <NUM> has to generate the information by itself. In one example, the processing module <NUM> generates the tunnel message and stores the tunnel message in the mapping table according to a routing table of a core layer and tunnel information, when the querying result indicates that the mapping table does not comprise the tunnel message comprising the input port and the header.

In one example, the header comprises an Ethernet header, and the transformed header comprises an IP header. In one example, the transformed header comprises the header and a tunnel header corresponding to the input port and the header. For example, the above packet can be the packet received by the transmitter TX, and the transformed header can be the transformed header of the transformed packet transmitted by the transmitter TX. In one example, the header comprises an IP header, the transformed header comprises an Ethernet header, and the transformed header does not comprise the IP header. In one example, the header comprises the transformed header and a tunnel header corresponding to the input port and the header. For example, the above packet can be the packet received by the receiver RX, and the transformed header can be the transformed header of the transformed packet transmitted by the receiver RX. That is, the network device <NUM> can transform an Ethernet packet into an IP packet, and can also transform the IP packet into the Ethernet packet.

The present invention provides the method of handling the packet tunnel according to the above examples, which can improve efficiency of processing a routing and a tunneling, to solve the problem of that current network devices are inefficient and expensive.

<FIG> is a schematic diagram of a communication system <NUM> according to an example of the present invention. The communication system <NUM> may comprise network devices <NUM> and <NUM>, a transmitter (e.g., tunnel endpoint) <NUM> and a receiver (e.g., tunnel endpoint) <NUM>. The network device <NUM> in <FIG> may be utilized to realize the transmitter <NUM> and the receiver <NUM>, for handling a packet PKT and a packet PKTM. The packet PKT may comprise a header and a payload. The packet PKTM may comprise a transformed header and the payload. In detail, the network devices <NUM> and <NUM> may be bridges, gateways, routers, hubs, switch hubs, layer <NUM> (L2) switches, mobile phones, laptops, etc..

The transmitter <NUM> is coupled to the network devices <NUM>, for receiving the packet PKT from the network devices <NUM>. The transmitter <NUM> replaces the header of the packet PKT with the transformed header in a tunnel message, to generate the packet PKTM, when the tunnel message in the mapping table of the transmitter <NUM> comprises the header and the input port. The transmitter <NUM> first generates the transformed header by itself and then replaces the header of the packet PKT with the transformed header, to generate the packet PKTM, when the tunnel message comprising the header and the input port does not exist in the mapping table of the transmitter <NUM>.

The receiver <NUM> is coupled to the transmitter <NUM>, for receiving the packet PKTM from the transmitter <NUM>. The receiver <NUM> replaces the header of the packet PKTM with the transformed header in a tunnel message, to generate (recover) the packet PKT, when the tunnel message in the mapping table of the receiver <NUM> comprises the header and the input port. The receiver <NUM> first generates the transformed header by itself and then replaces the header of the packet PKTM with the transformed header, to generate the packet PKT, when the tunnel message comprising the header and the input port does not exist in the mapping table of the receiver <NUM>.

Detailed operations of the transmitter <NUM> and the receiver <NUM> can be referred to the operation of the network device <NUM>, and is not repeated herein.

<FIG> is a schematic diagram of a network device <NUM> according to an example of the present invention. The network device <NUM> may comprise a module <NUM>, a core layer <NUM>, a driver <NUM>, an input port <NUM> and an output port <NUM>. The module <NUM> may be utilized to realize the transceiving module <NUM>, the query module <NUM>, the processing module <NUM> and the storage module <NUM> in <FIG>. The input port <NUM> and the output port <NUM> may be utilized to realize the input port <NUM> and the output port <NUM> in <FIG>, respectively. The dotted arrow is a path via which the packet PKT is transmitted, when the querying result indicates that the mapping table does not comprise the tunnel message comprising the input port <NUM> and the header. The solid arrow is a path via which the packet PKT is transmitted, when the querying result indicates that the mapping table comprises the tunnel message comprising the input port <NUM> and the header. The driver <NUM> may be utilized to drive the network device to transmit and receive the packet. That is, the packet PKT does not need to be transmitted via the core layer <NUM> for performing the routing and the tunneling process, when the querying result indicates that the mapping table comprises the tunnel message comprising the input port and the header.

<FIG> is a schematic diagram of a mapping table <NUM> according to an example of the present invention. In one example, the mapping table <NUM> may be utilized in the network device <NUM> in <FIG>, for realizing the mapping table <NUM>. In one example, the mapping table <NUM> may be utilized in the communication system <NUM> in <FIG>, for realizing the mapping table in the transmitter <NUM>. The mapping table <NUM> may comprise a first tunnel message, a second tunnel message and a third tunnel message. The first tunnel message may comprise a header, a transformed header, an input port and an output port. The header may comprise a destination MAC address (e.g., <NUM>:<NUM>:<NUM>:<NUM>:<NUM>:<NUM>), a source MAC address (e.g., <NUM>:<NUM>:<NUM>:<NUM>:<NUM>:<NUM>), a Virtual Local Area Network (VLAN) identifier (VID) (e.g., <NUM>) and a Priority Code Point (PCP) (e.g., <NUM>). The transformed header may comprise a destination MAC address (e.g., <NUM>:<NUM>:e8:<NUM>:<NUM>:<NUM>), a source MAC address (e.g., <NUM>:<NUM>:e8:<NUM>:<NUM>:<NUM>), a VLAN ID (e.g., <NUM>), a PCP (e.g., <NUM>), a source IP address (e.g., <NUM>. <NUM>), a destination IP address (e.g., <NUM>. <NUM>), a tunnel header (e.g., GRE header) and a Differentiated Services Code Point (DSCP) (e.g., <NUM>).

In detail, the first tunnel message, the second tunnel message or the third tunnel message may be the tunnel message in the aforementioned examples. "<NUM>:<NUM>:<NUM>:<NUM>:<NUM>:<NUM>" may be the MAC address of the network device <NUM>. "<NUM>:<NUM>:<NUM>:<NUM>:<NUM>:<NUM>" may be the MAC address of the network device <NUM>. "<NUM>" may be the VID of the packet PKT, for identifying which VLAN the packet PKT belongs to. "<NUM>" may be the PCP of the packet PKT, for identifying a priority of the packet PKT transmitted in a link layer. "<NUM>:<NUM>:e8:<NUM>:<NUM>:<NUM>" may be the MAC address of the receiver <NUM>. "<NUM>:<NUM>:e8:<NUM>:<NUM>:<NUM>" may be the MAC address of the transmitter <NUM>. "<NUM>" may be the VID of the packet PKTM. <NUM>" may be the IP address of the transmitter <NUM>. <NUM>" may be the IP address of the receiver <NUM>. The GRE header may be the tunnel header of the packet PKTM. "<NUM>" may be the DSCP of the packet PKTM, for identifying a priority of the packet PKTM transmitted in a network layer.

The transmitter <NUM> replaces the header of the packet PKT with the transformed header in the first tunnel message, to form the transformed packet (e.g., the packet PKTM), when the header and the input port of the first tunnel message conform to (are the same with) the header of the packet PKT and the input port <NUM>. The transmitter <NUM> transmits the transformed packet to the receiver <NUM> via the output port (e.g., the output port <NUM>) of the first tunnel message. The network device <NUM> generates the tunnel message (e.g., the third tunnel message) and stores the tunnel message in the mapping table <NUM> according to the routing table of the core layer and the tunnel information, when there is no tunnel message with the header and the input port conforming to the header of the packet PKT and the input port <NUM> in the mapping table <NUM>.

According to the above description, it can be seen that the transmitter <NUM> can transform the Ethernet packet PKT without the IP header in the link layer into the packet PKTM with the IP header in the network layer, and transmit the network layer packer PKTM through the network layer to the receiver <NUM> via the tunnel. The receiver <NUM> can recover the Ethernet packet PKT without the network layer header from the packet PKTM with the network layer header. That is, the present invention provides the method of handling the packet tunnel, the Ethernet packet without the network layer header can be transmitted in the network layer according to the cross protocol layer method. Furthermore, the packet can be processed more efficiently, and the method therefore reduces the time taken by the network device to perform the routing process and the tunneling process.

Operations of the network device <NUM> in the above examples can be summarized into a process <NUM> shown in <FIG>. The process <NUM> includes the following steps:.

The process <NUM> is utilized to illustrate the example of the method of handling the packet tunnel of the network device <NUM>. Detailed descriptions and alternatives can be referred to the above, and is not repeated herein.

It should be noted that realizations of the network device <NUM> (including the transceiving module <NUM>, the query module <NUM>, the processing module <NUM>, the storage module <NUM>, the input port <NUM> and the output port <NUM>) are various. For example, the devices mentioned above may be integrated into one or more devices. In addition, the network device <NUM> may be realized by hardware (e.g., circuit), software, firmware (known as a combination of a hardware device, computer instructions and data that reside as read-only software on the hardware device), an electronic system or a combination of the devices mentioned above, but is not limited herein.

Claim 1:
A network device (<NUM>) for handling a packet tunnel, the network device comprising:
a core layer of a network device performing a routing process that is determining a transmission path of a packet and a tunneling process that is building a tunnel for a received packet according to a routing table, when a routing is operated in a wireless network,
a receiving module (<NUM>), for receiving a packet from an input port (<NUM>);
a query module (<NUM>), coupled to the receiving module, for querying a mapping table according to the input port and a header of the packet, to generate a query result;
a processing module (<NUM>), coupled to the query module, for performing instructions of:
determining a transformed header and an output port (<NUM>) according to the querying result, wherein the instruction of determining the transformed header and the output port according to the querying result comprising:
a tunnel message comprising the transformed header and the output port, when the querying result indicates that the mapping table comprises the tunnel message comprising the input port and the header; and
determining the transformed header and the output port according to the input port and the header, and generating the tunnel message and storing the tunnel message in the mapping table according to the routing table of the core layer and tunnel information, when the querying result indicates that the mapping table does not comprise the tunnel message comprising the input port and the header; and
replacing the header with the transformed header, to generate a transformed packet; and a transmitting module (<NUM>), coupled to the processing module, for transmitting the
transformed packet via the output port.