KEMBAR78
Transport Layer Protocols | PDF | Transmission Control Protocol | Port (Computer Networking)
0% found this document useful (0 votes)
12 views60 pages

Transport Layer Protocols

The document discusses process-to-process delivery in the transport layer, focusing on UDP and TCP protocols. It outlines the responsibilities of the transport layer, including packetizing, connection control, addressing, and reliability. Additionally, it highlights the characteristics of UDP as a connectionless protocol and TCP as a connection-oriented protocol, detailing their applications and functionalities.

Uploaded by

temsiyonmohe1
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)
12 views60 pages

Transport Layer Protocols

The document discusses process-to-process delivery in the transport layer, focusing on UDP and TCP protocols. It outlines the responsibilities of the transport layer, including packetizing, connection control, addressing, and reliability. Additionally, it highlights the characteristics of UDP as a connectionless protocol and TCP as a connection-oriented protocol, detailing their applications and functionalities.

Uploaded by

temsiyonmohe1
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/ 60

Chapter 23

Process-to-Process Delivery:
UDP, TCP

McGraw-Hill Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
23-1 PROCESS-TO-PROCESS DELIVERY

The transport layer is responsible for process-to-


process delivery—the delivery of a packet, part of a
message, from one process to another. Two processes
communicate in a client/server relationship,

In Client/Server communication, four entities must be defined:


•Sending Node
•Local Host IP
•Local Process Port number
•Receiving Node
• Remote host IP
•Remote Process ID Port number

McGraw-Hill
Position of UDP in the TCP/IP protocol suite

McGraw-Hill
Nesting of TPDU, Packets, and Frames

 Transport Protocol Data Unit (TPDU)


 Term used for transport entity to transport entity messages

 TPDUs are contained in packets exchanged by network layer


 Packets are contained in frames exchanged by data link layer

McGraw-Hill
Figure 23.1 Types of data deliveries

McGraw-Hill
Transport layer duties

Packetizing
Sender side: breaks application messages into segments, passes them to
network layer
 Transport layer at the receiving host deliver data to the receiving process
Connection control
Connection-oriented
Connectionless
Addressing
Port numbers to identify which network application
 Reliability
Flow control
Error Control
transport
-end transport
McGraw-Hill
The Internet Transport Layer

 The Internet supports two transport


layer protocols:
 The Transport Control Protocol (TCP)
for reliable service
 The Unreliable (User) Datagram
Protocol (UDP)

McGraw-Hill
Processes communicating across network
 Process is an instance of a program in execution.
 Processes on two hosts communicate with each other by sending
and receiving messages
 The process receives messages from, and sends messages into the
network through its socket
 A socket is the interface between the application layer and the
transport layer within a host.
 Sockets are the programming interface used to build network
applications over the internet.
 Programmers can select which transport layer protocol (UDP or
TCP) to be used by the application and select few transport-layer
parameters (maximum buffer size, Maximum segment size,
starting sequence number of segment).

McGraw-Hill
Port numbers

Transport layer at the receiving host delivers data


to the socket
There should be a unique identifier for each
socket.
Socket identifier is called socket address
Socket address = IP address & Port number

McGraw-Hill
Figure 23.2 Port numbers

McGraw-Hill
Figure 23.3 IP addresses versus port numbers
Process-to-Process delivery needs IP
address and Port number

McGraw-Hill
Figure 22.4 IANA ranges

Port numbers are 16-bit integers between 0 -


65535

Well-known: Assigned and controlled by Internet Assigned Numbers


Authority IANA for example: FTP 20,21, TELNET 23, SMTP 25, HTTP
80

McGraw-Hill
Table 23.1 Well-known ports used with UDP

McGraw-Hill
Table 23.2 Well-known ports used by TCP

McGraw-Hill
Figure 23.7 Error control

Why we need error control at the


transport layer?

McGraw-Hill
Figure 22.6 Multiplexing and demultiplexing

Sender Receiver

Multiplexing: (at the sending node) The process of encapsulating


