# US 2022/0294712 A1 · Using fields in an encapsulation header to track a sampled packet as it traverses a network

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

- Number: US 2022/0294712 A1
- Document ID: US20220294712A1
- Status: Published application
- Kind: A1
- Application number: 17/670,715
- Filed: 2022-02-14
- Published: 2022-09-15
- Earliest claimed: 2021-03-09
- Assignees: Arista Networks, Inc.
- Applicants: Arista Networks, Inc.
- Inventors: Vijay Rangarajan; Padmanabh Ratnakar; Punit Jaiswal; T B Binoshmon; Ashutosh Shukla
- Web page: https://patentgrep.com/patent/US20220294712A1

## CPC

- H04L 43/022: by sampling
- H04L 12/4633: {Interconnection of networks using encapsulation techniques, e.g. tunneling}
- H04L 69/22: Parsing or analysis of headers
- H04L 43/06: Generation of reports
- H04L 2212/00: Encapsulation of packets
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

In general, one aspect, the disclosure relates to a method for sampling packets in a network. The method includes receiving, by a first network device, a packet, making a first determination, by the first network device, that the packet is to be sampled, in response to the first determination: sampling the packet to obtain sampling data, storing sampling metadata associated with the packet, encapsulating, after the sampling, the packet to obtain an encapsulated packet, where the encapsulated packet comprises a bit that is set in an encapsulation header, wherein the bit is set based on the presence of the sampling metadata, and transmitting the encapsulated packet to a second network device.

## Claims

### Claim 1

A method for sampling packets in a network, comprising:
receiving, by a first network device, a packet;
making a first determination, by the first network device, that the packet is to be sampled;
in response to the first determination:
sampling the packet to obtain sampling data;
storing sampling metadata associated with the packet;
encapsulating, after the sampling, the packet to obtain an encapsulated packet, wherein the encapsulated packet comprises a bit that is set in an encapsulation header, wherein the bit is set based on the presence of the sampling metadata; and
transmitting the encapsulated packet to a second network device.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
receiving, by the first network device, a second packet from a third network device;
making a second determination, by the first network device, that the second packet is encapsulated;
in response to the second determination, making a third determination that a bit in an encapsulation header of the second packet is set; and
in response to the third determination, sampling the second packet.

### Claim 3 (depends on 2)

The method of claim 2, further comprising:
transmitting the second packet towards its destination without performing any additional evaluation of the second packet about whether the second packet satisfies a sampling rule.

### Claim 4 (depends on 1)

The method of claim 1, further comprising:
receiving, by the first network device, a second packet from a third network device;
making a second determination, by the first network device, that the second packet is encapsulated;
in response to the second determination, making a third determination that a bit in an encapsulation header of the second packet is not set; and
in response to the third determination, transmitting the second packet towards its destination without sampling the second packet and without performing any additional evaluation of the second packet to determine whether the second packet satisfies a sampling rule.

### Claim 5 (depends on 1)

The method of claim 1, wherein the encapsulated packet is a virtual extensible local area network (VXLAN) packet and wherein the encapsulation header is a VXLAN header and wherein the bit is one of a plurality of reserved bits in the VXLAN header

### Claim 6 (depends on 1)

The method of claim 1, further comprising:
transmitting the sampling data to collector circuitry

### Claim 7 (depends on 1)

The method of claim 1, wherein making the first determination, by the first network device, that the packet is to be sampled comprises:
evaluating at least a portion of a header of the packet to determine whether the at least the portion of the header of the packet matches a sampling rule,
wherein the header of the packet is distinct from the encapsulation header.

### Claim 8 (depends on 1)

The method of claim 1, further comprising:
discarding the sampling metadata after the encapsulated packet is transmitted to the second network device.

### Claim 9

A method for sampling packets, comprising:
receiving, by a first network device, a packet from a second network device;
making a determination, by the first network device, that the packet is encapsulated;
in response to the determination, making a second determination that a bit in an encapsulation header of the packet is set, wherein the bit was not set by the first network device;
sampling, based on the second determination, the packet to obtaining sampling data, wherein the sampling is performed without the network device performing any additional evaluation on the packet to determine whether the packet satisfies a sampling policy; and
after the sampling, transmitting the packet towards its destination.

### Claim 10 (depends on 9)

The method of claim 9, further comprising:
transmitting the sampling data to collector circuitry.

### Claim 11 (depends on 9)

The method of claim 9, wherein the packet is a virtual extensible local area network (VXLAN) packet and wherein the encapsulation header is a VXLAN header.

### Claim 12 (depends on 10)

The method of claim 10, wherein the bit is one of a plurality of reserved bits in the VXLAN header.

### Claim 13 (depends on 9)

The method of claim 9, wherein the bit is one of a plurality of reserved bits specified in an encapsulation protocol.

### Claim 14

A network device, comprising:
packet processing circuitry configured to:
receive a packet;
make a first determination that the packet is to be sampled;
in response to the first determination:
sample the packet to obtain sampling data;
store sampling metadata associated with the packet;
encapsulate, after the sampling, the packet to obtain an encapsulated packet, wherein the encapsulated packet comprises a bit that is set in an encapsulation header, wherein the bit is set based on the presence of the sampling metadata; and
transmit the encapsulated packet to a second network device.

### Claim 15 (depends on 14)

The network device of claim 14, further comprising:
control circuitry configured to:
transmit the sampling data to collector circuitry.

### Claim 16 (depends on 14)

The network device of claim 14, wherein the encapsulated packet is a virtual extensible local area network (VXLAN) packet, wherein the encapsulation header is a VXLAN header, and wherein the bit is one of a plurality of reserved bits in the VXLAN header.

### Claim 17 (depends on 14)

The network device of claim 14, wherein making the first determination that the packet is to be sampled comprises:
evaluating at least a portion of a header of the packet to determine whether the at least the portion of the header of the packet matches a sampling rule,
wherein the header of the packet is distinct from the encapsulation header.

### Claim 18 (depends on 14)

The network device of claim 14,
wherein the packet processing circuitry is further configured to:
discard the sampling metadata after the encapsulated packet is transmitted to the second network device.

### Claim 19 (depends on 14)

The network device of claim 14, wherein the bit is one of a plurality of reserved bits specified in an encapsulation protocol.

### Claim 20 (depends on 14)

The network device of claim 14, wherein the sampling metadata indicates that the packet matches at least one sampling rule.
