1

I installed a RHEL virtual machine with Virtual Box and I can't ping my host computer nor internet.

I configured 2 adapters:

  1. Attached to NAT, promiscuous allow all and cable connected
  2. Atteched to Bridged Adapter, promiscuous allow all and cable connected

When I run ip addr show, here is the output:

ip addr show output

Thank you.

3
  • First of all, the eth0 has no IP address. So either it receives it from VirtualBox or you should assign it with some of the NAT IP segment (probably 192.168.x.x - you should be able to find it in virtualbox somewhere). The eth1 has no connection (virtual wire) as it says it has NO-CARRIER and is not in LOWER_UP state. – Jaroslav Kucera Apr 12 '18 at 11:59
  • Thank you for your clarifications. Can I assign an ip adress to eth0? – elpha01 Apr 12 '18 at 12:01
  • Yes, from proper IP segment. – Jaroslav Kucera Apr 12 '18 at 12:24
1

Thanks to Jaroslav Kucera who said that I should assign an ip to eth0.

I followed this article

I modified /etc/sysconfig/network and /etc/sysconfig/network-scripts/ifcfg-eth0 for DHCP then reboot.

Now I can ping internet.

1

An additional contribution after chasing the very same complaint for two days: I learned to look for the work " UP " in the NIC line and the br0 line (if present, as they are with virtual machines). I use routinely for both CentOS 7 and RHEL 7 the commands:

# ip  link  set  br0  down
# ip  link  set  br0  up 
# systemctl  reboot

Verify the primary NICs have an " UP " status as well. They usually do.

0

Had similar issue

Check that you have following added to: /etc/sysconfig/network:

NETWORKING=yes
HOSTNAME=my-hostname

Make sure you have configuration file in respective place (according to your device name): /etc/sysconfig/network-scripts/ifcfg-enp0s3 in my case:

NAME=enp0s3
DEVICE=enp0s3
ONBOOT=yes

Then run: ifup enp0s3
(your device name can be different, for example eth0, so double check that)

Also this command sudo service networking restart might help in some cases.

Related issue: https://serverfault.com/questions/660210/cant-start-centos-7-network-service

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.