CH 02

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 89

2-1 LAYERED TASKS

We use the concept of layers in our daily life. As an


example, let us consider two friends who communicate
through postal mail. The process of sending a letter to a
friend would be complex if there were no services
available from the post office.

Topics discussed in this section:


Sender, Receiver, and Carrier
Hierarchy
2-1 LAYERED TASKS

Figure 2.1 Tasks involved in sending a letter


2-1 LAYERED TASKS
2-2 THE OSI MODEL

Established in 1947, the International Standards


Organization (ISO) is a multinational body dedicated to
worldwide agreement on international standards. An
ISO standard that covers all aspects of network
communications is the Open Systems Interconnection
(OSI) model. It was first introduced in the late 1970s.
An open system is a set of protocols that allows any two
different systems to communicate regardless of their
underlying architecture. The purpose of the OSI model
is to show how to facilitate communication between
different systems without requiring changes to the logic
of the underlying hardware and software.
2-2 THE OSI MODEL

Topics discussed in this section:

Layered Architecture
Peer-to-Peer Processes
Encapsulation
2-2 THE OSI MODEL

Note

ISO is the organization.


OSI is the model.
2-2 THE OSI MODEL

The Open Systems Interconnection model is a layered


framework for the design of network Systems that allows for
communication across all types of computer systems. It consists
of seven separate but related layers, each of which defines a
segment of the process of moving information across a network.
Understanding the fundamentals of the OSI model provides a
solid basis for exploration of data communications.
2-2 THE OSI MODEL

Figure 2.2 Seven layers of the OSI model


2-2 THE OSI MODEL

Layered Architecture
The OSI model is built of seven ordered layers: physical
(layer 1), data link (layer 2), network (layer 3), transport
(layer 4), session (layer 5), presentation (layer 6), and
application(layer 7). Figure shows the layers involved
when a message is sent from device A to device B. As the
message travels from A to B, it may pass through many
intermediate nodes. These intermediate nodes usually
involve only the first three layers of the OSI model.
2-2 THE OSI MODEL

In developing the model, the designers distilled the process of


transmitting data down to its most fundamental elements. They
identified which networking functions had related uses and
collected those functions into discrete groups that became the
layers.
2-2 THE OSI MODEL

Each layer defines a family of function distinct from those of the


other layers. By defining and localizing functionality in this
fashion, the designers created an architecture that is both
comprehensive and flexible. Most important, the OSI model
allows complete transparency between otherwise incompatible
systems.
A mnemonic for remembering the layers of the OSI model is:
Please Do Not Touch Steve's Pet Alligator, (Physical, Data Link,
Network Transport, Session, Presentation, Application).
2-2 THE OSI MODEL
Figure 2.3 The interaction between layers in the OSI model
2-2 THE OSI MODEL

Peer-to-Peer Processes
Within a single machine, each layer calls upon the
services of the layer just below it.
Between machines, layer x on one machine communicates
with layer x on another machine. This communication is
governed by an agreed-upon series of rules and
conventions called protocols. The processes on each
machine that communicate at a given layer are called peer-
to-peer processes. Communication between machines is
therefore a peer-to-peer process using the protocols
appropriate to a given layer.
2-2 THE OSI MODEL

At the physical layer, communication is direct:


Machine A sends a stream of bits to machine B. At the
higher layers, however, communication must move
down through the layers on machine A, over to
machine B, and then back up through the layers.
Each layer in the sending machine adds its own
information to the message it receives from the layer
just above it and passes the whole package to the layer
just below it.
2-2 THE OSI MODEL

This information is added in the form of headers or


trailers (control data appended to the beginning or end
of a data parcel). Headers are added to the message at
layers 6, 5, 4, 3,and 2. A trailer is added at layer 2.
Headers are added to the data at layers 6, 5, 4, 3, and 2,
Trailers are usually added only at layer 2.
2-2 THE OSI MODEL

• At layer 1 the entire package is converted to a form


that can be transferred to the receiving machine. At
the receiving machine, the message is unwrapped
layer by layer, with each process receiving and
removing the data meant for it. For example, layer 2
removes the data meant for it, then passes the rest to
layer 3. Layer 3 removes the data meant for it and
passes the rest to layer 4, and so on.
2-2 THE OSI MODEL

Interfaces between Layers


The passing of the data and network information down
through the layers of the sending machine and back up
through the layers of the receiving machine is made
possible by an interface between each pair of adjacent
layers. Each interface defines what information and
services a layer must provide for the layer above it. Well-
defined interfaces and layer functions provide modularity
to a network. As long as a layer still provides the expected
services to the layer above it, the specific implementation
of its functions can be modified or replaced without
requiring changes to the surrounding layers.
2-2 THE OSI MODEL

