Patent ID: 8107506

Claim:
A method for reducing service impairment in a Link Aggregation Group (LAG) comprising: dividing a service packet into multiple service sub-flows; allocating the multiple service sub-flows to each physical port of a plurality of physical ports such that a maximum difference between a quantity of service sub-flows on one physical port and a quantity of service sub-flows on another physical port is equal to 1; determining a first group and a second group from the plurality of physical ports, wherein physical ports of the first group have a same number of service sub-flows and physical ports of the second group have a same number of service sub-flows, and the number of service sub-flows on each physical port of the first group is larger than the number of service sub-flows on each physical port of the second group by 1; adding a new physical port; selecting one physical port from the first group consecutively; obtaining one service sub-flow on the selected physical port and allocating the obtained one service sub-flow to the new physical port; and determining whether a difference between a quantity of service sub-flows on the new physical port and a quantity of service sub-flows on each of the physical ports is equal to or less than 1; if the difference is equal to or less than 1, ending the allocating process; if the difference is larger than 1, determining whether the first group is traversed; if the first group is traversed, selecting a physical port from the second group consecutively; obtaining one service sub-flow on the selected physical port and allocating the obtained one service sub-flow to the new physical port; and determining whether a difference between a quantity of service sub-flows on the new physical port and a quantity of service sub-flows on each of the physical ports is equal to or less than 1; if the difference is equal to or less than 1, ending the allocating process is ended; and if the difference is larger than 1, determining whether the second group is traversed; if the second group is traversed, selecting one physical port from the first group consecutively again, obtaining one of the remaining service sub-flows on the selected physical port and allocating the obtained one of the remaining service sub-flows to the new physical port, and ending the allocating process until the difference is equal to or less than 1; and forwarding the service packet, according to the corresponding physical ports of the service sub-flows.