DNS

DNS stands for Domain Name System, which is a form of domain name resolution.

DNS maps static and easily human readable textual (rather than numerical) names to IP addresses. A domain name server resolves the text domain name to the appropriate IP address. For example, entering “ping www.freertos.org” in the command console of a desktop computer will show a ping request being sent to the IP address 195.8.66.1 (at the time of writing – the IP address may change) because a DNS server resolved the string “www.freertos.org” to the IP address 195.8.66.1.

If ipconfigUSE_DNS is set to 1 in FreeRTOSIPConfig.h then the FreeRTOS+TCP API function FreeRTOS_gethostbyname() can be used to resolve a text name to an IP address.

Like the IP address of the node running FreeRTOS+TCP, the IP address of a domain name server can be configured either statically as a parameter to FreeRTOS_IPInit(), or dynamically from a DHCP server.