Tuesday, October 15, 2024

CST 311 - Week 7

 For week 7, most of my time was spent studying for the final exam. I spent some more time tracing through Djikstra's algorithm and practicing my understanding of IP addresses and subnet masks. When it comes to new content, we read over Chapter 6, which covers The Link Layer and LANs. As opposed to the network layer that covers end-to-end communication across a series of links, this chapter focused on how information traverses the individual links. 

Basics

There are two link-layer channels -- broadcast channels, which connect multiple hosts in wireless networks, and point-to-point communication links, for example, two routers connected by a long-distance link. The basic service of the link layer is to transfer a datagram from one node to an adjacent one, but we read about the potentially varying details of a link-layer protocol, like framing, link access, reliable delivery, and error detection and correction. We learned that the link layer is usually implemented on a chip called the network adapter, which implements these services. The layer's functionality is mostly controlled by the hardware with only higher-level functionality being software-controlled. Because of this, you can think of the link layer as the place in the stack where hardware meets software. 

Error Checking

One of the main sections that stuck out to me was the section on error-checking. There are three techniques for detecting errors -- parity checks, checksumming methods, and cyclic redundancy checks. 

Parity checks are the simplest form of error-checking, where for information D with d bits in an even parity scheme, the sender includes an additional bit with value such that the total number of 1s in the d + 1 bits is even. In an odd scheme, the number of 1s will be odd. With a two-dimensional parity scheme, a receiver can detect the error and also where it occurred.

A checksum is based on the idea that bytes of data are treated as 16-bit integers and summed. The 1s complement of this forms the checksum. When received, 1s complement of the checksum is performed and if any resulting bits are 1, an error will be detected.

A widely used technique is one based on cyclic redundancy check codes. First, the sender and receiver agree on an r + 1 bit pattern called a generator (G). The idea is that for data D, the sender chooses r additional bits, R, and append them to D so that d + r bit pattern is exactly divisible by G. If the remainder of (d + r)/G does not equal zero, there has been an error.

No comments:

Post a Comment