# US 2026/0281075 A1 · Tunneling STUN Packets in the Presence of Endpoint-Dependent NAT

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

- Number: US 2026/0281075 A1
- Document ID: US20260281075A1
- Status: Published application
- Kind: A1
- Application number: 19/081,324
- Filed: 2025-03-17
- Published: 2026-09-17
- Earliest claimed: 2025-03-17
- Assignees: Arista Networks, Inc.
- Applicants: Arista Networks, Inc.
- Inventors: Anand Narayanan RAO
- Web page: https://patentgrep.com/patent/US20260281075A1

## CPC

- H04L 61/2514: between local and global IP addresses
- H04L 12/4633: {Interconnection of networks using encapsulation techniques, e.g. tunneling}
- H04L 12/4641: {Virtual LANs, VLANs, e.g. virtual private networks [VPN] (LAN interconnection over a bridge based backbone H04L12/462; encapsulation techniques H04L12/4633; routing of packets H04L45/00; packet switches H04L49/00; virtual private networks for security H04L63/0272)}
- H04L 61/2517: using port numbers
- H04L 61/256: NAT traversal
- H04L 61/2592: using tunnelling or encapsulation
- H04L 2212/00: Encapsulation of packets
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

Techniques are provided for tunneling Session Traversal Utilities for NAT (STUN) packets between an edge device and a route reflector in a scenario where the edge device is behind an endpoint-dependent NAT (i.e., a NAT that performs different translations on network packets based on the destination of each packet). In certain embodiments, these techniques ensure that the route reflector learns/discovers “correct” public IP address/port information for the edge device in this scenario, or in other words public IP address/port information that enables the route reflector and the edge device to exchange tunneled data traffic.

## Claims

### Claim 1

A method performed by an edge network device in a Software-Defined Wide Area Network (SD-WAN), the method comprising:
receiving, from a Session Traversal Utilities for Network Address Translation (STUN) client running on the edge network device, a STUN binding request packet destined for a STUN server running on a route reflector of the SD-WAN;
encapsulating the STUN binding request packet within an overlay tunnel header, an outer Internet Protocol (IP) header, and an outer User Datagram Protocol (UDP) header, the encapsulated STUN binding request packet including:
a tunnel port in a destination port field of the outer UDP header, wherein the tunnel port is used for communication between the edge network device and the route reflector via an overlay tunnel; and
a first packet type in a packet type field of the overlay tunnel header, the first packet type indicating that the encapsulated STUN binding request packet is a STUN protocol packet; and
transmitting the encapsulated STUN binding request packet to the route reflector via a service provider network.

### Claim 2 (depends on 1)

The method of claim 1 wherein the overlay tunnel is encrypted using Internet Protocol Security (IPsec) and wherein the encapsulated STUN binding request packet includes twelve bytes of zero values between the outer UDP header and the overlay tunnel header.

### Claim 3 (depends on 1)

The method of claim 1 wherein a network address translation (NAT) layer in the service provider network:
intercepts the encapsulated STUN binding request packet;
translates the encapsulated STUN binding request packet into a NAT-ed encapsulated STUN binding request packet, the translating comprising:
changing a private IP address of the edge network device specified in a source IP address field of the outer IP header to a public IP address of the edge network device; and
changing a private port of the edge network device specified in a source port field of the outer UDP header to a public port of the edge network device; and
forwards the NAT-ed encapsulated STUN binding request packet to the route reflector.

### Claim 4 (depends on 3)

The method of claim 3 wherein the NAT layer is an endpoint-dependent NAT.

### Claim 5 (depends on 3)

The method of claim 3 wherein the route reflector:
receives the NAT-ed encapsulated STUN binding request packet;
determines that the received packet is an encapsulated STUN protocol packet by:
checking for presence of twelve bytes of zero values between the outer UDP header and the overlay tunnel header in a scenario where the overlay tunnel is encrypted using IPsec; and
checking the packet type field in the overlay tunnel header;
extracts, from the received packet, the STUN binding request packet originally sent by the STUN client by:
removing the outer IP header;
removing the outer UDP header;
removing the overlay tunnel header; and
removing the twelve bytes of zero values between the outer UDP header and the overlay tunnel header in the scenario where the overlay tunnel is encrypted using IPsec;
modifies a source IP address of the extracted STUN binding request packet to the public IP address included in the source IP address field of the removed outer IP header;
modifies a source port of the extracted STUN binding request packet to the public port included in the source port field of the removed outer UDP header; and
passes the modified STUN binding request packet to the STUN server for processing.

### Claim 6 (depends on 5)

The method of claim 5 wherein the STUN server:
receives the modified STUN binding request packet;
determines that the source IP address and the source port of the modified STUN binding request packet correspond to the edge network device's public IP address and public port; and
sends out a STUN binding response packet that includes the edge network device's public IP address and public port in a payload of the STUN binding response packet.

