I have CentOS 6.7 x64 (Final) Desktop standard installation, on a dedicated pc (not on a VM), Linux version 2.6.32-573.el6.x86_64 (gcc version 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC) ).
I've configured my /etc/sysconfig/network-scripts/ifcfg-eth0 file as follow:
DEVICE=eth0
HWADDR=A4:5D:36:66:39:82
TYPE=Ethernet
UUID=36d492f3-cf76-4472-b8f1-b855d4af724d
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=none
IPADDR=192.168.1.2
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
DNS1=8.8.8.8
DNS2=8.8.4.4 ,
then:
chkconfig network on
service network start
After, I've modified my /etc/hosts and /etc/sysconfig/network as:
192.168.1.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.1.2 srvr1.cloud.priv ,
then:
service network restart .
As result, I've got that I can go on the web (I'm on with this configuration by now), but when I run:
hostname --fqdn ,
it returns:
hostname: No address associated with name
instead of a correct FQDN response.
I would need to know how to solve this situation and get the right output.
PS: I don't know if it has something to do with this problem, but my modem-router has the DHCP activated and the provider does not allow to disable it (or better, it can not be disabled by the user with official versions of the firmware).