Sponsored Content
Operating Systems Linux Red Hat Problems with DHCP_HOSTNAME for RHEL5 and RHEL6 Post 302605286 by umar.shaikh on Wednesday 7th of March 2012 06:48:37 AM
Old 03-07-2012
Question Problems with DHCP_HOSTNAME for RHEL5 and RHEL6

Hi folks,

I have a weird problem.

I'm doing guest customization for Linux guests. During this process, I change the hostname, etc. For changing the hostname, I edit the /etc/sysconfig/network file and change the HOSTNAME field. I also add a new property called DHCP_HOSTNAME as my IP's are all DHCP based and I want my hostname to be registered in DNS.

The way I'm currently setting my DHCP_HOSTNAME is as follows:
Code:
DHCP_HOSTNAME=linuxHostname.domain.com

Now, the funny part. I'm doing the same for RHEL5 and RHEL6. It works perfectly in RHEL5.
The hostname is registered in DNS as linuxHostname.domain.com. Moreover, when I do an nslookup with the IP of this linux guest, I get the correct answer back as linuxHostname.domain.com.

But, when running with RHEL6, the name registered in DNS is linuxHostname.domain.com.domain.com !!
nslookup too returns back as linuxHostname.domain.com.domain.com

Any idea as to why this is happening?

A few points for readers:
1. The DHCP_HOSTNAME for me has to be within this file itself. I have read some posts for adding it within the ifcfg-eth0 file, but I am not sure that is an option for me.
2. I've seen that when I remove the .domain.com entry from the RHEL6 DHCP_HOSTNAME, the DNS name is registered correctly. i.e. as linuxHostname.domain.com

My questsion is in 2 parts:
1. Any idea why it works with RHEL5 and not with RHEL6?
2. Is it the right practice to add domain.com to the DHCP_HOSTNAME? Or is that the DNS's job? If I don't add the domain name, will it resolve to the correct DNS name automatically in a forest?
 

10 More Discussions You Might Find Interesting

1. Red Hat

whats new in rhel6

hi everyone please tell me what is new in rhel 6 version,than rhel 5 or rhel 5.5? (1 Reply)
Discussion started by: dipanjan123
1 Replies

2. Red Hat

3D effects on RHEL6 OC

Hello, I just installed RHEL6 OC on my T61p. It's great! Just for fun I'd like to use some fancy cool Desktop effects. I tried to enable 3D Desktop effects from OC Welcome Center but it gave me error message: Accelerated 3D graphics is not available. Desktop effects require hardware 3D support.... (7 Replies)
Discussion started by: susja
7 Replies

3. Red Hat

3d effects in rhel6

I installed rhel 6.0 in my laptop but it is not upporting 3d graphics of rhel6 and i am getting an error message "Accelerated 3d graphics not available Desktop effects require hardware 3D support." my laptop is dll studio 1558 and my graphic card is ATI Radeon 5470 with 1 gb dedicated ram. (6 Replies)
Discussion started by: nileshgupta
6 Replies

4. Red Hat

Installation of java on RHEL6

HI all, I am trying to install java on RHEL 6 in a vm. Can any one Help me How to install Java on RHEL6. (1 Reply)
Discussion started by: saisrinivas99
1 Replies

5. Red Hat

Facing problems installing KVM on RHEL6

I am running RHEL 6 on VirualBox/VMWare VM and on that VM i am trying to create a KVM virtual machine. Issue is that command "egrep 'vmx|svm' /proc/cpuinfo doesn't show my any results, so that lets me think if my processor doesn't support Virtualization technology. But it does and i have... (5 Replies)
Discussion started by: Rohit Bhanot
5 Replies

6. Red Hat

dual boot RHEL5 and RHEL6

have a server pre-installed with RHEL5, with 12 SCSI disks being /dev/sda with RHEL5, and managed to put RHEL6 into /dev/sdc /dev/sda is the first bootable disk on the SCSI chain.. editing /etc/grub.conf would not allow me to boot RHEL6 , the entries seem to be right.. any advices,... (0 Replies)
Discussion started by: ppchu99
0 Replies

7. Red Hat

Mount problem in RHEL6

Hi Folks, I am trying to mount an AIX server in Linux 6, I am able to mount the path under the mount point of /mnt and also can view on df -h. But, under the /mnt there is no content ... its empty. (6 Replies)
Discussion started by: gsiva
6 Replies

8. Red Hat

Start problem rhel6

what can i do now??? please help me.... (12 Replies)
Discussion started by: shakilbd
12 Replies

9. Red Hat

Chroot DNS RHEL6

