lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] Split DNS for multihomed setup


From: Radouch, Zdenek
Subject: Re: [lwip-users] Split DNS for multihomed setup
Date: Sat, 16 Aug 2014 19:37:49 +0000

Hi Mark,
I am completely missing what this has to do with DNS.

> We obviously must make sure, that the DNS query is
> made through the ethernet interface.

No. A DNS query is not made through an interface. A query
is made to a configured name server, wherever the name server is,
on whatever interface this name server can be reached.
If the primary configured name server cannot resolve the name
the resolver iterates to the next configured name server.

This should have nothing to do with a multi-homed configuration,
as long as the routing to the name servers is defined. If not, then
the routing is where the problem is.

>  the "resolver cache" (dns_table) obviously does not consider which
> interface the entry belongs to

Because an entry does not belong to an interface at all, the entry belongs
perhaps to some global query name space.

As I said, I am really missing what the problem is. Do you have a name server
that can translate your example "foo.local"? If you do, then that is the server
that will successfully return the answer to the query, and you should not care
where it is, other than making sure the resolver will contact it.
Once the records come back, they can be cached, there is no interface
involved in this, all you need is the foo.local => a.b.c.d mapping. That is
what DNS is, nothing more.

You need to ask yourself (and perhaps explain) why you believe that
an address record, mapping a name to an address is insufficient in your
application. You said:

> the destinations, that we must connect to might be
> specified as domain names...

If you successfully translate the name then the destination will no longer be
a domain name, it will be an IP address.
Do you still need to know which interface? If you do, then that's a routing 
issue,
if you don't then that should clarify why it is not needed in the DNS query.

Cheers,
-Z


________________________________________
From: address@hidden address@hidden on behalf of Mark Lvov address@hidden
Sent: Friday, August 15, 2014 5:26 PM
To: Mailing list for lwIP users
Subject: [lwip-users] Split DNS for multihomed setup

Hello,

I am using raw API, my system has two distinct network interfaces and
there is a requirement, that (TCP) connections to certain remote
addresses are made through certain network interfaces.

Furtermore, the destinations, that we must connect to might be
specified as domain names, that obviously need resolving. The problem
is, certain destinations must only be resolved via DNS queries, that
are made through a particular network interface. For example, consider
a situation, when we have a PPP netif and an ethernet netif (that is
on a "local" network) and we need to connect to "foo.local" via
ethernet netif. We obviously must make sure, that the DNS query is
made through the ethernet interface. Hope, that makes sense.

Now, I've looked through the DNS implementation and I see that there
are basically two obstacles:
* there is no way to specify, which interface the queries should go
through (the pcb is bound to IP_ADDR_ANY without any way to override
it)
* the "resolver cache" (dns_table) obviously does not consider which
interface the entry belongs to

I am intentionally mentioning "interface" all throughout, but it can
be substituted for "source address", since those are equivalent in
this context.

What is the best way to tackle this problem? Perhaps I should attempt
to patch the dns implementation to add the "source address" argument
to the relevant functions and make the entries dns_table aware of the
source address of the query (falling back to IP_ADDR_ANY if source
address is not specified)? Is there any other way to do this?

Thanks,
Mark

_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users



reply via email to

[Prev in Thread] Current Thread [Next in Thread]