You are on page 1of 46

Chapter 2

Network Models

Dr. Niroj Kumar Pani


nirojpani@gmail.com

Department of Computer Science Engineering & Applications


Indira Gandhi Institute of Technology
Sarang, Odisha
Chapter Outline…
◼ Need for Layered Architecture for Data Communication

◼ The TCP/IP Model (Internet Model)


➢ Overview
➢ TCP/IP Model Architecture
➢ The Layers
➢ How it All Works?

◼ The OSI Model


➢ Overview
➢ OSI Model Architecture

Dr. N. K. Pani, Dept. of CSEA, IGIT Sarang | 2.2


Need for Layered Architecture for Data Communication
◼ How do we practically communicate over a network?
➢ In order to understand this, let’s first understand how do we
communicate in our daily life.

Communication In Daily Life

◼ Let's consider what action are performed while we send a letter to someone.

➢ Step 1:
▪ We choose a means to write the letter. For example, post card, or
an envelope etc.
▪ We write your message in that.
▪ Put the TO and FROM addresses.
▪ Post the letter to the nearest sub-post office.

Dr. N. K. Pani, Dept. of CSEA, IGIT Sarang | 2.3


➢ Step 2:
▪ Form the nearest sub-post office the letter goes to the main post
office (within a bag or packet).
➢ Step 3:
▪ In the main post office, the letter is unpacked from the bag /
packet of the sub-post office.
▪ The letter is put to another packet (of the main post office).
▪ The letter (in the packet) is transferred to the main post office at
the receiver’s end.
➢ Step 4:
▪ At the destination’s post office, the letter is again unpacked.
▪ The letter is put to a new packet.
▪ It is then sent to sub-post office nearer to the destination.
➢ Step 5:
▪ At this sub-post office, the letter unpacked.
▪ The postman of the sub-post office delivers the letter to you.

Dr. N. K. Pani, Dept. of CSEA, IGIT Sarang | 2.4


◼ The Bottom-line of the discussion:
➢ Communication in daily life happens in phases.
➢ Each phase performs a particular task.
➢ Each phase has its own means (bag) of data transfer.

Dr. N. K. Pani, Dept. of CSEA, IGIT Sarang | 2.5


Communication Within a Network

◼ Like communication in our daily life, communication within a network is also


performed in phases (layers).

◼ To clarify the concept, let’s consider the example of sending an E-mail.


Following activities are performed:

➢ Step 1:
▪ You choose an application to write the mail.
▪ You write your message in it.
▪ You write the TO address in it (the FROM address is already
there)
▪ Your mail is then, encrypted, translated (to MIME format).
The data unit that we get after this phase is called a “message”.

Dr. N. K. Pani, Dept. of CSEA, IGIT Sarang | 2.6


➢ Step 2:
▪ The message is fragmented (divided into small parts) if required.
▪ Your port address (address of your application) and the
destination’s port address is attached to the message.
The data unit that we get after this phase is called a “segment / user
datagram”.

➢ Step 3:
▪ The logical address (IP address) of your computer and the
destination’s computer is attached to the segment.
The data unit that we get after this phase is called a “datagram /
packet”.

➢ Step 4:
▪ The physical address (MAC address) of your computer and the
next hop is attached to the packet.
The data unit that we get after this phase is called a “frame”.

Dr. N. K. Pani, Dept. of CSEA, IGIT Sarang | 2.7


➢ Step 5:
▪ The frame is transferred from 0/1 format to electromagnetic
signals and sent through wires to the next hop.

The next hop takes appropriate action (to be discussed later) and send
it to the next hop. This process continues. Finally, the frame reaches the
destination, where the reverse steps are performed to get the mail.

◼ The Bottom-line of the discussion:


➢ Like communication in our daily life, the communication within a
network also performed in phases / layers.
➢ At each phase / layer a specific action is performed (there are a set of
softwares at each layer that performs the specific task).
➢ Each layer has its own means of data transfer (message / segment /
packet / frame / signal).

Dr. N. K. Pani, Dept. of CSEA, IGIT Sarang | 2.8


Network Models

◼ The concept of layered architecture for data communication over the network
is realized / implemented through the network models.

◼ We discuss two network models:


➢ TCP/IP mode (also called, Internet model)
➢ OSI model