Hi, Just installed BIND on rhel6 as a primary new DNS server and all went well, digging and resolving as it should. However, all zone files are listed in the /var/named dir as well as the /var/named/chroot/var/named. Although no dynamic links are shown, they are. This doesn't seem secure to me,... (2 Replies)
Discussion started by: Duffs22
2 Replies

10. Red Hat

Prod runs RHEL6 but pprod uses RHEL5??

Hi, I am currently building out a new production environment. Our current prod env uses RHEL5.8 but I am thinking of building out a RHEL6 environment since a complete end-to-end testing will need to take place prior to go-live anyway. Plus it is an ideal time to upgrade the OS across the... (4 Replies)
Discussion started by: Duffs22
4 Replies
HOSTNAME(1)						     Linux Programmer's Manual						       HOSTNAME(1)

NAME
hostname - show or set the system's host name domainname - show or set the system's NIS/YP domain name dnsdomainname - show the system's DNS domain name nisdomainname - show or set system's NIS/YP domain name ypdomainname - show or set the system's NIS/YP domain name nodename - show or set the system's DECnet node name SYNOPSIS
hostname [-v] [-a] [--alias] [-d] [--domain] [-f] [--fqdn] [-i] [--ip-address] [--long] [-s] [--short] [-y] [--yp] [--nis] [-n] [--node] hostname [-v] [-F filename] [--file filename] [hostname] domainname [-v] [-F filename] [--file filename] [name] nodename [-v] [-F filename] [--file filename] [name] hostname [-v] [-h] [--help] [-V] [--version] dnsdomainname [-v] nisdomainname [-v] ypdomainname [-v] DESCRIPTION
Hostname is the program that is used to either set or display the current host, domain or node name of the system. These names are used by many of the networking programs to identify the machine. The domain name is also used by NIS/YP. GET NAME When called without any arguments, the program displays the current names: hostname will print the name of the system as returned by the gethostname(2) function. domainname, nisdomainname, ypdomainname will print the name of the system as returned by the getdomainname(2) function. This is also known as the YP/NIS domain name of the system. nodename will print the DECnet node name of the system as returned by the getnodename(2) function. dnsdomainname will print the domain part of the FQDN (Fully Qualified Domain Name). The complete FQDN of the system is returned with host- name --fqdn. SET NAME When called with one argument or with the --file option, the commands set the host name, the NIS/YP domain name or the node name. Note, that only the super-user can change the names. It is not possible to set the FQDN or the DNS domain name with the dnsdomainname command (see THE FQDN below). The host name is usually set once at system startup in /etc/rc.d/rc.inet1 or /etc/init.d/boot (normally by reading the contents of a file which contains the host name, e.g. /etc/hostname). THE FQDN You can't change the FQDN (as returned by hostname --fqdn) or the DNS domain name (as returned by dnsdomainname) with this command. The FQDN of the system is the name that the resolver(3) returns for the host name. Technically: The FQDN is the name gethostbyname(2) returns for the host name returned by gethostname(2). The DNS domain name is the part after the first dot. Therefore it depends on the configuration (usually in /etc/host.conf) how you can change it. Usually (if the hosts file is parsed before DNS or NIS) you can change it in /etc/hosts. OPTIONS
-a, --alias Display the alias name of the host (if used). -d, --domain Display the name of the DNS domain. Don't use the command domainname to get the DNS domain name because it will show the NIS domain name and not the DNS domain name. Use dnsdomainname instead. -F, --file filename Read the host name from the specified file. Comments (lines starting with a `#') are ignored. -f, --fqdn, --long Display the FQDN (Fully Qualified Domain Name). A FQDN consists of a short host name and the DNS domain name. Unless you are using bind or NIS for host lookups you can change the FQDN and the DNS domain name (which is part of the FQDN) in the /etc/hosts file. -h, --help Print a usage message and exit. -i, --ip-address Display the IP address(es) of the host. -n, --node Display the DECnet node name. If a parameter is given (or --file name ) the root can also set a new node name. -s, --short Display the short host name. This is the host name cut at the first dot. -V, --version Print version information on standard output and exit successfully. -v, --verbose Be verbose and tell what's going on. -y, --yp, --nis Display the NIS domain name. If a parameter is given (or --file name ) then root can also set a new NIS domain. FILES
/etc/hosts AUTHOR
Peter Tobias, <tobias@et-inf.fho-emden.de> Bernd Eckenfels, <net-tools@lina.inka.de> (NIS and manpage). Steve Whitehouse, <SteveW@ACM.org> (DECnet support and manpage). net-tools 28 Jan 1996 HOSTNAME(1)
All times are GMT -4. The time now is 06:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy