Network Ping

General support questions
rajeshk
Posts: 8
Joined: 2017/06/20 10:01:12

Network Ping

Post by rajeshk » 2017/06/20 10:17:08

Team,

i know this is a common issue but cant get help myself . tried various methods sourcing from google but in vial. finally posting for help.

Need some help in networking the Centos 6.9 minimal.i was trying for ping from host to guest and vice-versa but with no help.

Below are the details:
Centos 6.9 Minimal installed on VirtualBox as guest OS
Host OS is Win 10 (Corporate Laptop,so this has restricted access and IPs)

Centos:
Bridge network

vi /etc/resolve.conf

;generated by /sbin/dhclient-script
nameserver 10.201.50.100
nameserver 10.201.50.200

eth0 shows:

Device=etho
HWADDR=***
TYPE=ETHERNET
UUID=***
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=static

IPADDR=192.168.56.1
NETMASK=255.255.255.0
GATEWAY=10.211.15.1

ping 8.8.8.8
connect: network is unreachable

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

Re: Network Ping

Post by TrevorH » 2017/06/20 10:28:16

IPADDR=192.168.56.1
NETMASK=255.255.255.0
GATEWAY=10.211.15.1
Your GATEWAY needs to be in the same subnet as your IPADDR/NETMASK. Yours is not.
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

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: Network Ping

Post by gerald_clark » 2017/06/20 14:34:29

That looks like a host-only network address, not a bridge.

rajeshk
Posts: 8
Joined: 2017/06/20 10:01:12

Re: Network Ping

Post by rajeshk » 2017/06/21 09:14:53

Changed gateway to 192.168.56.5

still cant ping any host.

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

Re: Network Ping

Post by tunk » 2017/06/21 10:37:24

I've used VirtualBox a little bit and I seem to remember that it works if you set the VM to use DHCP.
EDIT: Sorry, I was wrong. Just fired up a CentOS 7 VM and it gets it's IP address from an external DHCP server.

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

Re: Network Ping

Post by TrevorH » 2017/06/21 11:29:16

The 192.168.56 addresses sound like those used for NAT purposes by VMware/VBox and it would be most unusual for the host to have an ip address ending in .5 to be used for the gateway. Normally the host gets .1 and the guests get higher numbered ip addresses. The fact that you have .1 hard coded as the ip address also sounds like it might be in conflict with the address on the host.
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

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

Re: Network Ping

Post by tunk » 2017/06/21 11:41:37

After experimenting a bit, it looks like it might work if you change from "bridged adapter" to "NAT" in the VirtualBox Network device settings for you VM. And then using DHCP on your VM network setup. In my case I get an address like 10.0.x.y.

rajeshk
Posts: 8
Joined: 2017/06/20 10:01:12

Re: Network Ping

Post by rajeshk » 2017/06/21 12:32:39

tunk wrote:After experimenting a bit, it looks like it might work if you change from "bridged adapter" to "NAT" in the VirtualBox Network device settings for you VM. And then using DHCP on your VM network setup. In my case I get an address like 10.0.x.y.
will try this and let you know,.

rajeshk
Posts: 8
Joined: 2017/06/20 10:01:12

Re: Network Ping

Post by rajeshk » 2017/06/21 13:36:21

rajeshk wrote:
tunk wrote:After experimenting a bit, it looks like it might work if you change from "bridged adapter" to "NAT" in the VirtualBox Network device settings for you VM. And then using DHCP on your VM network setup. In my case I get an address like 10.0.x.y.
will try this and let you know,.
tried this, now after ping it sends package but wont receive any package 100% loss of package.

before it was host unreachable while doing ping.

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

Re: Network Ping

Post by tunk » 2017/06/21 15:00:56

Does ping 8.8.8.8 work on your host OS?
What is the VM ip address?
How does your ifcfg-eth0 now look like?

If ping doesn't work on your host, then your company firewall may block it.
If so, run these two commands as root:
yum install nmap
nmap -p 80,443 http://www.centos.org
If the network is working, then the second command should show that the two ports are open.
EDIT: logical short circuit, if the first does work, then you have network.
Last edited by tunk on 2017/06/21 15:16:29, edited 2 times in total.

Post Reply