You are not logged in.

#1 2018-01-06 20:44:52

intimothy
Member
Registered: 2018-01-06
Posts: 15

[SOLVED]ping: google.de: Name or service not known

Hello everyone,

I am a total newbie to Arch Linux, having switched from Debian 9 and Centos7 to ArchLinux. Today I wanted to install Arch Linux on Virtual Box running on a Windows8 computer.
In my VirtualBox settings I left "NETWORK" to NAT, left "ACTIVATE NETWORK ADAPTER" and "CABLE CONNECTED" checked.

Then I booted ArchLinux installer from CD in VirtualBox and did the following:

1. loadkeys de
2. fdisk -l
3. fdisk /dev/sda
4. (in fdisk partitioning editor): 1. n (new partition) 2. left everything to default so the partition sda1 would get the entire 15GB disk space for vdi, dynamically allocated, 3. set flag (a) for grub, 4. w (write)
5. mkfs.ext4 -L ROOT /dev/sda1
6. mount /dev/sda1 /mnt
7. df -Th (shows up on the bottom of the table, EVERYTHING FINE!)
8. ip -a (shows interface enp0s3 with the ip address 10.0.2.15 (24-bit subnet) and the loopback interface (nothing else, no wlan interface!)

I am connected from guest (ArchLinuxVM) to host(Windows8) via NAT and from Windows 8 to my Fritz.Box-Router via ethernet patch cable.
The IP address of my router is 192.168.178.1. I tried to change it to 10.0.2.1 but this is not possible.

Why can't the ArchLinuxVM reach the internet over my router?
The windows 8 can reach the internet and the Arch VM can ping anyone in the Local Area Network.

Any suggestions/help? The Arch Wiki did not help me in this case because it only covers WLAN connection issues.

dhcpcd enp0s3

output: [samp]"dhcpcd already running on pid 493 (/run/dhcpcd-enp0s3.pid)

cat /etc/resolv.conf

output: #Generated by resolvconf
domain fritz.box
nameserver 192.168.178.1
So Arch knows his DNS! Makes sense, otherwise I couldn't reach other hosts in my LAN, right?

Last edited by intimothy (2018-01-06 21:43:50)

Offline

#2 2018-01-06 20:50:12

loqs
Member
Registered: 2014-03-06
Posts: 17,754

Re: [SOLVED]ping: google.de: Name or service not known

intimothy wrote:

The windows 8 can reach the internet and the Arch VM can ping anyone in the Local Area Network.

Does this include being able to ping 192.168.178.1?
What is the output of `ip r`?

Offline

#3 2018-01-06 20:53:03

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED]ping: google.de: Name or service not known

Does it work if you use bridged rather than NAT in the VBox settings?


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#4 2018-01-06 20:54:23

intimothy
Member
Registered: 2018-01-06
Posts: 15

Re: [SOLVED]ping: google.de: Name or service not known

Does this include being able to ping 192.168.178.1?

yes. It might be NAT Service instead of NAT, otherwise I wouldn't be able to reach other hosts except for the router, right?

What is the output of `ip r`?

default via 10.0.2.2 dev enp0s3 src 10.0.2.15 metric 202
10.0.2.0./24 dev enp0s3 proto kernel scope link src 10.0.2.15 metric 202

Offline

#5 2018-01-06 20:57:04

intimothy
Member
Registered: 2018-01-06
Posts: 15

Re: [SOLVED]ping: google.de: Name or service not known

slithery wrote:

Does it work if you use bridged rather than NAT in the VBox settings?

I haven't tried that yet because it has got to be working with NAT.

Offline

#6 2018-01-06 21:03:25

intimothy
Member
Registered: 2018-01-06
Posts: 15

Re: [SOLVED]ping: google.de: Name or service not known

I believe that "NAT" in VirtualBox actually means "NAT Service" and "NAT-Network" is the actual NAT.
Otherwise I wouldn't be able to ping my raspberrypi from the ArchLinux guest but only my router.

Offline

