Monday, May 16, 2016

CST 311 Week 4

Week 4

This week caught me off guard because I didn't look at the due dates well enough to recognize that both week 3 and week 4 were due the time that week 3 was due (meaning week 3 and week 4 were combined into week 3). Week 4 is actually a week off to study for the midterm on the Saturday of the actual week 4. There were lighter work loads for both week 3 and week 4, but they were presented as being lighter to give the students more time to study for the midterm and I didn't read it as two weeks condensed into one. It would probably have been more ideal to just tell us all that all of the material was for week 3 and there isn't material for week 4 to give us time to study for the midterm. So, I found this frustrating. I always do my assignments as quickly as possible at the beginning of the week so that I don't have to waste my energy on stress surrounding deadlines.

As for the material, we covered the transport layer in more detail, multiplexing, demultiplexing, and UDP. The point of the transport layer is to provide communication between the host's processes. Multiplexing is done at the sending host and adds a transport header. Demultiplexing is done on the other side (receiving host) and breaks apart the header to send the data to the correct socket. UDP is an unreliable, unordered delivery protocol. Our Wireshark lab was focused on UDP this week.

We went into a surprising amount of detail this week with regards to calculating the checksums on UDP headers. The checksums are used to quickly check if a UDP segment has an error or not. While they're not a reliable way of checking for errors, they can help signal that something may have gone wrong. To do the assignment we had to understand binary addition. I'm glad I'm also enrolled in an Operating Systems course that taught me how to add binary numbers this semester because this course didn't provide any assistance there and it was necessary to complete the homework assignment. Calculating a checksum is done by doing this:
  1. Add two binary numbers (we added bytes, UDP uses 16-bit integers).
  2. A "wraparound" will be at the beginning of the sum (0 or 1) at the number of bits you're adding plus 1 decimal place.
  3. Remove the "wraparound" from the beginning of the sum and add it to the rest of the binary integer.
  4. Flip all the bits to be the opposite (0101 -> 1010).
  5. That is the checksum!

No comments:

Post a Comment