Good evening bouabidi-ga,
Networking is a fun topic. It's burdened with a lot of baggage, and
some real gems. Thanks for the chance to delve back into some of the
theory.
The DoD model, developed in the '70s for DARPA, is a 4-layer model
that maps clearly to current common internet protocols, as the modern
internet is a fairly straightforward evolution of the old DARPA net.
The four layers in the DoD model are:
Layer 1: the network access layer
For example, in an ethernet network with a hub connecting a bunch
of computers, the MAC address of each network card allows packets to
be delivered to a particular card - cards whose MAC addresses do not
match the address in the packet simply ignore it. Other network types
use different schemes.
Layer 2: the internet layer
IP, the Internet Protocol, which defines IP numbers, exists at this
layer. Many routing schemes route based on this layer (for example,
if you try to access an IP number in Scandanavia, your gateway looks
in its routing table for the IP number you're trying to get to,
determines the next place to route it along its way, and passes it
along. Eventually the packet reaches Scandanavia, or something
happens along the way and it gets lost).
Layer 3: the host-to-host layer
This is where flow-control and connection protocols exist. Whereas
Layer 1 deals with packet delivery in a single network, and Layer 2
deals with packet delivery over multiple networks, Layer 3 deals with
opening connections, ensuring packets are in fact recieved (IP does
not notice that packets get lost, whereas TCP does, and re-sends
them).
Layer 4: the process layer
This is where the interesting things happen. SMTP, FTP, SSH, HTTP,
etc. These are all the "higher level" protocols live, insulated from
all the problems buried in layers 1-3. These protocols don't need to
know anything about ethernet, or sonet, or token rings, as this is all
handled for them lower down.
The OSI model (later adopted by the ISO) was defined in committee by
more academic persons than the DoD model, which was defined by people
who needed to get things done. Consequently, the OSI model is nicer
from a theoretical standpoint, but introduces a lot of overhead.
Modern protocols cheerfully span multiple OSI network layers. The
seven defined layers are:
Layer 1: the physical layer
This describes the physical properties of the network. It defines
signalling on thicknet, types of connectors used, termination, and
electrical signalling. This layer maps fairly well to layer 1 in the
DoD model.
Layer 2: the data link layer
This layer defines how information is transmitted on Layer 1. It
defines ethernet frames, checksums, etc. This is also contained
within layer 1 of the DoD model.
Layer 3: the network layer
This handles routing and addressing, and maps to layer 2 in the DoD model.
Layer 4: the transport layer
This layer handles flow control and data delivery. This is where
retransmission of dropped packets is handled. This layer is
comparable to layer 3 of the DoD model.
Layer 5: the session layer
Less well-defined, this layer handles data larger than a single
packet. For example, it details how request and response packets are
part of an RPC call. This is handled in the DoD's layer 4.
Layer 6: the presentation layer
This layer describes how to transfer data between disparate
systems. For example, if I am on a little-endian machine using some
nonstandard floating point format, how do I transfer something like
1.274 to you, if you are using a big-endian machine that adheres to
the IEEE floating-point standard? This too is handled in layer 4 of
the DoD model.
Layer 7: the application layer
Like layer 4 in the DoD model, this is where applications actually
work, though as we've seen, the DoD's app layer is bigger.
The OSI layer is a good way to think about networking, as it splits up
the various issues, and allows each layer to build upon the lower
layers fairly well. However, actually implementing each layer
separately leads to a ton of overhead, and would make networks slow.
Despite the fact that the OSI model doesn't really map well to current
technology, it is extensively referenced. For example, if you buy a
"layer 2 / 3 switch", the layer 2 and 3 being referred to are the OSI
layers, not the DoD layers. On the other hand, when someone refers in
verbal conversation to the physical layer, they usually refer both to
OSI layer 1 and 2, or equivalently to DoD layer 1.
Suffice it to say that things are not as clear as they might be. If
you need more information, don't hesitate to ask.
-Haversian
Links:
DoD model description (brief):
http://www.freesoft.org/CIE/Course/Section1/5.htm
OSI model description (brief):
http://www.freesoft.org/CIE/Topics/15.htm
The Wikipedia (puts a lot of this info in one place):
http://en.wikipedia.org/wiki/OSI_model
Examples of how the OSI model and modern protocols map (a bit ad-ish):
http://searchnetworking.techtarget.com/sDefinition/0,,sid7_gci523729,00.html
Comparison of the two (only naming) - Has a good graphical comparison:
http://gwis2.circ.gwu.edu/~syoung/Page6.html
(page moved: use archive.org:
http://web.archive.org/web/20011128020553/http://gwis2.circ.gwu.edu/~syoung/Page6.html
)
Good discussion of both the DoD model and the OSI model, with examples:
http://www.comptechdoc.org/independent/networking/protocol/protlayers.html
Search terms:
OSI networking model
DoD networking model
7-layer network model |