The first test will take place in class on Wednesday, October 8. It will cover course material through Friday, October 3. From the textbook, this includes: Chapter 1, especially Sections 1.1 through 1.3, Section 1.5, and some general ideas from Section 1.4; Chapter 2, especially Sections 2.1, 2.2, 2.4, 2.5, and 2.6.1; and Chapter 3, Sections 3.1, 3.2, and 3.3. You are also responsible for Labs 1 through 4, and for aspects of Java programming that were covered in lecture.
The test will include: some shorter essay-type questions such as definitions; longer, more conceptual essay questions about general network principles; questions about network configuration; and questions about socket programming and the Java Socket API and about threads in Java. You might be asked to write some basic Java code with sockets, such as code to contact a server and exchange some data. You might be given some Java code and asked to explain it. The test will be four pages long, with room for answers.
Here are some of the terms and ideas that you should know for the test:
packet-switching and packet-switched networks
comparison with circuit-switched networks
the network core
packet-switches in the network core: routers
the network edge: access networks
ISPs -- Internet Service Providers
hosts: computers on the network edge
layered protocols
why layered protocols are used
encapsulation in protocol layers
headers, added and used by the different layers
what routers do
how queuing is used at routers and how it can lead to dropped packets
IP addresses
The five layer Internet protocol stack:
Application layer (messages)
Transport layer (segments)
Network layer (datagrams)
Link layer (frames)
Physical layer (bits)
Responsibilities of layers in the Internet protocol stack
Transport layer: process-to-process delivery of application-layer messages
Network layer: host-to-host delivery of transport layer datagrams,
across multiple networks and routers
Link layer: host-to-host delivery within a single network
Physical layer: transmission of bits between directly connected devices
application and transport layer are implemented in hosts on the network edge
application layer:
uses transport layer services for process-to-process delivery
implements its own architectures, protocols, and policies
uses a client/server model on the Internet
server "listens" for communications from client at a known IP address and port
HTTP: HyperText Transfer Protocol
used for communication between web servers and clients (browsers)
standard port number is 80
a request/response protocol
stateless (no state information is automatically preserved between requests)
request format: request line, headers, blank line, and (for POST command) data
request line example: GET /index.html HTTP/1.1
some request headers: Host, Connection, If-modified-since
response format: status line, headers, blank line, data
status line example: HTTP/1.1 200 OK
status codes: 200 OK, 404 Not Found, 403 Forbidden, etc.
some response headers: Content-Type, Content-Length, Connection
MIME types and why they are used in HTTP
persistent connections (Connection: keep-alive vs. Connection: close)
Web caching and web proxies
SMTP: Simple Mail Transfer Protocol
Mail agents and mail servers
SMTP used to send mail from mail agent to server and from server to server
other protocols (IMAP, POP, webmail) are used to retrieve mail from server
traditionally used a plain text conversation on port 25
message headers From:, To:, and Subject: -- part of the mail message
SMTP commands MAIL FROM:, RCPT TO:, part of the "envelope", not the message
MIME was introduced to enable binary mail attachments, non-ASCII characters, etc.
DNS: Domain Name System
distributed database
record types: A, CNAME, NS, MX
root DNS servers
TLD (top-level domain) and TLD servers
autoritative name server for a domain
local DNS servers
canonical names and aliases
DSN queries and answers
how a DNS server looks up an IP address
caching in DNS and the time-to-live field in DNS database records
Peer-to-peer applications
why they can be faster and more efficient than pure client/server applications
some basic ideas of BitTorrent (what is does, trackers, peers)
multiplexing and demultiplexing in the transport layer
TCP (Transmission Control Protocol): connection-oriented, reliable communication,
with congestion control
UDP (User Datagram Protocol): simple, unreliable process-to-processes delivery
UDP checksums and error detection
the UDP header: source and destination port numbers, length, checksum, data
UDP does not do congestion control
Wireshark
how Wireshark lets you observe network traffic and packet contents
basic network tools: ping, traceroute, nslookup, ifconfig, telnet
why do HWS computers have different IP addresses when seen from outside HWS?
socket programming in Java
programming basic TCP clients and servers
class ServerSocket:
constructor: serverSocket = new ServerSocket(port)
major method: clientSocket = serverSocket.accept()
class Socket:
constructor for client side: socket = new Socket(host,port)
on sever side, returned by serverSocket.accept();
major methods: socket.getInputStream(), socket.getOutputStream(), socket.close()
using socket streams to send and receive messages
blocking in serverSocket.accept(), new Socket(), and read operations on Sockets
running a server in an infinite loop to handle a sequence of client connections
queueing of connection requests for serverSocket.accept()
threads and parallel processing
why servers are multithreaded
thread pools
basic ideas of Java threads
the Thread class and its run() method
the difference between thread.start() and thread.run()
blocking queues and the producer/consumer problem