You are on page 1of 60

Chapter 2

Network Models

2.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
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.

2.2
Figure 2.1 Tasks involved in sending a letter

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

2.4
Note
ISO is the organization.
OSI is the model.

• The purpose of OSI model is to show how to facilitate communication


between two different systems without requiring change to the logic of the
underling H/W and S/W.
• It consists of seven separate but related layers, each of which defines a
part of the process of moving information across a network.

2.5
Figure 2.2 Seven layers of the OSI model

2.6
Layered Architecture

• OSI model consists of 7 layers.


• Each layer defines a family of functions distinct from those of the other layers.
• Within a single machine, each layer calls upon the services of the layer just
below it.
 e.g. layer 3 uses the services provided by layer 2 and provides services
for layer 4.
• Between machines, layer x on one machine communicate with layer x on
another machine, by protocols.
• Communication between machines is a peer-to-peer process using the
protocols appropriate to a given layer.

2.7
Figure 2.3 The interaction between layers in the OSI model

2.8
• Interfaces Between Layers

• Data passes down through the layers of the sending device and back up

through the layers of the receiving device through interface between each

pair of adjacent layers.

• Each interface defines the information and services a layer must provide

for the layer above it.

2.9
• 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.
• Layers 5,6, and 7 – session, presentation, and application – are user
support layers; they allow interoperability among unrelated software
systems.
• Layer 4, the transport layer, links the two groups and ensures that what
the lower layers have transmitted is in a form that the upper layers can
use.
• The upper OSI layers almost implemented in S/W; lowers layers are
combination of S/W and H/W except for the physical layer which is mostly
H/W.
2.10
• Encapsulation

• At the sender device, in each layer, a header, or possibly a trailer, can be


added to the data unit (payload). Commonly, the trailer is added only at
layer 2.
• The data portion of a packet at level N-1 carries the whole packet ( data
and header and maybe trailer) from level N.
• The concept is called encapsulation; where level N-1 is not aware of which
part of the encapsulated packet is data and which part is the header or
trailer.
• At the receiver device, each lower layer removes the header added by the
corresponding layer and sends the payload to the upper layer in a process
called decapsulation.

2.11
Figure 2.4 An exchange using the OSI model

2.12
2-3 LAYERS IN THE OSI MODEL

In this section we briefly describe the functions of each


layer in the OSI model.
Physical Layer
Data Link Layer
Network Layer
Transport Layer
Session Layer
Presentation Layer
Application Layer

2.13
Note

The physical layer is responsible for movements of


individual bits from one hop (node) to the next.

2.14
Figure 2.5 Physical layer

2.15
The physical layer is also concerned with the following:

o Physical characteristics of interfaces and medium lacisyhp ehT .


eht dna secived eht neewteb ecafretni eht fo scitsiretcarahc eht senifed reyal
.muidem noissimsnart fo epyt eht senifed osla tI .muidem noissimsnart

o Representation of bits. The physical layer data consists of a stream of


bits (sequence of 0s or 1s) with no interpretation .

o Data rate. The transmission rate-the number of bits sent each second-is
also defined by the physical layer .

2.16
The physical layer is also concerned with the following:

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

o Physical topology . bus, ring, star or mesh topology. .


o Transmission mode. simplex, half-duplex, or full-duplex .

2.17
Note

The data link layer is responsible for moving


frames from one hop (node) to the next.

2.18
Figure 2.6 Data link layer

2.19
Other responsibilities of the data link layer include the following:

• Framing. Framing is a function of the data link layer. The data link layer divides the
stream of bits received from the network layer into frames.
• Physical addressing. hcae fo redaeh eht ni reviecer ro/dna rednes fo )sserdda CAM(
.emarf
• Flow Control: teg yam atad eht esle sedis htob no tnatsnoc eb tsum etar atad ehT
.detpurroc
• Error control.semarf tsol ro degamad stimsnarter dna srorre stceteD :
• 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

2.20
Note

The network layer is responsible for the


delivery of individual packets from
the source host to the destination host.

2.21
Figure 2.8 Network layer

2.22
Network layer

Network layer works for the transmission of data from one host to the
other located in different networks. It also takes care of packet routing i.e.
selection of the shortest path to transmit the packet, from the number of
routes available. The sender & receiver’s IP address are placed in the
header by the network layer .

2.23
Network layer

The functions of the Network layer are :


• Routing: The network layer protocols determine which route is suitable
from source to destination. This function of network layer is known as
routing.
• Logical Addressing: In order to identify each device on internetwork
uniquely, network layer defines an addressing scheme. The sender &
receiver’s IP address are placed in the header by network layer. Such an
address distinguishes each device uniquely and universally.

2.24
Note

The transport layer is responsible for the delivery


of a message from one process to another.

2.25
Figure 2.10 Transport layer

2.26
Transport layer

Transport layer provides services to application layer and


takes services from network layer. The data in the
transport layer is referred to as Segments. It is responsible
for the End to End Delivery of the complete message. The
transport layer also provides the acknowledgement of the
successful data transmission and re-transmits the data if an
error is found .

2.27
The functions of the transport layer are :

• Segmentation and Reassembly: This layer accepts the message from


the (session) layer , breaks the message into smaller units . Each of
the segment produced has a header associated with it. The transport
layer at the destination station reassembles the message.

• Service Point Addressing: In order to deliver the message to correct


process, transport layer header includes a type of address called
service point address or port address. Thus by specifying this
address, transport layer makes sure that the message is delivered to
the correct process.

2.28
Note

The session layer is responsible for dialog


control and synchronization.

2.29
Figure 2.12 Session layer

2.30
Session layer

This layer is responsible for establishment of connection, maintenance of


sessions, authentication and also ensures security.

The functions of the session layer are :


• Session establishment, maintenance and termination.
• Synchronization : This layer allows a process to add checkpoints which
are considered as synchronization points into the data. These are help to
identify the error so that the data is re-synchronized properly.
• Dialog Controller : The session layer allows two systems to start
communication with each other in half-duplex or full-duplex.

2.31
Note

The presentation layer is responsible for translation,


compression, and encryption.

2.32
Figure 2.13 Presentation layer

2.33
Presentation layer

Presentation layer is also called the Translation layer.The data from the
application layer is extracted here and manipulated as per the required
format to transmit over the network .

The functions of the presentation layer are :


• Translation : For example, ASCII to EBCDIC.
• Encryption/ Decryption : Data encryption translates the data into
another form or code .
• Compression: Reduces the number of bits that need to be transmitted
on the network .

2.34
Note

The application layer is responsible for


providing services to the user.

2.35
Responsibilities of application layer:

• Network virtual terminal


• File transfer, access, and management
• Mail services
• Directory services

2.36
Figure 2.15 Summary of layers

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

2.38
Figure 2.16 TCP/IP and OSI model

2.39
1. Physical and Data Link Layers in TCP/IP model

• At the physical and data link layers, TCP/ IP does not define any
specific protocol.
• It supports all the standard and proprietary protocols.
• A network in a TCP/ IP internetwork can be a local-area network or
a wide-area network.
• Physical layer is responsible for carrying individual bits in a frame
across the link in the form of either electrical or optical signals.
• The logical unit between two physical layers in two devices is a bit.

2.40
Data Link Layer in TCP/IP model

• The main functions are almost the same as of that for OSI model.
• The logical unit between two data link layers in two devices is a
frame.

2.41
2. Network Layer in TCP/IP model

• The same main function of that in OSI model.


• The logical unit between two network layers in two devices is a
packet.
• At the network layer supports the Internetworking Protocol (IP).
• IP uses four supporting protocols: ARP, RARP, ICMP, and IGMP.

2.42
Internetworking Protocol (IP) – supporting protocols

• Address Resolution Protocol


• The Address Resolution Protocol (ARP) is used to associate a
logical address with a physical address.
• ARP is used to find the physical address of the node when its
Internet address is known.
• Reverse Address Resolution Protocol
• The Reverse Address Resolution Protocol (RARP) allows a host
to discover its Internet address when it knows only its physical
address.

2.43
Internetworking Protocol (IP) – supporting protocols

• Internet Control Message Protocol


• The Internet Control Message Protocol (ICMP) is a mechanism
used by hosts and gateways to send notification of datagram
problems back to the sender.
• ICMP sends query and error reporting messages.
• Internet Group Message Protocol
• The Internet Group Message Protocol (IGMP) is used to
facilitate the simultaneous transmission of a message to a group
of recipients.

2.44
3. Transport layer in TCP/IP model

• The transport layer was represented in TCP/IP by two protocols:


TCP and UDP.
• The logical unit between two transport layers in two devices is a
segment or datagram.
• UDP and TCP are transport level protocols responsible for delivery
of a datagram or segment from end-to-end (from the source node to
the destination node)

2.45
3. Transport layer in TCP/IP model

• Transmission Control Protocol (TCP):


• Advantages
• Connection oriented; that first establishes a logical
connection between transport layers at two hosts before
transferring data.
• Provides flow control, error control, and congestion control.
• Disadvantages
• Connection overhead
• Connection Delay

2.46
3. Transport layer in TCP/IP model

• User Datagram Protocol (UDP):


• Advantages
• Less overhead in the connection established.
• Lower delay in the connection established.
• Disadvantages
• It is a connectionless protocol that transmits user
datagrams without first creating a logical connection.

2.47
4. Application Layer in TCP/IP model

• The application layer in TCP/ IP is equivalent to the combined


session, presentation, and application layers in the OSI model.
• The logical unit between two application layers in two devices is a
message.
• Many protocols are defined at this layer such as: HTTP, FTP,
SMTP, DNS, TELNET.

2.48
Figure 2.17 Summary of layers

2.49
2-5 ADDRESSING

Four levels of addresses are used in an internet employing


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

2.50
Figure 2.18 Relationship of layers and addresses in TCP/IP

2.51
1. physical address.

• The Physical address, also known as the MAC or link 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 (Header)
• 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.52
Example 1

• In Figure 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.53
2. Logical address (IP)

• IP addresses are necessary for universal communications that are


independent of physical network.
• No two host address on the internet can have the same IP address
• IP addresses 32-bit address that uniquely define a host connected to
the Internet
• The physical addresses will change from hop to hop, but the logical
addresses remain the same.

2.54
Example 2

• 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.55
Figure 2.20 IP addresses

2.56
3. Port Addresses

• There are many application running on the computer.


• Each application run with a port no.(logically) on the computer.
• A port address in TCP/ IP is 16 bits in length.

2.57
Example 3

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.58
Figure 2.21 port addresses

2.59
4. Specific Addresses

User-friendly addresses
- Examples include the e-mail address (for example, email.com)
defines the recipient of an e-mail
- URL addresses (edugate.bpc.edu.sa)

2.60

You might also like