A bit off-topic: Multiple connection/instances and name servers...?

Dan Williams dcbw at redhat.com
Mon Oct 2 17:20:59 UTC 2023


On Fri, 2023-09-29 at 10:03 +0200, Martin Maurer wrote:
> Sorry, if a bit off-topic, but I hope others can help on this topic, 
> which occurs together with libqmi:
> 
> Assume I am able to build up 3 connections, each of them IPv6,
> different 
> APN/destination/usages:
> 
> For each connection, I get a IPv6 address assigned.
> 
> I can send ping to each connection, when using IPv6 addresses.
> 
> I also get 1-2 DNS server addresses for each connection.
> 
> I can send ping to each connection:
> 
> 
> ping -6 -I qmimux0 ...IPv6-Adresse...
> 
> ping -6 -I qmimux1 ...IPv6-Adresse...
> 
> ping -6 -I qmimux2 ...IPv6-Adresse...
> 
> 
> (Instead of
> 
> ping -6 -I wwan0 ...IPv6-Adresse...
> 
> in single connection/single instance case)
> 
> But what do I do with the 3x2=6 DNS addresses?
> 
> When writing them e.g. to /etc/resolv.conf they are used for all 
> connection together?

glibc will query them in the order listed.

> 
> So I cannot more distinguish over which nameserver a name is
> resolved?

With plain resolv.conf and glibc, you can't. glibc just isn't built for
complicated DNS setups...

... which is why people use split-DNS and local forwarding resolvers
like dnsmasq or systemd-resolved.

This kind of local resolver setup allows you to direct specific domains
to specific nameservers. People often use this for VPNs, to direct say
"*.company.com" to the VPN nameservers, while all other queries go to
the WWAN provider upstream DNS.

This can also be necessary because some nameservers aren't forwarding
ones, and will only resolve certain domains and refuse others.

So it's kind of up to you how you want to configure DNS, whether the
simple resolv.conf (which queries servers in the order listed) or
split-dns with dnsmasq/systemd-resolved (where you get to figure out
what domains go where).

> Best case would be when it does not matter which connection is used
> to 
> resolve the names to IPv6 addresses
> 
> and the information is valid independant of the used connection.
> 
> Or not use names at all and only use IPv6 addresses?
> 
> Have other hit this problem?

I certainly have; and I did split DNS with dnsmasq (via NetworkManager)
when doing Red Hat work over WWAN.

Dan

> 
> Many thanks for your thoughts!
> 
> Best regards,
> 
> Martin
> 
> 



More information about the libqmi-devel mailing list