0% found this document useful (0 votes)
40 views69 pages

Computer Networks - (OSI and TCP Model)

Uploaded by

Ghaffar Buzdar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views69 pages

Computer Networks - (OSI and TCP Model)

Uploaded by

Ghaffar Buzdar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 69

OSI Model and TCP/IP

Protocol Suite
Objectives
Upon completion you will be able to:

• Understand the architecture of the OSI model


• Understand the layers of the OSI model and their functions
• Understand the architecture of the TCP/IP Protocol Suite
• Differentiate between the OSI model and the TCP/IP Suite
• Differentiate between the three types of Internet addresses
• Differentiate between the Multiplexing and Demultiplexing

1
Model and Protocol
 A model:
◼ Specification set by a standards organization as a
guideline for designing networks.
 A protocol:
◼ Set of rules that controls the interaction of different
devices in a network or an internetwork.
OSI Model
❑ Established in 1947, the International Standard 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 topics discussed in this section include:

Layered Architecture
Peer-to-Peer Processes
Encapsulation

3
Note:

The Open Systems Interconnection (OSI) model


is a theoretical model that shows how any two
different systems can communicate with each other.

◼ OSI Model –
is a framework of 7 layers
that gives network designers an idea of the functionality of each
separate but related layer.
Figure 6-1

The OSI model


OSI layers

TCP/IP Protocol Suite 6


Flow of data in the OSI model

Header
Header

Header Trailer
Seven layers of OSI model
 Physical layer
 Data-link layer
 Network layer
 Transport layer
 Session layer
 Presentation layer
 Application layer
Physical layer
 Responsible for transmitting a bit stream over a physical
medium.
 It encodes and decodes bits into groups of bits.
 It then transforms a stream of bits into a signal.
Note:

The physical layer is responsible


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

10
Data-link layer
 The data-link layer organizes bits into logical units called
frames.
 The data-link layer is responsible only for node-to-node
delivery of the frame.
 The data-link layer is often responsible for error handling
between two adjacent stations.
Hop-to-hop delivery

12
Note:

The data link layer is responsible for


moving frames from one hop (node) to
the next.

13
Network layer
 The network layer is responsible for delivery of a packet between the
original source and final destination.
 Using logical addresses (IP addresses) instead of physical addresses.
 Example of IP address
◼ 140.122.76.121 (4 Bytes)
Note:

The network layer is responsible for the


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

15
Source-to-destination delivery
Transport layer
 The transport layer is responsible for source-to-destination delivery of
the entire message.
 The transport layer is responsible for breaking the entire message into
several packets (Segments) and delivery them to the network layer.
 The transport layer is responsible for ensuring that the whole message is
transmitted.
 If packets (Segments) arrive out of order, they must be reorganized.
Reliable process-to-process delivery of
a message

Guarantee end-to-end delivery of a data/ message


Note:

The transport layer is responsible for


the delivery of a message from one
process to another.

19
Session layer
 The session layer is designed to control the dialog between users.
 The synchronization points divides a long message into smaller ones
and ensure that each section is received and acknowledged by the
receiver.
 Most network implementations today do not use a separate session layer,
their services are usually included in the application layer.
Presentation layer
 The presentation layer is concerned with the syntax and semantics
of the information exchanged between two systems.
 It deals with the fact that different systems use different coding
methods.
◼ Compress and decompress data
◼ Encrypt and decrypt data
 Most implementations do not use a presentation layer today, their
services are usually included in other layer.
Application layer
 The application layer enables the user to access the network.
 It defines common applications that can be implemented to make the
job of the user simpler.
 Will be discussed later…
Summarize Functions of Layers
1. Physical
• transmit a bit stream over a physical medium.
2. Data-Link
• Organizes bits into logical units called frames.
• Node-to-node delivery
3. Network
• Source-to-destination delivery of a packet.
4. Transport
• Source-to-destination delivery of the entire message.
5. Session
• Establishes, maintains, and synchronizes the dialog between communicating
systems.
6. Presentation
• Deals with the fact that different systems use different coding methods.
7. Application
• Enables the user to access the network.
Summary of layers
Application data stream
data stream data
Presentation
data stream
Session
Transport data data data Segments

Network Network header data packets

Data link Frame H Network H data From trailer Frames

Physical 1110111 0111 011111101 Bits


