Different subnet container name resolution

networking

(Nix6) #1

Hey All,

I am having some issues resolving container names. setup:-

image

Issue :-

I can ping all the vm and containers with ip addresses from each other. I can ping containers from v1 & v2 using container names and I can can ping V1 & V2 from containers C1 & C2 using vm names. But cannot ping C1 form C2 and vice versa. Not shown in the diagram, I have another container C3 on 10.10.20.0 subnet and I can ping C2 from C3 and vice versa with names.

LXC containers cannot resolve container names on different subnets but can be pinged by ip. Am I missing a simple setting?

LXC version - 2.0.9 on Debian Buster
Dnsmasq running ad dhcp and dns server on br1 and br2
vm and containers are Archlinux

Insight will be greatly appreciated.

Thanks


(Nix6) #2

Hi All,

I was able to solve this issue by simply making an entry in hosts file of the containers. Still curious as to why I encountered this issue. I am able to resolve all dns names except for the containers on a different subnets. I have some basic understanding of networking and this just did not make sense.

Hope some wizard can advise.

Cheers,