OSI 7 Layers Model
Layer 7: Application Layer
-
Defines interface to user processes for
communication and data transfer in network
-
Provides standardized services such as
virtual terminal, file and job transfer and operations
Layer 6: Presentation Layer
-
Masks the differences of data formats
between dissimilar systems
-
Specifies architecture-independent data
transfer format
-
Encodes and decodes data; Encrypts and
decrypts data; Compresses and decompresses data
Layer 5: Session Layer
-
Manages user sessions and dialogues
-
Controls establishment and termination of
logic links between users
-
Reports upper layer errors
Layer 4: Transport Layer
-
Manages end-to-end message delivery in
network
-
Provides reliable and sequential packet
delivery through error recovery and flow control mechanisms
-
Provides connectionless oriented packet
delivery
Layer 3: Network Layer
-
Determines how data are transferred between
network devices
-
Routes packets according to unique network
device addresses
-
Provides flow and congestion control to
prevent network resource depletion
Layer 2: Data Link Layer
Layer 1: Physical Layer
-
Defines physical means of sending data over
network devices
-
Interfaces between network medium and
devices
-
Defines optical, electrical and mechanical
characteristics
OSI Model Layers
Application |
Presentation |
Session |
Transport
Network |
Data Link |
Physical
|
Layer
|
Function |
Protocols |
Network Components |
Application
User Interface
|
- used for applications specifically written to run
over the network
- allows access to network services that support
applications;
- directly represents the services that directly
support user applications
- handles network access, flow control and error
recovery
- Example apps are file transfer,e-mail, NetBIOS-based
applications
|
DNS; FTP; TFTP; BOOTP; SNMP;
RLOGIN;
SMTP;
MIME; NFS; FINGER;
TELNET; NCP; APPC;
AFP; SMB |
Gateway |
Presentation
Translation |
- Translates from application to network format and
vice-versa
- all different formats from all sources are made into
a common uniform format that the rest of the OSI model can
understand
- responsible for protocol conversion, character
conversion,data encryption / decryption, expanding graphics
commands, data compression
- sets standards for different systems to provide
seamless communication from multiple protocol stacks
- not always implemented in a network protocol
|
|
Gateway
Redirector |
Session
"syncs and sessions" |
- establishes, maintains and ends sessions across the
network
- responsible for name recognition (identification) so
only the designated parties can participate in the session
- provides synchronization services by planning check
points in the data stream => if session fails, only data after
the most recent checkpoint need be transmitted
- manages who can transmit data at a certain time and
for how long
- Examples are interactive login and file transfer
connections, the session would connect and re-connect if there
was an interruption; recognize names in sessions and register
names in history
|
NetBIOS
Names Pipes
Mail Slots
RPC |
Gateway |
Transport
packets; flow control &
error-handling |
- additional connection below the session layer
- manages the flow control of data between parties
across the network
- divides streams of data into chunks or packets; the
transport layer of the receiving computer reassembles the
message from packets
- "train" is a good analogy => the data is divided into
identical units
- provides error-checking to guarantee error-free data
delivery, with on losses or duplications
- provides acknowledgment of successful transmissions;
requests retransmission if some packets don’t arrive error-free
- provides flow control and error-handling
|
TCP, ARP, RARP;
SPX
NWLink
NetBIOS / NetBEUI
ATP |
Gateway
Advanced Cable Tester
Brouter |
Network
addressing; routing |
- translates logical network address and names to their
physical address (e.g. computername ==> MAC address)
- responsible for
- addressing
- determining routes for sending
- managing network problems such as packet switching,
data congestion and routing
- if router can’t send data frame as large as the
source computer sends, the network layer compensates by breaking
the data into smaller units. At the receiving end, the network
layer reassembles the data
- think of this layer stamping the addresses on each
train car
|
IP; ARP; RARP,
ICMP; RIP; OSFP;
IGMP;
IPX
NWLink
NetBEUI
OSI,
DDP
DECnet
|
Brouter
Router
Frame Relay Device
ATM Switch
Advanced Cable Tester |
Data Link
data frames to bits |
- turns packets into raw bits 100101 and at the
receiving end turns bits into packets.
- handles data frames between the Network and Physical
layers
- the receiving end packages raw data from the Physical
layer into data frames for delivery to the Network layer
- responsible for error-free transfer of frames to
other computer via the Physical Layer
- this layer defines the methods used to transmit and
receive data on the network. It consists of the wiring, the
devices use to connect the NIC to the wiring, the signaling
involved to transmit / receive data and the ability to detect
signaling errors on the network media
|
Logical Link Control
802.1 OSI Model
802.2 Logical Link Control |
Bridge
Switch
ISDN Router
Intelligent Hub
NIC
Advanced Cable Tester |
Media Access Control
802.3 CSMA/CD (Ethernet)
802.4 Token Bus (ARCnet)
802.5 Token Ring
802.12 Demand Priority |
Physical
hardware; raw bit stream
|
- transmits raw bit stream over physical cable
- defines cables, cards, and physical aspects
- defines NIC attachments to hardware, how
cable is attached to NIC
- defines techniques to transfer bit stream to
cable
|
IEEE 802
IEEE 802.2
ISO 2110
ISDN |
Repeater
Multiplexer
Hubs
TDR
Oscilloscope
Amplifier |
|
How OSI Works
|
by
Jeff Tyson
|
Virtually all
networks in use today are based in some fashion on the Open Systems
Interconnection (OSI) standard. OSI was developed in 1984 by
the
International Organization for Standardization (ISO), a global
federation of national standards organizations representing
approximately 130 countries.
The core of this standard is the OSI Reference Model, a set of
seven layers that define the different stages that data must go through
to travel from one device to another over a
network.
In this edition you'll find out all about the OSI standard.
The Layers
Think of the seven layers as the assembly line in the
computer. At each
layer, certain things happen to the data that prepare it for the next
layer. The seven layers, which separate into two sets, are:
- Application Set
- Layer 7: Application - This
is the layer that actually interacts with the
operating system or application whenever the user chooses to
transfer files, read messages or perform other network-related
activities.
- Layer 6: Presentation -
Layer 6 takes the data provided by the Application layer and
converts it into a standard format that the other layers can
understand.
- Layer 5: Session - Layer 5
establishes, maintains and ends communication with the receiving
device.
- Transport Set
- Layer 4: Transport - This
layer maintains flow control of data and provides for error
checking and recovery of data between the devices. Flow control
means that the Transport layer looks to see if data is coming from
more than one application and integrates each application's data
into a single stream for the physical network.
- Layer 3: Network - The way
that the data will be sent to the recipient device is determined in
this layer. Logical
protocols,
routing
and
addressing are handled here.
- Layer 2: Data - In this
layer, the appropriate physical protocol is assigned to the data.
Also, the type of network and the
packet
sequencing is defined.
- Layer 1: Physical - This is
the level of the actual hardware. It defines the physical
characteristics of the network such as connections, voltage levels
and timing.
The OSI Reference Model is really just a guideline. Actual
protocol stacks often combine one or more of the OSI layers into a
single layer.
Protocol Stacks
A protocol stack is a group of protocols that all work together to allow
software or hardware to perform a function. The TCP/IP protocol
stack is a good example. It uses four layers that map to the OSI model
as follows:
- Layer 1: Network Interface -
This layer combines the Physical and Data layers and
routes the
data between devices on the same network. It also manages the exchange
of data between the network and other devices.
- Layer 2: Internet - This layer
corresponds to the Network layer. The Internet Protocol (IP)
uses the IP
address, consisting of a Network Identifier and a Host
Identifier, to determine the address of the device it is
communicating with.
- Layer 3: Transport -
Corresponding to the OSI Transport layer, this is the part of the
protocol stack where the Transport Control Protocol (TCP) can
be found. TCP works by asking another device on the network if it is
willing to accept information from the local device.
- Layer 4: Application - Layer 4
combines the Session, Presentation and Application layers of the OSI
model. Protocols for specific functions such as
e-mail (Simple
Mail Transfer Protocol, SMTP) and file transfer (File
Transfer Protocol, FTP) reside at this level.
As you can see, it is not necessary to develop a separate layer for
each and every function outlined in the OSI Reference Model. But
developers are able to ensure that a certain level of compatibility
is maintained by following the general guidelines provided by the model.
For more information, check out the links on the next page.
Lots More
Information!
Related HowStuffWorks Articles
More Great Links
|
The 7 Layers of the OSI Model
The OSI, or Open System Interconnection, model defines a networking
framework for implementing protocols in seven layers. Control is passed from
one layer to the next, starting at the application layer in one station,
proceeding to the bottom layer, over the channel to the next station and
back up the hierarchy.
Application
(Layer 7) |
This layer supports
application and end-user processes. Communication partners are
identified, quality of service is identified, user
authentication and privacy are considered, and any constraints on
data syntax
are identified. Everything at this layer is application-specific. This
layer provides application services for file transfers,
e-mail,
and other
network
software services.
Telnet
and FTP are
applications that exist entirely in the application level.
Tiered
application architectures are part of this layer. |
Presentation
(Layer 6) |
This layer provides independence from differences in
data representation (e.g.,
encryption) by translating from application to network format, and
vice versa. The presentation layer works to transform data into the form
that the application layer can accept. This layer formats and encrypts
data to be sent across a network, providing freedom from compatibility
problems. It is sometimes called the syntax layer. |
Session
(Layer 5) |
This layer establishes, manages and terminates
connections between applications. The session layer sets up,
coordinates, and terminates conversations, exchanges, and dialogues
between the applications at each end. It deals with session and
connection coordination. |
Transport
(Layer 4) |
This layer provides
transparent transfer of data between end systems, or hosts, and is
responsible for end-to-end error recovery and
flow
control. It ensures complete data transfer. |
Network
(Layer 3) |
This layer provides
switching
and routing
technologies, creating logical paths, known as
virtual circuits, for transmitting data from
node to
node. Routing and forwarding are functions of this layer, as well as
addressing,
internetworking, error handling, congestion control and
packet
sequencing. |
Data Link
(Layer 2) |
At this layer, data packets are encoded and decoded into
bits. It
furnishes transmission protocol knowledge and management and handles
errors in the physical layer, flow control and frame synchronization.
The data link layer is divided into two sublayers: The
Media
Access Control (MAC) layer and the Logical Link Control (LLC) layer.
The MAC sublayer controls how a computer on the network gains access to
the data and permission to transmit it. The LLC layer controls frame
synchronization, flow control and error checking. |
Physical
(Layer 1) |
This layer conveys the
bit stream -
electrical impulse, light or radio signal -- through the network at the
electrical and mechanical level. It provides the
hardware
means of sending and receiving data on a carrier, including defining
cables, cards
and physical aspects.
Fast
Ethernet,
RS232,
and ATM are
protocols with physical layer components. |
What lurks at OSI Layer 8?
By Steve Taylor and Joanie Wexler
Network World Wide Area Networking Newsletter,
01/28/03
The OSI model defines protocols for how a network technically handles
communications at the various functional layers. Starting with electrons
and photons at the physical layer (Layer 1), the model offers an orderly
framework for end-to-end communications up to and including how
applications interact with humans at Layer 7.
However, there's an additional layer that the OSI model can't specify.
And at the end of the day, this layer might be the most important one of
all. We're calling it "OSI Layer 8," and it represents human-to-human
interactions - or, more simply, the ability of humans to communicate
meaningfully with one another in the first place.
Take e-mail, for example. Your message rides on a far-reaching,
high-speed, secure, redundant IP WAN infrastructure. But if you send a
message written in German to someone who understands only Chinese, the
network has been useless. No communication has actually taken place.
Sure, there are products that translate between languages. But there's
a reason for the colloquial phrase, "It got lost in the translation."
Using translation programs, the nuances - if not the core meaning - of
messages quite often get lost. Many translation programs also make rash
assumptions, such as that there are no typos in the message to be
interpreted.
But there's a piece to this puzzle that's even more fundamental than
whether an e-mail is written in English or Swahili: understanding that
people reading e-mails, navigating Web pages, shopping e-commerce sites,
mining information from a database, or using applications in any other way
are living, breathing humans. Being able to communicate in a meaningful
way to humans - including presenting information in a way that they can
get their arms around - transcends network technology in importance.
Is there a technology component of OSI Layer 8? Not really. Some
e-mail programs try to warn you if your e-mail might be offensive by
comparing your message against a dictionary of distasteful language. But
it's up to you and your good judgment to make sure that you're using the
nonoffensive words appropriately.
The Seven Layers Model
Seven layers are defined:
7)
Application : Provides different services to the applications
6)
Presentation : Converts the information
5) Session
: Handles problems which are not communication issues
4)
Transport : Provides end to end communication control
3) Network
: Routes the information in the network
2) Data
Link : Provides error control between adjacent nodes
1) Physical
: Connects the entity to the transmission media
The Application Layer
The application layer contains a variety of protocols that are commonly
needed. For example, there are hundreds of incompatible terminal types in
the world. Consider the plight of a full screen editor that is supposed to
work over a network with many different terminal types, each with different
screen layouts, escape sequences for inserting and deleting text, moving the
cursor, etc.
One way to solve this problem is to define an abstract network virtual
terminal for which editors and other programs can be written to deal with.
To handle each terminal type, a piece of software must be written to map the
functions of the network virtual terminal onto the real terminal. For
example, when the editor moves the virtual terminal's cursor to the upper
left-hand corner of the screen, this software must issue the proper command
sequence to the real terminal to get its cursor there too. All the virtual
terminal software is in the application layer.
Another application layer function is file transfer. Different file
systems have different file naming conventions, different ways of
representing text lines, and so on. Transferring a file between two
different systems requires handling these and other incompatibilities. This
work, too, belongs to the application layer, as do electronic mail, remote
job entry, directory lookup, and various other general-purpose and
special-purpose facilities.
The Presentation Layer
The presentation layer performs certain functions that are requested
sufficiently often to warrant finding a general solution for them, rather
than letting each user solve the problems. In particular, unlike all the
lower layers, which are just interested in moving bits reliably from here to
there, the presentation layer is concerned with the syntax and semantics of
the information transmitted.
A typical example of a presentation service is encoding data in a
standard, agreed upon way. Most user programs do not exchange random binary
bit strings. They exchange things such as people's names, dates, amounts of
money, and invoices. These items are represented as character strings,
integers, floating point numbers, and data structures composed of several
simpler items. Different computers have different codes for representing
character strings, integers and so on. In order to make it possible for
computers with different representation to communicate, the data structures
to be exchanged can be defined in an abstract way, along with a standard
encoding to be used "on the wire". The job of managing these abstract data
structures and converting from the representation used inside the computer
to the network standard representation is handled by the presentation layer.
The presentation layer is also concerned with other aspects of
information representation. For example, data compression can be used here
to reduce the number of bits that have to be transmitted and cryptography is
frequently required for privacy and authentication.
The Session Layer
The session layer allows users on different machines to establish
sessions between them. A session allows ordinary data transport, as does the
transport layer, but it also provides some enhanced services useful in a
some applications. A session might be used to allow a user to log into a
remote time-sharing system or to transfer a file between two machines.
One of the services of the session layer is to manage dialogue control.
Sessions can allow traffic to go in both directions at the same time, or in
only one direction at a time. If traffic can only go one way at a time, the
session layer can help keep track of whose turn it is.
A related session service is token management. For some protocols, it is
essential that both sides do not attempt the same operation at the same
time. To manage these activities, the session layer provides tokens that can
be exchanged. Only the side holding the token may perform the critical
operation.
Another session service is synchronization. Consider the problems that
might occur when trying to do a two-hour file transfer between two machines
on a network with a 1 hour mean time between crashes. After each transfer
was aborted, the whole transfer would have to start over again, and would
probably fail again with the next network crash. To eliminate this problem,
the session layer provides a way to insert checkpoints into the data stream,
so that after a crash, only the data after the last checkpoint has to be
repeated.
The Transport Layer
The basic function of the transport layer, is to accept data from the
session layer, split it up into smaller units if need be, pass these to the
network layer, and ensure that the pieces all arrive correctly at the other
end. Furthermore, all this must be done efficiently, and in a way that
isolates the session layer from the inevitable changes in the hardware
technology.
Under normal conditions, the transport layer creates a distinct network
connection for each transport connection required by the session layer. If
the transport connection requires a high throughput, however, the transport
layer might create multiple network connections, dividing the data among the
network connections to improve throughput. On the other hand, if creating or
maintaining a network connection is expensive, the transport layer might
multiplex several transport connections onto the same network connection to
reduce the cost. In all cases, the transport layer is required to make the
multiplexing transparent to the session layer.
The transport layer also determines what type of service to provide to
the session layer, and ultimately, the users of the network. The most
popular type of transport connection is an error-free point-to-point channel
that delivers messages in the order in which they were sent. However, other
possible kinds of transport, service and transport isolated messages with no
guarantee about the order of delivery, and broadcasting of messages to
multiple destinations. The type of service is determined when the connection
is established.
The transport layer is a true source-to-destination or end-to-end layer.
In other words, a program on the source machine carries on a conversation
with a similar program on the destination machine, using the message headers
and control messages.
Many hosts are multi-programmed, which implies that multiple connections
will be entering and leaving each host. There needs to be some way to tell
which message belongs to which connection. The transport header is one place
this information could be put.
In addition to multiplexing several message streams onto one channel, the
transport layer musk take care of establishing and deleting connections
across the network. This requires some kind of naming mechanism, so that
process on one machine has a way of describing with whom it wishes to
converse. There must also be a mechanism to regulate the flow of
information, so that a fast host cannot overrun a slow one. Flow control
between hosts is distinct from flow control between switches, although
similar principles apply to both.
The Network Layer
The network layer is concerned with controlling the operation of the
subnet. A key design issue is determining how packets are routed from source
to destination. Routes could be based on static tables that are "wired into"
the network and rarely changed. They could also be determined at the start
of each conversation, for example a terminal session. Finally, they could be
highly dynamic, being determined anew for each packet, to reflect the
current network load.
If too many packets are present in the subnet at the same time, they will
get in each other's way, forming bottlenecks. The control of such congestion
also belongs to the network layer.
Since the operators of the subnet may well expect remuneration for their
efforts, there is often some accounting function built into the network
layer. At the very least, the software must count how many packets or
characters or bits are sent by each customer, to produce billing
information. When a packet crosses a national border, with different rates
on each side, the accounting can become complicated.
When a packet has to travel from one network to another to get to its
destination, many problems can arise. The addressing used by the second
network may be different from the first one. The second one may not accept
the packet at all because it is too large. The protocols may differ, and so
on. It is up to the network layer to overcome all these problems to allow
heterogeneous networks to be interconnected.
In broadcast networks, the routing problem is simple, so the network
layer is often thin or even nonexistent.
The Data Link Layer
The main task of the data link layer is to take a raw transmission
facility and transform it into a line that appears free of transmission
errors in the network layer. It accomplishes this task by having the sender
break the input data up into data frames (typically a few hundred bytes),
transmit the frames sequentially, and process the acknowledgment frames sent
back by the receiver. Since the physical layer merely accepts and transmits
a stream of bits without any regard to meaning of structure, it is up to the
data link layer to create and recognize frame boundaries. This can be
accomplished by attaching special bit patterns to the beginning and end of
the frame. If there is a chance that these bit patterns might occur in the
data, special care must be taken to avoid confusion.
The data link layer should provide
error control
between adjacent nodes.
Another issue that arises in the data link layer (and most of the higher
layers as well) is how to keep a fast transmitter from drowning a slow
receiver in data. Some traffic regulation mechanism must be employed in
order to let the transmitter know how much buffer space the receiver has at
the moment. Frequently, flow regulation and error handling are integrated,
for convenience.
If the line can be used to transmit data in both directions, this
introduces a new complication that the data link layer software must deal
with. The problem is that the acknowledgment frames for A to B traffic
compete for the use of the line with data frames for the B to A traffic. A
clever solution (
piggybacking
) has been devised.
The Data Link Layer : Error Control
A noise burst on the line can destroy a frame completely. In this case,
the data link layer software on the source machine must retransmit the
frame. However, multiple transmissions of the same frame introduce the
possibility of duplicate frames. A duplicate frame could be sent, for
example, if the acknowledgment frame from the receiver back to the sender
was destroyed. It is up to this layer to solve the problems caused by
damaged, list, and duplicate frames. The data link layer may offer several
different service classes to the network layer, each of a different quality
and with a different price.
The Data Link Layer : Piggybacking
In most practical situations, there is a need for transmitting data in
both directions. One way of achieving full-duplex data transmission would be
to have two separate communication channels, and use each one for simplex
data traffic (in different directions). If this were done, we would have two
separate physical circuits, each with a "forward" channel (for data) and a
"reverse" channel (for acknowledgment). In both cases the bandwidth of the
reverse channel would be almost entirely wasted. In effect, the user would
be paying the cost of two circuits but only using the capacity of one.
A better idea is to use the same circuit for data in both directions. In
this model the data frames from A to B are intermixed with the
acknowledgment frames from A to B. By looking at the "kind" field in the
header of an incoming frame, the receiver can tell whether the frame is data
or acknowledgment.
Although interweaving data and control frames on the same circuit is an
improvement over having two separate physical circuits, yet another
improvement is possible. When a data frame arrives, instead of immediately
sending a separate control frame, the receiver restrains itself and waits
until the network layer passes it the next packet. The acknowledgment is
attached to the outgoing data frame. In effect, the acknowledgment gets a
free ride on the next outgoing data frame. The technique of temporarily
delaying outgoing acknowledgment so that they can be hooked onto the next
outgoing data frame is widely known as piggybacking.
The Physical Layer
The physical later is concerned with transmitting raw bits over a
communication channel. The design issues have to do with making sure that
when one side sends a 1 bit, it is received by the other side as a 1 bit,
not as a 0 bit. Typical questions here ar e how many volts should be used to
represent a 1 and how many for a 0, how many microseconds a bit lasts,
whether transmission may proceed simultaneously in both directions, how the
initial connection is established and how it is torn down when both sides
are finished, and how many pins the network connector has and what each pin
is used for. The design issues here deal largely with mechanical,
electrical, and procedural interfaces, and the physical transmission medium,
which lies below the physical layer. Physical layer design can properly be
considered to be within the domain of the electrical engineer. |