Build a small DNS resolver step by step: normalize names, walk referrals down from the root server, follow aliases, look up nameservers that come without an address, fall back when a server refuses, stop on cycles, then cache and resolve many names at once.