A packet transmission method, wherein the method is applied to a network comprising a first link and a second link between a transmitting device, being a network device, and a router, and the method comprises: determining, by the transmitting device based on a length of a packet, whether a quantity of tokens in a first token bucket meets a requirement for transmitting the packet, wherein a token injection rate of the first token bucket is set based on bandwidth of the first link; when determining that the quantity of tokens in the first token bucket meets the requirement for transmitting the packet, obtaining, by the transmitting device, a quantity of tokens required for transmitting the packet, and transmitting the packet by using the first link; when determining that the quantity of tokens in the first token bucket does not meet the requirement for transmitting the packet, further determining, by the transmitting device, whether the second link is congested; and when determining that the second link is not in a congested state, transmitting, by the transmitting device, the packet by using the second link; wherein the transmitting, by the transmitting device, the packet by using the second link when determining that the second link is not in a congested state comprises: when a quantity of in-flight packets transmitted by the transmitting device on the second link is less than an in-flight packet threshold, determining, by the transmitting device, that the second link is not in a congested state, wherein the quantity of in-flight packets is a sum of a number of bytes of packets that are being transmitted on the second link and for which the transmitting device has not received an acknowledgment message, wherein the acknowledgment message is a message that is sent to the transmitting device by a receiving device of the second link when a packet sent by the transmitting device is received and is correctly sequenced at the receiving device, to acknowledge receipt of the packet at the receiving device, and the in-flight packet threshold is a threshold that is set based on a quantity of packets that can be accommodated by the second link. determining, by the transmitting device based on a length of a packet, whether a quantity of tokens in a first token bucket meets a requirement for transmitting the packet, wherein a token injection rate of the first token bucket is set based on bandwidth of the first link; when determining that the quantity of tokens in the first token bucket meets the requirement for transmitting the packet, obtaining, by the transmitting device, a quantity of tokens required for transmitting the packet, and transmitting the packet by using the first link; when determining that the quantity of tokens in the first token bucket does not meet the requirement for transmitting the packet, further determining, by the transmitting device, whether the second link is congested; and when determining that the second link is not in a congested state, transmitting, by the transmitting device, the packet by using the second link; wherein the transmitting, by the transmitting device, the packet by using the second link when determining that the second link is not in a congested state comprises: when a quantity of in-flight packets transmitted by the transmitting device on the second link is less than an in-flight packet threshold, determining, by the transmitting device, that the second link is not in a congested state, wherein the quantity of in-flight packets is a sum of a number of bytes of packets that are being transmitted on the second link and for which the transmitting device has not received an acknowledgment message, wherein the acknowledgment message is a message that is sent to the transmitting device by a receiving device of the second link when a packet sent by the transmitting device is received and is correctly sequenced at the receiving device, to acknowledge receipt of the packet at the receiving device, and the in-flight packet threshold is a threshold that is set based on a quantity of packets that can be accommodated by the second link. when a quantity of in-flight packets transmitted by the transmitting device on the second link is less than an in-flight packet threshold, determining, by the transmitting device, that the second link is not in a congested state, wherein the quantity of in-flight packets is a sum of a number of bytes of packets that are being transmitted on the second link and for which the transmitting device has not received an acknowledgment message, wherein the acknowledgment message is a message that is sent to the transmitting device by a receiving device of the second link when a packet sent by the transmitting device is received and is correctly sequenced at the receiving device, to acknowledge receipt of the packet at the receiving device, and the in-flight packet threshold is a threshold that is set based on a quantity of packets that can be accommodated by the second link.