Page 1 of 1

No network on CentOS

Posted: 31. Jan 2018, 19:37
by newbie2018
Host is laptop Windows 10 version 1709
VirtualBox version 5.2.6 r 120293
Guest CentOS-7-x86_64 DVD-1708 - installation options Server with GUI

I'm not sure what is going on with Virtualbox or Centos; but, I cannot get any network to work with the setting above. CentOS will install and run, but no network. Cannot ping, web browser doesn't work, ifconfig just has loopback. No eth0 on /etc/sysconfig/network-scripts/.

Please ask any questions as I have no idea what other info to provide.

Thank you for viewing.

Re: No network on CentOS

Posted: 31. Jan 2018, 19:53
by mpack
Please post a VM log file. With the VM fully shut down, right click and "Show Log" in the GUI, save "VBox.log" (no other file) to a zip, and attach the zip here.

Re: No network on CentOS

Posted: 31. Jan 2018, 21:38
by newbie2018
Thank you for replying. Attached is the vbox.log.

Re: No network on CentOS

Posted: 1. Feb 2018, 09:45
by andyp73
A quick scan of the log file and it looks to me (it is early and the caffeine hasn't kicked in yet) like there is a network adapter defined.

Can you post the output of the following commands in the guest:
ifconfig -a
dmesg
EDIT: D'oh! Corrected the command to use Linux syntax not Windows!
-Andy.

Re: No network on CentOS

Posted: 1. Feb 2018, 10:19
by socratis
Besides the information that Andy asked for, the following steps might also tell us what's going on:
  • ping <DefaultGateway>    <-- tests your connectivity
    ping 8.8.8.8             <-- tests outgoing connectivity
    ping google.com          <-- tests name resolution

Re: No network on CentOS

Posted: 1. Feb 2018, 17:15
by newbie2018
andyp73:
I have not gone missing. I am still trying to figure out a way to get the output to you.
I cannot share folder to host from the guest because I do not have guest addition installed. And I cannot seem to install because I need to install the gcc make perl packages. And I can't get that package because I cannot get to the network.
Any suggestions on how to get the output out?

socratis:
pinging google - Name or service not known error
pinging 8.8.8.8 - Network is unreacheable error

Re: No network on CentOS

Posted: 1. Feb 2018, 17:40
by socratis
You didn't answer Andy's question, mine was second, in addition to what Andy asked:
andyp73 wrote:Can you post the output of the following commands in the guest:
ifconfig -a
dmesg

Re: No network on CentOS

Posted: 1. Feb 2018, 19:12
by newbie2018
socratis:
I did respond to Andy's question. I'm still trying to figure out a way to get the output out.

Attached is the print screen on ifconfig -a [Mod edit; Replaced attachment with actual text.]

Code: Select all

[admin@localhost ~]$ ifconfig -a
enpos3: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
        ether 08:00:27:18:6b:26 txqueuelen 1000 (Ethernet)
        RX packets 0 bytes 0 (0.0 B)
        RX errors 0 dropped 0 overruns 0 frame 0
        TX packets 0 bytes 0 (0.0 B)
        TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOoPBACK,RUNNING> mtu 65536
        inet 127.0.0.1 netmask 255.0.0.0
        inet6 ::1 prefixlen 128 scopeid ox10<host>
        loop txqueuelen 1 (Local Loopback)
        RX packets 128 bytes 11136 (10.8 KiB)
        RX errors 0 dropped 0 overruns 0 frame 0
        TX packets 128 bytes 11136 (10.8 KiB)
        TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

virbro: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
        inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
        ether 52:54:00:55:44:07 txqueuelen 1000 (Ethernet)
        RX packets 0 bytes 0 (0.0 B)
        RX errors 0 dropped 0 overruns 0 frame 0
        TX packets 0 bytes 0 (0.0 B)
        TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

virbro-nic: flags=4098<BROADCAST,MULTICAST> mtu 1500
        ether 52:54:00:55:44:07 txqueuelen 1000 (Ethernet)
        RX packets 0 bytes 0 (0.0 B)
        RX errors 0 dropped 0 overruns 0 frame 0
        TX packets 0 bytes 0 (0.0 B)
        TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

Re: No network on CentOS

Posted: 1. Feb 2018, 20:47
by newbie2018
Loaded the print screens for dmesg to https://we.tl/aC0NY2qC0j because of the maximum allowed size on this forum.

Password is v1rtualb0x

Re: No network on CentOS

Posted: 2. Feb 2018, 10:05
by andyp73
The log file from your virtual machine contains:

Code: Select all

00:00:02.007342 [/Devices/e1000/0/Config/] (level 4)
00:00:02.007343   AdapterType    <integer> = 0x0000000000000001 (1)
00:00:02.007344   CableConnected <integer> = 0x0000000000000001 (1)
00:00:02.007345   LineSpeed      <integer> = 0x0000000000000000 (0)
00:00:02.007345   MAC            <bytes>   = "08 00 27 bf ec 57" (cb=6)
00:00:02.007346 
00:00:02.007347 [/Devices/e1000/0/LUN#0/] (level 4)
00:00:02.007348   Driver <string>  = "NAT" (cb=4)
This is the E1000 network adapter configured in NAT mode. The output from dmesg showing the Linux kernel boot messages and the output from ifconfig -a have the MAC address as 08:00:27:18:6b:26 which Linux has then mapped to enp0s3 and which doesn't have an IP address assigned to it.

I don't know why the MAC address is getting changed unless there is something you haven't told us ;)

I have a very similar setup on my laptop other than I have the networking configured in bridged mode.

-Andy.

Re: No network on CentOS

Posted: 2. Feb 2018, 19:18
by newbie2018
I was testing the mac address (trying to match it with the mac address on Linux Mint); but, doesn't work either.
Sorry, was trying all kinds of things to try to get it to work. Even tried building another guest with Ubuntu Server LTS - no network as well.
However, when I tried LinuxMint, I was able to get a network connection. Perhaps that'll provide an "Ah-Ha" moment?

Any idea why would an ip address not assigned since it's DHCP?

Re: No network on CentOS

Posted: 8. Feb 2018, 22:35
by newbie2018
Just a quick update ... I downgraded to virtualbox 5.1.32 (last known version that works for me) and network is working again.
I cannot tell what's the issue with 5.2.

Thanks.

Re: No network on CentOS

Posted: 9. Feb 2018, 11:02
by andyp73
Not sure what is going on there. On my Windows 10 (1709) host with VirtualBox 5.2.6, the default Red-Hat (64bit) VM template and the CentOS 7-1708 VDI file from osboxes.org I see the following:

The guest reports enp0s3 as having IP address 10.0.2.15 (which looks right for NAT mode) and I can browse the internet with Firefox without any problems.

The /etc/resolv.conf file in the guest has picked up the correct DNS server addresses from my actual physical internet gateway.

I guess that is kind of a long handed approach to saying that it seems to be a CentOS 7 configuration issue rather than a VirtualBox problem per se.

-Andy.