Dr. N. K. Pani, Dept. of CSEA, IGIT Sarang | 2.9


The TCP/IP Model (Internet Model)
Overview
◼ The TCP/IP model was developed prior to the OSI model.

◼ It is a practical model currently used for data communication over the internet
or any network (this is the reason why it is called the internet model).

[NOTE]: The OSI model is a theoretical model. It doesn’t have any direct implementation. It is
used as a reference model.

Dr. N. K. Pani, Dept. of CSEA, IGIT Sarang | 2.11


TCP/IP Model Architecture
◼ The TCP/IP model composed of five ordered, separated, but related layers (as
shown in Fig. 2.1).

◼ Each layer is responsible for


carrying out a specific
functionality in concern to the
data communication between
two computers (nodes) over the
Internet (or any network).

◼ Each layer uses the services of


layer below it and provides
services to the layer above it,
through inter-layer interfaces.
[Fig. 2.1: TCP/IP Architecture]

Dr. N. K. Pani, Dept. of CSEA, IGIT Sarang | 2.12


The Layers
Application Layer

◼ Functionalities / Duties:
➢ The application layer is responsible for providing services (applications)
that enables the user (human or software) to access the network.
Examples of services include:
▪ E-mail
▪ Remote login
▪ File access & transfer
▪ Browsing
➢ The application layer is also concerned with:
▪ Translation
▪ Encryption
▪ Compression

Dr. N. K. Pani, Dept. of CSEA, IGIT Sarang | 2.13


◼ Protocols: The application layer defines several protocols for the different
specified services:
➢ SNMP (Simple Network Management Protocol): Helping protocol.
Performs network management.
➢ DNS (Domain Name System): Helping protocol. Performs name
resolution.
➢ SMTP (Simple Mail Transfer Protocol), POP3 (Post Office Protocol v3),
and IMAP4 (Internet Mail Access Protocol v4): For E-mail.
➢ TELNET (Terminal Network): For remote login.
➢ FTP (File Transfer Protocol): For file transfer.
➢ HTTP (Hyper Text Transfer Protocol): For browsing.

[NOTE]: Before we study the transport layer, we must 1st discuss the “addressing technique”
used in internet.

Dr. N. K. Pani, Dept. of CSEA, IGIT Sarang | 2.14


Addressing Technique

Three levels of addresses are used on the internet.

◼ Physical Address / Link-Layer Address:


➢ It is the address of a computer (node) as defined by its LAN or WAN.
➢ The size and format of this address varies depending upon the network
type. For example:
▪ If our computer is in an Ethernet LAN, it will use a 6-byte physical
address, which is also called MAC address. This address is
imprinted in the computer NIC card.

[6-byte MAC address in


hexadecimal format]

▪ Local talk (Apple) has a 1-byte dynamic address.

Dr. N. K. Pani, Dept. of CSEA, IGIT Sarang | 2.15


◼ Logical Address / IP Address:
➢ Physical addresses, since they relay upon the underlying network are
inadequate for universal communication (i.e., by using a physical
address we can identify a computer within a network / LAN, but if the
computer is located outside our LAN, we can’t identify it).
➢ For this, we need a universal addressing system, in which each node
can be identified uniquely, regardless of its location.
➢ This universal address is called the logical address or the IP address
(since it is provided by the IP protocol).
➢ The current version of IP is IPv4
[4-byte IP address ]
which uses a 4-byte address.

[NOTE - If IP address can identify a node uniquely and universally, why do we need a physical
address?]: IP address specify the source and the destination only. How to specify the next hop?
For this, the physical address is there. Similarly, physical address alone won’t be enough (as
already discussed), because without knowing the destination the next hop can’t be decided.

Dr. N. K. Pani, Dept. of CSEA, IGIT Sarang | 2.16


◼ Service-Point Address / Port Address:
➢ The IP address identifies a computer uniquely and universally.
➢ But a computer can run many processes. How to identify the
processes?
➢ A port number (or, port address) is used to identify the processes. In
other words, each process within a computer has its own port address.
➢ Port number is of 2-bytes.

For Example: Applications Port Number


FTP 20 & 21
TELENT 23
SMTP 25
DNS 53
HTTP 80
◼ NOTE:
➢ The physical address is embedded by the data link layer.
➢ The logical address is embedded by the network layer.
➢ The port address is embedded by the transport layer.
Dr. N. K. Pani, Dept. of CSEA, IGIT Sarang | 2.17
Transport Layer

◼ Functionalities / Duties:

➢ Prime Responsibility:
▪ Process-to-process delivery of the entire application layer
message.

➢ Services: In order to ensure process-to-process delivery, the transport


layer provides the following services:
▪ Port addressing / Service-point addressing: Refers to specifying
an addressing scheme that uniquely identifies each process
within a computer.
▪ Fragmentation & Reassembly: Refers to
- Dividing (fragmenting) the application layer message (at
the sender site), if its size exceeds the allowed
transmittable unit (the segment size).

Dr. N. K. Pani, Dept. of CSEA, IGIT Sarang | 2.18


- Reversely, reassembling the fragments into one single
message (at the receiver site), so that it could be
delivered to the application layer.
▪ Segmenting (Making Segments) / Packetizing (Making User
Datagrams) : Refers to
- Attaching a transport layer header to each application
layer message (after fragmentation - if it is done). The header
contains the port addresses of the sender & destination
applications, and other information (as needed).

The data unit thus formed (by encapsulating application layer message
with transport layer header) is called a segment / user datagram. It is
the unit of data transmitted and processed by the transport layer.

[NOTE]: The transport layer protocols, in general, use two types of segments.
Data segments (segments that carry application layer data along with some
control information) and control segments (carry control information only).

Dr. N. K. Pani, Dept. of CSEA, IGIT Sarang | 2.19


▪ Connection control: Refers to session establishment and
termination.
▪ Flow Control (of the entire segment):
- Flow control refers to a set of procedure that tells the
sender how much data it can transmit before it must wait
for an acknowledgement from the receiver.
- It protects the receiver from being overwhelmed with the
data flow.
▪ Error Control (of the entire segment):
- It refers to both error detection and correction.

◼ Protocols: The transport layer defines two protocols for process-to-process


delivery.
➢ UDP (User Datagram Protocol): Doesn’t provide
fragmentation/reassembly, connection control, flow & error control
services.
➢ TCP (Transmission Control Protocol): Provides all services.
Dr. N. K. Pani, Dept. of CSEA, IGIT Sarang | 2.20
Network Layer

◼ Functionalities / Duties:

➢ Prime Responsibility:
▪ Source-to-destination (host-to-host) delivery of the transport
layer data unit (segment or user datagram).
[NOTE]: Since source-to-destination delivery normally involves delivering a
packet across (outside) networks, it is also referred to as internetworking.

➢ Services: In order to ensure source-to destination delivery, the network


layer provides the following services:
▪ Logical addressing / IP addressing: Refers to specifying an
addressing scheme that uniquely and universally identifies each
computer in a network.

Dr. N. K. Pani, Dept. of CSEA, IGIT Sarang | 2.21


▪ Fragmentation & Reassembly: Refers to
- Dividing (fragmenting) the transport layer segment (at the
sender site and at each router), if its size exceeds the
allowed transmittable unit (the IP packet / datagram size).

[NOTE]: A packet can travel though different networks each of which


has its own data link layer frame formats (for example, the Ethernet
frame size is different from that of FDDI). If a packet is larger than
the maximum frame size, then the sender (as well as the routers) has
to reduce the packet size. It is done by fragmenting the data section
(transport layer segment) of the packet.

- Reversely, reassembling the fragments into one single


segment (at the receiver site), so that it could be delivered
to the transport layer.

[NOTE]: The reassembly of the packets is done only by the


destination host (not by the routers).

Dr. N. K. Pani, Dept. of CSEA, IGIT Sarang | 2.22


▪ Packetizing (Making Packets): Refers to
- Attaching a network layer header to each transport layer
segment (after fragmentation). The header contains the IP
addresses of sender & receiver, and other information (as
needed).

[NOTE]: The destination’s IP address is provided to the network


layer by DNS (application layer).

The data unit thus formed (by encapsulating transport layer


segment with network layer header) is called a packet. It is the
unit of data transmitted and processed by the network layer.

[NOTE]: The network layer protocols, in general, use two types of packets.
Data packets (packets that carry transport layer data along with some control
information) and control packets (carry control information only).

