Foundations of Python Network Programming

(WallPaper) #1
■ IntroduCtIon

xxv

•    Representing the typical situation of a client in a home or coffee shop are the client machines
behind modemA and modemB that not only offer no services to the Internet but that are in fact
not visible on the wider Internet at all. They possess merely local IP addresses, which are
meaningful only on the subnet that they share with any other hosts in the same home or coffee
shop. When they make connections to the outside world, those connections will appear to
originate from the IP addresses of the modems themselves.

•    Direct connections allow the modems to connect to an isp gateway out on the wider Internet,
which is represented by a single backbone router that forwards packets between the networks
to which it is connected.

The Network Playground


The source code to the program listings in this book is available online so that both current owners of this book and
potential readers can study them. There is a directory for each chapter of this edition of the book. You can find the
chapter directories here:


https://github.com/brandon-rhodes/fopnp/tree/m/py


But program listings can go only so far toward supporting the curious student of network programming. There are
many features of network programming that are difficult to explore from a single host machine. Thus, the source code
repository for the book provides a sample network of 12 machines, each implemented as a Docker container. A setup
script is provided that builds the images, launches them, and networks them. You can find the script and the images in
the source code repository here:


https://github.com/brandon-rhodes/fopnp/tree/m/playground


You can see the 12 machines and their interconnections in Figure 1. The network is designed to resemble a tiny
version of the Internet.


Figure 1. The network playground’s topology

Free download pdf