TCP/IP PROTOCOL SUITE
 Transmission control Protocol/Internet Protocol
 Developed by DARPA
 No official protocol standard
 The TCP/IP protocol suite was developed prior to the OSI model.
Therefore, the layers in the TCP/IP protocol suite do not match exactly
with those in the OSI model.
 The original TCP/IP protocol suite was defined as four software layers
built upon the hardware. Today, however, TCP/IP is thought of as a
five-layer model with the layers named similarly to the ones in the OSI
model.
Layers in the TCP/IP Protocol Suite
TCP/IP and OSI model
An OSI View of TCP/IP
Internet Model OSI Model F-D’s Model

Application
(http, telnet, snmp, Application
smtp, bgp, ftp) layer

Transport
(TCP, UDP)
Network
Internet layer
(IPv4/IPv6)
Network Access (HDLC) Data Link layer

Physical layer Physical layer


Sender Receiver
Application Application
Layer HTTP Request Layer HTTP Request

Transport TCP HTTP Request


Transport TCP HTTP Request
Layer Layer

Network IP TCP HTTP Request


Network IP TCP HTTP Request
Layer Layer

Data Link Data Link


Layer Ethernet IP TCP HTTP Request Layer Ethernet IP TCP HTTP Request

Physical Physical
Layer Layer
TCP/IP Network Access Layer
 Exchange of data between end system and network
 Address of host and destination
 Prioritization of transmission
 Software at this layer depends on network (e.g. X.25 vs.
Ethernet)
 Segregation means that no other software needs to be
concerned about net specifics
TCP/IP Internet Layer
 An Internet is an interconnection of two or more networks
 Internet layer handles tasks similar to network access layer,
but between networks rather than between nodes on a
network
 Uses IP for addressing and routing across networks
 Implemented in workstations and routers
TCP/IP Transport Layer
 Also called host-to-host layer
 Reliable exchange of data between applications
 Uses TCP protocols for transmission
TCP/IP Application Layer
 Logic needed to support variety of applications
 Separate module supports each type of application (e.g. file
transfer)
◼ FTP
◼ HTTP
◼ Telnet
◼ News
◼ SMTP
A private internet
Communication at the physical layer

Legend Source Destination


A R1 R3 R4 B
Physical Physical
layer layer
Link 1 Link 3 Link 5 Link 6

011 ... 101


01
1.
..
10
1

011 ... 101 011 ... 101


Note

The unit of communication at the physical


layer is a bit.
Communication at the data link layer
Legend Source Destination D Data H Header
A R1 R3 R4 B
Data link Data link

Physical Physical
Link 1 Link 3 Link 5 Link 6

D2 H2
Frame
D2 ame
Fr

H2

D2 H2 D2 H2
Frame Frame
Note

The unit of communication at the data link


layer is a frame.
Communication at the network layer
Legend Source Destination D Data H Header
A R1 R3 R4 B
Network Network

Data link Data link

Physical Physical

D3 H3
Datagram

D3 H3
Datagram
Note

The unit of communication at the network


layer is a datagram.
Communication at transport layer
A Legend Source Destination D Data H Header B
Transport Transport
R1 R3 R4
Network Network

Data link Data link

Physical Physical

D4 H4
Segment

D4 H4
Segment
Note

The unit of communication at the transport


layer is a segment, user datagram, or a
packet, depending on the specific protocol
used in this layer.
Communication at application layer
A B
Application Legend Source Destination D Data H Header Application

Transport Transport
R1 R3 R4
Network Network

Data link Data link

Physical Physical

D5 D5
Message

D5 D5
Message
Note

The unit of communication at the


application layer is a message.
TCP & UDP
 Most TCP/IP applications use TCP for transport layer
 TCP provides a connection (logical association) between
two entities to regulate flow check errors
 UDP (User Datagram Protocol) does not maintain a
connection, and therefore does not guarantee delivery,
preserve sequences, or protect against duplication
Internetworking
 Interconnected networks, usually implies TCP/IP
 Can appear to users as a single large network
 The global Internet is the largest example, but intranets and
extranets are also examples
Internetworking
Advantages of OSI (1)

 OSI model places emphasis on providing a reliable


data transfer service, while the TCP/IP model treats
reliability as an end-to-end problem.
 Each layer of the OSI model detects and handles
errors. In the TCP/IP model, reliability control is
concentrated at the transport layer.
 Hosts on OSI implementations do not handle
network operations (simple terminal), but TCP/IP
hosts participate in most network protocols.

