Arm Mbed OS support forum

Disable MBed OS DNS altogether


I am using MBed OS in a very controlled environment, where every device has its own static IP address. Furthermore there are rather tight restrictions on the application size, so I am looking into reducing the size of the final binary as much as possible.

When looking at the map file I noticed that the DNS part of the ethernet stack does use quite a lot of room. I don’t need DNS, as outlined above, so I had a look into disabling it. As far as I can tell there is no way of doing it other than editing the LWIP options and part of the LWIPInterface class.

Question: Is there a easier way of disabling DNS in the LWIP stack or MBed OS in general? Was this use-case considered at any point?

Further Info: I am currently using Mbed Os 6.2 with the corresponding mbed-cli tools. The development boards I use are the NUCLEO-L552ZE-Q with an external EMAC and the NUCLEO-H743ZI, although other NUCLEO boards are available and could be tested.

Any advice or thoughts are appreciated :slight_smile: