Professional Documents
Culture Documents
7.) Application Layer: The Application Layer can include things like File Transf
ers, and display formatting. HTTP is an example of an Application Layer protocol
. Commonly known protocols considered by many to be part of the application laye
r actually may be considered to occupy the Session, Presentation, and Applicatio
n Layers. For example an examination of an NFS file mount with files being copie
d defies simple categorization within the ISO OSI 7 Layer Reference Model. Is NF
S an Application Layer Protocol? Well, files are copied, so we see that the Appl
ication Layer may be included. However, synchronization in file transfers takes
place to some extent and session are created and torn down on demand as files ar
e transferred. This suggests that it could also be part of the session layer or
maybe presentation layer.
6.) Presentation Layer: Other than data sent/accepted to/from the application la
yer and Session Layer, this layer is reserved for certain kinds of data manipula
tion or consistent data types being encapsulated for transmission. Translations
could possibly be made between ASCII and Unicode or even EBCIDIC if hexadecimal
values for letter were being transmitted.
It is the presentation layer that is also able to exchange messages and often dy
namically create a syntax that is shared by it and its peer layer service on the
remote stack.
It is possible for something like a database translation system that could provi
de a consistent presentation service for an application program performing datab
ase queries to operate here. There are some parts of OBDC that may fit into the
presentation layer in this respect.
Also included within this layer is Security in the form of encryption (if used)
and compression.
It is this layer that requests the creation of sessions, and requests the termin
ation of sessions.
Some may ask why encryption and compress could be considered part of this layer.
When you think of it, encryption is a form of "translation" that is used. Certa
inly, it may not be EBCIDIC to ASCII, but a translation of characters is made so
that the destination may receive the intended content of the sender. Also, the
same can be said on compression and decompression; they are forms of translation
used at a common layer to allow the above layer (Application Layer) to get its
data and have the presentation layer processing be transparent to the Applicatio
n Layer.
Other examples of translation that might be made to "fit" in this layer include
vt100, vt220, HTML and codes for translation of data to be presented. FOr exampl
e, in html, "&" can be used to represent "&" and this is effectively a modif
ication of data being displayed. (The end user often does not see the escape cod
es used to display an inverse letter, or odd symbol.)
5.) Session Layer: This section is one of the most often misunderstood sections
since it does not have an obvious separate protocol when people try to apply it
to a common layered system that may use TCP/IP or IPX/SPX. Often with these prot
ocols and protocols on top of these protocols, layer boundaries are not so obvio
us. In examining what services are supposed to take place here according to the
ISO in this OSI 7 Layer Reference model for Networking we can see a short list.
Deal with creating a session, transmission of data, and then tear down of the cr
eated session. Sessions are created and terminated at the request of the Present
ation Layer as it has data needing to be passed on to a different location.
Part of the Session creation process includes dealing with cases of Half Duplex
sessions where only a transmission or reception may take place and working out a
turn sharing system to ensure both sides get opportunities to transmit as they
need to relay data. In the case of Full Duplex support, a discovery process may
be needed to allow this layer to know that bi-directional conversations make tak
e place at the same time.
Another service that is offered as a part of the Session Layer might include dat
a synchronization. Checksums may also be included at the Session Layer as a part
of data synchronization. A checksum is performed after each packet is transmitt
ed to see if applying the data from the packet to the file or stream being moved
or transmitted would cause it to have the same checksum as the file on the remo
te location up to that point. If it is, then the new data may be added to the lo
cal machine being transferred from the remote site. This is a form of error corr
ection for transmitted data. A familiar form of checksums in use can be seen in
Z-modem transfers as part of communications or terminal software. The wonderful
part of z-modem transfers is that it becomes possible for an interrupted z-modem
download to be resumed where it left off with a minimal amount of retransmitted
data. This may not be a method used at this layer, but it shows how using a sys
tem of synchronization with each part of the data being transferred can allow fo
r interruptions to limit the problems associated with having to start the whole
transmission over again.
A job of the Session Layer includes helping to ensure communications within a se
ssion be only permitted by one party at a time as necessary. When this is an iss
ue, sometimes a specialized "token" or "speaking staff" may need to be passed an
d relayed between the different members. Only members with this special "speakin
g staff" or "token" may initiate these messages.
An example of Flow Control with tokens or "speaking staffs":
In some tribal groups, they have meetings where only the member of the tribe hol
ding a ceremonial "speaking staff" other object, or a ruled "symbolic reference"
is allowed to speak. It exists as a flow control mechanism in their gatherings.
Hearing several people speak simultaneously, especially in an argument, may hav
e the effects of making the collective words unintelligible. Unintelligible word
s lead to required retransmissions of conveyed data. Retransmitted data make mee
tings longer than necessary. Flow control provides a useful purpose of preventin
g uncontrolled chatter of unauthorized sources from disrupting transmission of d
ata from an authorized source via possession of the "speaking staff" to speak. T
his flow control system works because all of the people agree that it is "illega
l" to speak unless they have permission. (By Illegal, we refer to it being again
st the "laws" or "rules" or "protocol" or "standard".)
Even the tribe of our U.S. House of Representatives has a "speaking staff" of so
rts. When you hear things like, "The speaker of the house recognizes House membe
r Joe Schmoe from the state of Stupidity and yields the floor for 3 minutes" you
hear a verbal exchange telling everyone to shut up while this guys blabs on for
3 minutes. This shows how advanced we are in the western civilization; our trib
al "elders" don't actually carry around "speaking staffs" in our tribe... ...I m
ean U.S. House of Representatives. In this tribe, they pass a "symbolic referenc
e" to the "floor" and give the "floor" to a member. In this example, the speaker
of the house is the flow control manager, and recognizes people that wish to be
heard and grants them the floor as he/she sees fit.
In some of the worst cases, a lack of flow control may lead to personal harm of
feuding members or premature and untimely death as a result of uncontrolled emot
ional and inflammatory outbursts between feuding members of a tribe. Luckily, we
do not often have communications layers with control over the life and death of
people. (Certainly, the data conveyed over channels might have life or death co
nsequences, but the layers themselves do not possess control over life and death
.)
4.) Transport Layer: This layer is responsible for many things that individually
may not seem exceptionally important but actually provide for some critical nee
ds.
Just as you will read in some of the next layers below, this layer also looks to
prevent a fast sender from over-running a slow receiver. An analogy is made in
the Networking Layer section between data throughput rates and pipe sizes may be
tter illustrate this and keep the amount of reading smaller if it is examined la
ter.
This layer, just as all layers, accept data from layer immediately above and bel
ow it (except for layer 1, and layer 7) as well as provide services for the laye
rs above them (except for Layer 7.) In this case, the Transport Layer must creat
e a connection of the type needed by the Session Layer for each connection reque
sted by the Session Layer. In cases where data being pushed down this model towa
rds this layer is larger than the maximum allowed size of packets for this layer
, it is up to this layer to re-size the incoming data from above. It does this b
y breaking the larger sized data from the layer above into smaller sizes that ma
y fit within packets for this layer. The peer level Session Layer then re-create
s the larger sized data for its upper layer by connecting payloads of separate p
ackets together in a "stream".
The bulk of the work done by this layer includes keeping track of multiple conne
ctions that may be taking place at any one time and keeping the incoming and out
going packets properly addressed to be relayed to their respective desired locat
ions. It may use a form of multiplexing to allow each connection to be properly
directed to its intended interface/location in the Session Layer.
If a higher layer requires that a connection be created that is "reliable" (able
to notice an error and then correct for the error so that all data sent eventua
lly arrives at its destination) and the above layer cannot provide its own metho
d of ensuring a "reliable" connection, then it is up to this layer to create a "
reliable connection" that ensures all data sent eventually arrives.
If a "reliable" service is not required, but instead an "unreliable" connection
is desired, then it is up to this layer to ensure that the packets arriving are
the same as the packets that were sent, or else they are discarded. This can be
performed by a number of ways, but the most common is to use special checksums (
explained in a lower layer below this.)
(Described Later: Brief summary) Both reliable and unreliable connections may us
e something called a checksum (explained later in this page) If a packets comput
ed checksum matches its carried checksum, then the packet may be considered vali
d, and have its payload passed on up to a higher layer. If the checksums do not
match, then the packet may be discarded.
If any order processing of data is needed to ensure packets coming in are assemb
led in the right sequence, then it is at this layer that this occurs. A special
sequence number of sorts may be included in each packet transmitted by the sende
r. This sequence identifier allows the receiver to know what order to send paylo
ads of incoming packets on up to the next higher layer. This helps to ensure pay
loads do not get re-ordered from transmitted sequence.
Regardless of which method (reliable or unreliable) is used, it is up to this la
yer to provide enough information in the packets to ensure the order is known an
d packets are free of errors. A "reliable" connection looks to get new copies of
damaged packets while an "unreliable" connection looks to discard the errors. A
"reliable" connection would wait for packets missing in a sequence before conti
nuing. An "unreliable" connection may just discard packets that arrive out of se
quence and continue passing on the payload of packets in a sequential order that
may skip occasional packets arriving out of order.
As a final requirement, like other layers, this layer is supposed to insulate th
e other layers from changes made to it. Say for example a new media is used, tha
t may effect the Physical Layer and the Data Link. If the interface for the data
link layer is coded to offer the same services to the Layer above, upper layers
are not impacted by changes made to layers below. This allows for advancements
to be made in any layer to replace previous implementations without causing seri
ous impacts requiring the whole stack of layers to be recoded.
This layer acts much like a shipping warehouse supervisor. The supervisor must k
now the source of a package needing to be sent out as well as the destination. T
he supervisor must find a box in which the package will fit. If the package is t
oo large to fit into the box, the supervisor must break the package into smaller
parts that may fit into the box. This supervisor also may date or time stamp th
e boxes holding the packages so the receiver will know in what order the package
s inside the boxes were shipped. If a recipient needs to reply to the original s
ender they send their package back to the company where we have our trusty super
visor. This supervisor examines the package to see who sent it, and who in the o
rganization should be getting the return package. Some people in his organizatio
n may care if the package arrives, and want to know who picked it up, so they ma
y asked for the supervisor to send the package "Registered Mail" with "Return Re
ceipt Requested" to know the package did arrive and who picked it up. Some peopl
e in his organization are just sending out bulk advertisements and if the little
junk mail cards get munged in the postal system to the point they cannot be rea
d, oh well. If after our supervisor notices packages are piling up and not leavi
ng fast enough to certain destinations only served by "Cheap & Slow Mail Service
" he may decide to hold off on trying to send too many boxed packages through th
at system too quickly for fear of them being lost.
In the above analogy, the organization is the Session Layer, and the shipping su
pervisor is the Transport layer. The supervisor decreases the sending of package
s to slower mail carriers (flow control.) The supervisor keeps track of who in t
heir organization is sending out a package with source addresses so as to know w
ho a response on that package should be sent for each person in the organization
that is presently sending packages outside the organization (multiplexing). The
supervisor chops packages that are too large into smaller pieces that fit in th
e boxes the supervisor has on hand (packetizing of payload in sizes allowed by T
ransport layer protocol.) Each member of his company may send multiple packages
and notices to anyone in the world that can get mail and strike up conversations
as needed, but the supervisor must keep track of each transaction (creating con
nections as needed by the Session Layer.) If suddenly, the shipping system went
over to using personal Jets to fly things to destinations, the people at the org
anization need not do anything differently (Session Layer is insulated and not i
nconvenienced by changes made in hardware at layers lower than it.) Reliable tra
nsport is effected by use of registered mail and return receipt requested. "Unre
liable" mail is sent out in bulk, and if it gets lost along the way, becomes bro
ken, or no longer valid, it may be discarded and nobody is blamed. If the superv
isor is told that the packages needed to be shipped to a destination are done fo
r now, the supervisor can then forget about that connection between a member of
the supervisor's organization and the outside world and focus on the other conne
ctions being made by members of their organization, and incoming connection requ
ests from outside organizations.
3.) Networking Layer: It is the opinion of one of my associates that this layer
is potentially the most complex of all the layers due to the issues that it must
address. Most importantly: routing. This layer is responsible primarily with ro
uting of data from the layer above (Transport Layer) to a remote location that m
ay or may not share the same Physical Layer-direct-link, or even Data Link Layer
protocol. Issues in differences in the commonly referenced name "bandwidth" to
describe the size of an imaginary pipe for pushing data from one point to anothe
r as if it were liquid in a real pipe, are also address here at this layer. Just
as the Data Link Layer below must ensure that a fast sender does not flood-out
a slower receiver and possibly lead to lost data, this layer also must address p
roblems that may exist when a stream of packets coming form a network with unuse
d big pipes encounters a possibly busy network with small pipes. Even in the cas
e where two networks both have the same sized pipes, a network with a pipe that
is almost full may have difficulties in passing on incoming packets from a netwo
rk with a pipe that is nearly empty.
Other issues that are resolved by this layer include dealing with packet sized i
n the case of dissimilar settings, or protocols between networks forcing the siz
e of a packet to become smaller before being passed on (called fragmentation in
IP of the TCP/IP suite of protocols). (Part of another document goes to better d
escribe this using the often used "carrier pigeon" lesson to convey the problems
of packet fragmentation by using symbolism and allowing the reader to draw some
parallels. It can be found here at /networking/integrated.html#pigeon. I do not
promote the slaughter of innocent birds here. I use the often-used "carrier pig
eon" scenario to describe TCP/IP based transmissions of data but extend it to in
clude packet fragmentation. The idea is to use a pre-exiting model for teaching
that the user may know, and extend it to also include the special case of fragme
ntation.)
Often some sort of accounting mechanisms are included at this layer to allow a n
etwork administrator to see how many packets, bytes, and various numbers of diff
erent sized packets may have been transmitted. Though it is not an absolute nece
ssity to the function of this layer, it does often provide statistical data for
making charges to parties, optimizing links and arguing for bigger more expensiv
e pipes, or smaller cheaper pipes, or bigger slower pipes, or smaller faster pip
es. It can be one thing to tell your boss you need a bigger pipe, and it is enti
rely another to show your boss you need a bigger pipe.
2.) Data Link Layer: This layer is responsible for creating what appears to the
layer above (Network Layer) as a channel that is free of detected errors. Often
this is done by packaging bits into cells, or frames, or generically "packets" w
ith a predictable beginning and end and special calculations performed on the da
ta known as checksums.
It is necessary for the sender and receiver to agree upon the beginning and ends
of packets so their transmission may be synchronized. The beginning of the pack
et may be known by both the sender and receiver based on a shared timing. For ex
ample (this one is not a real-case), a packet should be expected every second wi
th a 1 second pause after each packet (synchronous). Another example may include
using a special sequence of bits that act as a signature for the beginning of a
packet and another special signature that acts as the end of a packet (asynchro
nous). With either system it is possible for the sender and receiver to both kno
w when a packet starts, and stops.
However the bits are packaged, a system is devised and used by the sender and re
ceiver to allow the receiver to detect a bad cell, frame or generically packet.
Often this is a checksum. A checksum is a special mathematical check performed o
n the data being transmitted by the sender's Data Link Layer. The sender examine
s the payload it will be encapsulating in a packet and performs a special mathem
atical equation on the payload (or complete packet depending on the defined Data
Link Layer protocol). Then it includes the results of that equation in a part o
f the packet that is not the payload, such as the beginning, or header of the pa
cket. When the receiving machine gets the packet, it looks in the agreed upon lo
cation of the packet for the checksum value, and removes it from the packet. The
n the receiver performs the same mathematical equation on the payload (or remain
der of packet, depending upon the protocol's agreed upon method) and compares it
s result with that of the transmitted packet's checksum value. If both are diffe
rent, then there is something wrong with the received packet, and it may be disc
arded.
This layer resolves problems that may arise in the cases of duplicated frames, c
ells, or damaged packets being received, and knowing how to deal with them as we
ll as the above mentioned checksum for finding bad frames, cells or generically
packets. One solution may be to just drop the frame.
Contention for the transmission-channel may be an issue for the Data Link Layer
when support for Full Duplex is enabled. If an in band acknowledgement requires
the use of the Transmit circuit, then bits needing to be packaged and sent out o
n the transmit circuit must compete with the data needing to be packaged and sen
t on its way from the Network Layer. (A case could exist where an acknowledgment
band as a separate circuit may exist for the purpose of acknowledgments only, b
ut this would be a Data Link Layer solution to this issue, and it up to the defi
ned protocol to address this as a solution if it is used. Many Data Link Layer p
rotocols do not use this solution, but instead may include an acknowledgment as
part of a frame, cell or generically a packet being sent to the original sender
anyway.)
This layer needs to address problems that may exist where a fast transmitter fro
m inundating the slower receiver with too many bits, too fast for the receiver t
o analyze them. The consequences of not addressing this could lead to dropped bi
ts and data lost by the receiver.
In the case of a non Point-To-Point network like a Broadcast network, this layer
must also deal with problem associated with multiple senders wishing to use the
shared media. Some may elect to use a form of Time Delimited Multiplexing where
each device gets a time window to use the shared media. Some may elect to use a
system where each device transmits their intention to transmit, and if there is
no complaint, they transmit their packet (CSMA/CA (Carrier Sense Media Access,
Collision Avoidance): LocalTalk). Some may look to just allowing every device to
transmit whenever they have data to transmit; they always check for "collisions
" (when two device try to use the same shared media at the same time) and when c
ollisions are found, both offending Data Link Layer devices take a time out, eac
h for a randomly different amount of time before trying to transmit again (CSMS/
CD (Carrier Sense Media Access Collision Detection: Ethernet). Some may use a sp
ecial "token" passed from machine to machine where by which only machines with a
token are permitted to speak (TokenRing). Some may chose to have a central hub
that acts as a gate keeper to which devices must ask permission before transmitt
ing and special priority may be given to servers, or identified special devices
(Demand Priority: 100VG-AnyLAN). Some may use other systems not mentioned above.
Some examples of some protocols that operate mostly in the Data Link Layer inclu
de Ethernet, TokenRing, ATM, and PPP.
1.) Physical Layer: This layer is responsible for moving bits across a shared me
dia between two points. Agreed upon specification by both parties involved (or a
ll parties involved) on how (1) bit and off (0) bit should be signaled. For what
duration should an amperage, how a voltage signature proceeds in order for the
sender to the receiver foor it to "hear" the signal, and decode the signal back
into the bits transmitted by the sender. If not a wired physical media, but inst
ead a wireless system, then it would be this layer that specified what frequency
of light or sound would be used and if luminous intensity or amplitude changed
meanings of bits. This layer also specifies how the channel may be used: Full Du
plex, Half Duplex, or (possibly?) Simplex. This layer also deals with conductor
mapping in the case of wired media, and frequency/amplitude/cycle-offsets in the
case of wireless media for mapping Receiving and Transmission.
An example of a wired system could be 10 Base T Ethernet. Technically Ethernet i
s a Data Link Layer protocol, but the wiring for Ethernet is a Physical Layer pr
otocol. Taking an ASCII Art drawing from my small online EtherNet cabling docume
nt, we will use a numbering system specified below:
ASCII Art drawing of a 10 Base T RJ45 Jack:
END TOP
---------- ------------------------------
1|--O | 8|---------- |
2|--O | 7|---------- |
3|--O --- 6|---------- |
4|--O | | 5|---------- |
5|--O | | 4|---------- |
6|--O --- 3|---------- |
7|--O | 2|---------- |
8|--O | 1|---------- |
---------- ------------------------------
BOTTOM SIDE
------------------------------ ------------------------------
| | | |
| | | |
|||||||||||||,,,,,,,,, | | |
|||||||||||||||||||||| | | |
|||||||||||||````````` | | |
| | | |
| | | |
------------------------------ ------------------------------||
///|||||||||||
////////
ASCII Art drawing of two ends of a 10 Base T, RJ45 cable with one RJ45 jack on e
ach end of the cable:
(TOP VIEW POINTING LEFT) (TOP VIEW POINTING RIGHT)
------------------------------ ------------------------------
8|---------- | | ----------|1
7|---------- |WIRE-WIRE| ----------|2
6|---------- |WIRE-WIRE| ----------|3
5|---------- |WIRE-WIRE| ----------|4
4|---------- |WIRE-WIRE| ----------|5
3|---------- |WIRE-WIRE| ----------|6
2|---------- |WIRE-WIRE| ----------|7
1|---------- | | ----------|8
------------------------------ ------------------------------
Assume that the numbering scheme listed above holds true for this document. Pins
number 1 and 2 are used for Transmission. Pin 1 is used for the positive charge
(+) and pin 2 is used for the negative charge (-). Pins number 3 and 6 are used
for Reception. Pin 3 is used for the positive charge and pin 6 is used for the
negative charge. (The reason for 10 Base T Ethernet over RJ45 jack to skip pins
number 4 and 5 is for phone service. Standard analog telephones (POTS) using the
RJ-style jacks in the U.S. use 2 conductors. They start using the center two co
nductors, and when extra lines are needed and added, then the next outer center
pairs are used. In the case of an 8 conductor RJ-style jack used by the telephon
e company for phone service (though most residential U.S. RJ-style jacks are 4 o
r 6 conductor RJ-style jacks) pins 4 and 5 would be the center two pins, and res
erved for the first phone line. Pins 3 and 6 would be used for the next phone li
ne, and pins 2 and 7 would be used for the third phone line. Pins 4 and 5 were t
herefore skipped so that previous wiring for phones could possibly continue to e
xist in buildings while still offering EtherNet service.
Key
+ This layer is specified to have this
- This layer is not specified to have this.
+/- Even though this layer does not explicitly allow for this to take place, it
often does even if the standard does not require it.
*1 Since there are no layers above the application layer within the 7-layer mode
l standard, there technically are no layers above it. However, the user's action
s and users themselves could be viewed as and unofficial layer. In this way, we
do not officially state these items as a "+" but instead offer this explanation.
*2 See the End-to-end vs. Chained table diagram to better understand this.
ISO OSI Seven Layer Model: Mixed (Router + Data Link Switch)
7 Application- < -------End--------to--------End------- > Application-
6 Presentation < -------End--------to--------End------- > Presentation
5 --Session--- < -------End--------to--------End------- > --Session---
4 -Transport-- < -------End--------to--------End------- > -Transport--
3 --Network--- < #####Chained##### > --Network--- < ## > --Network---
2 -Data Link-- < ## > -Data Link-- < ## > -DLL- -- -DLL- < -- > -Data Link--
1 --Physical-- < == > -PHY- -- -PHY- < == > -PHY- -- -PHY- < == > --Physical--
L Stack Num 1 Link Stack Num 2 Link Stack Num 3 Link Stack Num 4
Key:
< == > This is a physical wire or media connecting devices.
< -- > This is a virtual path for peer level, layered protocol communications. F
ollow the GREEN colored layers, up and down any touching green stacks, and acros
s physical links.
< ## > This is the layer were the peer level devices are communicating for the o
peration being discussed.
---- Where two or more "-" characters exist in a string, alone in a cell specia
l meaning is implied. This is meant to show that data does not physically pass w
ithin the stack shown across this path, even though the data "virtually" passes
through this point when viewing the peer layer stacks from an "End-to-end" vs. "
chained" perspective.
-DLL- Another way for referring to the Data Link Layer.
-PHY- Another way for referring to the PHYsical Layer
GREEN This identifies the path that data actually flows, in a trip down the lay
ers, across the physical layers, up to the RED colored layer where it is analyze
d and sent on down to another physical layer, and over through the same layers,
and is passed on down again, and across a third physical link to the destination
, and up its layers.
R E D This identifies the layer at which the operation discussed is taking plac
e.
To be continued... (Still expanding upon the ISO OSI 7 Layer Model. This section
may be broken up into multiple sections since this monolithic review is a bit t
oo large for a single page for most people.)