I am not able to understand or find anywhere the correct DNS resolution order for a custom linux namespace.
For ex- If I add a new namespace & using IP command I can give its IP address, subnet & default gateway.
But I haven’t yet found any way to pass the dns server address too for my custom linux namespace.
All the information I have come accross tells me that the only way DNS server address is passed to namespace is
- If /etc/netns/customNamespace/resolv.conf is present, then use this.
- by using /etc/resolv.conf of the host only
So my questions are
- Why is DNS resolution not taken care by IP command and depends on file system.
- If new network namespace is using files from host for its network configuration, then how do we call it isolated ?
Please do correct me, where ever I have been wrong with my understanding or assumptions.