TCP/IP
Example of the logic inside a single router
$L$: Data Link Address (mac addresses), each router has a local and a public address. $N$: IP of the sender and final receiver of a packet.
Transport Layer
See slides.
Segment = Packet, in TCP
Data Link Layer
See slides.
Sublayers
- Data Link Control (DLC) : this layer takes care of all the issues common to both point-to-point and broadcast links.
- Media Access Control (MAC) : Only deals with the issues specific to broadcast links.
Addressing
See slides.
Each router uses a Forwarding Table to determine where to relay the packet.
Types of addressing
- Unicast Addressing: Sender and receiver are known
- Multicast Addressing: One to many communication within local network
- Broadcast Addressing: One to all
Errors
See slides.
Error detection is of cause easier than error correction.
Burst Error: Two or more bits are flipped
Block Coding
Message is divided into blocks (“datawords”), and add redundant bits to each packet to create “codewords”.
The sender makes sure that the codeword is a correct codeword. Determining if a codeword is current, requires a table for validating the codeword, which is shared by sender and receiver.
The minimum Hamming Distance between valid codewords should be $2$, to make sure a bit-flip does not result in another valid codeword. This is the case in Parity-Check Code.
Linear Block Coding
You can $\text{XOR}$ two valid codewords to get another valid codeword. $$A ,, \text{XOR} ,, B= C $$ Where $A$, $B$ and $C$ are all valid.
Hamming Codes
Cyclic Coding
Se slides.
The redundant bit “rotate” for each dataword.
$$s(x) = e(x) ,,\text{mod} ,, g(x)$$ $x$: Dataword $s(x)$: Syndrome - should be $0$ in a valid codeword $e(x)$: The error $g(x)$: The generated codeword
Generators with a factor of $(x+1)$ can detect all odd number of bit-flips.