Chapter 1: The Internet and World Wide Web Flashcards
What is the Internet?
- 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
What are 4-5 key features of the Internet?
- 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 is the Internet different from the World Wide Web?
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://
What is the Internet Protocol (IP)?
- 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)
Explain an IP address.
- 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)
What is the Transmisison Control Protocol (TCP)?
- 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
What is a web server?
-HTTP software that listens for web page requests
(Apache)
What is a web browser?
-program that fetches/displays documents from web servers
What is the DNS?
- 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
What is a URL?
- Uniform Resource Locator
- identifier for location of a document on a website
http:// www.aw-bc.com/ info/regesstepp/index.html
~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~
protocol host path
What happens when you enter this URL in a browser? (brief answer)
http://www.aw-bc.com/info/regesstepp/index.html
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
What is a URL anchor, and how is it formed?
-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
What is a URL query string, and how do you form it?
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
What happens when you type a URL (www.google.com) into your browser and press enter?
- browser checks cache; if requested object is in cache and is fresh, skip to #9
- browser asks OS for server’s IP address
- OS makes a DNS lookup and replies the IP address to the browser
- browser opens a TCP connection to server (this step is much more complex with HTTPS)
- browser sends the HTTP request through TCP connection
- browser receives HTTP response and may close the TCP connection, or reuse it for another request
- 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)
- if cacheable, response is stored in cache
- browser decodes response (e.g. if it’s gzipped)
- browser determines what to do with response (e.g. is it a HTML page, is it an image, is it a sound clip?)
- browser renders response, or offers a download dialog for unrecognized types
What are some key apsects of HTTP?
- 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