# US 2024/0205205 A1 · Packet sending method, network device, storage medium, and program product

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2024/0205205 A1
- Document ID: US20240205205A1
- Status: Published application
- Kind: A1
- Application number: 18/589,743
- Filed: 2024-02-28
- Published: 2024-06-20
- Earliest claimed: 2021-08-31
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Jianqiang HOU; Hongwei HE
- Web page: https://patentgrep.com/patent/US20240205205A1

## CPC

- H04L 45/74: Address processing for routing
- H04L 63/0485: {Networking architectures for enhanced packet encryption processing, e.g. offloading of IPsec packet processing or efficient security association look-up}
- H04L 45/34: {Source routing}
- H04L 45/741: Routing in networks with a plurality of addressing schemes, e.g. with both IPv4 and IPv6
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

A packet sending method, a network device, and a program product are disclosed, and pertain to the field of segment routing technologies. The method includes: A network device sends a packet which includes a segment routing header SRH and a payload, the SRH includes an encrypted field and an unencrypted field, the encrypted field includes at least an encrypted SID list, and the SID list indicates a transmission path of the packet. A SID list in an SRH of an SRv6 packet transmitted over a POP network is encrypted, thereby protecting SID information from being leaked. In addition, an intermediate node on a packet transmission path only needs to decrypt an encrypted field in the SRH to determine a next hop from the SID list, and does not need to decrypt the payload. This improves forwarding efficiency of the network device and protects secure transmission of the payload.

## Claims

### Claim 1

A packet sending method, comprising:
sending, by a network device, a packet, wherein the packet comprises a segment routing header (SRH) and a payload, the SRH comprises an encrypted field and an unencrypted field, the encrypted field comprises at least an encrypted segment identifier (SID) list, and the SID list indicates a transmission path of the packet.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the unencrypted field comprises a field indicating an index of a last SID in the SID list.

### Claim 3 (depends on 2)

The method according to claim 2, wherein the unencrypted field further comprises a routing type field.

### Claim 4 (depends on 2)

The method according to claim 2, wherein the unencrypted field further comprises a reserved flags field, and a value of the reserved flags field indicates that the SID list has been encrypted.

### Claim 5 (depends on 1)

The method according to claim 1, wherein the SRH comprises an extended type-length-value (TLV), the extended TLV carries encryption metadata, the encrypted field is encrypted based on the encryption metadata, and the encryption metadata is not encrypted.

### Claim 6 (depends on 5)

The method according to claim 5, wherein the unencrypted field further comprises a header extension length field.

### Claim 7 (depends on 5)

The method according to claim 5, wherein the extended TLV comprises an encryption flags field, and values of the encryption flags field indicate locations of the encrypted field and the unencrypted field in the SRH.

### Claim 8 (depends on 5)

The method according to claim 5, wherein the encrypted field further comprises encrypted padding data, and the extended TLV further carries the encrypted padding data.

### Claim 9 (depends on 5)

The method according to claim 5, wherein the extended TLV further carries an integrity check value, and the integrity check value is at least used to check integrity of the SID list and a field before the SID list in the SRH.

### Claim 10

A packet sending method, comprising:
receiving, by a network device, a first packet, wherein the first packet comprises a segment routing header (SRH) and a payload, the SRH comprises an encrypted field and an unencrypted field, the encrypted field comprises at least an encrypted segment identifier (SID) list, and the SID list indicates a transmission path of the first packet;
decrypting, by the network device, the encrypted field to obtain an SRH that does not comprise an encrypted field; and
processing, by the network device, the first packet based on the SRH that does not comprise an encrypted field.

### Claim 11 (depends on 10)

The method according to claim 10, wherein the processing, by the network device, the first packet based on the SRH that does not comprise an encrypted field comprises:
when the network device determines, based on the SRH that does not comprise an encrypted field, that the network device is not a destination of the payload, modifying, based on a next hop of the payload, the SRH that does not comprise an encrypted field, and generating a second packet based on a modified SRH, wherein the second packet comprises the modified SRH and the payload; and
sending, by the network device, the second packet.

### Claim 12 (depends on 11)

The method according to claim 11, further comprising:
before the generating a second packet based on a modified SRH, encrypting the modified SRH, wherein correspondingly, the SRH in the second packet comprises the encrypted field and the unencrypted field.

### Claim 13 (depends on 10)

The method according to claim 10, wherein
the decrypting the encrypted field comprises:
determining, by the network device, an end location of the SID list based on a field that is in the SRH and that indicates the an index of a last SID in the SID list, wherein the unencrypted field comprises the field indicating the index of the last SID in the SID list;
determining, by the network device, a start location of the SID list based on an IPV6 header of the first packet; and
determining and obtaining, by the network device, the encrypted SID list based on the start location and the end location of the SID list, to decrypt the encrypted SID list.

### Claim 14 (depends on 10)

The method according to claim 10, wherein
the decrypting the encrypted field comprises:
determining, by the network device, an end location of the SID list based on a field that is in the SRH and that indicates a index of a last SID in the SID list, wherein the unencrypted field comprises the field indicating the index of the last SID in the SID list and a routing type field;
determining, by the network device, a start location of the SID list based on the routing type field; and
determining and obtaining, by the network device, the encrypted SID list based on the start location and the end location of the SID list, to decrypt the encrypted SID list.

### Claim 15 (depends on 10)

The method according to claim 10,
the decrypting, by the network device, the encrypted field comprises:
when a value of a reserved flags field indicates that the SID list has been encrypted, performing an operation of decrypting the encrypted field, wherein the unencrypted field further comprises the reserved flags field.

### Claim 16

A network device, comprising:
a memory, storing instructions; and
a processor connected to the memory, wherein when the instructions are executed by the processor, the network device is configured to:
encrypt a segment routing header (SRH) in a packet, wherein the packet further comprises a payload, the encrypted SRH comprises an encrypted field and an unencrypted field, the encrypted field comprises at least an encrypted segment identifier (SID) list, and the SID list indicates a transmission path of the packet; and
send the packet.

### Claim 17 (depends on 16)

The network device according to claim 16, wherein the unencrypted field comprises a field indicating an index of a last SID in the SID list.

### Claim 18 (depends on 17)

The network device according to claim 17, wherein the unencrypted field further comprises a routing type field.

### Claim 19 (depends on 17)

The network device according to claim 17, wherein the unencrypted field further comprises a reserved flags field, and a value of the reserved flags field indicates that the SID list has been encrypted.

### Claim 20 (depends on 16)

The network device according to claim 16, wherein the SRH comprises an extended type-length-value (TLV), the extended TLV carries encryption metadata, the encrypted field is encrypted based on the encryption metadata, and the encryption metadata is not encrypted.
