lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] DNS using Wired interface and PPP


From: Sergey A. Borshch
Subject: Re: [lwip-users] DNS using Wired interface and PPP
Date: Sun, 11 Aug 2019 23:15:37 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1

On 11.08.2019 20:48, address@hidden wrote:
Am 11.08.2019 um 14:55 schrieb Sergey A. Borshch:
Hello everybody.

My system has two network interfaces: main is wired Ethernet and backup is
cellular modem using PPPoS. I want to choose which interface to use by
netifapi_netif_set_default().

The problem I expect that both interfaces got DNS servers addresses from
providers. It is possible that each of interface is connected to each own
subnetwork and each provider has it's own DNS servers in their subnetworks not
accessible from outside of subnetwork. It means that when I use wired Ethernet
interface I should use DNS servers supplied by Internet provider via DHCP and
using cellular modem interface I should use DNS severs supplied by cellular
operator via IPCP. What is correct way to do do such scenario in lwIP?

As far as I understood lwIP architecture, it uses two global (system-wide) DNS
addresses (by default) and each interface overwrites them after getting new
values by DHCP/IPCP. So used DNS addresses depends on which interface got their
DNS addresses last.

Well, I think you're right there. However, is this different on Linux or
some other OS? I don't know if there's any standard way of solving this.
I don't know how it is implemented internally, but I see DNS addresses fields in every interface settings GUI in Linux Mint and Windows 7. Possibly lwIP also should have DNS addresses in netif structure and access them via netif_default in dns_send() and dns_backupserver_available()?

This could be solved e.g. by adding an optional layer between dhcp.c and
the call to dns_setserver() so that an application can override this,
but I wouldn't want to solve this in a much different way than other
stacks...

Regards,
Simon

--
Regards,
  Sergey A. Borshch            mailto: address@hidden
    SB ELDI ltd. Riga, Latvia



reply via email to

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