You are on page 1of 55

Application Layer

Protocols & Transport


Layer Protocols

Network Fundamentals – Chapter 3, 4

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 1
Application layer – The Interface
Between Human and Data Networks

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 2
 The Session Layer

 As the name of the Session layer implies, functions at


this layer create and maintain dialogs between source
and destination applications.

 The Session layer handles the exchange of information


to initiate dialogs, keep them active, and to restart
sessions that are disrupted or idle for a long period of
time.

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 3
 Presentation layer has three primary functions:
1. Coding and conversion of Application layer data to ensure
that data from the source device can be interpreted by the
appropriate application on the destination device.
2. Compression of the data in a manner that can be
decompressed by the destination device.
3. Encryption of the data for transmission and the decryption of
data upon receipt by the destination.

 Graphics Interchange Format (GIF), Joint


Photographic Experts Group (JPEG), video format,
text format……

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 4
Application layer– The Interface Between
Human and Data Networks

 Two forms of application layer software – applications &


services
 When we open a web browser or an instant message
window, an application is started.
 And the program is put into the device's memory where
it is executed.
 Each executing program loaded on a device is referred
to as a process or service.
 Applications are the software programs used by people
to communicate over the network.

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 5
The Client/Server model

 In the client/server model, the device requesting the


information is called a client and the device responding
to the request is called a server.
 In addition to the actual data transfer, this exchange
may also require control information, such as user
authentication and the identification of a data file to be
transferred.
 Advantages - centralized administration
security is easier to enforce

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 6
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 7
File Download

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 8
File Upload

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 9
Peer-to-Peer Networks

 In a peer-to-peer network, two or more computers are


connected via a network and can share resources
(such as printers and files) without having a dedicated
server.

 Every connected end device (known as a peer) can


function as either a server or a client.

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 10
Pear to Pear network

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 11
Compare and contrast peer-to-peer
networking and peer-to-peer applications

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 12
 P2P applications use a hybrid system
where resource sharing is decentralized
but the indexes that point to resource
locations are stored in a centralized
directory.
 Peer-to-peer applications can be used on
peer-to-peer networks, client/server
networks, and across the Internet.

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 13
Application layer protocols are:
 Domain Name Service Protocol (DNS)
 Hypertext Transfer Protocol (HTTP)
 Simple Mail Transfer Protocol (SMTP)
 Telnet
 File Transfer Protocol (FTP)

 The protocols in the TCP/IP suite are generally defined


by Requests for Comments (RFCs).
 The Internet Engineering Task Force maintains the
RFCs as the standards for the TCP/IP suite.

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 14
DNS Services and Protocols
 In data networks, devices are labeled with numeric IP
addresses, so that they can participate in sending and
receiving messages over the network.
 Servers are also numbered as ip address
 Ex. Cisco server has ip address as - 198.132.219.25
 But the name cisco server is much easier for people to
remember than 198.132.219.25. (www.cisco.com)
 Also, if Cisco decides to change the numeric address, it is
transparent to the user, since the domain name will remain
www.cisco.com .
 The new address will simply be linked to the existing
domain name and connectivity is maintained.
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 15
The DNS protocol defines an automated service that matches
resource names with the IP address.

Resource records are used by the server to resolve name.

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 16
 The DNS client, sometimes called the DNS resolver.
 Computer operating systems also have a utility called
nslookup that allows the user to manually query the
name servers to resolve a given host name.

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 17
Hierarchy of DNS Server
The different top-level
domains represent the
either the type of
organization or the
country or origin.

Examples of top-level
domains are:
.au - Australia
.co - Colombia
.com - a business or
industry
.jp - Japan
.org - a non-profit
organization
.edu – education sites
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 18
HTTP Protocol
 URLs (or Uniform Resource Locator)
 URIs (Uniform Resource Identifier)
 First, the browser interprets the three parts of the URL:
 1. http (the protocol or scheme)
 2. www.cisco.com (the server name)
 3. web-server.htm (the specific file name requested).

 Using the HTTP protocol requirements, the browser sends a GET


request to the server and asks for the file.
 The server in then sends the HTML code for this web page to the
browser.
 Finally, the browser decodes the HTML code and formats the page for
the browser window.
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 19
• HTTP is not a secure protocol.
• For secure communication across the Internet, the
Secure HTTP (HTTPS) protocol is used.
• HTTPS can use authentication and encryption to secure
data as it travels between the client and server.

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 20
Email services and SMTP/ POP Protocols
E-mail Client operates:
Mail User Agent (MUA)

E-mail server operates two


separate processes:
Mail Transfer Agent (MTA)
Mail Delivery Agent (MDA)

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 21
SMTP & MTA are used to transfer data between the users

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 22
 SSH provides the structure for secure remote login and
stronger authentication than Telnet and supports data
encryption.

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 23
 FTP – used to transfer files between network

Port - 21

Port - 20

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 24
Dynamic Host Confirmation Protocol (DHCP)

 This service automates the assignment of IP addresses,


subnet masks, gateway and other IP networking parameters.
 The DHCP server chooses an address from a configured
