Sie sind auf Seite 1von 48

Chapter 2

Network Models


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

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


Figure 2.1


Tasks involved in sending a letter

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.
The seven-layer OSI model provides guidelines for the
development of universally compatible network protocol.
Topics discussed in this section:
Layered Architecture
Peer-to-Peer Processes

Figure 2.2 Seven layers of the OSI model

ISO is the organization. OSI is the model.


Interaction between Layers : Peerto-Peer Process


Figure 2.3 illustrate the interaction between layers in the OSI

At physical layer, the communication is direct.
At the higher layers, however, communication must move
down through the layers on device A, over to device B, and
then back up through the layers.
Each layer in the sending device adds its own information to
the message it receives from the layer above it and passes
the whole package to the layer below it.
At layer 1, the entire package is converted to a form that can
be transmitted to the receiving device.
At the receiving end, the message is unwrapped layer by
layer, with each process receiving and removing the data
meant for it.

Figure 2.3 The interaction between layers in the OSI model


How does information passed from one layer

to the next in the OSI model?


Fig. 2.4 illustrates an overall view of the OSI layers.

D7 means the data unit at layer 7, D6 means the data unit at layer
6, and so on.
The process starts at layer 7 (application layer), then moves from
layer to layer in descending , sequential order.
At each layer, a header, or possibly a trailer, is added to the data
unit. Commonly, the trailer is added only at layer 2.
When the formatted data unit is added through the physical layer, it
is changed to electromagnetic signal and transported along a
physical link.
Upon reaching its destination, the signal passes into layer 1 and is
transformed to digital form.
The data unit then moves 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. Actions appropriate to that layer are taken.
As it reaches layer 7, the message is again in a form appropriate to
the application and is made available to the recipient.

Figure 2.4 An exchange using the OSI model




Figure 2.3 also illustrates encapsulation.

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

Physical Layer


The physical layer is responsible for ensuring that a stream of

bits are transmitted between two nodes sharing a single link.
The physical layer coordinates all functions required to
transmit a bit stream over a physical medium.
It defines:
Physical characteristics of interfaces/ connectors and
Defines the characteristics of the interface between
devices and the transmission medium. It also defines the
type of transmission medium.
Representations of bits: how raw data (0s and is) are
encoded (transformed) into signals (electrical or optical)
Data rate: the number of bits transmitted per sec (bps)
Synchronization of bits between sender and receiver
Line configuration: multipoint or point-to-point
Physical topology: mesh, star, tree, ring or bus
Transmission mode: simplex, half duplex or full-duplex

Figure 2.5 Physical layer

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


Data Link Layer

The data link layer is responsible for ensuring that a packet

of data is successfully transmitted between two adjacent
nodes in the network.
The data link layer attempts to make the physical layer
appear error free to the layers above it in the model as well
as controlling node-to-node delivery (or also known as hopto-hop delivery).
It defines:


Access control: deciding when a device connected to the link

can transmit at any given time (who gets to talk and when)
Framing: Identifies the start and the end of each packet and
which part of the packet is the address
Physical Addressing: the address of the next node along the
route to the intended final destination
Error control: mechanisms for detecting and recovering from
transmission errors
Flow control: prevents the network or receiver from being
swamped by controlling the release of data at the source

Figure 2.6 Data link layer

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



Figure 2.7 shows, communication at the data link layer

occurs bet two adjacent nodes. To send data from A to F,
three partial deliveries are made:
First, the data link layer at A sends frame to the data link
layer at B (a router)
Second, the data link layer at B sends new frame to the
data link layer at E.
Finally, data link layer at E sends a new frame to the
data link layer at F
Note that the frames that are exchanged between the
three nodes have different values in the headers
(different destination and source addresses).
The value of the trailers can also be different if error
checking includes the header of the frame.

Figure 2.7 Hop-to-hop delivery


Network Layer

The network layer is responsible for getting am individual

packet of data from the source computer to the destination
The responsibilities of the network layer
Logical addressing: translates source and destination
addresses in ones that can be understood across all
connected networks.


Example: IP address

Routing: determining which path to take from source to

destination (most important when there are multiple
possible routes) in large network or internetworks.

The connecting device called routers or switches are

responsible in routing or switching the packets to the
final destination.

Figure 2.8 Network layer

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


Figure 2.9 shows the end-to-end delivery

The network layer at A sends the packet to the network
layer at B.
When the packet arrives at B, the router makes a decision
based on the final destination (in this case F) of the packet.


Router B uses its routing table to find the next hop (in this
example is router E)
The network layer at B, therefore sends the packet to the
networks layer at E.

The network layer at E, in turn, sends the packet to the

network layer at F.

Figure 2.9 Source-to-destination delivery (end-to-end delivery)


Transport Layer

The transport layer is responsible for getting the entire message

from the source process to destination process reliably.

A process is an application program running on a host.

The transport layer manages end-to-end delivery between two
communicating software processes.
Responsibilities of the transport layer include:


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.

Segmentation and reassembly (packetising): Breaking up the

message into packets of data at the source and reassembling them
at the destination and numbering the packets.
Service-point addressing: ensuring that the message reaches the
correct process (running program) at the destination. This is done
by assigning service point address (or port address) to the
Flow control: similar to data link layer except end-to-end.
Error control: similar to data link layer except entire message at the
final destination not single packets
Connection control: establishes end-to-end connections if required
(connection or connectionless network).

Figure 2.10 Transport layer

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


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


Session Layer

The session layer allows two communication processes to

co-ordinate the exchange of data.
This establishes, maintains, and synchronizes the
interaction between two communicating processes.
Its responsibilities include:


Dialog control: Allows two systems to enter a dialog defining

whether communication is half-duplex or duplex.
Synchronization: Allows a process to define synchronization
checkpoints in the message.
message This makes error/disaster
recovery more efficient (example: can prevent having to
resend an entire file when the link goes down)

Figure 2.12 Session layer

The session layer is responsible for dialog control and


Presentation layer


The presentation layer formats the data for interoperability,

security and efficiency of transmission.
This layer deals with the syntax and semantics of the
information being exchanged between the communicating
It is responsible for:
Translation: from the machine specific characters sets
and data formats to generic sets (examples Unicode,
Encryption: for security purposes
Compression: to minimize the amount of bits needed to
be transmitted and to reduce delivery time.

Figure 2.13 Presentation layer

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


Application Layer


The application layer is the interface between the user and

the network.
Allows the user (human or software) to access the network.
Provides user interfaces such and support such electronic
mail. Remote file access transfer, shared DBMS, etc
Services provided by the application layer include but not
limited to the following:
Network virtual terminal: Remote software access to a
physical terminal.
Instant messaging: such as chat
File transfer, Access and Management (FTAM): Allows a
user to access, retrieve and manage file on a remote
Mail services: control email exchange (X.400)
Directory services: distributed database sources and
access to global information (X.500)

Figure 2.14 Application layer

The application layer is responsible for providing services to the


Figure 2.15 Summary of layers


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

Internet Model : TCP/IP Protocol



US DoDs ARPA (Advanced Research Project Agency)

funded a project to investigate the possibility of creating
a nuclear war proof network.
Connecting computers via a new technology called
packet-switching and the resulting network grew
become what we now call the Internet
A series of protocol were developed in conjunction with
the Internet. The two most popular being Transmission
Control Protocol (TCP) and Internetworking Protocol (IP).

TCP/IP vs OSI Models


OSI is strictly a model with
no implementation
OSI is virtually unused
OSI is copyrighted
OSI is de jure standard
Consists of 7 distinct layers

TCP/IP is a protocol suite with
an associated stack
TCP/IP is in widespread use
TCP/IP is a de facto, free
TCP/IP is the basis of the
Consists of 5 layers:
Application, Transport ,
Network Layer (also called
the Internet layer), Logical
Link Control (or Network
Interface Layer/Data Link
Layer) and Medium Access

Figure 2.16 OSI model and TCP/IP Protocol Stack


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


Figure 2.17 Addresses in TCP/IP


Figure 2.18 Relationship of layers and addresses in TCP/IP


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.


Figure 2.19 Physical addresses


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:

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


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


Figure 2.20 IP addresses


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

Figure 2.21 Port addresses


The physical addresses will change from hop to hop,
but the logical addresses usually remain the same.


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.

A 16-bit port address represented
as one single number.




The physical address also known as link address or

hardware address, is the address of a node as defined by
its LAN or WAN. It is included in the frame used by data
link layer. It is the lowest-level address.

Logical addresses are necessary for universal

communications that are independent of the underlying
physical networks. Logical address in the Internet is
known as the IP address. It uniquely defines a host on the
Internet. IPv4 IP address is 32 bit-address.

The port address identifies a process on a host.

A specific address is a user-friendly address.

The physical addresses change from hop to hop, but the

logical and port addresses usually remain the same.