Author:
Notes:
#notes #book
Computer Networks and the Internet
- End systems connected together by network of communication links and packet switches, with a path running through an ISPs
- Protocol is a specific predefined sequence of communicating between different end systems on the internet
- Home Access is typically through DSL which transmits digital data to high frequency tones for transmission on already existing telephone wires. These are then translated back to digital form at the telco and passed on to the internet. Phone splitter acts as a device to split the data frequencies by data type - low for phone, mid for upstream data and high for downstream data.
- Persistent and Non Persistent Connections - Diff between connection per request or one that stays open
HTTP
- Http Request Messages
- Request Line
- Type: GET, POST, HEAD, PUT, DELETE
- URL
- Version
- Header Lines
- Host (domain)
- User Agent - browser
- Connection (Persistence)
- Language
- ETC
- HTTP Response Message
- Status Line
- Version
- Status Code
- 201 - OK
- 301 - Moved Permanently
- 304 - Not Modified (for cache update)
- 400 - Bad Request (not understood)
- 404 - Not Found (does not exist)
- 500 - HTTP Version Not Supported
- Header Lines
- Connection Type (persistence)
- Date
- Server (server type, equivalent of user agent)
- Last Modified (for caching)
- Content Length
- Content Type
- Body Lines
- Cookies
- Used for state persistence
- Contains a line referring to the cookie entry id
- Conditional GET
- “If-modified-since” to check if item is latest
FTP
- Two parallel TCP connections (In-band, as opposed to one in HTTP’s out-of-band)
- Control Connection
- Data Connection
- Closes after file transfer
- Common Commands - USER. PASS. LIST. RETR, STOR
- Common Replies - 331 (password required), 125, (transfer start), 425 (can’t open connection), 452 (write error)
Email
- Components
- User Agents - App, Client Program, Web
- Mail Servers - “mailbox” that handles messages, contains message queue
- SMTP (Simple Mail Transfer Protocol)
- TCP, client and server side
- Only direct connections
- Runs on 7-bit ASCII (archaic)
- Primarily a PUSH (as opposed to HTTP pulls)
- Mail Access Protocols
- For use by client to PULL mail, as opposed to SMTP’s push
- Post Office Protocol v3 (POP3)
- Simple - list, retrieve, delete
- Internet Mail Access Protocol (IMAP)
- Has folders, state information
- Can obtain just components of messages (Eg. message header)
- HTTP
- Web browsers. Eg. Gmail, Yahoo, Hotmail