### Claim 7 (depends on 6)

The method of claim 6 wherein the route reflector:
receives the STUN binding response packet from the STUN server;
encapsulates the STUN binding response packet within a second overlay tunnel header, a second outer IP header, and a second outer UDP header, the encapsulated STUN binding response packet including:
the tunnel port in a source port field of the second outer UDP header; and
a second packet type in a packet type field of the second overlay tunnel header, the second packet type indicating that the encapsulated STUN binding response packet is a STUN protocol packet; and
transmits the encapsulated STUN binding response packet to the edge network device via the service provider network,
wherein the encapsulated STUN binding response packet includes twelve bytes of zero values between the second outer UDP header and the second overlay tunnel header in the scenario where the overlay tunnel is encrypted using IPsec.

### Claim 8 (depends on 7)

The method of claim 7 wherein the NAT layer:
intercepts the encapsulated STUN binding response packet;
reverse-translates the encapsulated STUN binding response packet into a deNAT-ed encapsulated STUN binding request packet, the reverse-translating comprising:
changing a destination IP address specified in a destination IP address field of the second outer IP header to the private IP address of the edge network device; and
changing a destination port specified in a destination port field of the second outer UDP header to the private port of the edge network device; and
forwards the deNAT-ed encapsulated STUN binding response packet to the edge network device.

### Claim 9 (depends on 8)

The method of claim 8 wherein the edge network device:
receives the deNAT-ed encapsulated STUN binding response packet;
determines that the received packet is an encapsulated STUN protocol packet by:
checking for presence of twelve bytes of zero values between the second outer UDP header and the second overlay tunnel header in the scenario where the overlay tunnel is encrypted using IPsec; and
checking the packet type field in the second overlay tunnel header;
extracts, from the received packet, the STUN binding response packet originally sent by the STUN server by:
removing the second outer IP header;
removing the second outer UDP header;
removing the second overlay tunnel header; and
removing the twelve bytes of zero values between the second outer UDP header and the second overlay header in the scenario where the overlay tunnel is encrypted using IPsec;
modifies a destination IP address of the extracted STUN binding response packet to the private IP address included in the destination IP address field of the removed second outer IP header;
modifies a destination port of the extracted STUN binding response packet to the private port included in the destination port field of the removed second outer UDP header;
modifies a source IP address of the extracted STUN binding response packet to a server IP address specified in a source IP address field of the removed second outer IP header; and
passes the modified STUN binding response packet to the STUN client for processing.

### Claim 10

An edge network device that is part of a Software-Defined Wide Area Network (SD-WAN), the edge network device comprising:
a processor; and
a memory having stored thereon program code that, when executed by the processor, causes the processor to:
receive, from a Session Traversal Utilities for Network Address Translation (STUN) client running on the edge network device, a STUN binding request packet destined for a STUN server running on a route reflector of the SD-WAN;
encapsulate the STUN binding request packet within an overlay tunnel header, an outer Internet Protocol (IP) header, and an outer User Datagram Protocol (UDP) header, the encapsulated STUN binding request packet including:
a tunnel port in a destination port field of the outer UDP header, wherein the tunnel port is used for communication between the edge network device and the route reflector via an overlay tunnel; and
a first packet type in a packet type field of the overlay tunnel header, the first packet type indicating that the encapsulated STUN binding request packet is a STUN protocol packet; and
transmit the encapsulated STUN binding request packet to the route reflector via a service provider network.

### Claim 11 (depends on 10)

The edge network device of claim 10 wherein the overlay tunnel is encrypted using Internet Protocol Security (IPsec) and wherein the encapsulated STUN binding request packet includes twelve bytes of zero values between the outer UDP header and the overlay tunnel header.

### Claim 12 (depends on 10)

The edge network device of claim 10 wherein a network address translation (NAT) layer in the service provider network:
intercepts the encapsulated STUN binding request packet;
translates the encapsulated STUN binding request packet into a NAT-ed encapsulated STUN binding request packet, the translating comprising:
changing a private IP address of the edge network device specified in a source IP address field of the outer IP header to a public IP address of the edge network device; and
changing a private port of the edge network device specified in a source port field of the outer UDP header to a public port of the edge network device; and
forwards the NAT-ed encapsulated STUN binding request packet to the route reflector.

### Claim 13 (depends on 12)

The edge network device of claim 12 wherein the NAT layer is an endpoint-dependent NAT.

### Claim 14 (depends on 12)

