Chapter 1: The Internet and World Wide Web Flashcards

1
Q

What is the Internet?

A
  • a network of shared networks using the Internet Protocol (IP)
  • layers of communication protocols: IP → TCP/UDP → HTTP/FTP/POP/SMTP/SSH…
  • a giant cable with lots of connections
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are 4-5 key features of the Internet?

A
  • subnetworks can stand on their own
  • computers can dynamically join and leave the network
  • built on open standards; anyone can create a new internet device
  • lack of centralized control (mostly)
  • everyone can use it with simple, commonly available software
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How is the Internet different from the World Wide Web?

A

The Internet

  • a massive network of networks infrastructure
  • hardware-based: routers, copper wires, fiber-optic cables, wireless
  • governed by Internet Protocol (IP): data moved in packets
  • layers of protocols included: (IP → TCP/UDP → HTTP/FTP/POP/SMTP/SSH…)

WWW

  • information-sharing model built on top of the Internet
  • software-based: files, folders, documents stored on hardware
  • governed by HTTP: one of protocols layered in IP
  • interlinked documents/pages made of hypertext (HTML)
  • searchable: each page has a URL beginning with http://
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the Internet Protocol (IP)?

A
  • The main protocol for routing packets across networks
  • Enables inter-networking, establishes the Internet
  • Routes encapsulated data packets from source host to destination based on IP Addresses in packet headers

(compare to postal system: IP is like the address on a package which you can drop off – but there’s no direct link between you and recipient, a TCP responsibility)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Explain an IP address.

A
  • Each device on the Internet has a 32-bit IP address
  • 4 octets (8-bit numbers: 0-255)

NB: Allows you to identify senders/receivers by country/city
NB: Commands to find local IP address: ipconfig (Windows), ifconfig (Linux/Mac)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the Transmisison Control Protocol (TCP)?

A
  • adds multiplexing, guaranteed message delivery on top of IP
  • multiplexing: multiple programs using the same IP address
    • port: a number given to each program or service
    • port 80: web browser (port 443 for secure browsing)
    • port 25: email
    • port 22: ssh
  • some programs (games, streaming media programs) use simpler UDP protocol instead of TCP
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a web server?

A

-HTTP software that listens for web page requests

(Apache)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is a web browser?

A

-program that fetches/displays documents from web servers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the DNS?

A
  • Domain Name System
  • a set of servers that map written names to IP addresses
  • translates between top-level URLs and IPs
  • many systems maintain a local cache called a hosts file, used by an OS to map hostnames to IP addresses
    • Windows: C:\Windows\system32\drivers\etc\hosts
    • Mac: /private/etc/hosts
    • Linux: /etc/hosts
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is a URL?

A
  • Uniform Resource Locator
  • identifier for location of a document on a website

http:// www.aw-bc.com/ info/regesstepp/index.html
~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~
protocol host path

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What happens when you enter this URL in a browser? (brief answer)

http://www.aw-bc.com/info/regesstepp/index.html

A

The browser would:

  • ask the DNS server for the IP address of www.aw-bc.com
  • connect to that IP address at port 80
  • ask the server to GET /info/regesstepp/index.html
  • display the resulting page on the screen
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is a URL anchor, and how is it formed?

A

-anchor: jumps to a given section of a web page

(http: //www.textpad.com/download/index.html#downloads)
- fetches index.html then jumps down to part of the page labeled downloads

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is a URL query string, and how do you form it?

A

query string: a set of parameters passed to a web program

http: //www.google.com/search?q=miserable+failure&start=10
* parameter q is set to “miserable+failure”
* parameter start is set to 10

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What happens when you type a URL (www.google.com) into your browser and press enter?

A
  1. browser checks cache; if requested object is in cache and is fresh, skip to #9
  2. browser asks OS for server’s IP address
  3. OS makes a DNS lookup and replies the IP address to the browser
  4. browser opens a TCP connection to server (this step is much more complex with HTTPS)
  5. browser sends the HTTP request through TCP connection
  6. browser receives HTTP response and may close the TCP connection, or reuse it for another request
  7. browser checks if the response is a redirect or a conditional response (3xx result status codes), authorization request (401), error (4xx and 5xx), etc.; these are handled differently from normal responses (2xx)
  8. if cacheable, response is stored in cache
  9. browser decodes response (e.g. if it’s gzipped)
  10. browser determines what to do with response (e.g. is it a HTML page, is it an image, is it a sound clip?)
  11. browser renders response, or offers a download dialog for unrecognized types
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are some key apsects of HTTP?

A
  • specifies how to transfer hypertext (i.e., linked web documents) between two computers.
  • an application-layer protocol for transmitting hypermedia documents, such as HTML.
  • designed for communication between web browsers and web servers, though it can be used for other purposes as well.
  • follows a classical client-server model, with a client opening a connection, making a request, then waiting until it receives a response.
  • a stateless protocol, meaning that the server doesn’t keep any data (state) between two requests.
  • —For example, relying on HTTP alone, a server cannot remember a password you typed or what step you’re on in a transaction.

-a textual protocol (all commands are plain text and human-readable)

  • Only clients can make HTTP requests, and then only to servers. Servers can only respond to a client’s HTTP request.
  • When requesting a file via HTTP, clients must provide the file’s URL.
  • The web server must answer every HTTP request, at least with an error message.

OTHER KEY HTTP ATTRIBUTES:

  • HTTP Headers
  • HTTP Request Methods
  • HTTP Response Codes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are the basic steps an HTTP server takes after receiving a client request?

A

On a web server, the HTTP server is responsible for processing and answering incoming requests.

  1. On receiving a request, an HTTP server first checks whether the requested URL matches an existing file.
  2. If so, the web server sends the file content back to the browser. If not, an application server builds the necessary file.
  3. If neither process is possible, the web server returns an error message to the browser, most commonly “404 Not Found”. (That error is so common that many web designers spend quite some time designing 404 error pages.)
17
Q

What are some key advantages to using a server, rather than hosting all files on your computer?

A

Technically, you could host all those files on your own computer, but it’s far more convenient to store them all on a dedicated web server that
• is always up and running
• is always connected to the Internet
• has the same IP address all the time (not all ISPs provide a fixed IP address for home lines)
• is maintained by a third-party provider

18
Q

Explain HTTP Response Codes

A
  • When answering an HTTP client request, the server sends back a three-digit number indicating whether the request was successfully processed. These codes can be grouped in five categories:
  • Responses are grouped in five classes:
  • *(100s) Informational Responses**
  • -100=Continue: client should continue with request
  • *(200s) Successful Responses**
  • -200=request has succeeded
  • *(300s) Redirections**
  • -301=Moved Permanently: requested resource has been moved elsewhere
  • *(400s) Client Errors**
  • -404=Not Found: URI requested doesn’t exist
  • *(500s) Server Errors**
  • -500=Internal Server Error: server had problem handling valid client request
19
Q

Explain HTTP Headers

A
  • allows the client/server to pass additional information with the request/response message files
  • name/value pairs (name: value)
  • *HTTP Request Headers:**
  • Details of what the browser wants and will accept back from the server
  • Contains the type, version and capabilities of the browser that is making the request so that server returns compatible data.
  • *HTTP Response Headers:**
  • Contains the date, size and type of file that the server is sending back to the client
  • Also data about the server itself.
20
Q

Explain HTTP Request Methods

A
  • First line in an HTTP Request msg
  • Indicates type of request & what server should do

GET: Retrieve a document (html, css, imgs, javascript,etc)

POST: Send data to the server (possibly large amts)

HEAD: Retrieve header info
(identical to GET, except no content returned)

21
Q

How is GET different from POST?

(HTTP request methods)

A
  • GET=simplest; get something back from server
  • POST=more powerful, like GET++; can request something and simultaneously send form data
  • The data you send with the GET is appended to the URL up in the browser bar, so whatever you send is exposed.