Key Takeaway

<aside> 💡

In this chapter, we will use Docker to review the techniques we previously learned, including Network Namespace, Virtual Ethernet, Linux Bridge, and more.

</aside>

revisit-docker.drawio.svg

Quick Review

Experiment

Set Up the Experiment Environment

<aside> 💡

This environment uses the Ubuntu 24.04 server provided by iximiuz Labs, which offers a fast and convenient online practice environment.

Reference: https://labs.iximiuz.com/

</aside>

Install Docker

Install following the official guide: Docker DocumentationUbuntu

After installation, the Docker service is not enabled by default, so we need to enable it using the following command:

$ sudo systemctl status docker.service
$ sudo systemctl start docker.service
$ sudo systemctl enable docker.service

Let’s begin the experiment!

截圖 2025-08-21 下午2.09.05.png

截圖 2025-08-21 下午2.36.49.png

Next, let’s enter the network namespaces of the two containers to check the IP addresses assigned to them.

Here, we use the nsenter command to enter the network namespace. If you prefer to use the ip netns approach, you can refer to this article: Docker and Network Namespace

截圖 2025-08-21 下午3.33.48.png

截圖 2025-08-21 下午3.34.20.png

We can observe that both ARP and ICMP packets are being transmitted and received normally.

截圖 2025-08-21 下午2.38.03.png

As a side note, how can we tell which virtual ethernet interface on the Host corresponds to the container’s network namespace?

From the diagram on the left, we can see that the interface number 12 on the Host (Bottom) corresponds to the eth0 interface inside the container (Up), which also ends with 12.