The hostnames you assign to your machines can be whatever you want. I like to add an A record for the name I pick to DNS, but that's optional. For your internal (LAN) addresses, just use /etc/hosts.
For example, here's one of my nodes:
Code:
dfelicia@catch-22 ~ $ hostname
catch-22
dfelicia@catch-22 ~ $ hostname -f
catch-22.donsbox.com
dfelicia@catch-22 ~ $ cat /etc/hosts
# IPv4 localhost aliases
127.0.0.1 localhost
207.192.69.157 catch-22.donsbox.com catch-22
192.168.133.15 jigani.local
192.168.133.149 donsbox.local
dfelicia@catch-22 ~ $ nslookup catch-22.donsbox.com
Server: 207.192.69.4
Address: 207.192.69.4#53
Non-authoritative answer:
Name: catch-22.donsbox.com
Address: 207.192.69.157
dfelicia@catch-22 ~ $ nslookup 207.192.69.157
Server: 207.192.69.4
Address: 207.192.69.4#53
Non-authoritative answer:
157.69.192.207.in-addr.arpa name = donsbox.com.
Authoritative answers can be found from:
69.192.207.in-addr.arpa nameserver = ns1.nac.net.
69.192.207.in-addr.arpa nameserver = ns2.nac.net.
So for LAN (which I use for distcc), I use the .local hostnames. I bind apache, dovecot, etc. to desired DNS name.