CPC H04L 45/566 (2013.01) [H04L 45/123 (2013.01); H04L 45/42 (2013.01)] | 30 Claims |
1. A network device, comprising:
at least one processor;
one or more memories coupled to the at least one processor and storing programming instructions, wherein the at least one processor is configured to execute the programming instructions to cause the network device 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 node or link on the packet forwarding path, and wherein the original segment list comprises S successively adjacent original segment identifiers; and
generate a compressed segment list, wherein the compressed segment list comprises C successively adjacent compressed segment identifiers, and the compressed segment list is used to forward a packet along the packet forwarding path, 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 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.
|