Last time…
We introduced Sixgate as a simple way for IPv4-only clients to automatically reach IPv6-only servers. The idea is to let server operators drop IPv4 entirely — except for a single gateway — while still remaining accessible to legacy clients. It’s a bridge, not a wall.
This post explains how Sixgate works in practice: how clients discover the gateway, how packets are encapsulated, and how responses are routed — all without requiring session state.
This page as published is version 0.1. If I make a substantive edit I will update the version.
🔧 Core Components
Sixgate relies on four key elements:
- SRV Records in Reverse DNS Zones
- UDP-Based IPv6 Packet Encapsulation
- Gateway Forwarding with Embedded IPv4 Identity
- Stateless Response Routing
1. Gateway Discovery via SRV Records
When a client receives an IPv6 address from DNS but cannot connect due to lack of IPv6 support, it performs a fallback SRV query to discover a gateway.
SRV Query Format
The query uses the reverse-nibble format of the IPv6 address, similar to ip6.arpa, but requests a service record:
_sixgate._udp.<addr>.ip6.arpaFor example, for IPv6 address 2001:db8::1, the query becomes:
_sixgate._udp.1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpaThe SRV record returns:
- Target: IPv4-accessible hostname of the gateway (for example, gw.example.com)
- Port: The UDP port listening for Sixgate packets on that IPv4 host.
The client then performs an A record lookup to resolve the IPv4 address of the gateway.
2. UDP Encapsulation of IPv6 Packets
The client constructs a standard IPv6 packet as if it had native connectivity. It then wraps this packet in a UDP payload and sends it to the gateway’s IPv4 address and designated port.
- Outer Layer: IPv4 + UDP
- Payload: Raw IPv6 packet (including headers and data)
This is similar to Teredo’s encapsulation model but reversed in direction and purpose.
3. Gateway Forwarding with Embedded IPv4 Identity
Upon receiving the UDP packet, the gateway:
- Extracts the IPv6 packet from the payload.
- Rewrites the source IPv6 address to one of its own — embedding the client’s IPv4 address and UDP port into the lower 48 bits.
- Forwards the packet to the target IPv6-only server.
This rewriting is necessary because the original client has no routable IPv6 address. By embedding the client’s identity into the source address, the gateway enables stateless response routing and preserves visibility for server-side analysis.
Encoding Format
Assuming the gateway controls a /48 prefix (e.g., 2001:db8:abcd::/48), it constructs:
2001:db8:abcd:xxxx:yyyy:zzzzWhere:
- xxxx:yyyyencodes the client’s IPv4 address (e.g.,- 192.0.2.1→- c000:0201)
- zzzzencodes the client’s UDP port (e.g., decimal- 2820→- 0b04in hex)
This allows the server to:
- See a unique IPv6 source address per client
- Optionally extract the embedded IPv4 identity for logging, rate limiting, or application-layer logic
And it allows the gateway to:
- Reconstruct the client’s IPv4 address and port from the destination address of the server’s response
- Encapsulate the response in UDP and send it back — without maintaining a session table
This stateless design is the default behavior for Sixgate. It simplifies implementation, improves scalability, and ensures that the server can still perform meaningful analysis of client identity.
🧱 Deployment Realities
- IPv4 Address Requirement: Each IPv6-only cluster must maintain a single IPv4 address for the gateway. This is far lighter than full dual-stack hosting.
- DNS Availability: DNS must remain reachable over IPv4 to resolve both the original AAAA record and the SRV fallback.
- Firewall Traversal: Clients must be able to send outbound UDP packets to arbitrary destinations and receive UDP responses from the gateway.
🧪 Prototype and Standardization
Sixgate can be prototyped as:
- A browser extension or OS-level library
- A reference gateway daemon
- An experimental IETF draft defining SRV usage and encapsulation format
🌉 Summary
Sixgate offers a practical, decentralized way to let IPv6 stand alone — without leaving anyone behind. By shifting compatibility to the edge and leveraging DNS for discovery, it enables graceful IPv6-only deployments while preserving access for legacy clients.
If you’re interested in implementing or extending Sixgate, I’d love to collaborate. Let’s build the bridge — and let IPv6 finally stand on its own.
Coming soon: A follow-up post will explore Sixgate’s security considerations — including abuse prevention, spoofing risks, and how gateway operators can balance openness with protection. If Sixgate is to be deployed in the wild, it must be safe as well as simple.
Credits
🦉 Written and published by me, Bill P. Godfrey.
✍️ Editorial assistance from Echoquill, my robotic assistant.

