Not able to access internet on linux VM, windows host

Issues related to configuring your network
pdk
Posts: 22
Joined: 2015/01/20 13:00:36

Not able to access internet on linux VM, windows host

Post by pdk » 2017/07/27 09:42:20

Hi,

I had been trying to setup my centos VM on my work laptop, after a break, when my office moved physically.
Not sure if i changed some settings in my network related files, but i am not able to access internet from my home with my work laptop, after this.
Earlier I used to change the networking to NAT at my homeoffice and everything was ok.
I am very basic in networking and that too after break its all gone, please kindly help me.

Some of the usual files, you may need to identify the issue:

/etc/resolv.conf
# Generated by NetworkManager
# No nameservers found; try putting DNS servers into your
# ifcfg files in /etc/sysconfig/network-scripts like so:
#
# DNS1=xxx.xxx.xxx.xxx
# DNS2=xxx.xxx.xxx.xxx
# DOMAIN=lab.foo.com bar.foo.com


/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
BOOTPROTO=none
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth0"
UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03
HWADDR=08:00:27:F5:83:DB
IPADDR=192.168.21.56
PREFIX=16
LAST_CONNECT=1421849246

/etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE="eth1"
BOOTPROTO=dhcp
NM_CONTROLLED="no"
ONBOOT="no"
TYPE="Ethernet"
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth1"
HWADDR=08:00:27:C2:B6:61

thanks
pdk

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Not able to access internet on linux VM, windows host

Post by TrevorH » 2017/07/27 10:13:51

Your /etc/resolv.conf has no nameserver lines in it so name resolution will not work.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

pdk
Posts: 22
Joined: 2015/01/20 13:00:36

Re: Not able to access internet on linux VM, windows host

Post by pdk » 2017/07/27 12:35:19

Thanks a lot Trevor for reply and help.

sorry , for this basic q again,
i added following two lines to resolve.conf
nameserver 8.8.4.4
nameserver 8.8.8.8

by googling, not sure what it does, or i have forgotten.
But it didnt work. I restarted the vm, and those two lines disappered from my cnf file.

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Not able to access internet on linux VM, windows host

Post by TrevorH » 2017/07/27 12:59:25

The contents of the file tell you what to do if you use NetworkManager.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

pdk
Posts: 22
Joined: 2015/01/20 13:00:36

Re: Not able to access internet on linux VM, windows host

Post by pdk » 2017/07/27 13:21:31

Im still using centos 6, i think the network manager is in 7 ?

pdk
Posts: 22
Joined: 2015/01/20 13:00:36

Re: Not able to access internet on linux VM, windows host

Post by pdk » 2017/07/27 13:55:42

I tried to change the
/etc/sysconfig/network-scripts/ifcfg-eth0
from
DEVICE="eth0"
BOOTPROTO=none
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth0"
UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03
HWADDR=08:00:27:F5:83:DB
IPADDR=192.168.21.56
PREFIX=16
LAST_CONNECT=1421849246

to

DEVICE="eth0"
BOOTPROTO=dhcp
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth0"
UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03
HWADDR=08:00:27:F5:83:DB
IPADDR=192.168.21.56
PREFIX=16
LAST_CONNECT=1421849246

and now able to browse. But not sure why this was earlier like that..may be my test setup for testing something else will be broken..

Thanks a lot Trevor for your time and hints

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Not able to access internet on linux VM, windows host

Post by TrevorH » 2017/07/27 15:37:47

You switched from a static ip to a dhcp one. With dhcp your server will send you DNS server info and that gets written to the file. In static, you have to provide this for yourself.

Moved to the CentOS 6 forum since that's what you run.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

pdk
Posts: 22
Joined: 2015/01/20 13:00:36

Re: Not able to access internet on linux VM, windows host

Post by pdk » 2017/07/27 15:49:07

Thanks Trevor, but then, i wanted to keep the existing stuff as it is. Looks like that didnt happen.

Not sure, how i can have static and correct thisissue of browsing. Kindly Please let me know with the actual file changes to make this happen

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Not able to access internet on linux VM, windows host

Post by TrevorH » 2017/07/27 16:25:25

It told you how in the original

Code: Select all

/etc/resolv.conf
# Generated by NetworkManager
# No nameservers found; try putting DNS servers into your
# ifcfg files in /etc/sysconfig/network-scripts like so:
#
# DNS1=xxx.xxx.xxx.xxx
# DNS2=xxx.xxx.xxx.xxx
# DOMAIN=lab.foo.com bar.foo.com
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

pdk
Posts: 22
Joined: 2015/01/20 13:00:36

Re: Not able to access internet on linux VM, windows host

Post by pdk » 2017/07/28 11:45:49

Thanks a lot Trevor, sorry for the delay, but that change somehow didnt work for me.

Not sure how i can revert back to my static ip settings (may be i need more spoon feeding here as regards to networking), spoiled working in mnc with everything earlier done by nw admin ppl.

Post Reply