49
Advantages of OSI (2)
 OSI: standard legislated by official recognized
body. (ISO) and the OSI reference model was
devised before the protocols were invented.
 The protocols came first, and the model was
really just a description of the existing protocols.
“Get the job done" orientation.
 Being general,the protocols in the OSI model are
better hidden than in the TCP/IP model and can
be replaced relatively easily as the technology
changes.
50
Widespread use of TCP/IP
 When businesses began to recognize the need for
interoperability, only TCP/IP was available and
ready to go
 Over the years it has handled most challenges by
growing to meet the needs
 Relatively simple and robust compared to
alternatives such as OSI (7 layers)

51
Addressing
Four different levels of addresses are used in an internet using
the TCP/IP protocols: physical (link) address, logical (IP)
address, port address and Application Specific Address.
The topics discussed in this section include:
Physical Address
Logical Address
Port Address
Application Specific Address
Addresses in the TCP/IP protocol suite
Example 1 (at DATA LINK LAYER)
In Figure below, a node with physical address 10 sends a
frame to a node with physical address 87. The two nodes are
connected by a link. At the data link level, this frame contains
physical (link) addresses in the header. These are the only
addresses needed. The rest of the header contains other
information needed at this level. The trailer usually contains
extra bits needed for error detection.
Physical Addresses

1 packet
87 10 Data accepted
87 10 Data

4
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
Example (At Network Layer)
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. So each router has three pairs of addresses, one for each
connection. Although it may be obvious that each router must have a
separate physical address for each connection, it may not be obvious why it
needs a logical address for each connection.
The computer with logical address A and physical address 10 needs to send a
packet to the computer with logical address P and physical address 95. We
use letters to show the logical addresses and numbers for physical addresses,
but note that both are actually numbers.
Logical Addresses

20 10 A P Data 20 10 A P Data 33 99 A P Data

Physical
addresses
changed

95 66 A P Data 95 66 A P Data
33 99 A P Data

Physical
addresses
changed
Note

The physical addresses will change from


hop to hop, but the logical addresses
remain the same.
Example (At Transport layer)
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 both computers are
using the same application, FTP, for example, the port
addresses are different because one is a client program and the
other is a server program.
Port Numbers

A Sender Receiver P

Data Data
a j Data a j Data

A P a j Data A P a j Data

H2 A P a j Data H2 A P a j Data

Internet
Note

The physical addresses change from hop to


hop, but the logical and port addresses
usually remain the same.
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
Multiplexing

Gathering data from multiple application processes of the


sender, enveloping that data with a header, and sending them
as a whole to the intended receiver is called multiplexing.

▪ In Multiplexing at the Transport Layer, the data is collected from


various application processes. These segments contain the source
port number, destination port number, header files, and data.
▪ These segments are passed to the Network Layer which adds the
source and destination IP address to get the datagram.
Demultiplexing

Delivering received segments at the receiver side to the


correct app layer processes is called demultiplexing.

▪ The destination host receives the IP datagrams; each datagram has a


source IP address and a destination IP address.
▪ Each datagram carries 1 transport layer segment.
▪ Each segment has the source and destination port number.
▪ The destination host uses the IP addresses and port numbers to
direct the segment to the appropriate socket.
Figure Multiplexing / Demultiplexing Diagram

The main objective of multiplexing and demultiplexing is to allow us


to use a multitude of applications simultaneously.
Multiplexing / Demultiplexing Diagram (Conti.)

▪ The above figure shows that the source computer is using


Google, Outlook, and Chat applications at the same time.
▪ All the data is forwarded to a destination computer.
▪ Each application has a segment put on a wire to be
transmitted. It signifies that all applications are running
simultaneously.
▪ Without multiplexing/demultiplexing exists, a user can use
only one application at a time because only the segments of
that application are put on the wire and transmitted. For
clarification, see the figure below −
Multiplexing / Demultiplexing Diagram

In the above figure, the Application layer has generated data, and then
passed it down to the Transport layer to be segmented
Multiplexing / Demultiplexing Diagram (Conti.)

▪ After segmenting the data, port numbers are given to each


segment to be ready for transmission.

▪ Then the segments are put on a wire to travel across the


network to the destination. This process is called
"multiplexing".

▪ When the transmitted segments reach the Transport layer of the


destination, they are automatically sent up to their appropriate
applications. This process is called "demultiplexing".

You might also like