The edge network device of claim 12 wherein the route reflector:
receives the NAT-ed encapsulated STUN binding request packet;
determines that the received packet is an encapsulated STUN protocol packet by:
checking for presence of twelve bytes of zero values between the outer UDP header and the overlay tunnel header in a scenario where the overlay tunnel is encrypted using IPsec; and
checking the packet type field in the overlay tunnel header;
extracts, from the received packet, the STUN binding request packet originally sent by the STUN client by:
removing the outer IP header;
removing the outer UDP header;
removing the overlay tunnel header; and
removing the twelve bytes of zero values between the outer UDP header and the overlay tunnel header in the scenario where the overlay tunnel is encrypted using IPsec;
modifies a source IP address of the extracted STUN binding request packet to the public IP address included in the source IP address field of the removed outer IP header;
modifies a source port of the extracted STUN binding request packet to the public port included in the source port field of the removed outer UDP header; and
passes the modified STUN binding request packet to the STUN server for processing.

### Claim 15 (depends on 14)

The edge network device of claim 14 wherein the STUN server:
receives the modified STUN binding request packet;
determines that the source IP address and the source port of the modified STUN binding request packet correspond to the edge network device's public IP address and public port; and
sends out a STUN binding response packet that includes the edge network device's public IP address and public port in a payload of the STUN binding response packet.

### Claim 16 (depends on 15)

The edge network device of claim 15 wherein the route reflector:
receives the STUN binding response packet from the STUN server;
encapsulates the STUN binding response packet within a second overlay tunnel header, a second outer IP header, and a second outer UDP header, the encapsulated STUN binding response packet including:
the tunnel port in a source port field of the second outer UDP header; and
a second packet type in a packet type field of the second overlay tunnel header, the second packet type indicating that the encapsulated STUN binding response packet is a STUN protocol packet; and
transmits the encapsulated STUN binding response packet to the edge network device via the service provider network,
wherein the encapsulated STUN binding response packet includes twelve bytes of zero values between the second outer UDP header and the second overlay tunnel header in the scenario where the overlay tunnel is encrypted using IPsec.

### Claim 17 (depends on 16)

The edge network device of claim 16 wherein the NAT layer:
intercepts the encapsulated STUN binding response packet;
reverse-translates the encapsulated STUN binding response packet into a deNAT-ed encapsulated STUN binding request packet, the reverse-translating comprising:
changing a destination IP address specified in a destination IP address field of the second outer IP header to the private IP address of the edge network device; and
changing a destination port specified in a destination port field of the second outer UDP header to the private port of the edge network device; and
forwards the deNAT-ed encapsulated STUN binding response packet to the edge network device.

### Claim 18 (depends on 17)

The edge network device of claim 17 wherein edge network device:
receives the deNAT-ed encapsulated STUN binding response packet;
determines that the received packet is an encapsulated STUN protocol packet by:
checking for presence of twelve bytes of zero values between the second outer UDP header and the second overlay tunnel header in the scenario where the overlay tunnel is encrypted using IPsec; and
checking the packet type field in the second overlay tunnel header;
extracts, from the received packet, the STUN binding response packet originally sent by the STUN server by:
removing the second outer IP header;
removing the second outer UDP header;
removing the second overlay tunnel header; and
removing the twelve bytes of zero values between the second outer UDP header and the second overlay header in the scenario where the overlay tunnel is encrypted using IPsec;
modifies a destination IP address of the extracted STUN binding response packet to the private IP address included in the destination IP address field of the removed second outer IP header;
modifies a destination port of the extracted STUN binding response packet to the private port included in the destination port field of the removed second outer UDP header;
modifies a source IP address of the extracted STUN binding response packet to a server IP address specified in a source IP address field of the removed second outer IP header; and
passes the modified STUN binding response packet to the STUN client for processing.

### Claim 19

A method performed by a route reflector in a Software-Defined Wide Area Network (SD-WAN), the method comprising:
receiving a Network Address Translation (NAT)-ed encapsulated Session Traversal Utilities for NAT (STUN) binding request packet;
determining that the received packet is an encapsulated STUN protocol packet by checking a packet type field in an overlay tunnel header in the received packet;
extracting, from the received packet, a STUN binding request packet originally sent by a STUN client running on an edge network device by:
removing an outer Internet Protocol (IP) header;
removing an outer User Datagram Protocol (UDP) header; and
removing the overlay tunnel header;
modifying a source IP address of the extracted STUN binding request packet to a public IP address included in a source IP address field of the removed outer IP header;
modifying a source port of the extracted STUN binding request packet to a public port included in a source port field of the removed outer UDP header; and
passing the modified STUN binding request packet to a STUN server running on the route reflector for processing.

### Claim 20 (depends on 19)

The method of claim 19 wherein an overlay tunnel between the route reflector and the edge network device is encrypted using Internet Protocol Security (IPsec), wherein determining that the received packet is an encapsulated STUN protocol packet further comprises checking for presence of twelve bytes of zero values between the outer UDP header and the overlay tunnel header, and wherein extracting the STUN binding request packet further comprises removing the twelve bytes of zero values.
