Ch2-Part1
Page 1: Introduction
Application Layer Chapter 2 from Computer Networking: A Top Down Approach 6th edition by Jim Kurose and Keith Ross.
Slides are freely available for adaptation by faculty, students, and readers.
Use of slides requires crediting the source and acknowledging copyright.
Page 2: Course Objectives
Course Goals:
Gain factual knowledge in computer networks, including protocols like Web, HTTP, FTP, SMTP, DNS, P2P, and Socket programming.
Learn fundamental principles and theories governing network applications.
Page 3: Outline of Chapter 2
Key Topics:
Principles of Network applications
Web and HTTP
FTP
Electronic Mail (SMTP, POP3, IMAP)
DNS
P2P Applications
Socket Programming with UDP and TCP
Page 4: Application Layer Overview
Main Topics of Focus:
Network application architectures
Process communication
Application-layer protocols
Transport services available to applications
Overview of transport services provided by the Internet
Page 5: Goals of the Chapter
Understanding conceptual and implementation aspects of network application protocols including:
Transport-layer service models
Client-server paradigm
Peer-to-peer paradigm.
Learning through examining popular application-level protocols such as HTTP, FTP, SMTP/POP3/IMAP, and DNS.
Development of network applications using Socket API.
Page 6: Examples of Network Applications
Common applications include:
E-mail
Web services
Text messaging
Remote login
P2P file sharing
Multi-user network games
Streaming video services (YouTube, Hulu, Netflix)
Voice over IP (e.g., Skype)
Real-time video conferencing
Social networking
Search engines and more.
Page 7: Creating Network Applications
Network applications should:
Run on diverse end systems
Communicate over a network.
Example: A web server software communicates with browser software, emphasizing that there is no need for applications to be developed for network-core devices.
Page 8: Application Architectures
Possible Structures:
Client-server Architecture
Peer-to-peer (P2P) Architecture
Page 9: Client-server Architecture
Characteristics of Client-Server:
Server:
Always-on host with a permanent IP address.
Manages data centers for scalability.
Clients:
Communicate with the server but may be intermittently connected and possess dynamic IP addresses.
Do not communicate directly with one another.
Page 10: Client-server Architecture (continued)
Overview of client-server interaction mechanisms.
Page 11: P2P Architecture
Characteristics of Peer-to-Peer:
No dedicated always-on server.
End systems communicate directly.
Peers request and provide services from one another, promoting scalability.
Intermittently connected with changing IP addresses.
Page 12: Principles of Network Applications (Reiterated)
Key focus on:
Application architectures
Process communications
Application-layer protocols
Transport services available to applications
Internet-provided transport services.
Page 13: Processes Communicating
Processes defined as:
Programs that run within a host.
Communication types:
Within the same host using inter-process communication.
Across different hosts through message exchange (client/server relationships).
Client and Server processes:
Client: Initiates communication.
Server: Waits to be contacted.
Page 14: Sockets
Definition of Sockets:
Interface for processes to send/receive messages.
Analogy: Socket as a door allowing message exchange across the transport infrastructure.
Page 15: Addressing Processes
Each receiving process requires an address.
Address Components:
Unique 32-bit IP address for the host (discussed in Chapter 4).
Identifier includes both IP address and port numbers.
Example of port usage:
HTTP server: Port 80
Mail server: Port 25.
Page 16: Principles of Network Applications (Reiterated)
Review of details concerning application architectures, communications, and protocols.
Page 17: Application-layer Protocols
Role of Application-layer Protocols:
Define how network processes communicate via message structuring.
Page 18: App-layer Protocol Definition
Application-layer protocol defines:
Types of messages exchanged (e.g., request, response).
Message syntax (structure of message fields).
Message semantics (meaning of message fields).
Rules for message exchange and responses.
Open protocols: Found in RFCs allowing interoperability (e.g., HTTP).
Proprietary protocols: Such as Skype.
Page 19: Network Application vs. App-layer Protocols
Distinction:Application-layer protocols are a segment of network applications.
Examples:
Web applications (HTTP, browsers, servers).
Email applications (SMTP, email clients, servers).
Page 20: Principles of Network Applications (Reiterated)
Repeat focus on core application topics.
Page 21: Transport Services Available to Applications
Review: Sockets serve as the interface connecting applications to transport-layer protocols.
Application downstream through the socket to a network for delivery.
Page 22: Choosing Transport-layer Protocols
Critical decisions include choosing transport-layer protocols aligning with application needs.
Considerations include projected transport messages and their effectiveness.
Page 23: Services Transport-layer Protocols Offer
Key Transport-layer Services:
Data Integrity
Essential for applications requiring reliable data transfer.
Timing
Certain applications necessitate low delay, e.g., video conferencing.
Throughput
Requirements for throughput differ per application.
Security and encryption measures.
Page 24: Transport Service Requirements for Common Apps
Common applications have varied requirements on:
Data loss (no loss for key services vs. tolerable loss).
Throughput (elastic vs. minimum requirements).
Timing sensitivity (varying needs based on application type).
Page 25: Principles of Network Applications (Reiterated)
Similarity in focus on key principles and transport services.
Page 26: Internet Transport Protocols Services
TCP Service:
Provides reliable transport, flow control, congestion control, and requires connection setup.
UDP Service:
Offers unreliable transport with no guarantees for reliability, flow control, or connection setup.
Page 27: Internet Applications
Connecting applications to respective protocols:
E-mail (SMTP).
Remote access (Telnet).
Web (HTTP).
File transfer (FTP).
Streaming multimedia (RTP and proprietary).
Page 28: Outline Reiteration
Structure of Chapter 2 is restated, focusing on principles and application categories.
Page 29: Web and HTTP Terminology
A web page consists of various objects including HTML files and images.
Objects are addressable via URLs (e.g., www.example.edu/path/image.gif).
Page 30: Overview of HTTP
HTTP: The Web's application layer protocol, based on client-server model.
Client requests content and server responds according to the HTTP protocol.
Defines how web clients request and receive web objects.
Page 31: HTTP Overview Continued
HTTP uses TCP for connection establishment (client initiates TCP to server and vice versa).
HTTP is stateless; servers maintain no information on past requests.
Page 32: HTTP Connections
Application developers decide on transport services (TCP or UDP) for use.
Considerations on how to manage requests/responses connections are crucial.
Page 33: Non-persistent vs. Persistent HTTP
Non-persistent HTTP: One object per TCP connection, requiring multiple connections for multiple objects.
Persistent HTTP: Allows multiple objects through a single TCP connection.
Page 34: Non-persistent HTTP Flow
HTTP process initiating TCP connection and how requests are processed for an object.
Page 35: Non-persistent HTTP Continued
Detailed breakdown of the steps involved in retrieving JPEG objects illustrated in a continuous flow.
Page 36: HTTP Response Timing
RTT (Round Trip Time): Defined and included in calculations for HTTP response times.
Total response time includes delays from TCP connection initiation to file transmission.
Page 37: Advantages of Persistent HTTP
Persistent connections reduce overhead by maintaining connections and enabling more efficient requests.
Page 38: Review Question
Example on calculated response times for non-persistent and persistent HTTP.
Page 39: HTTP Request Messages
HTTP Request Message Structure: Includes ASCII format with request line, headers, and carriage returns.
Page 40: HTTP Request General Format
Layout and structure detailing the components of HTTP request messages.
Page 41: HTTP Response Messages
Structure of HTTP Response Messages: Includes status line, headers, and data content.
Page 42: Response Status Codes
Overview of critical HTTP status codes (200, 301, 400, 404, 505) and their meanings.
Page 43: Experimenting with HTTP
Hands-on example using Telnet to interact with a web server through HTTP requests.
Page 44: User-Server State: Cookies
Cookies utilized by many web services detailed, including components and usage.
Page 45: Keeping State with Cookies
Interaction flow of cookies between client and server effectively through HTTP messages.
Page 46: Cookies Overview
Potential uses of cookies for authorization, shopping carts, user states, and privacy implications.
Page 47: Web Caches (Proxy Servers)
Use of caches to improve response times and reduce traffic on the access links is discussed.
Page 48: More on Web Caching
Cache Functions: Cache definition as a client/server system, distinguishing roles.
Page 49: Conditional GET Concept
Protocol for checking cached versions to reduce unnecessary data transmission is detailed.
Page 50: Chapter Outline Reiteration
Rebuilding chapter structure emphasizing application principles previously noted.
Page 51: FTP: The File Transfer Protocol
Overview of FTP's role, client-server model, and user interactions in file transfers.
Page 52: FTP Connection Process
Separation of Control and Data Connections: Detailed functionality between control and data operations.
Page 53: FTP Commands and Responses
Example commands in FTP communication, describing command structure and typical server responses.
Page 54: Chapter Outline Reiteration
Outline reiterated focusing on key applications.
Page 55: Electronic Mail Components
Introduction of user agents, mail servers, and SMTP distinguishing user and server roles.
Page 56: Mail Servers Defined
Explanation of mail servers' function encompassing mail queues and utilizing SMTP for delivery.
Page 57: Electronic Mail Processing via SMTP
SMTP Protocol Details: Interaction phases in email transfer based on TCP.
Page 58: User Agent Scenario
Illustration of user agent interaction in sending emails through SMTP, demonstrating step-wise processing.
Page 59: Sample SMTP Interaction
Example interaction between a client and server through SMTP relation—including commands and responses.
Page 60: Final Notes on SMTP
Summary of key SMTP features—including persistent connections and framework comparisons with HTTP.
Page 61: Additional SMTP Features
Further emphasis on message formatting specifics in SMTP and status code systems.
Page 62: SMTP: Final Points
Conclusive remarks highlighted on SMTP's delivery mechanisms via persistent connections.
Page 63: SMTP Summary
Overview reiterating the push/pull protocols comparison alongside command/responses.
Page 64: Mail Message Format in SMTP
Outline of the structure of mail messages as prescribed by SMTP and RFC 822 standards.
Page 65: Mail Access Protocols
Differences between delivery (SMTP) and retrieval protocols (POP3, IMAP) highlighted with feature overview.
Page 66: POP3 Protocol Phases
Detailed breakdown of POP3’s functionality including its authorization and transaction phases outlined.
Page 67: POP3’s Functionalities
Explaining the operational modes of POP3, including download and delete, download and keep.
Page 68: IMAP Overview
IMAP Features: Focus on message centralization, organization, and persistent user state management.