Dr. N. K. Pani, Dept. of CSEA, IGIT Sarang | 2.23


▪ Routing & Forwarding:
- Routing and forwarding are highly interlinked.
- Routing refers to the process of finding an optimal route
to the desired destination(s) (one source one destination -
unicast routing, or one source many destinations - multicast routing).
This information is stored in a “routing table”.
- Forwarding refers to placing a packet in its optimal route
to the destination(s) (i.e., placing the packet on the right interface
/ port). Forwarding requires routing.

[NOTE]: Normally, for efficiency, routing & forwarding are NOT done by
hosts. They are done by routers. The hosts usually use a “static routing table”
(information is entered manually) having an entry for only one router, called
the “default router” (the host usually knows only this router). The host sends
all its IP packets to the default router. The default router, depending upon the
destination address of a packet, finds an optimal route for it (does the routing)
and forwards the packet on that route (through one of its interfaces).
Dr. N. K. Pani, Dept. of CSEA, IGIT Sarang | 2.24
▪ Address resolution: Refers to converting the logical address to
physical address and vice versa.
▪ Error reporting: Refers to reporting any error that occurs during
packet transmission to the source.

Dr. N. K. Pani, Dept. of CSEA, IGIT Sarang | 2.25


◼ Protocols: The network layer defines / uses several protocols for different
specified services.
➢ IP (Internet Protocol): It is the main protocol of network layer that
performs source-to-destination delivery (one source to one destination
delivery - unicasting). It provides the following services (through which
source-to-destination delivery is achieved):
▪ Logical addressing
▪ Fragmentation & Reassembly
▪ Packetizing
[NOTE]: Currently we are using IPv4. We are migrating towards IPv6.

➢ IGMP (Internet Group Message Protocol): Provides multicasting (one


source to multiple destinations delivery).

Dr. N. K. Pani, Dept. of CSEA, IGIT Sarang | 2.26


➢ ARP (Address Resolution Protocol), RARP (Reverse Address Resolution
Protocol), and BOOTP (Bootstrap Protocol ): Provide address
resolution.

➢ ICMP (Internet Control Message Protocol): Provides error reporting.

➢ Different Routing Protocols (such as RIP, OSPF, BGP etc.): Provides


unicast / multicast routing.

[NOTE]: Since the routing protocols are deployed at the routers (not at host), and the
number of routing protocols are many, they are generally not mentioned in the
network layer in the TCP/IP protocol suite.

Dr. N. K. Pani, Dept. of CSEA, IGIT Sarang | 2.27


Data Link Layer

◼ Functionalities / Duties :

➢ Prime Responsibility:
▪ Hop-to-hop (node-to-node) delivery of the network layer data unit
(packet or datagram).

➢ Services: In order to ensure hop-to-hop delivery, the data link layer


provides the following services:
▪ Physical addressing / Link-layer addressing: Refers to specifying
an addressing scheme that uniquely identifies each node
(computer) within a LAN.

Dr. N. K. Pani, Dept. of CSEA, IGIT Sarang | 2.28


▪ Framing (Making a Frame): Refers to
- Padding (appending) extra bits to the network layer
packet if its size is less than the required transmittable
unit (frame size). This is optional.

[NOTE]: Padding is only done while making frames (in data link
layer), not while making segments (transport layer) or packets
(network layer), because some data link layer protocols specifies a
minimum frame size (for example, Ethernet has the minimum frame
size of 46 bytes), whereas there is no minimum size for a segment or
packet (they can be zero bytes).

- Attaching a data link layer header & trailer to each


network layer packet (after padding). The header & trailer
contains the physical addresses of sender and receiver,
and other information (as needed).

Dr. N. K. Pani, Dept. of CSEA, IGIT Sarang | 2.29


[NOTE]: The next hop’s physical address is provided to the data link layer by
ARP (network layer).

The data unit thus formed (by encapsulating network layer


packet with data link layer header & trailer) is called a frame. It is
the unit of data transmitted and processed by the data link layer.

[NOTE]: The data link layer protocols, in general, use two types of frames.
Data frames (frames that carry network layer data along with some control
information) and control frames (carry control information only). For control
frames padding not applicable.

