5.2. OSI Model Part II
5.2. OSI Model Part II
Session
Presentation
Application
1
OSI Transport Layer
2
🞂 Data received from session layer is divided in to small data unit is called
segments
🞂 Each data unit have s/destination port number which helps to direct to the
correct application eg. Skype 1863, http 80
🞂 Each data unit has also a sequence number so that at the receiver side it is
possible to reassemble the packet to the correct order to make it original
message
🞂 For error control T L addes a checksum to identify corrupted signal
🞂 Flow control: speed maching
🞂 If server starts to send data at 50 mbps transport layer tell to server to
decrease it to 10 mbps and if server sends at 5 mbps the it tell it to increase it
to 10mbps
3
Transport layer Functions
4
🞂 Error control – Data must reach the destination exactly as it was sent by the sender. We
have studied mechanisms such as checksums and CRC that help achieve error control
at the lower layer, the data link layer. However, TCP provides its own error control at a
higher layer, the transport layer. Why is this additional error control at the transport
layer necessary when the data link layer already takes care of it? The answer lies in
the fact that error control at the data link layer ensures error-free delivery between two
networks, however, it cannot guarantee this error-free delivery end-to-end (i.e., between
the source and the destination). The reason behind this is that if a router that connects
two networks introduces some errors, the data link layer does not catch them.
5
data link layer: node-to-node delivery
6
Packetizing
• the transport layer creates packets out of the
message received from the application layer
• it divides a long message into smaller ones
called segments; they are then encapsulated
into the data field of the transport-layer
packet and headers are added
Addressing
• at the data link layer, we need a MAC address
• at the network layer, we need an IP address
• at the transport layer, we need a transport-layer
address, called a port number, to choose among
several processes [0-65,535]
7
The sender just randomly select a port number(for example assume that we are accessing facebook.com
using our browser, the browser will randomly select (50000) and add it’s port number in sender port
number field and put 80 for destination port number for http:)
The randomly generated port number can be different for same application at different time
8
Socket address
9
Multiplexing and Demultiplexing
🞂 the addressing mechanism allows multiplexing and demultiplexing by the transport
layer since there may be several processes that need to send packets, but there is
only one transport-layer protocol (UDP or TCP)
🞂Multiple processes are multiplexed to use the ip infrastructure …
10
Connection Control Services: Connection less and connection oriented
Some well known ports used by UDP(more : Some well known ports used by TCP(more :
www.iana.org ) www.iana.org )
DNS 53 DNS 53
Echo 7 Telnet 23
TFTP 69 FTP:Data: 20
11
FTP: Control: 21
• TCP/IP doesn’t define error control at the data link layer , OSI do .
• Why we need to check error control at the transport layer b/c we have error control at each link in Data link layer b/c of the router
generate a new frame based on the link, at this time error may happen and DLL check the erroneous data not the senders data. So end
to end checking is necessary.
• The reverse question is if we make it at the transport do we need it in Data link layer??????? No ?????
• But ambiguous of course checking end to end guarantees error free transfer but there are some protocols that that check error on the
link and if there is packet droped at the destination (next hop ) the hop must resend the data it should not be from sender……
Reliability – TCP ensures that any data sent by a sender fi nally arrives at the destination as it was sent. This means, there cannot be
any data loss or change in the order of the data. Reliability at the transport layer (TCP) has four important aspects
• Error control – Data must reach the destination exactly as it was sent by the sender.
• Loss control – It might happen that the source TCP software breaks the original message into three packets, and sends the
three packets to the destination.
• Sequence control – Since different packets of the same message can take different routes to reach the same destination,
they could reach out of sequence.
• Duplication control – Duplication control is somewhat opposite to loss control. In case of loss control, one or more lost packets are detected. In
duplication control, one or more duplicate packets are detected.
12
TCP Connection management
13
Note that the SYN segment is a control segment and carries no data.
Syn; synchronization of sequence numbers.
The server also acknowledges the receipt of the SYN segment from the client by setting
the ACK flag and displaying the next sequence number it expects to receive from the
client.
14
TCP Transmission
🞂Reliable delivery in TCP is realized using acknowledgement
🞂Stop-and-wait protocol scenarios
15
TCP Retransmission Scenarios
16
Important issues (topics) to be covered for TCP
TCP Services
Numbering Bytes
Segments and the TCP header format
Flow Control
Error Control
17
OSI Upper Layers
Transport
Session
Presentation
Application
18
OSI Session Layer
19
OSI Upper Layers
Transport
Session
Presentation
Application
20
OSI Presentation Layer
21
OSI Upper Layers
Transport
Session
Presentation
Application
22
OSI Application Layer
23
🞂 Receives services from the transport layer and provides services to users
(humans or software)
🞂Provides user interfaces and support services such as email, remote file
access and transfer, access to the WWW
🞂Three general issues related to the application layer:
🞂 the client-server paradigm,
🞂 addressing, and services
24
24
The Client-Server Model
25
25
Addressing
Addressing mechanism in the application layer is different from the ones in other layers
These are aliases convenient for human beings; they must be mapped to IP addresses
An application program needs the services of another program for this; this application program is called DNS -
domain name system: it uses port 53
It is not directly used by the user; but by application programs to perform the mapping
26
26
If you want to…
Call someone, you need to ask for their phone number
You can’t just dial “P R O F G I L L ”
Mail someone, you need to get their address first
What about the Internet?
If you need to reach Google, you need their IP
Does anyone know Google’s IP?
Problem:
People can’t remember IP addresses
Need human readable names that map to IPs
Addresses are used to locate objects
Names are easier to remember than numbers
27
Domain Name Resolution
28
28
Application Layer Services
🞂Electronic mail
🞂 SMTP: simple mail transfer protocol
🞂MIME: multipurpose internet mail extensions
🞂POP3 : post office protocol 3
🞂IMAP : internet mail access protocol
🞂Webmail
🞂File transfer (FTP - file transfer protocol)
🞂HTTP - hypertext transfer protocol for accessing data on the WWW
🞂Www
🞂Multimedia
29
29
Application Services protocols Remarks
File transfer Protocol FTP used to send and received file from a remote host
Simple mail Transfer protocol SMTP Used to only send Email over a network
Hyper text transfer protocol HTTP Used for Internet to send document that encoded in HTML
Post Office Protocol 3 POP3 the whole mailbox will be cleared (transferred) from server to local computer;
view mail only once
Multipurpose Internet Mail Extensions MIME allows non-ASCII data to be sent using the existing mail programs and protocols
it transforms non-ASCII data at the sender site to ASCII and back to non-ASCII
at the receiving site
Internet Mail Access Protocol IMAP IMAP is similar to POP3 but with the following additional features
a user can: check the email header prior to downloading, search the contents of
the email for a specific string, partially download, email;
allows you to download emails from your email server onto multiple devices.
It keeps your messages on the email server.
Multimedia the combination of text, graphics, images, video and audio used together; at least
one must be continuous (time-dependent like audio, video, animation)
World Wide Web WWW a repository of information spread all over the world and linked together;
strings of text within a page that link to other documents are called
hyperlinks
30
Pop3 vs IMAP
Used to retrive email from an email server
POP3
•The only thing that pop3 does is download the email to your devices from mail server
•Downloads what is in your inbox folder
•Doesn’t download other folder like sent items, drafts, deleted emails, any custom folders
•No copy of the email is kept in the email server i.e if we access our email using our mobile, we can’t access it using other devices like from
laptop
•Used to save server
IMAP(Internet Message Access protocol)
•Also used to retrive email
•Allows you to view emails from multiple devices
•Syncs folders
Post Office Protocol, or POP version 3, is an email protocol that downloads email from an email server onto your local device. It then
deletes the email from the email server. If you want to retrieve your email through POP3, you can only view it from one device.
There are a few reasons why you might want to use POP3 to get your email. If you need to keep your email storage under a certain quota,
POP3 is a good way to maintain that storage limitation.
Another benefit of POP3 is privacy.
Your email can only be seen from your local device. If storage limitations and security are a concern for you, you might want to consider using
POP3 over something like IMAP.
While POP3 and IMAP and other protocols can be used to retrieve email, there's only really one email protocol for sending email, SMTP.
31
Summary of OSI Layers
32
summary
33
Lack of OSI Model’s Success
34
For example, although the services provided by the presentation and the session layers
were listed in the document, actual protocols for these two layers were not fully
defined, nor were they fully described, and the corresponding software was not fully
35
Quiz (10 %)
36
Quiz 2 (10 %) sec1
37
Thank You !!!