CentOS 7 is not able to connect to internet on VM

Issues related to configuring your network
Post Reply
maverick10
Posts: 5
Joined: 2018/07/18 01:39:30

CentOS 7 is not able to connect to internet on VM

Post by maverick10 » 2018/07/18 04:42:16

I installed centos 7 on VMware workstation installed on windows 10.
I am not able to connect to internet.
On my windows, my ip is 192.168.0.17 to LAN and gw is 192.168.0.1
on centos i put ens33 ip address as 192.168.0.100 and gw as 192.168.0.1. I cant ping GW, dns 8.8.8.8

I already changed these parameters on /etc/sysconfigs/network-config/ifcfg-ens33
IPADD= 192.168.0.100
DNS1= 8.8.8.8
GW= 192.168.0.1
ONBOOT= YES

still i dont see any change.Am i giving wrong subnet on my vm machine? Any co-relation between windows ip setting and vm network setting?

IP setting on windows:-

Ethernet adapter VirtualBox Host-Only Network:

Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::4525:105:20c5:445e%20
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::6db2:636d:853f:8964%21
IPv4 Address. . . . . . . . . . . : 192.168.27.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :

Ethernet adapter VMware Network Adapter VMnet8:

Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::f447:80b6:3a8:733c%15
IPv4 Address. . . . . . . . . . . : 192.168.17.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :

tunk
Posts: 1205
Joined: 2017/02/22 15:08:17

Re: CentOS 7 is not able to connect to internet on VM

Post by tunk » 2018/07/18 10:57:57

You mention both VMware workstation and VirtualBox - which are you using?
Anyway, I guess this is a question about how you setup the virtual router/switch/nic/etc on your VM software.
Also, 192.168.0.100 may be inside the dhcp range of your router.

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

Re: CentOS 7 is not able to connect to internet on VM

Post by TrevorH » 2018/07/18 13:27:33

Also, if you aim to use an ip from the same subnet then the network adapter in the VM settings will need to be set to bridged mode (or whatever VMWare calls it). If you have it set to NAT mode and try to use an ip from the same subnet as the host then it 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

Post Reply