Macs don't store configuration information in flat files like most historical UNIX systems do and instead rely on various directory services.
Depending on how you configure the services (and which version of OS you run), the actual storage mechanism and location varies.
What will work is simply making a shell script to dump all the network information you care to document.
domain name # will dump NIS domain if set
grep ^search /private/etc/resolv.conf # will list DNS search domains
grep ^nameserver /private/etc/resolv.conf # will list DNS servers by IP or name
As you see, even though the DNS information is stored in a directory, the OS will automatically generate a flat file in some cases since most programs look for and parse that file.
Should you need a primer on every command likely to be of use in tracking networking, you should run this command and then poke over the tar.gz report that gets saved to your desktop. It is a wealth of diagnostic data and shows how to dump mDNS information better than the manual pages and most written manuals.
/System/Library/Frameworks/SystemConfiguration.framework/Resources/get-mobility-info
hostname
? – Josh Hunt Mar 12 '13 at 9:17