Organization of the Layers


The seven layers can be thought of as belonging to three
subgroups. Layers 1, 2, and 3--physical, data link, and network--are
the network support layers; they deal with the physical aspects of
moving data from one device to another (such as electrical
specifications, physical connections, physical addressing, and
transport timing and reliability). Layers 5, 6, and 7--session,
presentation, and application--can be thought of as the user support
layers; they allow interoperability among unrelated software
systems. Layer 4, the transport layer, links the two subgroups and
ensures that what the lower layers have transmitted is in a form that
the upper layers can use
2-2 THE OSI MODEL

Upon reaching its destination, the signal passes into layer 1


and is transformed back into digital form. The data units then
move back up through the OSI layers. As each block of data
reaches the next higher layer, the headers and trailers attached
to it at the corresponding sending layer are removed,and
actions appropriate to that layer are taken. By the time it
reaches layer 7, the message is again in a form appropriate to
the application and is made available to the recipient.

two concepts
actual communication
virtual communication
2-2 THE OSI MODEL

Figure 2.4 An exchange using the OSI model Demo


2-3 LAYERS IN THE OSI MODEL

In this section we briefly describe the functions of each


layer in the OSI model.

Topics discussed in this section:


Physical Layer
Data Link Layer
Network Layer
Transport Layer
Session Layer
Presentation Layer
Application Layer
2-3 LAYERS IN THE OSI MODEL

Physical Layer
The physical layer coordinates the functions required to
transmit a bit stream over a physical medium. It deals with the
mechanical and electrical specifications of the primary
connections, such as cables, connectors, and signaling options
that physically link two nodes on a network.
This first layer receives a data unit from the second layer and
puts it into a format capable of being carried by a
communications link. It oversees the changing of a bit stream
into electromagnetic signals, and their transmission onto and
across a medium.
2-3 LAYERS IN THE OSI MODEL

Figure 2.5 Physical layer


2-3 LAYERS IN THE OSI MODEL

Note

The physical layer is responsible for movements of


individual bits from one hop (node) to the next.
2-3 LAYERS IN THE OSI MODEL

This seemingly simple task requires a number of considerations:


Signals. What type of signals are useful for transmitting
information?
Encoding. How are bits (0 and 1) to be represented by available
signaling systems? How are data represented by signals?
Interface. What information must be shared between two closely
linked devices to enable and facilitate communication? What is the
most efficient way to communicate that information?
Medium. What is the physical environment for the transmission of
data?
Date rate The transmission rate--the number of bits sent each
second—is also defined by the physical layer.
2-3 LAYERS IN THE OSI MODEL

Synchronization of bits The sender and receiver not only must use
the same bit rate but also must be synchronized at the bit level.
Line configuration. How can two or more devices be linked
physically? Are transmission lines to be shared or limited to use
between two devices? Is the line available or not?
Data transmission mode. It does transmission flow one way or
both ways between two connected devices? Or does it alternate?
Topology. How are network devices arranged? Do they pass data
directly to each other or through an intermediary? And by what
paths?
2-3 LAYERS IN THE OSI MODEL

Data Link Layer

The data link layer is responsible for delivering data units


(groups of bits) from one station to the next without
errors. It accepts a data unit from the third layer and
adds meaningful bits to the beginning (header) and end
(trailer) that contain addresses and other control
information. A data unit with this additional information
is called a frame.
2-3 LAYERS IN THE OSI MODEL

Figure 2.6 Data link layer


2-3 LAYERS IN THE OSI MODEL

Note

The data link layer is responsible for moving


frames from one hop (node) to the next.
2-3 LAYERS IN THE OSI MODEL

Figure 2.7 Hop-to-hop delivery


2-3 LAYERS IN THE OSI MODEL

To get to its ultimate destination, a transmission may


have to be passed along by a number of intermediate
stations. Data link frame headers and trailers contain the
information necessary to move a data unit from one of
these stations to the next. (information such as the
physical address of the station passing along the data unit
and that of the next station to which the frame must go on
the way to its final destination)
2-3 LAYERS IN THE OSI MODEL

In addition, the data link layer is responsible


for flow control and error detection.
Protocols in this layer regulate the right of a
device to transmit; how to keep transmissions
from overwhelming the receiver and how to
ensure that errors introduced during
transmission are corrected. To this end,
headers and trailers also carry information
about synchronization.
2-3 LAYERS IN THE OSI MODEL

