You are on page 1of 61

DATA

COMMUNICATION
AND NETWORKING
CEN-222

Engr M. Faisal Siddiqui Assistant


Professor

2.2

Chapter 2
Network Models

Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

22THEOSIMODEL
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.

Topics discussed in this section:


Layered Architecture
Peer-to-Peer Processes
Encapsulation
2.3

THEOSIMODEL

2.4

The OSI model is not a protocol; it is a model for


understanding and designing a network architecture
that is flexible, reliable , and interoperable (different
machines can communicate).
The OSI model is a layered framework for the design
of network systems that allows communication
between all types of computer systems. It consists
of seven separate but related layers, each of which
defines a part of the process of moving information
across a network (see Figure 2.2). An understanding
of the fundamentals of the OSI model provides a
solid basis for exploring data communications

Figure 2.2 Seven layers of the OSI model

2.5

Characteristics of the OSI Layers

2.6

The seven layers of the OSI reference model can be divided


into two categories: upper layers and lower layers.
The upper layers of the OSI model deal with application
issues and generally are implemented only in software. The
highest layer, the application layer, is closest to the end
user. Both users and application layer processes interact
with software applications that contain a communications
component.
The lower layers of the OSI model handle data transport
issues. The physical layer and the data link layer are
implemented in hardware and software. The lowest layer,
the physical layer, is closest to the physical network
medium (the network cabling, for example) and is
responsible for actually placing information on the medium.

OSI Layers

2.7

Figure 2.3 The interaction between layers in the OSI model

2.8

THEOSIMODEL

The upper OSI layers are almost always implemented in


software; lower layers are a combination of hardware and
software, except for the physical layer, which is mostly
hardware.
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.

The OSI Model: Understanding the


Seven Layers of Computer Networks

Introduction

The Open Systems Interconnection (OSI) model is a


reference tool for understanding data communications
between any two networked systems. It divides the
communications processes into seven layers. Each layer
both performs specific functions to support the layers
above it and offers services to the layers below it. The three
lowest layers focus on passing traffic through the network
to an end system. The top four layers come into play in the
end system to complete the process.

2.10

The physical layer

2.11

The physical layer of the OSI model


defines connector and interface
specifications, as well as the medium
(cable) requirements. Electrical,
mechanical, functional, and procedural
specifications are provided for sending a
bit stream on a computer network.

The physical layer

2.12

Components of the physical layer include:


Cabling system components
Adapters that connect media to physical
interfaces
Connector design and pin assignments
Hub, repeater, and patch panel specifications
Wireless system components
Network Interface Card (NIC)

The physical layer

The physical layer is also concerned with the following,

Physical characteristics of interfaces and medium.


The physical layer defines the characteristics of the interface
between the devices and the transmission medium. It also defines
the type of transmission medium.
Representation of bits.
The physical layer data consists of a stream of bits (sequence of
0s or 1s) with no interpretation. To be transmitted, bits must be
encoded into signals--electrical or optical. The physical layer
defines the type of encoding (how 0s and Is are changed to
signals).

2.13

The physical layer

2.14

Data rate.
The transmission rate-the number of bits sent each second-is
also defined by the physical layer. In other words, the physical
layer defines the duration of a bit, which is how long it lasts.
Synchronization of bits.
The sender and receiver not only must use the same bit rate
but also must be synchronized at the bit level. In other words,
the sender and the receiver clocks must be synchronized.
Line configuration.
The physical layer is concerned with the connection of devices
to the media. In a point-to-point configuration, two devices
are connected through a dedicated link. In a multipoint
configuration, a link is shared among several devices.

The physical layer

2.15

Physical topology.
The physical topology defines how devices are connected
to make a network.
Transmission mode.
The physical layer also defines the direction of
transmission between two devices: simplex, half-duplex, or
full-duplex.

Note
The physical layer is responsible for movements of
individual bits from one hop (node) to the next.

2.16

Layer 2 The Data Link Layer

Layer 2 of the OSI model provides the following functions:

Allows a device to access the network to send and receive


messages
Offers a physical address so a devices data can be sent on the
network.
Works with a devices networking software when sending and
receiving messages
Provides error-detection capability

2.17

Common networking components that function at layer 2 include:


Network interface cards
Ethernet and Token Ring switches
Bridges

