Network Fundamentals: Ch3 - Application Layer Functionality and Protocols
-
Upload
abdelkhalik-mosa -
Category
Technology
-
view
1.778 -
download
1
description
Transcript of Network Fundamentals: Ch3 - Application Layer Functionality and Protocols
Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy
Network Fundamentals
CHP 3: APPLICATION LAYER FUNCTIONALITY AND PROTOCOLS
Last Update: 12/6/2010
Abdekhalik Elsaid [email protected]
http://abdelkhalik.staff.scuegypt.edu.eg/
Suez Canal University – Faculty of Computers & Informatics - Local Cisco Academy
Application Layer
• OSI: is a layered, abstract representation created as a guideline for network protocol design.
• Application Layer, provides human interface to the network.
Suez Canal University – Faculty of Computers & Informatics - Local Cisco Academy
Application Layer
• Application Layer, functions:Provides the interface between the applications and network.
• Presentation Layer functions:Handles the conversion of data between different formats.
Encoding and decoding. Encryption and decryption. Compression and decompression.
• Session Layer functions:Maintains dialogs between source and destination applications.
Create session Manage and maintain session Terminate session
Most applications, like web browsers Include functionality of the OSI
layers 5, 6 and 7.
Suez Canal University – Faculty of Computers & Informatics - Local Cisco Academy
Application Layer Software
• The 2 forms of S/W programs that provide access to the network.1.Network-Aware applications:
are able to communicate directlywith the protocol stack. Ex: E-mail clients, and web browser
2.Application layer services: are the programs that interface with the network and prepare the data for transfer. Ex: network print spooling
Suez Canal University – Faculty of Computers & Informatics - Local Cisco Academy
User Applications, Services, and Protocols
• Applications: Provide the human interface.• Services: Establish an interface to the network.• Protocols: Are rules and formats that govern how data is treated.• The (applications,
services, and protocols) may be used by a single exe. Program. Ex: Telnet, FTP
Suez Canal University – Faculty of Computers & Informatics - Local Cisco Academy
Servers
• Servers usually are repositories of data.• The server runs a service, sometimes called a server daemon. • Daemons run in the background and are not under an end user's
direct control.
• Daemons are described as "listening" for a request from a client.
• When a daemon "hears" a request from a client:It exchanges appropriate
messages with the client, and then sends the requested data to the client.
Suez Canal University – Faculty of Computers & Informatics - Local Cisco Academy
Client-Server Model
• Client: the device requesting Information.• Server: the device which responds to the request.• Centralized Administration.• Security is easier to enforce.
Suez Canal University – Faculty of Computers & Informatics - Local Cisco Academy
Peer-to-Peer (P2P) Networking and Applications
• Peer-to-peer networking involves two distinct forms: 1. Peer-to-peer network design2. Peer-to-peer applications.
Suez Canal University – Faculty of Computers & Informatics - Local Cisco Academy
Peer-to-Peer Network Design
• Two or more computers are connected via a network and can share resources without having a dedicated server.
• End device (peer) can function as either a server or a client.• Decentralized Administration.• Security is difficult to enforce. • Used in small home networks
for file sharing and games.• One computer might
assume the role of server for one transaction while simultaneously serving as a client for another.
Suez Canal University – Faculty of Computers & Informatics - Local Cisco Academy
Peer-to-Peer Applications
• P2P applications allows a device to act as both a client and a server within the same communication.
• Every client is a server and every server a client.• Peer-to-peer applications can be used on peer-to-peer networks,
client/server networks, and across the Internet.• Some P2P applications use a hybrid system.
Suez Canal University – Faculty of Computers & Informatics - Local Cisco Academy
Application layer Protocols and Port numbers
• The Transport layer uses port number addressing .• Port numbers identify applications and Application layer services.• Server programs generally use predefined port numbers that are
commonly known by clients.• Examples:
Telnet - TCP Port 23 DNS - TCP/UDP Port 53DHCP - UDP Port 67 HTTP - TCP Port 80FTP - TCP Ports 20 and 21 SMTP - TCP Port 25
POP - UDP Port 110
Suez Canal University – Faculty of Computers & Informatics - Local Cisco Academy
Domain Name System (DNS)
• Devices are labeled with numeric IP addresses.• Domain Names were created to convert the numeric address into
a simple, recognizable name. Ex: IP: 198.133.219.25 DN: www.cisco.com
• DNS client is sometimes called DNS Resolver.• A DNS Server provides name resolution using the name daemon.• The DNS server stores different types of resource records (RRs)
used to resolve names. • These records contain the
name, address, and others.nslookup• Displays default DNS server for
your host.
Suez Canal University – Faculty of Computers & Informatics - Local Cisco Academy
DNS Servers Hierarchy
Suez Canal University – Faculty of Computers & Informatics - Local Cisco Academy
DNS Name Resolution
Step 1:• The DNS resolver sends a
recursive query to its Local DNS server.
• Requests IP address for "www.example.com". • The Local DNS server is responsible for resolving the name.
– Cannot refer the DNS client to another DNS server.
1
Suez Canal University – Faculty of Computers & Informatics - Local Cisco Academy
Step 2:• Local DNS Server forwards
the query to a Root DNS server.
Step 3:• Root DNS server
Makes note of .com suffixReturns a list of IP addresses for TLD Servers responsible
for .com.
DNS Name Resolution
1
2 23
Suez Canal University – Faculty of Computers & Informatics - Local Cisco Academy
• Root DNS Servers: There are 13 Root DNS servers (labeled A through M)
• TLD Servers– Responsible for domains
such as .com, edu, org, .net, .uk.
– There are redundant servers throughout the world.
DNS Name Resolution
Suez Canal University – Faculty of Computers & Informatics - Local Cisco Academy
Step 4:• The local DNS server sends
query for www.example.comto one of the TLD servers.
Step 5:• TLD Server
– Makes note of example.com– Returns IP address for authoritative server example.com
(such as dns.example.com server)
4 4
5
DNS Name Resolution
Suez Canal University – Faculty of Computers & Informatics - Local Cisco Academy
Step 6:• Local DNS server sends
query directly to DNS server for example.com
Step 7:• example.com DNS server
responds with its IP address for www.example.com
6
6
7
DNS Name Resolution
Suez Canal University – Faculty of Computers & Informatics - Local Cisco Academy
Step 8:• Local DNS server sends the IP
of www.example.com to the DNS client.
• DNS Caching: When a DNS server receives a DNS reply ,it can cache the information in its local memory.
• ipconfig /displaydns: Displays cashed DNS entries.• ipconfig /flushdns: Manually deletes entries.
8
7
DNS Name Resolution
Suez Canal University – Faculty of Computers & Informatics - Local Cisco Academy
DHCP – Dynamic Host Configuration Protocol
Suez Canal University – Faculty of Computers & Informatics - Local Cisco Academy
DHCP
• DHCP automates the assignment of IP address, Subnet mask, Default gateway, DNS Server
• DHCP servers can be:–Server on LAN–Router–Server at ISP
• DHCP addresses are not permanently assigned to hosts but are leased for a period of time
Suez Canal University – Faculty of Computers & Informatics - Local Cisco Academy
Telnet
• Allows a user to remotely access another device.
• A connection using Telnet is called a Virtual Terminal (VTY) session.
• Telnet clients (Teraterm ,Hyperterm)
Suez Canal University – Faculty of Computers & Informatics - Local Cisco Academy
• The Telnet server runs a service called Telnet daemon.• Telnet supports user authentication, but does not encrypt data. • Telnet transfers data as plain text.• Secure Shell (SSH) protocol offers an alternate and secure method
for server access.• SSH benefits over Telnet
– Stronger authentication – Encryption
• As a best practice, network professionals should always use SSH in place of Telnet, whenever possible.
Telnet and SSH
Suez Canal University – Faculty of Computers & Informatics - Local Cisco Academy
HTTP (HyperText Transfer Protocol)
HTTP: developed to publish and retrieve HTML pages, “data transfer”.
Suez Canal University – Faculty of Computers & Informatics - Local Cisco Academy
HTTP Request Message
Request Line• GET: Browser/client is requesting an object.• /~index/: Browser is requesting this object in this directory
(default is index.html).• HTTP/1.1: Browser implements the HTTP/1.1.
GET /~index/ HTTP/1.1
Accept-Language: en-us
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; InfoPath.1)
Host: www.cisco.com
Connection: Keep-Alive
Request line
Suez Canal University – Faculty of Computers & Informatics - Local Cisco Academy
Header Lines• Accept-Language: User prefers this language of the object• User-Agent: The browser type making the request• Host: Host on which the object resides• Connection: Client/browser is telling the server to keep this TCP
connection Open, known as a persistent connection.
GET /~ index / HTTP/1.1
Accept-Language: en-us
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; InfoPath.1)
Host: www.cisco.com
Connection: Keep-Alive
Suez Canal University – Faculty of Computers & Informatics - Local Cisco Academy
HTTP Response Message
HTTP/1.1 200 OKDate: Fri, 22 Feb 2008 16:34:18 GMTServer: Apache/2.0.52 (Red Hat)Last-Modified: Thu, 15 Nov 2007 19:33:12 GMTContent-Length: 15137Connection: closeContent-Type: text/html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
Response message:
Status line
Header lines
Entity body
HTTP is not a secure protocol. For secure communication, the HTTP Secure
(HTTPS) is used for accessing or posting web server information.
Suez Canal University – Faculty of Computers & Informatics - Local Cisco Academy
FTP (File Transfer Protocol)
• FTP was developed to allow for file transfers between a client and a server.
• Used to push and pull files from a server running the FTP daemon (FTPd).
• FTP requires two connections: 1. Control Connection: - For commands and replies. - Port 21.2. Data Connection: - For the actual file transfer. - Port 20.
Suez Canal University – Faculty of Computers & Informatics - Local Cisco Academy
– Mail User agent (MUA) “Mail Client”• Allows messages to be sent and
places received messages into the client's mailbox.
• GUI user agents: Outlook, Eudora, Messenger
– Mail servers: Stores user mail boxes, communicates with local user agents and other mail servers.
– SMTP: allows you to send e-mail from either a client or a server.
– POP: allows you to receive e-mail messages from an e-mail server ,(Mail access protocol)
SMTP – POP3
Suez Canal University – Faculty of Computers & Informatics - Local Cisco Academy
The e-mail server operates two separate processes: Mail Transfer Agent (MTA) Mail Delivery Agent (MDA)
MTA: is used to forward e-mail either to another MTAor to a MDA.
MTA uses SMTP toroute email between servers.
SMTP – POP3
Suez Canal University – Faculty of Computers & Informatics - Local Cisco Academy
MDA: governs transfer of email from mail servers to clients.
SMTP: an outbound e-mail delivery protocol.
POP/POP3: an inbound e-mail delivery protocol.
SMTP – POP3
Suez Canal University – Faculty of Computers & Informatics - Local Cisco Academy
SMB: is a client/server file sharing protocol.Developed by IBM to describe the structure of shared network
resources, such as directories, files, printers, and serial ports.Microsoft windows and Apple Macintosh operating systems
support resource sharing using the SMB protocol.
SMB Protocol
Suez Canal University – Faculty of Computers & Informatics - Local Cisco Academy
• Peers (hosts) act as both clients and servers.• The actual file transfer usually rely on HTTP services. • No centralized file server.• Many client applications are available for accessing the Gnutella network, including:
BearShare, Gnucleus, LimeWire, Morpheus, WinMX and XoloX
P2P File Sharing and Gnutella Protocol
The Gnutella protocol defines five different packet types:1. Ping: for device discovery 2. Pong: as a reply to a ping3. Query: for file location4. query hit: as a reply to a query 5. Push: as a download request
Suez Canal University – Faculty of Computers & Informatics - Local Cisco Academy
Thank You..