DNS using Wired interface and PPP

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

DNS using Wired interface and PPP

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.


--
Regards,
   Sergey A. Borshch            mailto: [hidden email]
     SB ELDI ltd. Riga, Latvia

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: DNS using Wired interface and PPP

goldsimon@gmx.de
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.

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


_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: DNS using Wired interface and PPP

Sergey A. Borshch
On 11.08.2019 20:48, [hidden email] 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: [hidden email]
     SB ELDI ltd. Riga, Latvia

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users