▪ Flow control (of the frame) In data link layer, flow control & error control
▪ Error control (of the frame) collectively are called data link control.

▪ Multiple access / Media access: Refers to the set of techniques


that coordinates the access to a link when it is shared among
multiple devices.

Dr. N. K. Pani, Dept. of CSEA, IGIT Sarang | 2.30


◼ Sub Layers:
➢ According to the IEEE standard the data link layer is further divided into
two sub-layers:
▪ LLC (Logical Link Control)
▪ MAC (Media Access Control)

➢ Data link control (flow & error control) is handled at the LLC sub-layer.

➢ Multiple access / media access is handled at the MAC sub-layer.

[NOTE]: The multiple access functionality (hence the MAC sub-layer) is required only
if the link is shared (for example, in LANs). It is not required if the link is dedicated
(for example, in PPP)

➢ Framing is handled
▪ Either at the LLC sub-layer alone. It is for protocols that operate
in the LLC sub-layer only, for example PPP (For PPP MAC sub-layer
is not required because, PPP work with dedicated links).

Dr. N. K. Pani, Dept. of CSEA, IGIT Sarang | 2.31


▪ Or, at both LLC & MAC sub-layers collectively. It is for protocols
that operate in both LLC and MAC sub-layers, for example HDLC,
LANs etc.
✓ Actually, a part of the frame is prepared by the LLC (it
contains information / fields related to flow & error control). This
partial frame is then passed to the MAC sub-layer which
prepares the final frame.

➢ Physical addressing is an integrated part of framing. It is handled by the


same sub-layer in which the final frame is prepared i.e.
▪ For protocols that operate in the LLC sub-layer only, physical
addressing is done by the LLC.
▪ For protocols that operate in both the sub-layers physical
addressing is done by the MAC (because the final frame is
prepared by the MAC).

Dr. N. K. Pani, Dept. of CSEA, IGIT Sarang | 2.32


◼ Protocols:
➢ The TCP/IP protocol suite doesn’t define any specific protocol(s) for the
data link layer (and also for physical layer) to perform a specific service,
unlike the other upper layers.

➢ In other words, TCP/IP accepts any protocol(s) at data link layer (or at
physical layer) that provides (can provide) the required services.

Examples of such protocols include:


▪ HDLC (High-Level Data Link Control) Protocol
▪ PPP (Point-to-Point Protocol)
▪ All LAN protocols (wired and wireless)

Dr. N. K. Pani, Dept. of CSEA, IGIT Sarang | 2.33


Physical Layer

◼ Functionalities / Duties:

➢ Prime Responsibility:
▪ Converting data (0/1) to electromagnetic signals. This is
because, data (0/1) itself can’t be transmitted through a medium.

➢ Also concerned with:


▪ Line configuration (point-to-point / multi-point)
▪ Physical topology
▪ Data Rate
▪ Representation of bits
▪ Bit Synchronization
▪ Transmission modes (serial / parallel)
▪ Multiplexing
▪ Physical characteristics of transmission medium

Dr. N. K. Pani, Dept. of CSEA, IGIT Sarang | 2.34


◼ Protocols:
➢ As already discussed, The TCP/IP protocol suite doesn’t define any
specific protocol(s) for the physical layer to perform a specific service,
unlike the other upper layers.
➢ In other words, TCP/IP accepts any protocol(s) at physical layer that
provides (can provide) the required services.

Dr. N. K. Pani, Dept. of CSEA, IGIT Sarang | 2.35


[Fig. 2.2: TCP/IP Layers - A Summery]

(5)
Application Layer SNMP DNS SMTP, POP3, TELNET FTP HTTP
[Provides (Helping (Helping IMAP4 (Remote (File (Browsing) ...
Applications] Protocol) Protocol) (E-Mail) Access) Transfer)

TCP UDP
(4)
(Port addressing, (Port addressing,
Transport Layer
Fragmentation & Reassembly, Making Datagrams)
[Process-to-
Segmenting (Making Segments),
Process Delivery]
Connection control,
Flow & Error Control)

ARP / RARP / BOOTP IPv4


(3) (Address Resolution) (Logical addressing,
Network Layer Fragmentation & Reassembly,
ICMP Packetizing, Unicasting)
[Source-to- (Error Reporting)
Destination
Delivery] IGMP Different Routing Protocols
(Multicasting) (Unicast / Multicast Routing)

