FreeRTOS-Plus-TCP example cannot set host name

I followed the tutorial [FreeRTOS-Plus-TCP and FreeRTOS-Plus-FAT Examples] on this site, and encountered an issue. While I can successfully ping the server using the IP address assigned by DHCP, I cannot ping it using the hostname defined by the mainHOST_NAME macro. (shown in the image below)

I observed that the mainHOST_NAME macro is referenced only once in the code attached, and it doesn’t meet the #if condition by default. I tried manually enabling this condition and setting ipconfigDHCP_REGISTER_HOSTNAME to 1, but the issue persists.

What could be the possible reasons for this, and how can I resolve it?

#if ( ipconfigUSE_LLMNR != 0 ) || ( ipconfigUSE_NBNS != 0 ) || ( ipconfigDHCP_REGISTER_HOSTNAME == 1 )

    const char * pcApplicationHostnameHook( void )
        /* Assign the name "FreeRTOS" to this network node.  This function will
         * be called during the DHCP: the machine will be registered with an IP
         * address plus this name. */
        return mainHOST_NAME;

this may need additional support from your dhcp server.