[ih] Separation of TCP and IP

Toerless Eckert tte at cs.fau.de
Thu Jun 23 21:19:50 PDT 2022


On Thu, Jun 23, 2022 at 09:22:10PM -0600, Grant Taylor via Internet-history wrote:
> On 6/23/22 8:44 PM, Toerless Eckert via Internet-history wrote:
> > Alas, this is not how TCP stacks where written. Instead they moved the
> > whole TCP protocol into the system level (linux kernel), making
> > per-application optimizations quite painful and slow to evolve. All the
> > Foo-over-UDP that has evolved is at least in part prove of that problem.
> 
> Perhaps I'm going to show my ignorance here, but I've got to ask:
> 
> Where does ping's use of raw sockets fit in this paradigm?

Good point: Raw sockets allow to build protocols like TCP at
process level, BUT: because their only demux point is the
IP layer proto / IPv6 next-proto field (and maybe the local ip address,
not sure), the kernel can not demux
the packets towards an actual application owner and hence this
just allows to outsource a single TCP implementation into userland.

But not for example having two competing browser apps in userland,
each one bringing its own "perfected/optimized" TCP implementation.

> It seems to me like that is lower than the typical TCP application but
> definitely more creating an entire TCP/IP stack in user space.
> 
> Aside:  I know that there are multiple TCP/IP stacks in user space from
> different people / companies.  My employer uses (at least) one for very
> specific things.

I have not looked into the details for a long time, but i think
that if you wanted to separate apps to run their own independent
TCP stacks in userland with raw sockets, both would need to run
with root privilege and have separate IP addresses (aka: require
multiple addresses on the host).

Of course, if we would have started with everything on top of UDP,
including TCP, that would have resulted in a whole other set
of interesting challenges over the decades, some of which i think
we haven't even solved well today.

Cheers
    Toerless
> 
> 
> -- 
> Grant. . . .
> unix || die
> -- 
> Internet-history mailing list
> Internet-history at elists.isoc.org
> https://elists.isoc.org/mailman/listinfo/internet-history

-- 
---
tte at cs.fau.de



More information about the Internet-history mailing list