[Cont.]
Dr. N. K. Pani, Dept. of CSEA, IGIT Sarang | 2.36
LANs
(Framing,

LLC
(2) PPP LLC Sub-layer for All LANs
Flow & Error Control)
Data link Layer (It is common for all LANs)
[Hop-to-Hop HDLC
Delivery] (Framing, Ethernet Token Bus Token Ring
MAC

...
Multiple Access) MAC MAC MAC

(Line configuration (point-to-point / multi-point), Protocols defined by the underlying


(1) Physical topology, network, for example:
Physical Layer Data Rate, • PPP Physical,
[Provides Representation of bits, • Ethernet Physical,
electro-magnetic Bit Synchronization, • Token Bus Physical,
transmission] Transmission modes (serial / parallel), • Token Ring Physical
Multiplexing, • Etc.
Physical characteristics of transmission medium)

Dr. N. K. Pani, Dept. of CSEA, IGIT Sarang | 2.37


How it All Works ?
◼ The following figure depicts an overall understanding of how TCP/IP model
works.

[Fig. 2.3: An Exchange using the TCP/IP Model]

Dr. N. K. Pani, Dept. of CSEA, IGIT Sarang | 2.38


◼ Explanation: As Fig.2.3 depicts
➢ The process starts at the application layer, then moves from layer to
layer in descending sequential order.
➢ At each layer, a header (H5, H4...) is attached to the data unit (D5, D4,...)
supplied by the layer above it. An additional tailor (T2) is attached at the
data link layer.
➢ When the formatted data unit passes through the physical layer, it is
changed to electromagnetic signal and transported along a physical
link.
➢ Upon reaching the destination, the signal passes to the physical layer
and transformed back into physical form.
➢ The data unit is then moved back up trough the layers where the
corresponding headers and tailors are removed, and the layer specific
actions are taken.
➢ By the time it reaches layer 5, it is appropriate to the application and
made available to the recipient.

Dr. N. K. Pani, Dept. of CSEA, IGIT Sarang | 2.39


◼ [NOTE 1 - Encapsulation]: The data unit at layer n carries the whole data unit of
layer n-1. This process is called encapsulation.

◼ [NOTE 2 - Peer-to-Peer Processes]: The processes (softwares / applications /


protocols) at each machine that communicate at a given layer are called peer-
to-peer processes.
[Fig. 2.4:
Interaction
between
layers:
Peer-to-Peer
Processes ]

Dr. N. K. Pani, Dept. of CSEA, IGIT Sarang | 2.40


◼ Data Exchange Using The TCP / IP Model: A Practical Example

[Fig. 2.5:
Data
Exchange
Using The
TCP / IP
Model: A
Practical
Example]

Dr. N. K. Pani, Dept. of CSEA, IGIT Sarang | 2.41


The OSI Model
Overview
◼ The OSI model was put forward by the ISO.

◼ OSI:
➢ Stands for Open Systems Interconnection.
➢ It is a model / standard introduced in late 1970’s.
➢ It was designed to govern all aspect of data communication between
two independent systems (nodes) in a network.

◼ ISO:
➢ Stands for International Standards Organization.
➢ It is an organization / multi-dimensional body established in 1947.
➢ It is dedicated for worldwide agreement on international standards.

[NOTE]: The OSI model is a theoretical model. It doesn’t have any direct implementation. It is
used as a reference model. That is why is also often called “OSI reference model”.

Dr. N. K. Pani, Dept. of CSEA, IGIT Sarang | 2.43


OSI Model Architecture
◼ In the OSI model, the application layer of TCP/IP model is broken down into
three layers:
➢ Application layer: Provides user interface
➢ Presentation layer: Provides translation, encryption and compression.
➢ Session layer: Provides session establishment and termination.
Rest of the things (architecture, functionality, and working) are exactly same
as the TCP/IP model.
[Refer Fig. 2.6, Next slide]

Dr. N. K. Pani, Dept. of CSEA, IGIT Sarang | 2.44


[Fig. 2.6: The OSI model and its comparison with the TCP/IP Model]

Dr. N. K. Pani, Dept. of CSEA, IGIT Sarang | 2.45


End of Chapter 2

You might also like