Although we glanced over its usage in previous chapters, anyone working with networking on a Linux-based system should be comfortable with tcpdump
. tcpdump
allows you to capture network traffic on one or more interfaces on the host. In this recipe, we'll walk through how we can use tcpdump
to verify container network traffic in a couple of different Docker networking scenarios.
In this recipe, we'll be using a single Docker host. It is assumed that Docker is installed and in its default configuration. You'll also need root-level access in order to inspect and change the hosts networking and firewall configuration. You'll also need the tcpdump
utility installed. If you don't have it on your system, you can install it with this command:
sudo apt-get install tcpdump