Patent ID: 11902156
Assignee: HUAWEI TECHNOLOGIES CO., LTD.
Field: Digital communication (Electrical engineering)
Classification: CPC H | IPC H

Claim 29:
30. A network system, comprising:
a first network device; and
a second network device,
wherein the first network device is configured to:
obtain an original segment list corresponding to a packet forwarding path, wherein the original segment list comprises original segment identifiers that are sequentially arranged, and each original segment identifier in the original segment identifiers that are sequentially arranged corresponds to one network device on the packet forwarding path,
and wherein the original segment list comprises S successively adjacent original segment identifiers;
generate a compressed segment list, wherein the compressed segment list comprises C successively adjacent compressed segment identifiers, wherein the C compressed segment identifiers are in a one-to-one correspondence with C original segment identifiers in the S original segment identifiers, first N bytes in each of the S original segment identifiers are the same, a length of each of the C compressed segment identifiers is X bytes, each of the C compressed segment identifiers comprises X bytes following the first N bytes in the corresponding original segment identifier, a sequence of the C compressed segment identifiers is the same as a sequence of the C original segment identifiers, and a length of each of the C compressed segment identifiers is less than a length of a corresponding original segment identifier, and wherein N is a positive integer, X is a positive integer, S is a positive integer, C is a positive integer, and C is less than or equal to S; and
receive a packet, wherein the packet is forwarded along the packet forwarding path; and
encapsulate the compressed segment list into the packet, and send the packet to the second network device, and

wherein the second network device is configured to: receive the packet sent by the first network device;
generate, based on the compressed segment identifier and a destination address of the packet, an original segment identifier corresponding to the compressed segment identifier, wherein the original segment identifier corresponds to a next-hop node of the second network device on the forwarding path of the packet, and a length of the compressed segment identifier is less than a length of the original segment identifier; and
send the packet to the next-hop node based on the original segment identifier.