October 25, 2022
BSD TCP/IP for Kyu - OSI protocols
The BSD networking code supports other protocols besides TCP/IP.
There are the "NS" (network simulator) protocols as well as "OSI".
Two things are worth bearing in mind.
One is history -- this work was done back in 1990 when it still
seemed possible that TCP/IP would be displaced by OSI.
The other is that BSD was a research effort and was exploring
different ways of doing networking.
OSI is now dead.
At one time OSI (Open Systems Interconnect) seemed like an interesting
and powerful collaboration where vendors and institutions were
working together. Ultimately pragmatism won out.
TCP/IP existed and worked and was available.
Whether or not OSI might have been better is hard to say,
but the question has little relevance.
OSI reference model
Almost every networking book or class presents the flawed 7 layer
OSI model for networking.
It is cute, even seductive, but by and large useless.
Even 25 years ago I found this model annoying.
I hated it. It did not work.
It never clarified or shed light on anything I was doing.
The flaw is that the 7 layers do not
exist in real networks and efforts to shoehorn existing network
stacks into the model leads to confusion rather than edification.
The idea of a layered model is certainly valid.
Let's look at something real, like a modern web server.
We have:
- 1 - an application layer (the Apache web server for example)
- 2 - an operating system layer (the socket API in a linux kernel).
- 3 - the TCP protocol layer in the kernel
- 4 - the IP layer performing routing and packet handling
- 5 - the device driver layer handling the network hardware
- 6 - the hardware (wires and transformers and silicon)
You could probably map what I just pulled off the top of my head onto
the OSI 7 layer model in some fashion, but I'm not certain what
purpose it would serve.
Looking at the above "model" you could argue that 2 and 6 are just
"plumbing" with nothing much interesting going on.
In fact you could view 5 and 6 both as "plumbing".
This would reduce to the following, which is most useful
from a host centric point of view:
- 1 - an application layer (the Apache web server for example)
- 2 - the TCP protocol layer in the kernel
- 3 - the IP layer performing routing and packet handling
- 4 - the device driver layer (including hadware)
Indeed, people have argued that TCP/IP was designed with as a 4 layer model
rather than a 7 layer model.
These models focus on what takes place on an end host.
People who work on network infrastructure find them of limited use.
Some advocate a simpler 3 layer model for a host:
- Application layer
- Service layer
- Connection layer
Have any comments? Questions?
Drop me a line!
Kyu / [email protected]