range of addresses called a pool and assigns ("leases") it to
the host.
 The host can obtain an IP address once the hardware
connection is made, either via a wired or wireless LAN.
 DHCP distributed addresses are not permanently assigned
to hosts but are only leased for a period of time.
 If the host is disconnected, the address is returned to the
pool for reuse.

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 25
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 26
 When a DHCP-configured device boots up or connects
to the network, the client broadcasts a DHCP
DISCOVER packet to identify any available DHCP
servers on the network.
 A DHCP server replies with a DHCP OFFER, with an
assigned IP add
 The client may receive multiple DHCP OFFER packets if
there is more than one DHCP server on the local
network, so it must choose between them, and broadcast
a DHCP REQUEST packet that identifies the explicit
server and lease offer that the client is accepting.
 The server would return a DHCP ACK message that
acknowledges to the client the lease is finalized.
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 27
 If the offer is no longer valid - perhaps due to a time-out
or another client allocating the lease - then the selected
server will respond with a DHCP NAK message
(Negative Acknowledgement).
 If a DHCP NAK message is returned, then the selection
process must begin again with a new DHCP
DISCOVER message being transmitted.

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 28
 The features of the Server Message Block - SMB protocol is
used in supporting file sharing in Microsoft-based networks

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 29
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 30
 The features of the Gnutella protocol and the role it plays in
supporting P2P services

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 31
Transport Layer Role and Services
 The purpose of the Transport layer

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 32
Transport layer functions

 Tracking the individual communication between


applications on the source and destination
hosts
 Segmenting data and managing each piece
 Reassembling the segments into streams of
application data
 Each of these applications or services is assigned an
address known as a port
 Identifying the different applications by using
Port number.
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 33
 Flow Control
Network hosts have limited resources, such as memory or
bandwidth.
Transport layer protocols request that the sending application
reduce the rate of data flow.
This is done at the Transport layer by regulating the amount of
data the source transmits as a group.
Flow control can prevent the loss of segments on the network
and avoid the need for retransmission.
Flow control is also used to prevent the receiver from being
overwhelmed by incoming data

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 34
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 35
 Nature of applications & Transport layer protocol properties

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 36
 User Datagram Protocol (UDP)
–UDP is a, connectionless protocol, described in.
–It has the advantage of providing for low overhead
data delivery.
–UDP segment only has 8 bytes of overhead.
–The pieces of communication in UDP are called
datagrams.
Applications that use UDP include:
 Domain Name System (DNS)
 Video Streaming
 Voice over IP (VoIP)

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 37
 Transmission Control Protocol (TCP)
–TCP is a connection-oriented protocol.
–TCP acquires additional overhead to gain functions.
–Each TCP segment has 20 bytes of overhead in the
header encapsulating the Application layer data.
–Additional functions specified by TCP are the same
order delivery, reliable delivery, and flow control.

 Applications that use TCP are:


 Web Browsers
 E-mail
 File Transfers
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 38
 The basic characteristics of the UDP and TCP protocols

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 39
 The role port numbers play in the TCP and UDP protocols.

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 40
IANA
 The Internet Assigned Numbers Authority (IANA) assigns
port numbers.
 IANA is a standards body that is responsible for assigning
various addressing standards.
 Well KnownPorts (Numbers 0 to 1023) - These
numbers are reserved for services and applications.
Ex- HTTP, POP3, SMTP, Telnet etc
 Registered Ports (Numbers 1024 to 49151) - These
port numbers are assigned to user processes or
applications.
 Dynamic or Private Ports (Numbers 49152 to 65535)
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 41
 Using both TCP and UDP

 Some applications may use both TCP and UDP.


 For example, the low overhead of UDP enables DNS to
serve many client requests very quickly.
 Sometimes, however, sending the requested
information may require the reliability of TCP.
 In this case, the well known port number of 53 is used
by both protocols with this service.

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 42
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 43
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 44
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 45
Steps in the three way handshake in the establishment of
TCP sessions.
 A TCP client begins the three-way handshake by sending a
segment with the SYN (Synchronize Sequence Number)

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 46
FIN- No more data from sender

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 47
 TCP sequence numbers are used to reconstruct the
data stream with segments placed in the correct order

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 48
 WINDOW Size
 If the sending host had to wait for acknowledgement of the receipt of
each 10 bytes, the network would have a lot of overhead.
 To reduce the overhead of these acknowledgements, multiple
segments of data can be sent before and acknowledged with a
single TCP message in the opposite direction.
 This acknowledgement contains an acknowledgement number
based on the total number of bytes received in the session.
 The amount of data that a source can transmit before an
acknowledgement must be received is called the window size.
 Window Size is a field in the TCP header that enables the
management of lost data and flow control.

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 49
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 50
 Retransmission of data -
 For example, if segments with sequence numbers 1500
to 3000 and 3400 to 3500 were received, the
acknowledgement number would be 3001.
 This is because there are segments with the sequence
numbers 3001 to 3399 that have not been received.
 When TCP at the source host has not received an
acknowledgement it retransmit data from that point
forward.

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 51
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 52
UDP Protocol

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 53
UDP Protocol

ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 54
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 55

You might also like