0% found this document useful (0 votes)
57 views

Computer Networks

Uploaded by

harshjeswani141
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views

Computer Networks

Uploaded by

harshjeswani141
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 27

Computer Networks

Text and Reference Books


• Computer Networking- a top-down approach featuring the
Internet, by James F. Kurose and Keith W. Ross, Person
Education, ISBN-10- 0132856204, 3rd Edition.
• Data Communications and Networking”, by Forouzan B. A, Tata
McGraw-Hill Publications, 2006, ISBN-0-07-063414-9, 4th
edition.
• Computer Networks”, by Tanenbaum A. S., Pearson Education ,
2008, ISBN- 978-81-7758- 165-2, 4th Edition
• Computer Networks and Internet”, by Comer D., Pearson
Education, ISBN-81-297- 0330-0,2nd Edition.
• Computer Networks- A Systems Approach”, by Larry L. Peterson
and Bruce S. Davie, Morgan Kaufmann, ISBN-978-81-312-1045-
1, 4th Edition.
Unit 1
Application Layer
• Principles of Network Application
• Network Application Architecture
• The Web and Hypertext Transfer Protocol (HTTP)
• File Transfer and Email protocols
• Domain Name Service
• Peer-to-Peer Applications
• Socket Programming with TCP
Principles of Network Application
• e-mail
• web
• text messaging
• remote login
• P2P file sharing
• multi-user network games
• streaming stored video
• voice over IP (e.g., Skype)
• real-time video conferencing
• social networking
• search
Creating a network app application
transport
network

write programs that: data link


physical

• run on (different) end systems


• communicate over network
• e.g., web server software
communicates with browser
software
application
no need to write software for transport
network
network-core devices data link
physical
application
transport
network
• network-core devices do not run data link
physical

user applications
• applications on end systems
allows for rapid app
development, propagation
Application architectures

possible structure of applications:


• client-server
• peer-to-peer (P2P)
Client-server architecture
server:
• always-on host
• permanent IP address
• data centers for scaling

clients:
• communicate with server
• may be intermittently connected
• may have dynamic IP addresses
• do not communicate directly
with each other
P2P architecture
• no always-on server
• arbitrary end systems directly
communicate
• peers request service from
other peers, provide service in
return to other peers
– self scalability – new
peers bring new service
capacity, as well as new
service demands
• peers are intermittently
connected and change IP
addresses
– complex management
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
• A side: applications with P2P architectures have
client processes & server processes
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 to deliver message to
socket at receiving process
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.12
– port number: 80
App-layer protocol defines
• types of messages exchanged,
– e.g., request, response
• message syntax:
– what fields in messages & how fields are delineated
• message semantics
– meaning of information in fields
• rules for when and how processes send & respond to messages
• open protocols:
• defined in RFCs
• allows for interoperability
• e.g., HTTP, SMTP
• proprietary protocols:
• e.g., Skype
What transport service does an app need?

data integrity
• some apps (e.g., file transfer, web transactions) require 100%
reliable data transfer
• other apps (e.g., audio) can tolerate some loss
timing
• some apps (e.g., Internet telephony, interactive games) require
low delay to be “effective”
throughput
• some apps (e.g., multimedia) require minimum
amount of throughput to be “effective”
• other apps (“elastic apps”) make use of whatever
throughput they get
security
• encryption, data integrity,
Web and HTTP
First, a review…
• 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, e.g.,

www.someschool.edu/someDept/pic.gif

host name path name


HTTP overview
HTTP: hypertext transfer
protocol
• Web’s application layer protocol
• client/server model
– client: browser that
requests, receives, (using
HTTP protocol) and
“displays” Web objects
– server: Web server sends
(using HTTP protocol)
objects in response to
requests
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
HTTP connections
non-persistent HTTP
• at most one object sent over TCP connection
– connection then closed
• downloading multiple objects required
multiple connections
persistent HTTP
• multiple objects can be sent over single TCP
connection between client, server
Non-persistent HTTP
Non-persistent HTTP: response time
RTT (definition): time for a small
packet to travel from client to
server and back
HTTP response time:
• one RTT to initiate TCP
connection
• one RTT for HTTP request and
first few bytes of HTTP
response to return
• file transmission time
• non-persistent HTTP response
time =
2RTT+ file transmission
time
Persistent HTTP
non-persistent HTTP issues:
• requires 2 RTTs per object
• OS overhead for each TCP connection
• browsers often open parallel TCP connections to fetch
referenced objects
persistent HTTP:
• server leaves connection open after sending response
• subsequent HTTP messages between same client/server sent
over open connection
• client sends requests as soon as it encounters a referenced
object
• as little as one RTT for all the referenced objects
Uploading form input
POST method:
• web page often includes form input
• input is uploaded to server in entity body
URL method:
• uses GET method
• input is uploaded in URL field of request line:
Method types
HTTP/1.0:
• GET
• POST
• HEAD
– asks server to leave requested object out of response
HTTP/1.1:
• GET, POST, HEAD
• PUT
– uploads file in entity body to path specified in URL field
• DELETE
– deletes file specified in the URL field

You might also like