How to share IPv4 addresses by partitioning the port space
summary
Describes a concrete implementation to share an IPv4 egress address by carving the ephemeral port space into 512-port slices assigned to servers; user-space sampling worked in production for TCP but fails for UDP. Proposes kernel changes: store a per-socket ephemeral range, clamp per-net ephemeral range at connect time, and add a stricter bind_add lookup so UDP treats destination tuple when deciding conflicts. RFC patches are posted; TCP works today, UDP needs the new protocol op and API combination IP_BIND_NO_PORT + REUSEADDR.
AI-written summary · about
chapters (7)
- 0:00Introduction
- 1:05IPv4 address traits and challenges
- 4:35Extreme solutions for IP sharing
- 8:53Port space partitioning concept
- 13:21Kernel API limitations
- 23:06Alternative approaches and API design
- 26:42Q&A and discussion
related talks
18mNATless IPv6/IPv4 Address Translation
26mContainer Networking: The Play of BPF and Network NS with different...
01h 21mTutorial: Developing High-performance Networking Applications
24mSpeedrun Through Splicing Sockets with Sockmap
33mSUPERp: Scale UP EtherRnet Protocol
26mIPv6 for Programmers
48mIPv6 for Server Admins and Client Developers
28mSafe sharing of the network with eBPF