The Data Link Layer

2.18

NICs have a layer 2 or MAC address. A switch


uses this address to filter and forward traffic,
helping relieve congestion and collisions on a
network segment.

The Data Link Layer

2.19

Responsibilities of the data link layer include the following:


Framing.
The data link layer divides the stream of bits received from the
network layer into manageable data units called frames.
Physical addressing.
If frames are to be distributed to different systems on the network,
the data link layer adds a header to the frame to define the sender
and/or receiver of the frame. If the frame is intended for a system
outside the sender's network, the receiver address is the address
of the device that connects the network to the next one.
Flow control.
If the rate at which the data are absorbed by the receiver is less
than the rate at which data are produced in the sender, the data
link layer imposes a flow control mechanism to avoid
overwhelming the receiver.

The Data Link Layer

2.20

Error control.
The data link layer adds reliability to the physical layer by
adding mechanisms to detect and retransmit damaged or
lost frames. It also uses a mechanism to recognize
duplicate frames. Error control is normally achieved through
a trailer added to the end of the frame.
Access control.
When two or more devices are connected to the same link,
data link layer protocols are necessary to determine which
device has control over the link at any given time.

Figure 2.6 Data link layer

2.21

Note
The data link layer is responsible for moving
frames from one hop (node) to the next.

2.22

Figure 2.7 Hop-to-hop delivery

2.23

Layer 3 The Network Layer

2.24

Layer 3, the network layer of the OSI model,


provides an end-to-end logical addressing system
so that a packet of data can be routed across
several layer 2 networks (Ethernet). Note that
network layer addresses can also be referred to
as logical addresses.

Figure 2.8 Network layer

2.25

The Network Layer

2.26

The network layer is responsible for the source-todestination delivery of a packet, possibly across multiple
networks (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.
If two systems are connected to the same link, there is
usually no need for a network layer. However, if the two
systems are attached to different networks (links) with
connecting devices between the networks (links), there is
often a need for the network layer to accomplish source-todestination delivery. Figure 2.8 shows the relationship of the
network layer to the data link and transport layers

Note
The network layer is responsible for the
delivery of individual packets from
the source host to the destination host.

2.27

Figure 2.9 Source-to-destination delivery

2.28

The Network Layer

2.29

As the figure shows, now we need a source-todestination delivery. The network layer at A sends
the packet to the network layer at B. When the
packet arrives at router B, the router makes a
decision based on the final destination (F) of the
packet.

The Network Layer

2.30

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 systems. The network
layer adds a header to the packet coming from the upper layer
that, among other things, includes the logical addresses of the
sender and receive.
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. One of the
functions of the network layer is to provide this mechanism.

Note
The transport layer is responsible for the delivery
of a message from one process to another.

2.31

Transport layer

2.32

The transport layer is responsible for process-to-process


delivery of the entire message. A process is an application
program running on a host.
The transport layer, ensures that the whole message
arrives intact and in order, overseeing both error control
and flow control at the source-to-destination level.

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

2.33

Transport layer

2.34

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 process (running program) on one computer to
a specific process (running program) on the other. The transport
layer header must therefore include a type of address called a
service-point address (or port address). The network layer gets
each packet to the correct computer; the transport layer gets the
entire message to the correct process on that computer.
Segmentation and reassembly. A message is divided into
transmittable segments, with each segment containing a sequence
number. These numbers enable the transport layer to reassemble
the message correctly upon arriving at the destination and to
identify and replace packets that were lost in transmission.

Transport layer

2.35

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. A connection oriented transport layer
makes a connection with the transport layer at the destination machine
first before delivering the packets. After all the data are transferred, the
connection is terminated.
Flow control. Like the data link layer, the transport layer is responsible
for flow control. However, flow control at this layer is performed end to
end rather than across a single link.
Error control. Like the data link layer, the transport layer is
responsible for error control. However, error control at this layer is
performed process-to process rather than across a single link. The
sending transport layer makes sure that the entire message arrives at
the receiving transport layer without error (damage, loss, or
duplication). Error correction is usually achieved through retransmission.

Note
The session layer is responsible for dialog
control and synchronization.

2.36

Session Layer

2.37

The services provided by the first three layers


(physical, data link, and network) are not
sufficient for some processes.
The session layer is the network dialog controller.
It establishes, maintains, and synchronizes the
interaction among communicating systems.

Session Layer

2.38

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 processes
to take place in either half duplex (one way at a time) or fullduplex (two ways at a time) mode.
Synchronization. The session layer allows a process to add
checkpoints, or synchronization points, to a stream of data. For
example, if a system is sending a file of 2000 pages, it is advisable
to insert checkpoints after every 100 pages to ensure that each
100-page unit is received and acknowledged independently. In this
case, if a crash happens during the transmission of page 523, the
only pages that need to be resent after system recovery are pages
501 to 523. Pages previous to 501 need not be resent. Figure 2.12
illustrates the relationship of the session layer to the transport and
presentation layers.

Note
The presentation layer is responsible for translation,
compression, and encryption.

2.39

Presentation Layer

2.40

The presentation layer is concerned with the syntax and semantics


of the information exchanged between two systems.
Specific responsibilities of the presentation layer include the
following:
Translation. The processes (running programs) in two systems
are usually exchanging information in the form of character
strings, numbers, and so on. The information must be changed to
bit streams before being transmitted. Because different computers
use different encoding systems, the presentation layer is
responsible for interoperability between these different encoding
methods. The presentation layer at the sender changes the
information from its sender-dependent format into a common
format. The presentation layer at the receiving machine changes
the common format into its receiver-dependent format.

Presentation Layer

2.41

Encryption. To carry sensitive information, a system must


be able to ensure privacy. Encryption means that the
sender transforms the original information to another form
and sends the resulting message out over the network.
Decryption reverses the original process to transform the
message back to its original form.
Compression. Data compression reduces the number of
bits contained in the information. Data compression
becomes particularly important in the transmission of
multimedia such as text, audio, and video.

Note
The application layer is responsible for
providing services to the user.

2.42

Figure 2.14 Application layer

2.43

Application layer

2.44

The application layer enables the user, whether human or software, to


access the network. It provides user interfaces and support for services
such as electronic mail, remote file access and transfer, shared database
management, and other types of distributed information services.
Network virtual terminal. A network virtual terminal is a software
version of a physical terminal, and it allows a user to log on to a remote
host. To do so, the application creates a software emulation of a terminal at
the remote host. The user's computer talks to the software terminal which,
in turn, talks to the host, and vice versa.
File transfer, access, and management. This application allows a user
to access files in a remote 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 locally.
Mail services. This application provides the basis for e-mail forwarding
and storage.
Directory services. This application provides distributed database sources
and access for global information about various objects and services

Figure 2.15 Summary of layers

2.45

SummaryApplication Layer

2.46

Application layer provides platform to send and receive data over the network.
All applications and utilities that communicate with network fall in this layer.
For examples
Browsers :- Mozilla Firefox, Internet Explorer, Google Chrome etc
Email clients: - Outlook Express, Mozilla Thunderbird etc.
FTP clients :- Filezilla, sFTP, vsFTP
Application layer protocols that we should know for exam are following:
SNMP (Simple Network Management Protocol) Used to control the
connected networking devices.
FTP (File Transfer Protocol) Used to transfer the files rapidly.
DNS (Domain Naming System) Used to translate the name with IP
address and vice versa.
DHCP (Dynamic Host Configuration Protocol) Used to assign IP address
and DNS information automatically to hosts.
Telnet used to connect remote devices.
HTTP (Hypertext Transfer Protocol) Used to browse web pages.
FTP (File Transfer Protocol) Used to reliably sends/retrieves files.
SMTP (Simple Mail Transfer Protocol) Used to sends email.
POP3 (Post Office Protocol v.3) Used to retrieves email.
NTP (Network Time Protocol) Used to synchronizes clocks.

Presentation layer

2.47

Presentation layer prepares the data.


It takes data from application layer and marks it with
formatting code such as .doc, .jpg, .txt, etc. These file
extensions make it easy to realize that particular file is
formatted with particular type of application.
With formatting presentation layer also deals with
compression and encapsulation. It compresses (on sending
computer) and decompresses (on receiving computer) the
data file.

The Session Layer

2.48

Session layer deals with connections. It


establishes, manages, and terminates sessions
between two communicating nodes.

Transport Layer

2.49

It sets up and maintains the connection between two devices.


It multiplexes connections that allow multiple applications to
simultaneously send and receive data.
According to requirement data transmission method can be
connection oriented or connection less.
For unreliable data delivery connection less method is used.
Connection less method uses UDP protocol.
For reliable data delivery connection oriented method is used.
Connection oriented method uses TCP protocol.
When Implemented a reliable connection, sequence numbers
and acknowledgments (ACKs) are used.
Reliable connection controls flow through the uses of
windowing or acknowledgements.

Transport Layer

2.50

Segmentation
Connection management
Reliable and unreliable data delivery
Flow control
Connection multiplexing

Transport Layer

2.51

Segmentation
Segmentation is the process of breaking large data file into smaller files
that can be accommodated by network. To understand this process thinks
about a 700 MB movie that you want to download from internet. You have
2MBPS internet connection. How will you download a 700MB movie on
2MBPS internet connection?
In this case segmentation process is used. On server transport layer breaks
700MB movie in smaller size of segments (less than your internet
connection speed). Assume that 700Mb movie is divided in 700 segments.
Each segment has file size of 1Mb that your PC can easily download at
current connection speed. Now your PC will download 700 small files
instead of one large file. So next time when you see download progress bar
in browser, think it about segment receiver progress bar. Once your
browser receives all segments from server, it will pop up a message
indicating download is completed. Transport layer at your PC will merge all
segments back in a single 700Mb movie file. End user will never know how
a 700Mb movie makes its way through the 2Mbps connection line.

Transport Layer

2.52

Connection management
Transport layer setup, maintain and tear down connections for session layer. Actual
mechanic of connection is controlled by transport layer. Transport layer use two
protocols for connection management UDP and TCP.
UDP
UDP is a connection less protocol. Connection-less transmission is said to be
unreliable. Now, don't get worried about the term "unreliable" this doesn't mean
that the data isn't going to get its destination; its only means that it isn't
guaranteed to get its destination. Think of your options when you are sending a
postcard, put it in the mailbox, and chances are good that it will get where it's
supposed to go but there is no guarantee. There is always a chance of missing in
the way. On the other hand, it's cheap.
TCP
TCP is a connection oriented protocol. Connection-oriented transmission is said to
be reliable. Think TCP as registry AD facility available in Pakistan post office. For this
level of service, you have to buy extra ticket and put a bunch of extra labels on it to
track where it is going and where it has been. You get a receipt when it is delivered.
In this method you have a guaranteed delivery. All of this costs you morebut it is
reliable!

Network Layer

2.53

Network layer is responsible for providing logical address known


as IP address. Router works on this layer. Main functions of this
layer are following:Define IP address
Find routes based on IP address to reach its destination.
Data packets
Data packets are used to transport the user data across the
network. Protocols used by data packets are known as routed
protocol. For example IP.
Route update packets
These packets are used to update the route information within
internetwork. Routers use these packets. Protocols that send route
update packets are called routing protocols; for example RIP,
RIPv2, EIGRP, and OSPF.

Data link layer

2.54

Main functions of data link layer are


Defining the Media Access Control (MAC) or hardware addresses
Defining the physical or hardware topology for connections
Defining how the network layer protocol is encapsulated in the data link
layer frame
Providing both connectionless and connection-oriented services
Defines hardware (MAC) addresses as well as the communication process
that occurs within a media.
MAC Address
MAC address is a 48 bit long layer two address. It is also known as
hardware address. This address is burnt with device by manufacturing
company.
The first six hexadecimal digits of a MAC address represent its manufacture
company.
MAC addresses only need to be unique in a broadcast domain.
You can have the same MAC address in different broadcast domains.

Data link layer

2.55

Frame
Data link layer receive packet from network layer and wrap it with
layer two Header that is known as frame. There are two
specifications of Ethernet frame.
Ethernet II
802

Physical Layer

2.56

Physical layer deals with communication media.


This layer receive frame from data link layer and
convert them in bits. It loads these bits on actual
communication media.

24TCP/IPPROTOCOLSUITE
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-tonetwork, 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.57

Figure 2.16 TCP/IP and OSI model

2.58

25ADDRESSING
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.59

Figure 2.17 Addresses in TCP/IP

2.60

Figure 2.18 Relationship of layers and addresses in TCP/IP

2.61

You might also like