Chapter 3. Network
In Chapter 1, we explored the common concepts of data exchange over computer networks, such as transmission modes and synchronicity.
This chapter introduces you to network protocols.
It explains why network protocols and their programmatic APIs are needed and how they are used.
These concepts are demonstrated in practice by implementing a Transmission Control Protocol (TCP) ECHO server and clients.
Throughout the chapter, you’ll become familiar with software tools like netcat, scapy, openssl, tcpdump, and tshark, and use them to explore the basics of the TCP and Transport Layer Security (TLS) protocols.
This will help you understand how various APIs discussed in this book communicate over the network.
Network Protocols
Have you wondered what happens on the network level when a browser opens a website? The goal of this chapter, and the following Chapter 4, is to examine some of the details of how this network communication is performed.
The purpose of networking is to enable communication by facilitating data exchange. Since today’s computers are binary, networking is about getting the 0s and 1s from one side of the communication to another.
Note
The communication channel used to exchange binary data doesn’t need to be binary itself. For example, a homing pigeon can help transfer chunks of binary data.
As an example, let’s take a copper cable used in computer networks. How do we identify the data being transmitted between the sender and receiver? First, how ...