Fedora guest does not see internet

Discussions about using Linux guests in VirtualBox.
Post Reply
CFB
Posts: 3
Joined: 20. Aug 2016, 19:12

Fedora guest does not see internet

Post by CFB »

Hi,
I have VirtualBox running on a Windows 10 host OS with several VMs using Fedora 23 as guest OS. When I use the default installation, it works as expected. But I modified some of them to use fixed IP addresses. Those cannot ping a host on the internet (e.g. ping google). They can ping other VirtualBox machines, whether fixed or non-fixed IP addresses and the Windows machine and vice versa. The VMs with non-fixed IP addresses have no problem pinging google

For all VMs, I use the Bridged Adapter.

When I ping google from a fixed IP guest host, I get "connect: Network is unreachable".

Here is the output of the systemctl status network.service command:

Code: Select all

[CFB@fedoraldap ~]$ systemctl status network.service
● network.service - LSB: Bring up/down networking
   Loaded: loaded (/etc/rc.d/init.d/network)
   Active: inactive (dead)
     Docs: man:systemd-sysv-generator(8)
[CFB@fedoraldap ~]$
I wonder if anybody encountered this, and if anybody can tell how to fix this. Thanks in advance.

CFB
CFB
Posts: 3
Joined: 20. Aug 2016, 19:12

Re: Fedora guest does not see internet

Post by CFB »

After some experimentation, I found out that I had to add a couple of lines to the file /etc/sysconfig/network-scripts/ifcfg-enp0s3:

Code: Select all

HWADDR=08:00:27:F0:40:F1
TYPE=Ethernet
BOOTPROTO=none
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILUE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=enp0s3
UUID=832b0e7e-90bf-4731-889f-f8942b70df8b
ONBOOT=yes
PREFIX=24
IPADDR=192.168.1.24
GATEWAY=192.168.1.1
DNS1=192.168.1.1
I added the last two lines. There was some fedora documentation about using the CLI to configure fixed IP addresses that omitted them...

CFB
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Fedora guest does not see internet

Post by socratis »

The last two lines that you added are about IPv6 connectivity. Did you have IPv4 or IPv6 issues to begin with? And you did mention at some point that you changed things manually (why) but you never posted the details. Could you, in the case that someone with the same problem comes around in the future?
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Fedora guest does not see internet

Post by Perryg »

Code: Select all

GATEWAY=192.168.1.1
DNS1=192.168.1.1
Were the last two lines and are ipv4. These are common entries and should have been added when switching to manual, but ifconfig should have worked for this as well.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Fedora guest does not see internet

Post by socratis »

Doh! That's what happens when you don't scroll all the way down :oops:
The lines I was referring to were the last two showing before scrolling the code box...
  • IPV6_PEERROUTES=yes
    IPV6_FAILURE_FATAL=no
Sorry about the confusion.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Fedora guest does not see internet

Post by Perryg »

It happens to us all. Just wanted to clarify. :wink:
CFB
Posts: 3
Joined: 20. Aug 2016, 19:12

Re: Fedora guest does not see internet

Post by CFB »

What got me originally was the text in the manual https://docs.fedoraproject.org/en-US/Fe ... rface.html which said:
create a file with name ifcfg-eth0 in the /etc/sysconfig/network-scripts/ directory as follows:

Code: Select all

DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
PREFIX=24
IPADDR=10.0.1.27
This is plainly wrong, because it is missing the GATEWAY and DNS1 entries. Although it is for an older version of Fedora, it has not been updated.

Thanks for the replies.

CFB
Post Reply