Can’t Reach Internet
I’m having some issues with Internet access from CentOS7 server which is installed in Vmware Workstation 10.0.3 build-1895310 in Windows 7 x64. At this point I can’t get if the error is on CentOS configuration or it’s another problem so I leave here what I did in order to get Internet working on that VM.
1) */etc/resolv.conf*
# Generated by NetworkManager nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 4.2.2.2
2) */etc/sysconfig/network*
# Created by anaconda HOSTNAME=webserver DNS1=8.8.8.8
DNS2=8.8.4.4
DNS3=4.2.2.2
3)* /etc/sysconfig/network-scripts/ifcfg-eno16777728*
TYPE=Ethernet BOOTPROTO=dhcp DEFROUTE=yes NAME=”Internet Eth0″
UUID
79e5fc-ee8a-41eb-93dd-a76e3cb8c7c1
ONBOOT=yes HWADDR :50:56:2E:E2:4
4) ifconfig -a
*eno16777728*: flagsA63
inet 192.168.1.112 netmask 255.255.255.0 broadcast 192.168.1.255
ether 00:50:56:2e:e2:45 txqueuelen 1000 (Ethernet)
RX packets 186 bytes 20568 (20.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 31 bytes 4956 (4.8 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
*eno33555200*: flagsA63
inet 192.168.3.131 netmask 255.255.255.0 broadcast 192.168.3.255
ether 00:50:56:3f:86:30 txqueuelen 1000 (Ethernet)
RX packets 1016 bytes 106110 (103.6 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 859 bytes 108641 (106.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
*lo*: flagss
inet 127.0.0.1 netmask 255.0.0.0
loop txqueuelen 0 (Local Loopback)
RX packets 8 bytes 552 (552.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 8 bytes 552 (552.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
*eno16777728 *is the interface that should access to Internet since this is the one I’ve configured in Vmware as bridged (connected directly to the physical network interface of host) and also it’s replicating physical network connection. When I try to ping any as for example: www.google.com DNS are not responding, see below:
# ping google.com ping: unknown host google.com
Is something wrong in my configuration? I have some others CentOS 6.5 VM
running on the same Vmware Workstation and all of them can access Intertnet but this one not. Any help?
Thx
9 thoughts on - Can’t Reach Internet
Check default route.. If installed: mtu 1500 mtu 1500 mtu 65536
—
Enviado pelo aplicativo muMail para Android domingo, 31 agosto 2014, 05:53PM -03:00 de “reynierpm@gmail.com”
I’m having some issues with Internet access from CentOS7 server which is installed in Vmware Workstation 10.0.3 build-1895310 in Windows 7 x64. At this point I can’t get if the error is on CentOS configuration or it’s another problem so I leave here what I did in order to get Internet working on that VM.
1) */etc/resolv.conf*
# Generated by NetworkManager nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 4.2.2.2
2) */etc/sysconfig/network*
# Created by anaconda HOSTNAME=webserver DNS1=8.8.8.8
DNS2=8.8.4.4
DNS3=4.2.2.2
3)* /etc/sysconfig/network-scripts/ifcfg-eno16777728*
TYPE=Ethernet BOOTPROTO=dhcp DEFROUTE=yes NAME=”Internet Eth0″
UUID=0a79e5fc-ee8a-41eb-93dd-a76e3cb8c7c1
ONBOOT=yes HWADDR=00:50:56:2E:E2:4
4) ifconfig -a
*eno16777728*: flags=4163
inet 192.168.1.112 netmask 255.255.255.0 broadcast 192.168.1.255
ether 00:50:56:2e:e2:45 txqueuelen 1000 (Ethernet)
RX packets 186 bytes 20568 (20.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 31 bytes 4956 (4.8 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
*eno33555200*: flags=4163
inet 192.168.3.131 netmask 255.255.255.0 broadcast 192.168.3.255
ether 00:50:56:3f:86:30 txqueuelen 1000 (Ethernet)
RX packets 1016 bytes 106110 (103.6 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 859 bytes 108641 (106.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
*lo*: flags=73
inet 127.0.0.1 netmask 255.0.0.0
loop txqueuelen 0 (Local Loopback)
RX packets 8 bytes 552 (552.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 8 bytes 552 (552.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
*eno16777728 *is the interface that should access to Internet since this is the one I’ve configured in Vmware as bridged (connected directly to the physical network interface of host) and also it’s replicating physical network connection. When I try to ping any as for example: http://www.google.com DNS are not responding, see below:
# ping google.com ping: unknown host google.com Is something wrong in my configuration? I have some others CentOS 6.5 VM
running on the same Vmware Workstation and all of them can access Intertnet but this one not. Any help?
Thx
What you mean with check default route?
79e5fc-ee8a-41eb-93dd-a76e3cb8c7c1
$ route -n
the one listed as gateway is your default route.
79e5fc-ee8a-41eb-93dd-a76e3cb8c7c1
Ok, since my default route is bad,
# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.3.1 0.0.0.0 UG 1024 0 0
eno33555200
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0
eno16780032
192.168.3.0 0.0.0.0 255.255.255.0 U 0 0 0
eno33555200
I tried this two ways:
1) */etc/sysconfig/network*
Add line GATEWAY2.168.1.1
Restart the newtork service:
# service network restart Restarting network (via systemctl): [ OK ]
# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.3.1 0.0.0.0 UG 1024 0 0
eno33555200
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0
eno16780032
192.168.3.0 0.0.0.0 255.255.255.0 U 0 0 0
eno33555200
Still no changes
2) */etc/sysconfig/network-scripts/ifcfg-eno16777728*
Add line GATEWAY2.168.1.1
Restart the newtork service:
# service network restart Restarting network (via systemctl): [ OK ]
# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.3.1 0.0.0.0 UG 1024 0 0
eno33555200
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0
eno16780032
192.168.3.0 0.0.0.0 255.255.255.0 U 0 0 0
eno33555200
Still no changes
What I’m doing wrong? Every time I do a network change/configuration I need to restart the complete OS in order changes to take effect, why?
Because if for any reason WAN is down then I can reach the VM trough the DHCP assigned IP I though
Because this is not the problem, as I mention before I have another VM
running on the same Vmware and all of them has Internet access so the problem is here with this one at some part but I’m able to find it
grep 192.168.3.1 /etc/sysconfig/network-scripts/*
alternately, is the 192.168.3.x interface being configured by DHCP?
perhaps its DHCP server is handing out that gateway.
Ok, now I’ve fixed the Internet connection by running this command: ip route replace default via 192.168.1.1 but now I have two default routes:
# ip route show default via 192.168.1.1 dev eno16780032
default via 192.168.3.1 dev eno33555200 proto static metric 1024
192.168.1.0/24 dev eno16780032 proto kernel scope link src 192.168.1.112
192.168.3.0/24 dev eno33555200 proto kernel scope link src 192.168.3.131
Is that right? How do I remove the second one? (default via 192.168.3.1 dev eno33555200 proto static metric 1024)
# grep 192.168.3.1 /etc/sysconfig/network-scripts/*
/etc/sysconfig/network-scripts/ifcfg-local:IPADDR2.168.3.131
/etc/sysconfig/network-scripts/ifcfg-local:GATEWAY2.168.3.1
No, it’s handled static:
TYPE=Ethernet ONBOOT=yes BOOTPROTO=static IPADDR2.168.3.131
GATEWAY2.168.3.1
NETMASK%5.255.255.0
NAME=”Local Eth1″
UUID
79e5fc-ee8a-41eb-93dd-a76e3cb8c7c1
HWADDR :50:56:3F:86:30
localhost shouldn’t have a gateway. or that IP
hmm, I don’t even have a ifconfig-local, just a ifcfg-lo, and it reads…
[root@new network-scripts]# more ifcfg-lo DEVICE=lo IPADDR7.0.0.1
NETMASK%5.0.0.0
NETWORK7.0.0.0
# If you’re having problems with gated making 127.0.0.0/8 a martian,
# you can change this to something else (255.255.255.255, for example)
BROADCAST7.255.255.255
ONBOOT=yes NAME=loopback