Using tcpdump to verify network paths

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.

Getting ready

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, ...

Get Docker Networking Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.