I had to change my IP addressing (because the Airport Extreme didn’t support 10.15.5.12/24). During the DNS modification, I couldn’t reach some of the machines. Obvisously, the Mac was keeping the old IP address in cache.
To flush your local DNS cache, just run:
# sudo dscacheutil -flushcache
Source 10.5: Flush DNS cache