Computer Networks:
Exam 1 Review
CS455/CS555/EE407/EE507
Fall 2024
Pat Wilbur
[email protected]
Exam 1: Wednesday, October 9th
Exam format (0.5 points each, 20 points total):
➢ 16 true/false questions
➢ 20 multiple choice questions
➢ 4 short answer questions
In-class, closed-book exam, 50-minute duration:
➢ Class conflict? Email me by tomorrow (Tuesday)
➢ Alternate accommodations? Email me by tomorrow (Tuesday)
➢ Distance sections? I’ll email you
Exam 1: Wednesday, October 9th
Scope of exam:
➢ August 26th – September 30th
➢ Content either contained within lecture slides or linked from lecture slides (see Moodle)
➢ Not much content from August 26th or August 28th lectures
➢ Will definitely cover ARQ content
Bring a pen!
Example questions
True/false: A protocol defines the format, actions, and the order of messages used by
communicating entities to accomplish a specific task.
True
False
*
Example questions
Multiple choice: Which protocol(s) will retransmit dropped packets for you?
(a) TCP
(b) UDP
(c) TCP and UDP
(d) Neither TCP nor UDP
*
Example questions
Short answer: Given the specified protocol and example sequence diagram (above), why was
the ACK for segment/PDU#4 received but no ACK for segment/PDU#3?
*
OSI Model: Network Protocol Layers
Higher = closer to the applications we’re familiar with. Lower = closer to the physical (physics) wires themselves.
Note: Class will be taught (mostly) top-down so we can develop context on the problems to solve before looking
at each deeper/lower-level solution; however, references/books are often organized (mostly) bottom-up.
Source: Wikipedia
Protocol Encapsulation
Network protocol layers are logically encapsulated (contained) inside
one another
Protocol Data Unit (PDU): A single unit of information containing:
➢ protocol-specific control information (e.g. a header)
➢ the service data unit (SDU): also known as payload data, the
SDU contains the next-higher protocol’s PDU, which is then
passed to the next-higher protocol for processing
Finally, the SDU that is encapsulated within the application-layer
protocol’s PDU is passed to the application itself as application data
HTTP Traffic Flow
Suppose user enters URL: www.someSchool.edu/someDepartment/home.index
1a. HTTP client initiates (TCP) connection
to HTTP server process at
www.someSchool.edu, (on Port 80, the 1b. HTTP server at host www.someSchool.edu
default for HTTP servers). waiting for (TCP) connection (on Port 80),
“accepts” connection, notifying client.
2. HTTP client sends HTTP request
message (containing URL) into (TCP)
connection socket. 3. HTTP server receives request message, forms
response message containing requested
object (someDepartment/home.index), sends
message into socket.
5. HTTP client receives response
4. HTTP server closes TCP connection.
message containing HTML file, displays
time web page (by parsing HTML file).
*
HTTP Request Message Format
*
HTTP Request Message Format
request line
GET /somedir/page.html HTTP/1.0
User-agent: Mozilla/4.0
header lines Accept: text/html, image/gif,image/jpeg
Accept-language:en
*
HTTP Request Methods (Verbs)
OPTIONS
GET – requests a representation of the specified resource, should only retrieve
data
HEAD
POST – submits an entity to the specified resource, often causing a change on
the server (e.g. file change, database entry, action, etc.)
PUT
DELETE
TRACE
CONNECT
etc.
Sources: https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods *
Uniform Resource Locator (URL)
protocol://authority:port/p/a/th/item_name?query
protocol = http (ftp, file, …)
authority = server machine
port = 80 by default
/p/a/th/item_name = specifies a file to be returned or possibly a
program to be executed to produce the file to be returned
query = data to be interpreted by the server
RFCs exist for "Uniform Resource Locators (URL)“ and
“Uniform Resource Identifiers (URI)”
*
HTTP Response Message Format
status line
(protocol status code, HTTP/1.0 200 OK
status phrase) Date: Thu, 06 Aug 2018 12:00:15 GMT
Server: Apache/1.3.0 (Unix)
header Last-Modified: Mon, 22 Jun 2018 ...
lines Content-Length: 6821
Content-Type: text/html
data data data data ...
data (e.g. requested HTML file)
*
HTTP Response Status Codes
Response Status Code in first line in server→client response message.
A few sample codes:
200 OK - request succeeded, requested object later in this message
301 Moved Permanently - requested object moved, new location for
redirection later in message (Location:); 302 for temporary redirect
400 Bad Request - request message not understood by server
404 Not Found - requested document not found on this server
505 HTTP Version Not Supported
*
Stateless vs. Stateful
HTTP is a stateless protocol: server program implementing the
protocol doesn’t maintain state of users (state, as in, state machine)
(In a dynamic websites, information about users might be stored in a
database though)
Stateful protocols are complex and difficult to use reliably:
➢ Often, past state history must be maintained
➢ If server/client crashes, state can be lost
➢ If some packets are lost on the network, client/server might lose
synchronization and have different views on the current state
*
HTTP(S) Protocol Graphs & Layers
HTTPS (HTTP + TLS) Internet
Standard OSI
Model
(Application)/ Model
(a.k.a.
(a.k.a.
[Application] HTTP “TCP/IP
HTTP Layer
“TCP/IP
Model”)
model”)
(Application)/ (Presentation)/
[Application] HTTP [Application] TLS
Layer Layer
(Transport)/ (Transport)/
[Transport] TCP [Transport] TCP
Layer Layer
(Network)/ (Network)/
[Internet] IP [Internet] IP
Layer Layer
Layer models key:
( ) OSI Model layer ... ... ... ...
[ ] Internet Model
(“TCP/IP Model”) layer
HTTP(S) Protocol Graphs & Layers
(Application)/
[Application] HTTP Layer models key:
Layer
( ) OSI Model layer
(Application)/ (Presentation)/ [ ] Internet Model
[Application] HTTP [Application] TLS (“TCP/IP Model”) layer
Layer Layer
(Transport)/ (Transport)/
[Transport] TCP [Transport] TCP
Layer Layer
(Network)/ (Network)/
[Internet] IP [Internet] IP
Layer Layer
... ... ... ...
... IP TCP HTTP HTML
Document ... IP TCP TLS HTTP HTML
Document
HTTP HTTPS (HTTP + TLS)
Layer models key:
E-mail Protocols
* OSI Model not included on this
slide for brevity *
[ ] Internet Model
(“TCP/IP Model”) layer
Simple Mail Transfer Protocol (SMTP) is one of the earliest SMTP Protocol Graph
application-layer protocols on the Web, used to send e-mail to a mail
server (can be used by a mail client to send mail to its corresponding
server, or by a mail server to deliver mail to another mail server) Internet
Standard
Model
POP (Post Office Protocol) and IMAP (Internet Message Access (a.k.a.
(a.k.a.
[Application] SMTP “TCP/IP
“TCP/IP
Protocol) are used for downloading/reading mail, although nowadays Model”)
model”)
web browsers are often used to read on SaaS e-mail providers
Human-readable! Please read Section 9.1.1 of Computer Networks: A [Transport] TCP
Systems Approach book to get longer discussion of e-mail protocols
Client: HELO cs.princeton.edu
Server: 250 Hello [email protected] [128.12.169.24]
Client: MAIL FROM:<[email protected]> [Internet] IP
Server: 250 OK
Client: RCPT TO:<[email protected]>
Server: 250 OK
Client: RCPT TO:<[email protected]>
Server:
Client:
550 No such user here
DATA
[Link] ...
Server: 354 Start mail input; end with <CRLF>.<CRLF>
Client: Blah blah blah
Client: <CRLF>.<CRLF>
Server: 250 OK
Client: QUIT Source
Server: 221 Closing connection
Layer models key:
FTP Protocol
* OSI Model not included on this
slide for brevity *
[ ] Internet Model
(“TCP/IP Model”) layer
File Transfer Protocol (FTP) is another early application-layer FTP Protocol Graph
protocol on the Web, used to upload and fetch files to/from a server
Insecure (no encryption) and largely deprecated today, but also Internet
Standard
human readable Model
(a.k.a.
(a.k.a.
[Application] FTP “TCP/IP
“TCP/IP
Model”)
model”)
[Transport] TCP
[Internet] IP
[Link] ...
Source
Naming things on the Internet
There are two predominate namespaces on the Internet:
➢ IP addresses: numerical addresses for hosts on the Internet (and/or a
local network) used by machines
➢ Domain names: alphanumeric (textual) addresses for hosts on the
Internet (and/or a local network) used by humans and machines
Authority for managing/maintaining these namespaces is heavily delegated
to regional institutions and/or hierarchical entities
A namespace can either be a flat range of possible addresses (e.g. IP
addresses) or a hierarchical graph of possible addresses (e.g. domain
names and hostnames)
Layer models key:
DNS Protocol
* OSI Model not included on this
slide for brevity *
[ ] Internet Model
(“TCP/IP Model”) layer
Domain Name System (DNS) is “a hierarchical and distributed name DNS Protocol Graph
service that provides a naming system for computers, services, and
other resources on the Internet or other Internet Protocol (IP)
networks.” Internet
Standard
Model
“It associates various information with domain names… assigned to DNS
(a.k.a.
(a.k.a.
[Application] “TCP/IP
“TCP/IP
each of the associated entities.” Model”)
model”)
“Most prominently, it translates readily memorized domain names to
the numerical IP addresses needed for locating and identifying [Transport] UDP
computer services and devices with the underlying network
protocols.”
Please read Section 9.3.1 of Computer Networks: A Systems [Internet] IP
Approach book to review DNS further, especially resource records
(RR) and time-to-live (TTL)
[Link] ...
Source: Wikipedia
DNS is hierarchical
Host ux01.cs.princeton.edu:
Hostname: ux01
Subdomain: cs (or cs.princeton.edu)
Domain: princeton.edu
Top-level Domain (TLD): edu
Source
DNS authority zones
Zones are divisions of authority in the DNS hierarchy, defining
which nameservers (DNS servers) are authoritative; that is,
which nameservers contain the canonical record that
correctly maps name to IP address (i.e. the record’s source
of truth)
Source
DNS authority zones
Source
DNS resolution
Source
References & attribution:
Original slides by Patrick F. Wilbur, 2024.
Other slides adapted from slides by Professor Yu Liu and Professor Jeanna Matthews.
In this file, slides marked * are heavily adapted or taken from slides by Professor Yu Liu and Professor Matthews.
Other references are depicted on individual slides themselves.