I need to explain how Docker networking works at a high level for an upcoming interview. Specifically, when you run multiple containers and connect them using a user-defined bridge network, how does name resolution actually happen? If container A tries to reach container B by hostname, what stops that from working on the default bridge network, and why does Docker's embedded DNS server make the user-defined network behave differently?
Also, is there any scenario where you'd still prefer to use --link or manually configure --network host instead of a custom bridge? I want to understand the practical boundaries of each networking mode, not just memorize the definitions.