Every Docker container is a set of Linux namespaces wrapped around a runtime. The most important one is the network namespace (netns): a separate set of interfaces, routes, ARP table, sockets, and firewall.
In this lesson you repeat what Docker does internally. You create two
netns by hand, connect them with a veth-pair (a virtual Ethernet
cable), assign IPs, and run ping. No Docker-in-Docker, just ip.