data messages from different applications sockets with the header
information and pass the segments to the network layer
DeMultiplexing: (at the receiving node) The process of delivering the
received data segment to the correct application
Example:

Suppose that the following is running on the same

computer:
 Downloading a web page while transferring data
through FTP
 Two telnet sessions are also running

 Transport layer receives TPDUs from network layer

for all four processes

McGraw-Hill
23-2 User Datagram Protocol (UDP)
 Connectionless
 No handshaking between UDP sender, receiver
 Each UDP segment handled independently of others
 A server application that uses UDP serves only ONE request at a time. All other requests are
stored in a queue waiting for service.
 Unreliable protocol has no flow and error control
 A UDP segment can be lost, arrive out of order, duplicated, or corrupted
 Checksum field checks error in the entire UDP segment. It is Optional
 UDP doe not do anything to recover from an error it simply discard the segment 
Application accepts full responsibility for errors
 It uses port numbers to multiplex/demultiplex data from/to the application layer.
 Advantages: Simple, minimum overhead, no connection delay
 Services provided by UDP:
 Process-to-Process delivery
 Error checking (however, if there is an error UDP does NOT do anything to recover from
error. It will just discard the message

McGraw-Hill
Figure 23.12 Queues in UDP

McGraw-Hill
UDP Applications

 Used for applications that can


tolerate small amount of
packet loss:
 Multimedia applications,
 Internet telephony,
 real-time-video conferencing
 Domain Name System messages
 Audio
 Routing Protocols
McGraw-Hill
Figure 23.9 User datagram format

Header size = 8 bytes


Minimum UDP process data size 0 bytes
Maximum UDP process data size=
65535 – 20 (network layer headers) - 8 (UDP
headres)= 65507 bytes

McGraw-Hill
Note

UDP length
= IP length – IP header’s length

McGraw-Hill
23-3 Transmission Control Protocol
(TCP)
 Transmission Control Protocol
properties:
 Connection-oriented

(establishment &
termination)
 Reliable

 Full-duplex

McGraw-Hill
Connection-Oriented
 Connection oriented means that a virtual connection is established
before any data is transferred.
 Connection ensures that the receiving process is available and
ready before the data is sent
 Three-way handshaking connection establishment procedure
because TCP is full-duplex both side must initialize
communication and get approval from the other side before any
data transfer,
 Virtual connection since TCP protocol will make sure that
segments are given to the receiver application in the same order as
they were sent by the sender even if they travel through different
physical paths
 A server application that uses TCP can handle many client
requests at the same time each has its own connection.

McGraw-Hill
Connection establishment and termination
Connection establishment

Combine
d into
one step

Connection release

McGraw-Hill
Figure 23.13 Stream delivery

TCP establishes a virtual connection

TCP will deliver segments to the applications in


order and without error, lost, or duplicates

McGraw-Hill
Full Duplex
 Data segments can flow in
both directions at the same
time.
 Each TCP connection has its
own sending and receiving
buffers.

McGraw-Hill
Flow control and
Reliability
Flow control (process-to-process): TCP makes sure that the sender
does not cause the receiver buffer to overflow
 By defining the amount of data that can be sent before receiving an
acknowledgement from the receiver (sliding – window protocols)
 Error control (process-to-process): entire message arrives at the
receiving transport layer without error, loss, duplication and in the
same order they were sent
 Error detection is done using checksum and correction by
retransmission
 Implemented by a sliding window ARQ
 Every transmission of data is acknowledged by the receiver.
 Acknowledgements are cumulative.
 If the sender does not receive ACK within a specified amount of time,
the sender retransmits the data.
 Accepts out of order but does Not send negative acknowledgements,
 if a segment is not acknowledged before time-out, it is considered to
be either corrupted or lost and the sender will retransmit the segment
only when it times-out
McGraw-Hill
TCP Applications

 Following applications require


reliable data transfer through
TCP:
 WWW using HTTP
 Electronic mail using SMTP
 Telnet
 File transfer using FTP

McGraw-Hill
Figure 23.16 TCP segment format

Minimum header length is


20 bytes and the maximum
is 60 bytes when there are
McGraw-Hill
Application Protocols
 SMTP: Simple Mail Transport Protocol
 HTTP: Hyper Text Transport Protocol
 HTTPS: Hyper Text Transport SSL (Secure)
 SNMP: Simple Network Management
Protocol
 FTP: File Transfer Protocol
 Telnet: Interactive login
 SSH: Secure Shell telnet
 DNS: Domain Name Service

McGraw-Hill
The Transmission Control Protocol
(TCP)
• TCP layer creates connection between
sender and receiver using port
numbers
– The port number identifies a particular
application on a particular device (IP address)
• TCP can multiplex multiple
connections (using port numbers)
over a single IP line

Data Communications and Computer Networks: A Business User's 31


Approach, Seventh Edition
McGraw-Hill
The Transmission Control Protocol
(TCP) (continued)
• The TCP layer can ensure that the
receiver is not overrun with data
(end-to-end flow control) using the
Window field
• TCP can perform end-to-end error
correction
– Checksum
• TCP allows for the sending of high
priority data
– Urgent Pointer
Data Communications and Computer Networks: A Business User's 32
Approach, Seventh Edition
McGraw-Hill
The Transmission Control Protocol
(TCP) (continued)

Figure 10-7
The fields of
the TCP
header

Data Communications and Computer Networks: A Business User's 33


Approach, Seventh Edition
McGraw-Hill
Internet Control Message Protocol
(ICMP)
• ICMP
– Used by routers and nodes
– Performs error reporting for the Internet
Protocol
• ICMP reports errors such as invalid IP address,
invalid port address, and the packet has
hopped too many times

Data Communications and Computer Networks: A Business User's 34


Approach, Seventh Edition
McGraw-Hill
User Datagram Protocol (UDP)

• A transport layer protocol used in


place of TCP
• Where TCP supports a connection-
oriented application, UDP is used with
connectionless applications
• UDP also encapsulates a header onto
an application packet but the header
is much simpler than TCP

Data Communications and Computer Networks: A Business User's 35


Approach, Seventh Edition
McGraw-Hill
Address Resolution Protocol (ARP)

• When an IP packet has traversed the


Internet and encounters the
destination LAN, how does the packet
find the destination workstation?
• Even though destination workstation
may have an IP address, a LAN does
not use IP addresses to deliver
frames
– A LAN uses MAC layer address
• ARP translates IP address into MAC
layer
Data address
Communications so Networks:
and Computer frameA Business
can be User's 36
Approach, Seventh Edition
McGraw-Hill
Dynamic Host Configuration
Protocol (DHCP)
• An IP address can be assigned to a
workstation permanently (static
assignment) or dynamically
– Dynamic IP address assignment is a more
efficient use of scarce IP addresses
– When DHCP client issues an IP request, DHCP
server looks in its static table
• If no entry exists, server selects an IP address
from available pool

Data Communications and Computer Networks: A Business User's 37


Approach, Seventh Edition
McGraw-Hill
Dynamic Host Configuration
Protocol (DHCP) (continued)
• The address assigned by DHCP server
is temporary
– Part of agreement includes specific period of
time
• If no time period specified, the default is one
hour
– DHCP clients may negotiate for a renewal
before the time period expires

Data Communications and Computer Networks: A Business User's 38


Approach, Seventh Edition
McGraw-Hill
Network Address Translation
(NAT)
• NAT lets router represent entire local
area network to Internet as single IP
address
– Thus, all traffic leaving LAN appears as
originating from global IP address
– All traffic coming into this LAN uses this
global IP address
• This security feature allows a LAN to
hide all the workstation IP addresses
from the Internet
Data Communications and Computer Networks: A Business User's 39
Approach, Seventh Edition
McGraw-Hill
Network Address Translation
(NAT) (continued)
• Since the outside world cannot see
into LAN, you do not need to use
registered IP addresses on inside LAN
• We can use the following blocks of
addresses for private use:
– 10.0.0.0 – 10.255.255.255
– 172.16.0.0 – 172.31.255.255
– 192.168.0.0 – 192.168.255.255

Data Communications and Computer Networks: A Business User's 40


Approach, Seventh Edition
McGraw-Hill
Network Address Translation
(NAT) (continued)
• When a user on inside sends packet
to outside, the NAT interface changes
the user’s inside address to global IP
address
– This change is stored in a cache
• When the response comes back, the
NAT looks in cache and switches the
addresses back
– If not the packet is dropped
• Unless NAT has a service table of fixed IP
address mappings
– This service table allows packets to originate
Data Communications and Computer Networks: A Business User's 41
from
Approach, Seventh the outside
Edition
McGraw-Hill
Locating a Document on the
Internet
• Every document on the Internet has a
unique Uniform Resource Locator
(URL)
• All URLs consist of four parts:
– Service type
– Host or domain name
– Directory or subdirectory information
– Filename

Data Communications and Computer Networks: A Business User's 42


Approach, Seventh Edition
McGraw-Hill
Locating a Document on the
Internet (continued)
• When a user, running a Web browser, enters
a URL, how is URL translated into an IP
address?
– Domain Name System (DNS) – large, distributed
database of URLs and IP addresses
• The first operation performed by DNS is to query a local
database for URL/IP address information
– If local server does not recognize address, the server at
next level will be queried
– Eventually root server for URL/IP addresses will be
queried
» If root server has answer, results are returned
» If root server recognizes domain name but not
extension in front of domain name, root server will
query server at domain name’s location
» When
Data Communications domain’s Networks:
and Computer server returns results,
A Business they are passed
User's 43
back
Approach, Seventh Editionthrough chain of servers (and their caches)
McGraw-Hill
Internet Services
• The Internet provides many types of
services, including several very common
ones:
– Electronic mail (e-mail)
– File transfer protocol (FTP)
– Remote login (Telnet)
– VoIP (Voice over IP)
– Listservs
– Streaming audio and video
– Instant Messaging, Tweets, and Blogs

Data Communications and Computer Networks: A Business User's 44


Approach, Seventh Edition
McGraw-Hill
Electronic Mail (e-mail)

• E-mail programs can create, send,


receive, and store e-mails, as well as
reply to, forward, and attach non-text
files
• Multipurpose Internet Mail Extension
(MIME) is used to send e-mail
attachments
• Simple Mail Transfer Protocol (SMTP)
is used to transmit e-mail messages
• Post Office Protocol version 3 (POP3)
and
Data Internet
Communications Message
and Computer
Approach, Seventh Edition
Access
Networks: A Protocol
Business User's 45
McGraw-Hill
File Transfer Protocol (FTP)

• Used to transfer files across the


Internet
• User can upload or download a file
• The URL for an FTP site begins with
ftp://…
• The three most common ways to
access an FTP site are:
– Through a browser
– Using a canned FTP program
– Issuing FTP commands at a text-based
command prompt
Data Communications and Computer Networks: A Business User's 46
Approach, Seventh Edition
McGraw-Hill
Remote Login (Telnet)

• Allows a user to remotely log in to a


distant computer site
• User usually needs a login and
password to access a remote
computer site
• User saves money on long-distance
telephone charges

Data Communications and Computer Networks: A Business User's 47


Approach, Seventh Edition
McGraw-Hill
Voice Over IP (VoIP)

• The transfer of voice signals using a


packet-switched network and the IP
protocol
• Voice over IP (VoIP) can be internal to
a company (private VoIP) or can be
external using the Internet
• VoIP consumes many resources and
may not always work well, but can be
cost-effective in certain situations

Data Communications and Computer Networks: A Business User's 48


Approach, Seventh Edition
McGraw-Hill
Voice Over IP (continued)

• Three basic ways to make a telephone


call using VoIP:
– PC to PC using sound cards and headsets (or
speakers and microphone)
– PC to telephone (need a gateway to convert IP
addresses to telephone numbers)
– Telephone to telephone (need gateways)

Data Communications and Computer Networks: A Business User's 49


Approach, Seventh Edition
McGraw-Hill
Voice Over IP (continued)

• Three functions necessary to support


VoIP:
– Voice must be digitized (PCM, 64 kbps, fairly
standard)
– 64 kbps voice must be compressed
– Once the voice is compressed, the data must
be transmitted

Data Communications and Computer Networks: A Business User's 50


Approach, Seventh Edition
McGraw-Hill
Voice Over IP (continued)

• How can we transport compressed


voice?
– H.323
• Created in 1996 by ITU-T
• Actually, H.323 created for a wide range of
applications both audio and video, and not for
TCP/IP networks
– Session Initiation Protocol (SIP)
• Created by IETF specifically for supporting the
transfer of voice over the Internet
– Many feel SIP will surpass H.323
Data Communications and Computer Networks: A Business User's 51
Approach, Seventh Edition
McGraw-Hill
Voice Over IP (continued)

• ENUM
– A protocol that supports VoIP
– Converts telephone numbers to fully qualified
domain name addresses
– Example – telephone number (312) 555-1212
will be converted to
2.1.2.1.5.5.5.2.1.3.1.e164.arpa

Data Communications and Computer Networks: A Business User's 52


Approach, Seventh Edition
McGraw-Hill
Listservs

• A popular software program used to


create and manage Internet mailing
lists
• When an individual sends an e-mail to
a listserv, the listserv sends a copy of
the message to all listserv members
• Listservs can be useful business tools
for individuals trying to follow a
particular area of study

Data Communications and Computer Networks: A Business User's 53


Approach, Seventh Edition
McGraw-Hill
Streaming Audio and Video

• The continuous download of a


compressed audio or video file, which
can be heard or viewed on the user’s
workstation
• Real-Time Protocol (RTP) and Real-
Time Streaming Protocol (RTSP)
support streaming audio and video
• Streaming audio and video consume a
large amount of network resources

Data Communications and Computer Networks: A Business User's 54


Approach, Seventh Edition
McGraw-Hill
Instant Messaging, Tweets, and
Blogs
• IM allows a user to see if people are
currently logged in on the network
and to send short messages in real
time
• Consumes less resources than e-mail,
and faster
• Tweets occur when you Twitter. Max
140 character messages
• Blogs are online web logs that people
maintain
Data Communications and Computer Networks: A Business User's 55
Approach, Seventh Edition
McGraw-Hill
The Internet and Business

• E-Commerce – the buying and selling


of goods and services via the Internet
• Many agree that e-commerce consists
of four major areas:
– E-retailing
– Electronic data interchange (EDI)
– Micro-marketing
– Internet security

Data Communications and Computer Networks: A Business User's 56


Approach, Seventh Edition
McGraw-Hill
Cookies and State Information

• A cookie is data created by a Web


server that is stored on the hard drive
of a user’s workstation
– This state information is used to track a
user’s activity and to predict future needs
• Information on previous viewing
habits stored in a cookie can also be
used by other Web sites to provide
customized content
• Many consider cookies to be an
invasion of privacy
Data Communications and Computer Networks: A Business User's 57
Approach, Seventh Edition
McGraw-Hill
Intranets and Extranets

• An intranet is a TCP/IP network inside


a company that allow employees to
access the company’s information
resources through an Internet-like
interface
• When an intranet is extended outside
the corporate walls to include
suppliers, customers, or other
external agents, the intranet
becomes an extranet
Data Communications and Computer Networks: A Business User's 58
Approach, Seventh Edition
McGraw-Hill
The Future of the Internet

• Various Internet committees are


constantly working on new and
improved protocols
• Examples include:
– Internet Printing Protocol
– Internet fax
– Extensions to FTP
– Common Name Resolution Protocol
– WWW Distributed Authoring and Versioning

Data Communications and Computer Networks: A Business User's 59


Approach, Seventh Edition
McGraw-Hill
Internet2

• A new form of the Internet is being


developed by a number of businesses
and universities
• Internet2 will support very high-
speed data streams
• Applications might include:
– Digital library services
– Tele-immersion
– Virtual laboratories

Data Communications and Computer Networks: A Business User's 60


Approach, Seventh Edition
McGraw-Hill

You might also like