Docsity

CN Unit I - part 2 -RAS, Lecture notes of Computer Networks

Partial preview of the text

Download CN Unit I - part 2 -RAS and more Lecture notes Computer Networks in PDF only on Docsity!

Application layer

Rachana Satao

2: Application Layer 2

Creating a network app

write programs that

  • run on (different) end systems
  • communicate over network
  • e.g., web server software communicates with browser software

No need to write software for network-core devices

  • Network-core devices do not run user applications
  • applications on end systems allows for rapid app development, propagation

application transport data link^ network physical

application transport data link^ network physical

application transport data link^ network physical

2: Application Layer 4

Client-server architecture

server:

  • always-on host
  • permanent IP address
  • server farms for scaling clients:
  • communicate with server
  • may be intermittently connected
  • may have dynamic IP addresses
  • do not communicate directly with each other

client/server

2: Application Layer 5

Pure P2P architecture

  • no always-on server
  • arbitrary end systems directly communicate
  • peers are intermittently connected and change IP addresses

Highly scalable but difficult to manage

peer-peer

2: Application Layer 7

Processes communicating

Process: program running within a host.

  • within same host, two processes communicate using inter- process communication (defined by OS).
  • processes in different hosts communicate by exchanging messages

Client process: process that initiates communication Server process: process that waits to be contacted

 Note: applications with P2P architectures have client processes & server processes

8

Sockets

  • process sends/receives messages to/from its socket
  • socket analogous to door
    • sending process shoves message out door
    • sending process relies on transport infrastructure on other side of door which brings message to socket at receiving process
  • Socket is a interface between application layer and transport layer (also referred as API).
  • API: (1) choice of transport protocol; (2) ability to fix a few parameters of transport layer.

process

TCP with buffers, variables

socket

host or server

process

TCP with buffers, variables

socket

host or server

Internet

controlled by OS

controlled by app developer

  • A Request for Comments ( RFC ) is a type of

publication from the Internet Engineering Task Force

(IETF) and the Internet Society, the principal technical

development and standards-setting bodies for the

Internet.

2: Application Layer 11

Addressing processes

  • to receive messages, process must have identifier
  • host device has unique 32-bit IP address
  • Q: does IP address of host on which process runs suffice for identifying the process? - A: No, many processes can be running on same host - identifier includes both IP address and port numbers associated with process on host. - Example port numbers: - HTTP server: 80 - Mail server: 25 - to send HTTP message to gaia.cs.umass.edu web server: - IP address: 128.119.245. - Port number: 80

2: Application Layer 13

Transport service requirements of common apps

Application

file transfer e-mail Web documents real-time audio/video

stored audio/video interactive games instant messaging

Data loss

no loss no loss no loss loss-tolerant

loss-tolerant loss-tolerant no loss

Throughput

elastic elastic elastic audio: 5kbps-1Mbps video:10kbps-5Mbps same as above few kbps up elastic

Time Sensitive

no no no yes, 100’s msec

yes, few secs yes, 100’s msec yes and no

2: Application Layer 14

Internet transport protocols services

TCP service:

  • connection-oriented: setup required between client and server processes
  • reliable transport between sending and receiving process
  • flow control: sender won’t overwhelm receiver
  • congestion control: throttle sender when network overloaded
  • does not provide: timing, minimum throughput guarantees, security

UDP service:

  • unreliable data transfer between sending and receiving process
  • does not provide: connection setup, reliability, flow control, congestion control, timing, throughput guarantee, or security

1: Application Layer Services 16

Application layer Services

• Web and HTTP

• FTP

• Electronic Mail

– SMTP, POP3,

IMAP

• DNS

• TELNET

• DHCP

1: Application Layer Services 17

Web and HTTP

First some terminology

  • Web page consists of objects
  • Object can be HTML file, JPEG image, Java applet,

audio file,…

  • Web page consists of base HTML-file which includes

several referenced objects

  • Each object is addressable by a URL
  • Example URL:

www.someschool.edu/someDept/pic.gif

host name path name

1: Application Layer Services 19

HTTP overview (continued)

Uses TCP:

  • client initiates TCP connection (creates socket) to server, port 80
  • server accepts TCP connection from client
  • HTTP messages (application- layer protocol messages) exchanged between browser (HTTP client) and Web server (HTTP server)
  • TCP connection closed

HTTP is “stateless”

  • server maintains no information about past client requests

Protocols that maintain “state” are complex!  past history (state) must be maintained  if server/client crashes, their views of “state” may be inconsistent, must be reconciled

1: Application Layer Services 20

HTTP connections

Nonpersistent HTTP

  • At most one object is sent over a TCP connection.

Persistent HTTP

  • Multiple objects can be sent over single TCP connection between client and server.