DNSclient is not picking up hostname from DNSserver but it is able to ping it - linux

I Have Window 7 as Host Machine and I have installed Redhat 5.3 and Centos 5.4 as Vmware Machines under Window 7 through Vmware Workestation.I configure DNS & DHCP in Redhat 5.3(10.0.0.1) and able to do nslookup & DIG in this.I am able to ping window 7,redhat,centos with each other.
I have made one entry client30.example.com for ip 10.0.0.30 in forword and backword lookup file in DNS server(10.0.0.1).
Problem :-
Centos whom i have made dhcp client of Redhat(10.0.0.1) is able to get ip from dhcp server and it gets ip 10.0.0.30 (as i wanted no problem till now)
But Centos is not picking up hostanme client30.example.com as i have bind entry of ip 10.0.0.30 with client30.example.com.
Still it is picking up hostname localhost.localdomain. I check /etc/resolve.conf file of centos and i found that by default it picks nameserver 192.168.1.1(even i have not provided this ip anywhere).Everytime i made manual change in this ip again it pics same ip on reboot.
Kindly help how i can resolve this problem.

Because VMware Workstation is itself DHCP. Please disable DHCP in VMware Workstation, You can't run two DHCP in single network subnet.
Also check /etc/sysconfig/network file, Hostname coming from there.

Related

gnome network manager: no internet, ping works, dig #8.8.8.8 works

Running opensuse tumbleweed with 4.7.5-1-default kernel and gnome.
Network managed with gnome's network-manager. Network (wired and wireless) connect to my router.
ping works also to external IPs
dig works if I provide the dns ip (eg. 8.8.8.8)
nmcli dev show | grep DNS shows the right nameservers (which I set in
the network managers interface): 8.8.8.8 and 8.8.4.4,
but dig without specification of the dns IP does not work
ping etc. to internet names (e.g. google.com) does not work.
Am completely lost by now. Help greatly appreciated.
(Matt stated the solution in his comment but I failed to understand it.)
Solution found on opensuse forum: the /etc/resolve.conf file was corrupted (empty). After deleting it and rebooting, the system (network-manager?) generated a new, working version. It contains the ip of the nameserver.

Unknown host connecting to internet in ubuntu

I tried to connect to my wifi network but i am not able to connect through my laptop .My other device at home are able to connect to internet. I am using ubuntu 16.04 LTS . I set my browser proxy to no proxy . I have no antivirus installed .
I tried to ping -c 5 (google .com and facebook.com) in terminal its showing unknown host google.com and unknown host facebook.com and tried to install eclipse while downloading it shows error java error unknown host .
Please help me to solve this issue.
Sounds like DNS may not have been configured when you connected to the network. This should normally happen automatically, but you can check by looking at the file /etc/resolv.conf. There should be at least one line in the file containing nameserver and an IP address.
If there are no nameserver lines, or if there's only one and it says nameserver 127.0.0.1, then you can try to use Google's public DNS by adding the line nameserver 8.8.8.8 (replacing the 127.0.0.1 if that's present).
Like everyone, I had to face this issue. So what did I do to address this issue?
1) I configured my Ubuntu server to have two network interfaces (NAT and Intnet).
2) In /etc/network/interfaces , I added the following lines:
auto enp0s8
iface enp0s8 inet static
address 192.168.10.23
dns-nameservers 8.8.8.8 8.8.4.4
3) Restarted the network - /etc/init.d/networking restart
Result: ping google.com worked.
I hope this helps you in resolving this issue :)

How to install whm,cPanel in my laptop?

I want to install whm & cpanel in my laptop. I install centOs 6.4 using oracle virtualBox as per instruction/iso in http://www.comunidadhosting.com/t/tutorial-de-como-instalar-cpanel-en-localhost.18879/.
After install it i check IP and it show me 10.0.2.15 . but my main problem is I am not able ping to guest machine from my host. When I ping from my guest to host machine then it's working fine , and host get internet access also.
I use NAT in networking.
Can any body tell me what is the problem and how to solve it ?
You need to check if you have a bridged connection OR a NAT connection with the outside host network. Both should have the same network connection and IP may be same/different.
And, if you have done this, then you need to disable the firewall on the guest-machine side so that your host machine could connect to the VM.
Your ping may then be failing because of getting blocked by the VM's firewall.

Moving a VirtualBox .vdi Linux machine to a new host computer

I've been happily using an Ubuntu 12.04 VM as a webserver with a static IP running on VirtualBox on my Windows 7 machine for a few months (working on it from the host computer, bridged network connection, accessing via SSH from host and sharing folders through windows).
In /etc/network/interfaces, I've got:
address 192.168.1.112
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
dns-nameservers 194.168.4.100 194.168.8.100
I tried creating a new VM with it on my Win7 laptop by copying across the .vdi and creating a new VirtualBox machine with it, then changing the static IP to 192.168.1.116, but I'm not getting any network... It can't ping anything, when I try to SSH into the VM, it says "connection rejected" and it doesn't show up anywhere in my Windows network.
Can anyone shed any light?
"Perryg" on the VirtualBox forums solved it:
Edit the /etc/udev/rules.d/70-persistent-net.rules, or you can delete the rules and Linux will configure it on the next boot.
That's all there was to it.

DNSClient is Not able to ping DNSserver by its hostname BUT able to ping by its IP

I have Two Linux Machine Redhat & Centos Under Window 7(as host) In Vmware Workstation.
I configure DNS server & DHCP Server in Redhat(10.0.0.1).
Client which is Centos is able to get IP(10.0.0.30) from DHCP server but it is not picking up name from DNS Server.
Problem is At server 10.0.0.1 i am able to ping itself by hostname like
root#server->ping server.example.com Ping successfull
But Client is not able to ping Server by Hostname like
root#localhost->ping server.example.com Ping Not Successfull
Client is able to ping Server by its ip like
root#localhost->ping 10.0.0.1 Ping Successfull
Now My questn is that Why Client is not able to ping server by its hostname & why client is not picking up name from DNS server,
Just had similar issue on my Debian VM running on a Win7 host.
Setting up DNS server isn't enough to resolve server name, especially when proxy is used in your network environment.
To solve it, you've to export http_proxy environment variable on command line before calling other executables. For example:
export http_proxy="http://{your proxy ip address here}:{your proxy port here}"
As usual, remember to add it to your profile script so you don't redo it after each boot.

Resources