sequencing (what part of the overall transmission is


represented by particular frame),and whether or not
the last frame arrived intact.
Headers and trailers at this level are added by the
sending node, then checked and interpreted by the
receiving node. Once a receiving node accepts a frame,
it strips off the header and trailer and passes the
remaining data unit on to the network layer.
Specific responsibilities of the data link layer include
the following:
2-3 LAYERS IN THE OSI MODEL

Framing The data link layer divides the stream of


bits received from the network layer into
manageable data units called frames .
Physical Addressing. Headers and trailers added at
this layer include the physical address of the most
recent node and the next intended node.
  Access control. When two or more devices are
connected to the same link, the data link layer
protocols are necessary to determine which device
has control over the line at any given time.
2-3 LAYERS IN THE OSI MODEL

Flow control To avoid overwhelming the receiver,


the data link layer regulates the amount of data that
can be transmitted at one time. It adds identifying
numbers to enable the receiving node to control the
ordering of the frames.
Error handling Data link layer protocols provide for
data recovery, usually by having the entire frame
retransmitted. Error control is normally achieved
through a trailer added to the end of the frame.
2-3 LAYERS IN THE OSI MODEL

When the standards were developed for local


area networks, the data link layer was subdivided
into two sub-layers : logical link control (LLC)
and media access control (MAC).
2-3 LAYERS IN THE OSI MODEL

Network Layer
The network layer is responsible for the source-to-
destination delivery of a packet across multiple
network links. Whereas the data link layer oversees
the delivery of the packet between two systems on
the same network (links), the network layer ensures
that each packet gets from its point of origin to its
final destination successfully and efficiently.
2-3 LAYERS IN THE OSI MODEL

Responsibilities of the network layer include the following:

Logical addressing The Physical addressing


implemented by the data link layer handles the
addressing problem locally. If a packet passes
the network boundary, we need another
addressing system to help distinguish the source
and destination system.
2-3 LAYERS IN THE OSI MODEL

Routing When independent networks or links are connected to


create internetworks (network of networks) or a large network,
the connecting devices (called routers or switches) route or
switch the packets to their final destination. Routing means
selecting the best path for sending a packet from one point to
another when more than one path is available. In this case,
each packet may take a different route to the destination, where
the packets are collected and reassembled into their original
order. Routing considerations include speed, cost, and the
ability to change pathways in mid_transmission.
2-3 LAYERS IN THE OSI MODEL

Figure 2.8 Network layer


2-3 LAYERS IN THE OSI MODEL

Note

The network layer is responsible for the


delivery of individual packets from
the source host to the destination host.
2-3 LAYERS IN THE OSI MODEL

Figure 2.9 Source-to-destination delivery


2-3 LAYERS IN THE OSI MODEL

Transport Layer
• The transport layer is responsible for process–to-process
delivery of the entire message. Whereas the network
layer oversees source-to-destination delivery of
individual packets, it does not recognize any
relationship between those packets. It treats each one
independently, as though each piece belonged to a
separate message, whether or not it does. The transport
layer, on the other hand, ensures that the whole
message arrives intact and in order, overseeing both
error control and flow control at the source -to-
destination level.
2-3 LAYERS IN THE OSI MODEL

Other responsibilities of the Transport Layer include the


following:
Service-point addressing Computers often run several
programs at the same time. For this reason, source-to-
destination delivery means delivery not only from one
computer to the next but also from a specific application on
one computer to a specific application on the other. The
transport layer header must therefore include a type of
address called a service-point address (also called a port
address or socket address). The network layer gets each
packet to the correct computer; the transport layer gets the
entire message to the correct application on that computer.
2-3 LAYERS IN THE OSI MODEL

Transport Layer

Segmentation and reassembly Dividing a


message into transmittable segments, and marking each
segment with a sequence number. These numbers enable the
transport layer to reassemble the message correctly at the
destination and to identify and replace packets lost in
transmission.
2-3 LAYERS IN THE OSI MODEL

Transport Layer
Connection control The transport layer can be either
connectionless or connection-oriented. A connectionless
transport layer treats each segment as an independent packet
and delivers it to the transport layer at the destination machine.
For added security, the transport layer may create a connection
between the two end ports. Creating a connection involves three
steps: connection establishment, data transfer, and connection
release. By confining transmission of all packets to a single
pathway, the transport layer has more control over sequencing,
flow, and error detection and correction.
2-3 LAYERS IN THE OSI MODEL

Transport Layer

Flow control Flow control at transport layer is performed end


to end rather than across a single link.
Error control Error control at transport layer is performed
process-to-process rather than across a single link. Error
correction is usually achieved through retransmission.
2-3 LAYERS IN THE OSI MODEL

Figure 2.10 Transport layer


2-3 LAYERS IN THE OSI MODEL

Note

The transport layer is responsible for the delivery


of a message from one process to another.
2-3 LAYERS IN THE OSI MODEL

Figure 2.11 Reliable process-to-process delivery of a message


2-3 LAYERS IN THE OSI MODEL

Session Layer
Specific responsibilities of the session layer include the
following:
Dialog control The session layer allows two systems to
enter into a dialog. It allows the communication between
two process to take place either half-duplex or full-
duplex mode.
Synchronization. The session layer allows a process to
add checkpoints, or synchronization points, to a stream
of data.
2-3 LAYERS IN THE OSI MODEL

Figure 2.12 Session layer


2-3 LAYERS IN THE OSI MODEL

Note

The session layer is responsible for dialog


control and synchronization.
2-3 LAYERS IN THE OSI MODEL

Presentation Layer
Specific responsibilities of the presentation layer
include the following:
Translation. Changing the format of a message from
that used by the sender into one mutually acceptable
for transmission. Then, at the destination, changing
that format into the one understood by the receiver.
2-3 LAYERS IN THE OSI MODEL

Presentation Layer
Encryption. Encryption and decryption of data for
security purposes.
Compression. Compressing and decompressing data to
make transmission more efficient.
2-3 LAYERS IN THE OSI MODEL

Figure 2.13 Presentation layer


2-3 LAYERS IN THE OSI MODEL

Note

The presentation layer is responsible for translation,


compression, and encryption.
2-3 LAYERS IN THE OSI MODEL

Figure 2.14 Application layer


2-3 LAYERS IN THE OSI MODEL

Application Layer
Specific services provided by the application layer include
the following:
Network virtual terminal A software version of a
physical terminal. A virtual terminal allows you to log on
to a remote host. To do so, the application creates a
software emulation of a terminal at the remote host. Your
computer talks to the software terminal, which in turn
talks to the host. The remote host believes it is
communicating with one of its own terminals and allows
you to log on.
2-3 LAYERS IN THE OSI MODEL

Application Layer
File transfer, access, and management. Allows a user at
a remote computer to access files in another host (to make
changes or read data ); to retrieve files from a remote
computer for use in the local computer; and to manage or
control files in a remote computer at that computer.
Mail services. Provides the basis for electronic mail
forwarding and storage.
Directory services. Provides distributed database sources
and access for global information about various objects
and services.
2-3 LAYERS IN THE OSI MODEL

Note

The application layer is responsible for


providing services to the user.
2-3 LAYERS IN THE OSI MODEL

Figure 2.15 Summary of layers


2-4 TCP/IP PROTOCOL SUITE

The layers in the TCP/IP protocol suite do not exactly


match those in the OSI model. The original TCP/IP
protocol suite was defined as having four layers: host-to-
network, internet, transport, and application. However,
when TCP/IP is compared to OSI, we can say that the
TCP/IP protocol suite is made of five layers: physical,
data link, network, transport, and application.
Topics discussed in this section:
Physical and Data Link Layers
Network Layer
Transport Layer
Application Layer
2-4 TCP/IP PROTOCOL SUITE

Figure 2.16 TCP/IP and OSI model


2-4 TCP/IP PROTOCOL SUITE

physical and data link layers

At the physical and data link layers, TCP/IP does


not define any specific protocol. It supports all of
the standard and proprietary protocols. A network
in a TCP/IP internetwork can be a LAN, a MAN, or
a WAN 。
2-4 TCP/IP PROTOCOL SUITE

Network layer
Internetwork Protocol (IP)
Address Resolution Protocol (ARP) ARP is used to find the
physical address of the node when its Internet address is known.
Reverse Address Resolution Protocol (RARP)
Internet Control Message Protocol (ICMP) is a mechanism used
by hosts and gateways to send notification of datagram problem
back to the sender.
Internet Group Message Protocol (IGMP) is used to facilitate
the simultaneous transmission of a message to a group of
recipients.
2-4 TCP/IP PROTOCOL SUITE

Transport layer
User Datagram Protocol (UDP)
Transmission Control Protocol (TCP)
Stream Control Transmission Protocol(SCTP) provides
support for newer application such as voice over the
Internet.
2-5 ADDRESSING

Four levels of addresses are used in an internet


employing the TCP/IP protocols: physical, logical, port,
and specific.

