No Internet Connection on VMware CentOS 6.5

Issues related to configuring your network
Post Reply
sandeep5041
Posts: 1
Joined: 2017/05/13 14:01:28

No Internet Connection on VMware CentOS 6.5

Post by sandeep5041 » 2017/05/13 14:18:40

I am facing a similar issue. As I don't have much knowledge on network admin part, i am unable to fix this issue.
Any help on this is greatly appreciated.
[Moderator: post was split away from an old dead thread: viewtopic.php?f=16&t=56639 ]

I have setup Centos 6.5 in Wndows 7 on VMWare workstation 11.0.
Using "Bridged" network connection in network adapter settings.
Using WIFI at home.

Below is the setting in Centos VMWare workstation.

[root@ ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
ONBOOT="yes"
NM_CONTROLLED="no"
TYPE=Ethernet
IPADDR="192.168.56.10"
NETMASK="255.255.255.0"
BOOTPROTO=static
DNS1=192.168.1.1

[root@ ~]# cat /etc/resolv.conf
nameserver 192.168.1.1
nameserver 8.8.8.8

Below is the IP config output from my local windows:

C:\Users\>ipconfig

Windows IP Configuration


Ethernet adapter Bluetooth Network Connection:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :

Wireless LAN adapter Wireless Network Connection:

Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::5904:e4a:64a6:5c23%15
IPv4 Address. . . . . . . . . . . : 192.168.1.2
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1

Ethernet adapter Local Area Connection 3:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :

Ethernet adapter VirtualBox Host-Only Network:

Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::19dc:a10c:ce43:c2da%32
IPv4 Address. . . . . . . . . . . : 192.168.56.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :

Ethernet adapter VMware Network Adapter VMnet1:

Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::b493:66c:d1f6:716f%40
IPv4 Address. . . . . . . . . . . : 192.168.37.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :

Ethernet adapter VMware Network Adapter VMnet8:

Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::289e:9f66:aaf:4176%41
IPv4 Address. . . . . . . . . . . : 192.168.83.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :


I am able to connect to VMware from putty using "192.168.56.10" IP address. But when i execute any command which needs internet connection , it fails. An example is provided below.

[root@ ~]# yum install createrepo
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6 ... 64&repo=os error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
Error: Cannot find a valid baseurl for repo: base

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

Re: No Internet Connection on VMware CentOS 6.5

Post by TrevorH » 2017/05/14 10:33:22

First off: don't use 6.5. It's old, unmaintained and out of date and has severe security vulnerabilities. Make sure you run yum update as soon as you can once you have a network connection so that you are running 6.9. Running 6.5 is crazy.

You have no GATEWAY= line in your ifcfg file. If you don't have one in /etc/sysconfig/network then you will have no default route and nothing outside your own LAN addresses will be reachable.

You also appear to have both VirtualBox and VMWare installed and running at the same time as your Windows ipconfig output shows virtual adapters with addresses of 192.168.56.1 (vbox) and 192.168.37.1 (VMWare) and 192.168.83.1 (also VMWare). Since 192.168.56 belongs to VirtualBox and not VMWare I suspect that you shouldn'r be using those addresses at all but picking one of 192.168.37 or .81. However, since you say you're using bridged mode networking, both of those are probably wrong and you should really be using an ip address in the same subnet as your host - 192.168.1.x.

So, my thoughts are: first pick ONE of VirtualBox OR VMWare and stick to it. Don't try to run both at the same time. If you use bridged mode networking then you should probably be using an ip address within the same subnet as your host machine and using the same gateway ip that that uses. If you want to use a 192.168 address that isn't in 192.168.1.0/24 then you should probably be using a NAT network mode not bridged.
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

Post Reply