Sie sind auf Seite 1von 48

Chapter 2

Network Models

2.1

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

21LAYEREDTASKS
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.2

Figure 2.1

2.3

Tasks involved in sending a letter

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.
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
Encapsulation
2.4

Figure 2.2 Seven layers of the OSI model


ISO is the organization. OSI is the model.

2.5

Interaction between Layers : Peerto-Peer Process

2.6

Figure 2.3 illustrate the interaction between layers in the OSI


model.
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

2.7

How does information passed from one layer


to the next in the OSI model?

2.8

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

2.9

Encapsulation

2.10

Figure 2.3 also illustrates encapsulation.

23LAYERSINTHEOSIMODEL
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.11

Physical Layer

2.12

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
media:
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.

2.13

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:

2.14

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.

2.15

2.16

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

2.17

Network Layer

The network layer is responsible for getting am individual


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

2.18

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.

2.19

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.

2.20

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)

2.21

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:

2.22

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
message.
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
delivery)

2.23

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

2.24

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:

2.25

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
synchronization.

2.26

Presentation layer

2.27

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
systems.
It is responsible for:
Translation: from the machine specific characters sets
and data formats to generic sets (examples Unicode,
ASCII)
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.

2.28

Application Layer

2.29

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
computer.
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
user.

2.30

Figure 2.15 Summary of layers

2.31

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.32

Internet Model : TCP/IP Protocol


Suite
History:

2.33

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

2.34

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

TCP/IP
TCP/IP is a protocol suite with
an associated stack
TCP/IP is in widespread use
TCP/IP is a de facto, free
standard
TCP/IP is the basis of the
Internet
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
Control

Figure 2.16 OSI model and TCP/IP Protocol Stack

2.35

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.36

Figure 2.17 Addresses in TCP/IP

2.37

Figure 2.18 Relationship of layers and addresses in TCP/IP

2.38

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.39

Figure 2.19 Physical addresses

2.40

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.41

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.42

Figure 2.20 IP addresses

2.43

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.44

Figure 2.21 Port addresses

2.45

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

2.46

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.47

Notes

2.48

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.