Podcast
Questions and Answers
A client encounters a 301 Moved Permanently
status code in an HTTP response. What should the client do?
A client encounters a 301 Moved Permanently
status code in an HTTP response. What should the client do?
- Retry the request using the same URL, as the server might be temporarily unavailable.
- Display an error message to the user indicating that the requested resource is no longer available.
- Terminate the connection, as the requested resource cannot be accessed.
- Update its request with the new location provided in the `Location:` header and resend the request. (correct)
Which HTTP status code indicates that the server could not understand the request due to malformed syntax?
Which HTTP status code indicates that the server could not understand the request due to malformed syntax?
- 505 HTTP Version Not Supported
- 400 Bad Request (correct)
- 301 Moved Permanently
- 404 Not Found
When using Telnet to interact with a web server, which command initiates a TCP connection to the server's default HTTP port?
When using Telnet to interact with a web server, which command initiates a TCP connection to the server's default HTTP port?
- `OPEN gaia.cs.umass.edu 80`
- `INITIATE gaia.cs.umass.edu 80`
- `TELNET gaia.cs.umass.edu 80` (correct)
- `CONNECT gaia.cs.umass.edu 80`
What is the correct sequence of actions to send a minimal GET request to a web server using Telnet?
What is the correct sequence of actions to send a minimal GET request to a web server using Telnet?
A client receives a 505 HTTP Version Not Supported
error. What does this indicate?
A client receives a 505 HTTP Version Not Supported
error. What does this indicate?
Which application layer protocol is commonly used for transferring email?
Which application layer protocol is commonly used for transferring email?
Which transport layer protocol is used by Telnet for remote terminal access?
Which transport layer protocol is used by Telnet for remote terminal access?
A web page at www.example.com/images/logo.png
is requested. What part of the URL represents the host name?
A web page at www.example.com/images/logo.png
is requested. What part of the URL represents the host name?
What is the primary function of HTTP?
What is the primary function of HTTP?
In the context of HTTP, what does it mean when we say the protocol is 'stateless'?
In the context of HTTP, what does it mean when we say the protocol is 'stateless'?
A client needs to download 5 images from a server. Using non-persistent HTTP, how many TCP connections are required?
A client needs to download 5 images from a server. Using non-persistent HTTP, how many TCP connections are required?
Which of the following scenarios benefits most from using persistent HTTP?
Which of the following scenarios benefits most from using persistent HTTP?
Which protocol is used to transfer email messages between mail servers?
Which protocol is used to transfer email messages between mail servers?
When a browser requests www.example.com/page.html
, what is the first step in the HTTP communication process?
When a browser requests www.example.com/page.html
, what is the first step in the HTTP communication process?
A user is streaming a live video. Which transport protocol would be most suitable?
A user is streaming a live video. Which transport protocol would be most suitable?
What is the primary function of a mail server?
What is the primary function of a mail server?
What does a 'mail reader' (User Agent) not typically handle?
What does a 'mail reader' (User Agent) not typically handle?
Which of the following best describes the relationship between HTTP and TCP?
Which of the following best describes the relationship between HTTP and TCP?
In the context of email, what does 'direct transfer' refer to?
In the context of email, what does 'direct transfer' refer to?
During an SMTP interaction, what type of data is used for commands?
During an SMTP interaction, what type of data is used for commands?
What is the significance of port 25 in the context of email communication?
What is the significance of port 25 in the context of email communication?
Before transferring messages, what is the first phase in the SMTP transfer process?
Before transferring messages, what is the first phase in the SMTP transfer process?
In the email sending scenario, what is the role of Alice's User Agent (UA)?
In the email sending scenario, what is the role of Alice's User Agent (UA)?
What is the purpose of the message queue in a mail server?
What is the purpose of the message queue in a mail server?
What is the final step in the scenario where Alice sends a message to Bob?
What is the final step in the scenario where Alice sends a message to Bob?
A DNS server caches a mapping between a hostname and an IP address. What happens when the host's IP address changes?
A DNS server caches a mapping between a hostname and an IP address. What happens when the host's IP address changes?
Which of the following is the primary function of a DNS server with regard to resource records?
Which of the following is the primary function of a DNS server with regard to resource records?
Which DNS record type is used to map a hostname to its canonical name?
Which DNS record type is used to map a hostname to its canonical name?
What is the role of the Time-To-Live (TTL) field in a DNS resource record?
What is the role of the Time-To-Live (TTL) field in a DNS resource record?
An organization wants to ensure that its mail servers can be easily located by other mail servers on the Internet. Which type of DNS record should they configure?
An organization wants to ensure that its mail servers can be easily located by other mail servers on the Internet. Which type of DNS record should they configure?
Which component is NOT directly involved in the functioning of HTTP cookies?
Which component is NOT directly involved in the functioning of HTTP cookies?
A user visits an e-commerce site for the first time. What is the immediate action taken by the site regarding cookies?
A user visits an e-commerce site for the first time. What is the immediate action taken by the site regarding cookies?
How do cookies facilitate maintaining 'state' in web applications?
How do cookies facilitate maintaining 'state' in web applications?
Which of the following is NOT a typical use case for HTTP cookies?
Which of the following is NOT a typical use case for HTTP cookies?
What is the primary goal of web caching (proxy server)?
What is the primary goal of web caching (proxy server)?
In a web caching scenario, what happens when the requested object is not found in the cache?
In a web caching scenario, what happens when the requested object is not found in the cache?
How does a user's browser interact with a web cache?
How does a user's browser interact with a web cache?
A client requests an image from a website. The request is first directed to a web cache. If the cache has an outdated version of the image, what will it do?
A client requests an image from a website. The request is first directed to a web cache. If the cache has an outdated version of the image, what will it do?
What is the least likely use of cookies?
What is the least likely use of cookies?
Which scenario best illustrates the use of cookies in maintaining user session state?
Which scenario best illustrates the use of cookies in maintaining user session state?
What is the primary difference between non-persistent and persistent HTTP connections regarding server behavior after sending a response?
What is the primary difference between non-persistent and persistent HTTP connections regarding server behavior after sending a response?
In non-persistent HTTP, what contributes to the overall response time when fetching a single object?
In non-persistent HTTP, what contributes to the overall response time when fetching a single object?
What is the purpose of the HEAD
command in HTTP?
What is the purpose of the HEAD
command in HTTP?
Which part of an HTTP request message indicates the end of the header lines?
Which part of an HTTP request message indicates the end of the header lines?
Which HTTP method is typically used to upload data to the server in the entity body?
Which HTTP method is typically used to upload data to the server in the entity body?
How does the URL method
(using GET) send input to the server?
How does the URL method
(using GET) send input to the server?
What is the primary function of the HTTP PUT
method?
What is the primary function of the HTTP PUT
method?
What is the function of the HTTP DELETE
method?
What is the function of the HTTP DELETE
method?
In an HTTP response message, what information does the status line provide?
In an HTTP response message, what information does the status line provide?
What does the Content-Type
header in an HTTP response indicate?
What does the Content-Type
header in an HTTP response indicate?
What is a key difference in how HTTP/1.0 and HTTP/1.1 handle requests?
What is a key difference in how HTTP/1.0 and HTTP/1.1 handle requests?
Which of the following is an advantage of using persistent HTTP connections over non-persistent connections?
Which of the following is an advantage of using persistent HTTP connections over non-persistent connections?
What is the Round Trip Time (RTT) in the context of HTTP request time?
What is the Round Trip Time (RTT) in the context of HTTP request time?
In the context of HTTP, what does the 'entity body' generally contain?
In the context of HTTP, what does the 'entity body' generally contain?
Which header field is NOT part of a typical HTTP request message?
Which header field is NOT part of a typical HTTP request message?
Flashcards
HTTP Status Code
HTTP Status Code
A code in the server's response indicating the request's outcome.
200 OK
200 OK
Request succeeded; the requested object is in the message.
301 Moved Permanently
301 Moved Permanently
The requested object has moved; the new location is specified.
400 Bad Request
400 Bad Request
Signup and view all the flashcards
404 Not Found
404 Not Found
Signup and view all the flashcards
Application Layer
Application Layer
Signup and view all the flashcards
Application Layer Protocols
Application Layer Protocols
Signup and view all the flashcards
Web Page Objects
Web Page Objects
Signup and view all the flashcards
HTTP
HTTP
Signup and view all the flashcards
HTTP and TCP
HTTP and TCP
Signup and view all the flashcards
Stateless HTTP
Stateless HTTP
Signup and view all the flashcards
Non-Persistent HTTP
Non-Persistent HTTP
Signup and view all the flashcards
Persistent HTTP
Persistent HTTP
Signup and view all the flashcards
URL
URL
Signup and view all the flashcards
Hostname vs Pathname
Hostname vs Pathname
Signup and view all the flashcards
RTT (Round Trip Time)
RTT (Round Trip Time)
Signup and view all the flashcards
Non-Persistent HTTP Response Time
Non-Persistent HTTP Response Time
Signup and view all the flashcards
HTTP Request Message
HTTP Request Message
Signup and view all the flashcards
HTTP Request Line
HTTP Request Line
Signup and view all the flashcards
HTTP Header Lines
HTTP Header Lines
Signup and view all the flashcards
POST Method
POST Method
Signup and view all the flashcards
URL Method (with GET)
URL Method (with GET)
Signup and view all the flashcards
HEAD Method
HEAD Method
Signup and view all the flashcards
PUT Method
PUT Method
Signup and view all the flashcards
DELETE Method
DELETE Method
Signup and view all the flashcards
HTTP Status Line
HTTP Status Line
Signup and view all the flashcards
HTTP Header Lines (Response)
HTTP Header Lines (Response)
Signup and view all the flashcards
HTTP Status Code 200
HTTP Status Code 200
Signup and view all the flashcards
HTTP Response Body
HTTP Response Body
Signup and view all the flashcards
Mail Reader (User Agent)
Mail Reader (User Agent)
Signup and view all the flashcards
Mailbox
Mailbox
Signup and view all the flashcards
Message Queue
Message Queue
Signup and view all the flashcards
SMTP Protocol Role
SMTP Protocol Role
Signup and view all the flashcards
SMTP Transfer Phases
SMTP Transfer Phases
Signup and view all the flashcards
Direct Transfer (Email)
Direct Transfer (Email)
Signup and view all the flashcards
Alice's First Steps (Email)
Alice's First Steps (Email)
Signup and view all the flashcards
SMTP Client Action
SMTP Client Action
Signup and view all the flashcards
Bob's Final Step (Email)
Bob's Final Step (Email)
Signup and view all the flashcards
Authoritative DNS Server
Authoritative DNS Server
Signup and view all the flashcards
DNS Caching
DNS Caching
Signup and view all the flashcards
TTL (Time To Live)
TTL (Time To Live)
Signup and view all the flashcards
DNS Resource Record (RR)
DNS Resource Record (RR)
Signup and view all the flashcards
CNAME Record
CNAME Record
Signup and view all the flashcards
Cookies
Cookies
Signup and view all the flashcards
Cookie ID
Cookie ID
Signup and view all the flashcards
Set-Cookie Header
Set-Cookie Header
Signup and view all the flashcards
Cookie Header
Cookie Header
Signup and view all the flashcards
Keeping State
Keeping State
Signup and view all the flashcards
Web Cache (Proxy Server)
Web Cache (Proxy Server)
Signup and view all the flashcards
Cache Hit
Cache Hit
Signup and view all the flashcards
Cache Miss
Cache Miss
Signup and view all the flashcards
Cached Object
Cached Object
Signup and view all the flashcards
Why Web Caching?
Why Web Caching?
Signup and view all the flashcards
Study Notes
- Chapter 2 discusses the application layer of computer networking using a top-down approach.
- The chapter covers network application principles, the Web and HTTP, electronic mail, and DNS.
Network Applications Principles
- Focuses on how programs running on end systems communicate.
- The end systems run on different operating systems.
- The end systems communicate over the network.
- With network application programming, writing software for network-core devices is not necessary.
- Rapid application development is made possible by creating programs to run on end systems.
Application Architectures
- Two possible structures for network applications include client-server and peer-to-peer(P2P).
Client-Server Architecture
- This architecture involves a server that is an always-on host with a permanent IP address
- The server uses data centers for scaling
- Clients communicate with the server can be intermittently connected
- The client's IP addresses may be dynamic
- The client does not communicate directly with each other
P2P Architecture
- An always-on server is not needed
- Arbitrary end systems can directly communicate, requesting service from and providing it to other peers.
- There is self-scalability due to new peers bringing new service capacity, as well as new service demands
- Peers are intermittently connected and change IP addresses are assigned dynamically
- Complex management may be needed
Processes Communicating
- A process is a program that runs on the host device
- Processes communicate with each other using inter-process communication if they are running on the same host device
- Messages are exchanged if the processes run on different host devices
- A client process initiates communication
- A server process waits to be contacted
- Applications with P2P architectures have client and server processes
Sockets
- A socket is used by a process to send and receive messages to and from
- A socket is analogous to a door
- The sending process shoves messages out the door
- The sending process relies on transport infrastructure on the other side of the door to deliver messages to the socket at the receiving process
Addressing Processes
- An identifier is needed for a process to receive messages
- The identifier includes the IP address and port numbers
- The host device has a unique 32-bit IP address
- Common example port numbers include 80 for the HTTP server and 25 for the mail server
- For sending an HTTP message to gaia.cs.umass.edu web server, the IP address is 128.119.245.12, and the port number is 80.
Application Layer Protocol Definitions
- Types of messages exchanged, such as request and response
- Message syntax, including what fields in messages are and how fields are delineated
- Semantics, which focuses on the meaning of information in the fields
- Rules for when and how processes send and respond to messages
- Open protocols are defined in RFCs
- Examples of open protocols incude HTTP and SMTP
- Proprietary protocols exist, for example, Skype
Transport Service Needs
- Data integrity; some apps, like file transfers, require 100% data integrity, while others, like audio can tolerate some loss
- Throughput; some, like multimedia, require a minimum amount to be effective, while others use whatever they get
- Timing; some, like online gaming, require low delay to be effective
- Security; encryption and data integrity are needed
Internet Transport Protocols
- TCP service offers reliable transport, flow control, and congestion control between sending and receiving processes
- TCP does not guarantee timing, throughput, or security, and is connection-oriented, requiring setup between processes
- UDP service provides unreliable data transfer between sending and receiving processes.
- UDP does not provide reliability, flow or congestion control, timing, throughput, or security, and is connectionless
- Common applications include:
- E-mail uses application layer protocol SMTP and underlying protocol TCP
- Web, remote terminal access, and file transfer use HTTP, Telnet and FTP application layer protocols and TCP protocol respectively
- Streaming multimedia and Internet telephony uses HTTP, RTP and SIP application layer protocols, with TCP or UDP protocols
Web and HTTP
- A web page consists of objects, which consist of a base HTML file with several referenced objects
- Objects can be HTML, JPEG images, Java applets, or audio files
- A base HTML file includes several referenced objects
- Each object is addressable by a URL, like www.someschool.edu/someDept/pic.gif
HTTP Overview
- HTTP is a web's application layer protocol and follows a client-server model.
- The client is the browser that uses HTTP to request, receives, and "displays" web objects
- The server sends (using HTTP protocol) objects in response to requests
- HTTP uses TCP
- The client initiates a TCP connection (creates socket) to server, port 80
- The server accepts the TCP connection from the client
- HTTP messages are exchanged between the client and the web server
- The TCP connection is usually closed
- HTTP is stateless and does not store any information about past client requests
HTTP Connections
- Non-Persistent HTTP connections are at most one object sent over TCP connection
- Non-Persistent HTTP connections are closed by the server upon completion of a request
- Downloading multiple objects requires multiple connections
- Persistent HTTP connections allow multiple objects to be sen over TCP connection
- In Persistent HTTP connections, a single TCP connection can be used by the client and server
Non-persistent HTTP Example
- Suppose a user enters the URL: www.someSchool.edu/someDepartment/home.index in their browser
- The URL contains text and references to 10 jpeg images
- The client initiates a TCP connection to the HTTP server at www.someSchool.edu on port 80
- The server waits for the connection at port 80 and accepts, notifying client of new connection
- The client sends an HTTP request message with containing URL into TCP connection socket
- The HTTP server receives the request, forms and sends a response with the requested object into the socket
- steps repeat for each of the 10 images
- The HTTP server closes the TCP connection
Non-persistent HTTP Response Time
- RTT (Round Trip Time) is time for a small packet to travel from client to server and back
- The equation for HTTP response time is: one RTT to initiate TCP connection + one RTT for HTTP request and first few bytes of HTTP response to return + file transmission time
- The equation for non-persistent HTTP response time is: 2RTT+ file transmission time
Persistent HTTP
- Requires 2 RTTs per object when using non persistent HTTP
- There is OS overhead for *each TCP connection with non persistent HTTP
- Browsers will often open many parallel TCP connections to fetch all the referenced objects
- Server leaves the connection open after response
- Subsequent HTTP messages between client and server are sent over the open connection
- Clients send new requests as soon as referenced objects are encountered
HTTP Request Message
- There are two types of HTTP messages: request and response
- The request message contains ASCII (human-readable format) and consists of request line (GET, POST, HEAD commands) and header lines
- The messages use carriage return and line-feed characters.
- HTTP's general format starts with the method, the URL, and the version, followed by the header field name, then the entity body
Uploading Form Input
- POST is often the method used, where the web page includes form input, with the input uploaded to the server in the entity body
- Using the URL method, the GET method is called, with the input uploaded in the URL field of request line
- For example; www.somesite.com/animalsearch?monkeys&banana
HTTP Method Types
- HTTP/1.0
- GET, POST, and HEAD
- HEAD asks the server to leave the requested object out of the response
- HTTP/1.1
- GET POST and HEAD
- PUT uploads the files into the entity body specified in the URL field
- DELETE deletes the file specified in the URL field
HTTP Response Message
- The response messsage has a human-readable format that begins with the HTTP version and status code plus a short description, then header lines, blank line followed by the server response object
- Examples of HTTP response status codes:
- 200 OK means that the request was successful and the object is being sent
- 301 Moved Permanently means that the object has moved, and the new location is specified later in this message
- 400 Bad Request means that the request was not understood by the server
- 404 Not Found means that the document was not found on this server
- 505 HTTP Version Not Supported means that the server doesn't support the HTTP version from client
Cookies
- Cookies enables sites track users
- Many Web sites use cookies requiring four components:
- a cookie header line of the HTTP response message,
- a cookie header line in the next HTTP request message,
- a cookie file kept on the user's host, and
- a back-end database at the web site
What Cookies are Used for
- Cookies are used for authorization, shopping carts, recommendations, and user session state
- Keep state involves protocol endpoints by maintaining state at the sender and receiver over time
- Cookies are sent using the http message carrying state
- Cookies can impact user privacy by allowing sites to learn more about the user and track their internet usage
Web Caches (Proxy Server)
- Satisfy client request without involving origin server
- A user sets the browser to access the Web via a cache.
- A browser sends all HTTP requests to cache
- The object is returned if it is in cache
- A requests is started from the origin server if the object does not exist.
Web Caching Benefits
- Reduces the time it takes to respond to client requests
- Reduces the network traffic on an institution's access link
- Makes the Internet dense with caches enables "poor" content providers to effectively deliver material
Caching Example
- An institution's access link utilization is 99% and total delay is 2 secs the the assumptions made from the original access link
- By increasing the link speed, access utilization drops to 9.9%
- By installing a local cache and supposing the hit rate is 0.4, the utilization is 0.58, and delay to 1.2 seconds
Conditional Get
- When an object is cached, it is useful not to send the object again if the cached version to up-to-date because this reduces the network traffic and avoids transmission delay.
- Server: response contains no object if cached copy is still up-to-date, uses HTTP/1.0 304 Not Modified
- Cache: specify date of cached copy in HTTP request
- If-modified-since:
Electronic Mail Components
- Three major components of electronic mail are user agents, mail servers, and SMTP
- User agent is often a "mail reader" that is used to compose, edit, and read mail messages
- This includes Outlook, Thunderbird, and Apple Mail
- It is used for outgoing and incoming messages stored on the local server or local machine
Electronic Mail: Mail Servers
- A mailbox contains all the incoming messages for a user
- The outgoing messages are stored in the message queue to be sent
- SMTP protocol is used between other servers to connect via a client, to send the data; or "service," to receive the data
Electronic Mail: SMTP
- SMTP or Simple Mail Transfer Protocol uses TCP to transfer messages from client to server on port 25
- Transfer requires sending server to reiceving server
- The process contains three phases:
- handshake or greeting phase,
- transfer of messages phase
- closure
Mail Message Format
- SMTP is a protocol for exchanging files
- RFC 822 outlines the standard format
- Information is transported as header lines, Body: the "message". This is an ASCII set of Charachter set only
SMTP Interaction
- SMTP uses persistent connections
- SMTP requires messages (header & body) to be in 7-bit ASCII
- SMTP servers use \r\n . \r\n to determine the end of messages
Mail Interactions
- Alice uses her user agent to compose the message
- Alice uses the mail server, which sends the message to her mail server
- A client side SMTP opens the TCP connection in Bob's Mail Server
- SMTP connects using the TCP Protocol
- Bob places the message in box to be read
- The invoked is sent
Mail Accessing Protocols
- Accessing protocols include: SMTP - sends/place to receiver’s server
- mail access protocol: protocol on retrieval from server
- Internet Mail Access Protocol: more features
- HTTP: (gmail), Hotmail mail
DNS
- System names are distributed in the hosts. Name servers are called to to to the domain and vice versa
- DNS is called a Domain Name System and the process is: distributed database is used by layer application protocol. The Host name, name of server (name) and address translation are connected.
DNS Serivices
- Translation with a internet IP host code
- host addressing
- Alias Name is mail server
- Loads the distribution
- Repeats the Web server. Correspond IP Names
DNS Hierarchies
- Clients want to join, and use the IP on www.amazon.com
- Uses a root DNS Server and uses client queries the Root name server for the the first time
- Client joins the connects DNS Server connects and joins www.mazon.com to join
DNS Root Name Server
- Server connected to name that resolves code
- Contacts the autoritate name server
- Name of domain and code given
- Returns name to computer, a local name is given
TLD, Autoritate Servers
- Domain is called for domains and job
- Each company has server to give host name
- Maintain host
- Run each organization
DNS and Local Server Name
- Each server has a ISP Server, such as a company, university, or residential location, all have local servers
- When host makes DNS queries, it sends a query to its DNS Server
- Act like a proxy and forwards the names out
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Related Documents
Description
Questions about HTTP status codes (301, 505), Telnet commands for initiating TCP connections, URL components, email transfer protocols, and HTTP's stateless nature. Includes non-persistent HTTP.