1541ultimate icon indicating copy to clipboard operation
1541ultimate copied to clipboard

Please add DNS setting in static ip configuration of U2+

Open Zibri opened this issue 2 years ago • 12 comments

[Network settings]
Use DHCP=Disabled
Static IP=192.168.2.64
Static Netmask=255.255.255.0
Static Gateway=192.168.2.1
Host Name=Ultimate-II

Please add DNS configuration when IP set to static and no DHCP. (also in the menu) Like:

[Network settings]
Use DHCP=Disabled
Static IP=192.168.2.64
Static Netmask=255.255.255.0
Static Gateway=192.168.2.1
Static DNS1=192.168.1.1
Static DNS2=8.8.8.8
Host Name=Ultimate-II

Zibri avatar Apr 22 '23 12:04 Zibri

Do I understand right, this missing feature is necessary for usage of the new feature "assembly 64"?

markusC64 avatar Dec 25 '23 14:12 markusC64

No, this is a request from our Egyptian / Italian friend. In 99.9999% of the cases, the DNS is implemented by the gateway, and therefore this is not required to specify the DNS in a network leaf node. Even more so, I wouldn't even know how to implement it, as I haven't seen ways to tell lwIP what the DNS IP should be.

GideonZ avatar Dec 25 '23 14:12 GideonZ

Oh well, then I will have to go without dns.

markusC64 avatar Dec 25 '23 14:12 markusC64

I don't understand?

GideonZ avatar Dec 25 '23 14:12 GideonZ

Well, internal DNS and Gateway differ in my installation.

I haven't missed DNS for several years on the Ultimate, so I expect that just assembly 64 will cause problems due to missing dns. Not a huge problem, I suppose.

markusC64 avatar Dec 25 '23 15:12 markusC64

In 99.9999% of the cases, the DNS is implemented by the gateway, and therefore this is not required to specify the DNS in a network leaf node. Even more so, I wouldn't even know how to implement it, as I haven't seen ways to tell lwIP what the DNS IP should be.

To be a bit more specific, the gateway and the DNS address is supplied via the DHCP protocol, while receiving the devices own IP address. In most cases the DHCP server also is the gateway router at home, that isn't even able to serve a different DHCP address. In some cases (as also in mine. ;) ) there are different solutions used for internal gateway and the DNS server. I think, there must be a possibility to manually configure gateway and DNS in the network settings. For both wired and wireless connection. I do not know any device where it isn't a possibility to set the IP address, network-mask, gateway and DNS server manually.

marty41 avatar Dec 25 '23 15:12 marty41

Well, I agree with Marty's statements. Anyway, given that you, Gideon, do not have an idea how to do that, I think I know something more important. Naming that would be completely off topic here.

markusC64 avatar Dec 25 '23 15:12 markusC64

Okay.. I must have misunderstood. Normally, one would configure the DNS just once, if at all, in the router. One would normally not configure a DNS on every leaf node. The DNS addresses then come from the DHCP server in the router indeed. So basically you are saying that you are not using DHCP? Why?

GideonZ avatar Dec 25 '23 15:12 GideonZ

If (and probably only if) your DHCP Server is a debian / ubuntu /raspbian installation, using it for fixed addresses (for sure you want to connect to the ultimate from your pc) is hard, you have to add several lines PER DEVICE of configuration in the configuration file. And even worse, you cannot make the file system read only because of that. Conpare: no dhcp means: Just enter IP, Netmask, Gateway and DNS in the client and you're done. No need to rember configuration lines to add to the configutation file.

markusC64 avatar Dec 25 '23 16:12 markusC64

/lwip-1.4.1/src/include/lwip/dns.h:

void dns_setserver(u8_t numdns, ip_addr_t *dnsserver); ip_addr_t dns_getserver(u8_t numdns);

No details, but that seems the function you need to set DNS servers. Cf. https://lists.gnu.org/archive/html/lwip-users/2010-11/msg00141.html

markusC64 avatar Dec 25 '23 16:12 markusC64

4 docs see: https://www.nongnu.org/lwip/2_1_x/group__dns.html

markusC64 avatar Dec 25 '23 17:12 markusC64

Unfortunately these calls are part of the raw API, which are not thread safe. It is illegal to call a mix of raw api calls and netapi calls.

GideonZ avatar Dec 25 '23 23:12 GideonZ