#7 2018-01-06 21:06:38

loqs
Member
Registered: 2014-03-06
Posts: 17,754

Re: [SOLVED]ping: google.de: Name or service not known

intimothy wrote:
loqs wrote:

Does this include being able to ping 192.168.178.1?

yes. It might be NAT Service instead of NAT, otherwise I wouldn't be able to reach other hosts except for the router, right?

Not exactly your system appears to be using NAT twice once on the Windows vmware host and secondly on the router.
Arch guest has IP 192.168.178.1 which should be translated to the IP of the router facing interface on the Windows host which the router will then translate to the IP of its internet facing interface.
You might have been able to only ping the Windows host but not the router which is what I was checking.
If your Windows box is not doing NAT for the arch guest then it would need to be doing routing to send 192.168.* to 10.* and route back the returns.
Edit:
fix quoting
Edit2:
clarify first NAT was on the Windows host.

Last edited by loqs (2018-01-06 21:09:55)

Offline

#8 2018-01-06 21:12:11

intimothy
Member
Registered: 2018-01-06
Posts: 15

Re: [SOLVED]ping: google.de: Name or service not known

slithery wrote:

Does it work if you use bridged rather than NAT in the VBox settings?

I haven't tried that yet because it has got to be working with NAT.

Yes, it is actually working with bridged networking. But why does he not find his correct dhcp server (192.168.178.1) when I do NAT?

ip r

default via 192.168.178.1 dev enp0s3 src 192.168.178.23 metric 202
192.168.178.0/24 dev enp0s3 proto kernel scope link src 192.168.178.23 metric 202

Why did it not work via NAT? I didn't change anything in the NETWORK-tab in VirtualBox (default was NAT, not NAT NETWORK!)
I'll figure this out, apparently I have too little knowledge about VirtualBox. (version 5.1.26 (Qt5.6.2))

Offline

#9 2018-01-06 21:17:22

loqs
Member
Registered: 2014-03-06
Posts: 17,754

Re: [SOLVED]ping: google.de: Name or service not known

intimothy wrote:

But why does he not find his correct dhcp server (192.168.178.1) when I do NAT?

What do you believe the correct server should be?

Offline

#10 2018-01-06 21:37:08

intimothy
Member
Registered: 2018-01-06
Posts: 15

Re: [SOLVED]ping: google.de: Name or service not known

You might have been able to only ping the Windows host but not the router which is what I was checking.
If your Windows box is not doing NAT for the arch guest then it would need to be doing routing to send 192.168.* to 10.* and route back the returns.

When I had VirtualBox Network settings on "NAT" I could both ping from ArchLinux guest the Windows8 host 192.168.178.25 and my fritz.box router 192.168.178.1.
But I could not reach my ArchLinux guest from anyone in my network.
You are probably right. I had double NAT.

What do you believe the correct server should be?

Well, my fritz.box router should do NAT, dhcp and dns at the same time but apparently the Windows8 host did a job he wasn't supposed to and disturbed/interrupted proper NAT functionality.
Maybe I should run my VirtualBox on a Debian9 host rather than Windows8. Then NAT should work without further issues.

Last edited by intimothy (2018-01-06 21:40:18)

Offline

#11 2018-01-06 21:49:50

loqs
Member
Registered: 2014-03-06
Posts: 17,754

Re: [SOLVED]ping: google.de: Name or service not known

If you want the arch guest to use the DHCP and DNS services from the router then you want bridged mode this is independent of the host OS see https://www.virtualbox.org/manual/ch06.html

Offline

#12 2018-01-07 01:28:17

intimothy
Member
Registered: 2018-01-06
Posts: 15

Re: [SOLVED]ping: google.de: Name or service not known

loqs wrote:

If you want the arch guest to use the DHCP and DNS services from the router then you want bridged mode this is independent of the host OS see https://www.virtualbox.org/manual/ch06.html

yes, this is what I didn't know when I was struggling. Thank you very much for your help loqs.

Offline

Board footer

Powered by FluxBB