主权项 |
1. A network device for transmitting encapsulating packets via an aggregated plurality of logical network connections after receiving packets, comprising:
a computer readable storage medium, wherein the computer readable storage medium stores a set of instructions and a plurality of priority queues; a plurality of network interfaces, wherein packets are received from at least one of the plurality of network interfaces; and a processing unit, wherein the processing unit executes the set of instructions to perform: receiving a packet via of the plurality of network interfaces; determining a global sequence number of the packet; determining a priority level of the packet based on port number of the packet, content of the packet, and/or type of service field in the packet; storing the packet in one of the plurality of priority queues according to the determined priority level; determining a priority sequence number corresponding to the determined priority level for the packet, wherein the priority sequence number is based on the arrival sequence of the packet, wherein the priority sequence number is unique during a lifetime of the aggregated plurality of logical network connection; selecting a first priority queue from the plurality of priority queues; wherein (i) a highest priority queue is selected as the first priority queue, (ii) a priority queue with the largest number of packets is selected as the first priority queue, (iii) a priority queue which has a packet having been stored for the longest time is selected as the first priority queue, (iv) a priority queue with the largest number of packets is selected as the first priority queue, or (v) a priority queue is selected as the first priority queue according to an equation or a policy; retrieving a first packet from the first priority queue when the network device is able to transmit the first packet; selecting a first logical network connection from the plurality of logical network connections for transmission; determining a logical network sequence number; encapsulating the first packet, the determined priority level, the determined global sequence number, the determined priority sequence number and the determined logical network sequence number in the at least one encapsulating packet; and transmitting the at least one encapsulating packet via the selected logical network and via one of the plurality of network interfaces; wherein the network device is connected to a plurality of logical network connections via the plurality of network interfaces. |