Ubuntu 12

1. Edit machine hostname:

# hostname <yourhostname>

2. Edit /etc/dhcp/dhclient.conf and add the following:

send host-name "<yourhostname>";

3. Restart dhclient:

# dhclient eth0

4. Restart networking:

# service networking restart

 

Cent OS 6 

1. Edit machine hostname:

# hostname <yourhostname>

2. Edit /etc/sysconfig/network-scripts/ifcfg-eth0 and add the following:

DHCP_HOSTNAME=<yourhostname>

3. Edit /etc/sysconfig/network and add the following:

HOSTNAME=<yourhostname>

4. Create and edit /etc/dhcp/dhclient.conf and add the following:

send fqdn.fqdn "<yourhostname>.yawningpanda.com.";
send fqdn.encoded on;
send fqdn.server-update off;
also request fqdn, dhcp6.fqdn; 

Replace yawningpanda.com with your domain.
The "." after the domain is intentional so be sure to include it.

5. Restart networking:

# service network restart