Exams - material covered and links to prior exams
past exams (note, some questions won't make sense as they are based on material we have not yet covered)
You can use 1 8.5x11' cheat sheet (front and back). You can write (or type) anything on it. Other than this, the test is close book, close notes. You will need a calculator. You can not share cheat sheets or calculators.
I will ask you questions that cover the material presented in
class or related to material from the two books or additional
reading referred to on our schedule page. I would expect that at least some of the questions on this exam are similar (directly or indirectly) to questions you have seen this semester on homework, quizes, or exercises.
CPSC 3600 Exam #1
Exam 1: The exam will be divided into sections, described as follows:
- Short answer - I might ask true/false, fill-in-the-blank questions. Or I might ask questions that require 1-2 sentence answers. These questions typically focus on material from the text book, especially on sections that cover terms and concepts that we have discussed in class.
- Problems - These questions would be similar to problem oriented questions on HW1 and HW2. Topics will likely come from one or more of the following
- Given a simple network diagram, compute one-way latency or RTT's. Given a specific scenario involving the network and application, I might ask questions that require you to apply concepts we have covered to the specific scenario.
- Problems that require you to apply probability and stats to get the solution
- Problems that require an understanding of network concepts.
- Code - You should be familiar with the sockets programs, code excerpts, and information related to sockets API that we have covered in class. You should be comfortable with the implementation of the UDPEcho program that supports modes 0 and 1 (mode 1 is the Constant Bit Rate mode) that is released as the HW2 solution.
Text Material covered in the texts from Exam 1 (Solution from Exam 1)
- Kurose text
- Chapter 1
- Chapter 2 sections 2.1, 2.2, 2.7
- Chapter 3 sections 3.1, 3.2, 3.3, and the first section of 3.4.1
- In the donahoo book, you should be familiar with chapters 1-4
and also section 5.2 of Donahoo.
Text Material covered in Exam 2 (material from Exam 1 is fair game....but the majority of questions are from the new material)
- Kurose text
- Ch 2, section 2.7.2 TCP programming
- Chapter 3- transport protocols and TCP
- Socket/transport ties:
- Socket is UDP (DATAGRAM) or TCP (STREAM)
- Sockets are full duplex - although all of our examples involve applications that are either one-way (one side sending, the other side just receiving, or possibly just sending periodic ACKs)
- both UDP and TCP sockets provide a send and rx buffer at each endpoint.
- Data that arrives at a receiving side of a socket gets inserted in the rx buffer. It stays in the queue until the receive side application issues a revc (or a read) from the socket.
- rate based (like our UDPEcho CBR mode 1) vs window mode (like our UDPEcho window mode 2)
- window mode: concept of a pipe, finding the optimal window to fill the pipe
- ACK policy at the server- one ACK per data segment that arrives, delayed-ack waits for >1 data segment before sending a cumulative ACK (but this requires a timeout in case no more data segments arrive to clock out the ACK)
- Terms: duplicate ACK, new ACK, cumulative ACK, delayed ACK, triple duplicate ACK (defines a loss event in TCP)
- Flow control (section 3.5.5) : The TCP's send window: min(cwnd, receivers advertised window).
- TCP flow control: when there is a fast sender and a slow receiver, data is likely to queue the receiver's Rx buffer. Each ACK packet from the receiver includes the Rx Advertised window which is the EXACT amount of buffer space available in the Rx buffer. This provides a way to convey to the sender to stop sending once the buffer is filled.
- NOTE: UDP does not do this!!! For a fast sender, slow receiver, the sender will fill the receiver's rx buffer and once filled, packets that arrive to a full rx buffer are dropped!!!!
- Terms: Rx Advertised window - the number of bytes available in the receive side socket rx buffer.
- Error recovery (kurose ch 3 and our lecture notes):
- : stop and wait, Go-back-N, improved go-back-N where the server ACKs data messages received successfully after loss recovery complete, TCP's default approach is selective-repeat : it sends back in the ACK a list of 'gaps' of loss which allows the send side to retransmit only what was lost
- TCP's slow start, congestion avoidance, fast retransmit,
- In the donahoo book,
- Related to TCP : ch2, you should be familiar with chapters 1-4
and also section 5.2 of Donahoo.
- Related to UDP: ch4,
- Ch 5 - related to byte ordering (similar concepts behind quiz6 and messages.c)
- Ch 6 - asynchronous I/O, concurrent TCP servers, select call (multiplexing)
- The lecture material related to transport protocols (they PDFS should all be listed here)
Probability and Stats topics
- Review concepts including
- sample spaces
- events
- probability of events based on counting techniques
- From a freshly shuffled deck of cars, you are dealt 2 cards (from a deck of 52). What is the probability that you are dealt a blackjack?
- established probabiltiy models
- Continuous - a uniform distribution
- Discrete - You roll two die.What is the probability you roll two 6's?
- multiple, identical experiments
- random variable
- sample space of the random variable
- standard RVs :
- Continuous - a uniform RV
- Discrete - roll two die. Define a RV X to represent the sum of both dice. Find the probability that X is greater than 12.
- Expected value, E[X]
- measurements and experimental statistics
- Time series
- Independent samples (vs correlated)
- Sample mean, sample variance
- Visualizing time series data
- histograms and sample distribution plots
FOCUS on the small subset of what we used in class: from measurement data, plot histograms and sample distributions, interpreting plots of probabilitydistributions, compute the sample mean, the concept of a random variable, experiments involving multiple repeated, independent trails (Bernoulli trials) that allow us to apply the binomial probabilty law.
CPSC 3600 Exam #2
Exam 2: solution to Exam 2
- Short answer - I might ask true/false, fill-in-the-blank questions. Or I might ask questions that require 1-2 sentence answers. These questions typically focus on material from the text book, especially on sections that cover terms and concepts that we have discussed in class.
- Problems - These questions would be similar to problem oriented questions on HW1 and HW2. Topics will likely come from one or more of the following
- Given a simple network diagram, compute one-way latency or RTT's. Given a specific scenario involving the network and application, I might ask questions that require you to apply concepts we have covered to the specific scenario.
- Problems that require you to apply probability and stats to get the solution
- Problems that require an understanding of network concepts.
- Code - You should be familiar with the sockets programs UDPEcho modes 0 and 1, sessionmanager and messages.c code.
- Code from HW4 problem 5 (UDPEcho mode 2 NOT covered).
Very specific info about Exam 2...
- concept questions: related to terms frequently used in class
- Iterative vs concurrent server design (probably oriented towards iterative UDPEcho question)
- UDPEcho mode 0: 1000 new clients send a message at the same time, assume these 1000 messages arrive in random order (so client 1 not necessarily the first to arrive), Assume the average service term by the server for each message is 1 second. What is the delay of each message (where the delay includes the queue delay plus the service time)? In particular, what is the average delay for these 1000 messages? Answer: The first to arrive has a service time of 1 second. The second to arrive has to wait for the first to be serviced, then it is serviced (2 seconds). The 1000'th to arrive has to wait for 999 others to be serviced, and then 1 second for its time to be serviced. The average : sum of each 1+2 + 3+ ..... + 1000 ) / 1000
- Error detection: timeouts versus duplicate acks
- Error recovery: retransmissions, go-back-n,
- TCP's error recovery,
- terms such as triple duplicate ACK, cumulative ACK,
- Retransmission Timeout (RTO)- optimal value is the best value that minimizes the time to transmit and minimizes the number of incorrect retransmissions
- terms such as
- Over a link: channel bandwidth, link data rate, application throughput (similar to the term goodput)
- over a path: bottleneck, available bandwidth,
- HW4 - questions 1-3 as well as Kurose material (see below) fair game
- Question 4 - not covered
- Question 5 - code not covered. Concepts related to congestion control and window transport ARE COVERED!!
- Application or transport layer sending paradigms: .rate based (our CBR mode) or window based
- Window transport protocol
- Finding the optimal window to fully utilize available bandwidth
- congestion window, maxWindow, W=min(cwnd, maxW)
- Each new ACK increases cwnd (Additive increase)
- Loss event: duplicate ACK or Timeout, drops cwnd=1
- Go-back-N - causes unnecessary retransmissions
- UDP
- As it related to our UDPEcho programs..... a single operation - message send results in the message received
- Message ---- sendto---> IP Datagram-----> recvfrom ---->Message
- TCP
- Streaming model - versus UDP datagram model
- Large block of data -----> loops on a send until all transferred to TCP ----->TCP breaks up the data into segements-----> TCP rx side guaranteed to get these segments--->places the streamed data into the Rx socket buffer--->receiver loops on recv to get all data
- Error recovery - segments in a windows 10-15 in flight, segment 10 dropped, show the recovery
- slow start, congestion avoidance, fast retransmit, fast recovery (cwnd, ssthresh)
- I'm assuming just a basic understanding of how TCP's algo is an improvement to our HW4 algorithm
- Be familiar with terms: triple duplicate ack, slow start, congestion avoidance, fast retransmit, fast recovery
- State machine details covered in final exam
- Understand the problem TCP (and our HW4 protocol) has with wireless:
- What is a packet is dropped due to wireless channel error (and NOT due to congestion) ?
- TCP misinterprets the implicit congestion feedback signal!!
- SOCKETs programming
- excerpts from UDPEcho modes 0,1 or messages.c
- byte ordering, Big Endian, how to pack and unpack
- No guarantees...but it is likely that the only material from Exam 1 covered will be questions directly related to Xtra credit #1/2 and also anything related to UDPEcho modes 0, 1 are covered.
- No questions related to probability....
CPSC 3600 Final Exam
Note: Material below this point is subject to change....it will be finalized prior to our review session to be held wed 12/13 6:00-8:00pm.
New material for the final (most questions on the final will come from material from Exams 1 and Exams 2)
- TCP - state machine,high level concepts based on the tcp-intro and material in kurose/donahoo.
- Discussion related to implementing a file transfer protocol using UDP (such as adapting UDPEcho) or using TCP
- Key: with UDP, the sendto and recvfrom transfers exactly one IP Datagram over the socket. On the other hand, TCP presents a streaming interface. The send side is in a loop sending a 'chunk' of data at a time. The recv side is in a loop receiving chunks of data.
- To send a 1Gbyte file using UDP, if we set a message size of 1472 bytes, this requires MANY sendto calls!
- To send a 1 GByte file using TCP, if we send 1 Gbyte in a single send socket call, the return will likely indicate it actually only sent a 'chunk' of the data....our code issue another send passing the updated pointer to the start of data. Our code should implement a loop around the send call, sending until the return from the send operation (along with any other state we might need to maintain) indicating the entire 1 GByte has been transferred.
- Related to network layer
- Kurose chapter 4, just sections 4.1, 4.2, 4.3
- The material discussed in our lecture material (IP-introduction)
- Highlights-
- Difference beween Host and a Router? A router is a host that is allowed to forward packets. Presumably a router has >1 network interface active at a given time, while a host (like a laptop) has >1 interface but it is usually limited to using one or the other at a given time (by default!)
- IPv4 classful addressesing
- An IP address has encodes two pieces of info: <network id, host id>
- An IP network is identified by a network id (more typical to use the term network prefix)
- Ex. Clemson has been allocated a class B network- In the Internet, any packets that have the network prefix 130.127/16 in the destination IP address will end up delivered to Clemson's border router that interfaces our network to the commodity Internet
- Class A,B,C defines the demarcation between these two ids (see p.4 of IP-introduction)
- More advanced topics extend this (subnets, supernets or CIDR). This is beyond our scope.
- Not all Class A, B, C IP addresses can be used (side 8 of IP intro slides)
- A host can not have an all 1's host id as this address is used by IP to implement network directed broadcast
- Sets of addresses are 'private' which means packets with destination (or source) IP addresses must not contain private addresses.
- The example below involving 5 class C networks. The address space defined by these networks is in the private space. Notice that this network is disconnected from the main Clemson network and the Internet. Therefore, this exact network can also exist in another lab at Clemson. As long as all packets remain only within these private networks, all is ok. If a clemson router sees a packet with a 192.168.*.* src or dst address, it will drop the packet.
- See Donahoo section 2.4 and ch 3, and section 6.6.
- Related to communications models - unicast, broadcast, multicast
- MAC level broadcast: use a destination MAC address of all one's. For ethernet: 0xFFFFFFFFFFFF (6 octet MAC addresses, all value 255 or 0xFF in hex
- Routers are not allowed to forward a MAC broadcast frame (some exceptions related to Ethernet bridges)
- IP v4 broadcast: two types:
- Limited broadcast: Use an IP destination address of all 1's : 255.255.255.255
- This will have the Host create a MAC frame with a MAC dst address of all 1's, and the frame contains the IP datagram which has a destination IP address of all 1's.
- Depending on your system and the network, you will see different things. In principle, all hosts directly connected to that network respond. Routers are not allowed to forward an IP packet with a Limited Broadcast address.
- Network directed broadcast.
- The following attempts to show 4 hosts that can communicate in an IP network involving 5 class C networks, R1 and R2 directly connected over network 192.168.5/24. Let's say Hosts H4 and H5 are both directly connected to 192.168.4/24.
H1 ---- 192.168.1/24 ---- R1 --- 192.168.2/24 -----H2
....... 192.168.5/24 ............
H3 -----192.168.3/24 ---R2 ----192.168.4/24 ---- H4, H5
- H1 issues a ping -b 255.255.255, it is likely only to see a reply from R1
- H1 issues a ping 192.168.4.255 (a network directed broadcast), H1 should see a reply from R2, H4, and H5.
- NOTE: Security rules are likely to not permit network directed broadcasts. For example, default Router forwarding rules typically include a rule that says to not forward a packet containing a destination IP address that is a network directed broadcast.
- IP network layer defines:
- IP Datagram format (slide 29 of IP intro).
- Key fields to pay attention to: vers (specifies V4 or V6), source/Dst IP addresses, Total Length (number bytes in Datagram, max Datagram size is limited by this field....max value from 16 bits is 65535 bytes.
- We did not cover the issue of what happens when a large IP datagram (like 64Kbytes) is sent down the stack to the link layer. A link (due to how the link/phy layers have been engineered to operate over a given physical medium) will have a maximum size frame. The term Maximum Size Segment (MSS) tells the link layer the max amount of data that can be placed in a frame. Over Ethernet (or WiFi or 3GPP), this is on the order of 1500 bytes. If an IP datagram length exceeds the links MSS, the IP Datagram is broken up into multiple IP packets call fragments. The destination host is responsible for reassembling fragments to create the original IP datagram. This is beyond our scope
- The details in IP-intro on subnetworks, ARP, forwarding, or IP fragmentation are not covered on the final.
Programming
- Programming questions related to UDPEcho client/server are fair game. The solution to HW4 is NOT covered. But...the adaptive sliding window protocol that is described in HW4 (and in our lectures) is covered. The version to look at is the version of UDPEcho that was prepared as starting code for HW4
- Various discussions related to the UDPEcho program were discussed throughput the semester. THese are listed in the transportprotocollectures page.
- Your should be familiar with the code related to the messages routines and the solution to Extra credit 2.
Specific information about the final:
- Questions similar to Exam1 are likely!!
- Questions similar to Exam2 are likely (and I'll try VERY hard to avoid confusing sentences!!!)
- Definitely questions on:
- Related to modes 0,1,2 of our UDPEcho program.
- Example for mode 2, I'll setup a sender- receiver scenario with a visual line diagram (just like what we've used all semester) and ask you to finish drawing out the diagram for the next 5 messages to be sent.
- Example for mode 2, same as above, but focus on a very simple packet loss scenario. I'll setup the flow, indicate a particular message is dropped and ask you to complete the figure to show how the recovery might work.
- Example, for mode 1, questions similar to those in section 2 of exam1
- probability:
- Understand the concept of a Bernoulli Loss Process and how to solve simple problems related to the probability of certain packet loss outcomes.
- Example: Our UDPEcho program operating in mode 2 is currently in a state where the window is 4 and the sender is blocked waiting for ACKs. What is the probability that no ACKs arrive? Assume a Bernoulli loss process is in effect with an average loss rate of p (setup as a Apply the binomial probability law, probability of 4 successes in 4 trials, where a success is a packet loss. Answer: P(k successes in N trials): formula (see page 2) reduces to p*p*p*p
- Understand the concept of a time series (think.... UDPEcho mode 0 and the collection of RTT samples).
- The sample mean: sum of all samples / number of samples, we did not talk about the variance (or the standard deviation) but its a measure of the how far away the samples are from the sample average.
- The sample distribution.... A plot of the relative frequency of the sample values.
- if the variation is relatively low, the distribution shows a tight spread around the sample average. If the system under observation is subject to high variability, the plot of the distribution will likely be much wider around the sample average (and obviously the variance and standard deviation would be larger than in the lower variability case.
- The concept of a random variable helps us make the jump from a discussion of measurement time series to using empirically derived results to provide us with an estimate of a probability parameter. For example, Let X represent the RTT that is in effect between a UDPEcho client and server. We can move the discussion from one based on the 'real' system to a simplified model of the system. We might want to find a probability model that we can use to represent what we obverve. Formally, we identify X to represent the RTT parameter in our model. We would like to be able to use the model to answer questions such as, what is the probability that any given RTT sample is less than or equal to some specific value. If we plot the sample distribution we can visually estimate the answer. If we are able to model X as, for example, a Normal random variable, with parameters that we supply through measurements, we can answer many interesting questions related to the RTT.
- Note.....I won't have any questions on the exam related specifically to a Random Variable. Just pointing out its importance.
- Concepts related to networking. I've identified a list of some of the more important ones to be familiar with on this page.
last updated: 12/13/2017