Topics discussed in this section:


Physical Addresses
Logical Addresses
Port Addresses
Specific Addresses
2-5 ADDRESSING

Figure 2.17 Addresses in TCP/IP


2-5 ADDRESSING

Figure 2.18 Relationship of layers and addresses in TCP/IP


2-5 ADDRESSING

Example 2.1
In Figure 2.19 a node with physical address 10 sends a
frame to a node with physical address 87. The two nodes
are connected by a link (bus topology LAN). As the
figure shows, the computer with physical address 10 is
the sender, and the computer with physical address 87 is
the receiver.
2-5 ADDRESSING

Figure 2.19 Physical addresses


2-5 ADDRESSING

Example 2.2
As we will see in Chapter 13, most local-area networks
use a 48-bit (6-byte) physical address written as 12
hexadecimal digits; every byte (2 hexadecimal digits) is
separated by a colon, as shown below:

07:01:02:01:2C:4B

A 6-byte (12 hexadecimal digits) physical address.


2-5 ADDRESSING

Example 2.3
Figure 2.20 shows a part of an internet with two routers
connecting three LANs. Each device (computer or
router) has a pair of addresses (logical and physical) for
each connection. In this case, each computer is
connected to only one link and therefore has only one
pair of addresses. Each router, however, is connected to
three networks (only two are shown in the figure). So
each router has three pairs of addresses, one for each
connection.
2-5 ADDRESSING

Figure 2.20 IP addresses Demo


2-5 ADDRESSING

Example 2.4
Figure 2.21 shows two computers communicating via
the Internet. The sending computer is running three
processes at this time with port addresses a, b, and c. The
receiving computer is running two processes at this time
with port addresses j and k. Process a in the sending
computer needs to communicate with process j in the
receiving computer. Note that although physical
addresses change from hop to hop, logical and port
addresses remain the same from the source to
destination.
2-5 ADDRESSING

Figure 2.21 Port addresses Demo


2-5 ADDRESSING

Note

The physical addresses will change from hop to hop,


but the logical addresses usually remain the same.
2-5 ADDRESSING

Example 2.5
As we will see in Chapter 23, a port address is a 16-bit
address represented by one decimal number as shown.

753

A 16-bit port address represented


as one single number.
2-5 ADDRESSING

Note

The physical addresses change from hop to hop,


but the logical and port addresses usually remain the same.
2-5 ADDRESSING

Specific Address

Some application have user-friendly addresses that


are designed for that specific address. Examples
include the e-mail address and the Universal Resource
Locator (URL) (for example ,www.yahoo.com).
SUMMARY

• The international Standards Organization created a model called


the Open Systems Interconnection, which allows diverse systems
to communicate.
• The seven-layer OSI model provides guidelines for the
development of universally compatible networking protocols.
• The physical, data link, and network layers are the network
support layers.
• The session, presentation, and application layers are the user
support layers.
• The transport layer links the network support layer and user
support layer.
• The physical layer links the network support layers and the user
support layers.
SUMMARY

• The data link layer is responsible for delivering data units


from one station to the next without errors.
• The network layer is responsible for the source-to-destination
delivery of a packet across multiple network links.
• The transport layer is responsible for the process-to-process
delivery of entire message.
• The session layer establishes, maintains, and synchronizes
the interactions between communicating devices.
• The presentation layer ensures interoperability between
communicating devices through transformation of data into a
mutually agreed upon format.
• The application layer enables the users to access the network.
SUMMARY

• TCP/IP is a five-layer hierarchical protocol suite developed


before the OSI model.
• The TCP/IP application layer is equivalent to the combined
session, presentation, and application layers of the OSI model.
• Four levels of addresses are used in an internet following the
TCP/IP protocols: physical (link) addresses, logical (IP)
addresses, port addresses, and specific addresses.
• The physical address, also known as the link address, is the
address of a node as defined by its LAN or WAN.
• The IP address uniquely defines a host on the Internet.
• The port addresses identifies a process on a host.
• A specific address is a user-friendly address.
PRATICE SET

1. List the layers of the Internet model.


2. What is the difference between a port address, a
logical address, and physical address?
3. Using the site
http://www.cne.gmu.edu/modules/network/osi.html,
discuss the OSI model.
4. Find the physical address and IP address of your
own computer in the classroom.
2-2 THE OSI MODEL

Figure 2.4 An exchange using the OSI model

Back
2-5 ADDRESSING

Figure 2.20 IP addresses

Back
2-5 ADDRESSING

Figure 2.21 Port addresses Back

You might also like