You are not logged in.

#1 2016-03-21 16:40:49

mageofbl00d
Member
Registered: 2016-03-06
Posts: 19

[SOLVED] PC has connection but "ping" says the opposite

After using Arch in a VM for some time I decided to install it for real. When I was setting my Internet connection after installation I pinged google.com and got

ping: www.google.com: Name or service not known

I followed the Network Configuration page on the wiki and pinged 8.8.8.8, successfully. Turned on dhcpcd service and changed my DNS to 8.8.8.8. Both things didn't help. While doing all this I discovered that in this condition I can use pacman and installed NetworkManager with applet. NM applet reported that wired connection is established, Firefox proved the same (writing this from my pc), but when I ping I still get "Name or service not known". Besides that when I install stuff pacman always struggles to find a working mirror. What could cause it?

I'm asking because I haven't encountered any of these problems while using Arch in VM. Might it be something about my hardware? I have my internet cable going through D-Link DIR-300 router. I'll provide any other info if needed.

Last edited by mageofbl00d (2016-03-25 16:56:07)

Offline

#2 2016-03-21 16:45:31

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: [SOLVED] PC has connection but "ping" says the opposite

So the only problem is with ping and pacman? Are you able to browse all sites easily? Have you tried pinging anything other than google.com?

Offline

#3 2016-03-21 16:56:14

mageofbl00d
Member
Registered: 2016-03-06
Posts: 19

Re: [SOLVED] PC has connection but "ping" says the opposite

Some sites work fine (google, arch forum), others don't (yahoo, facebook, youtube works partitialy). Same with ping.

EDIT: I can open yahoo and fb right now, but can't ping them

Last edited by mageofbl00d (2016-03-21 17:13:05)

Offline

#4 2016-03-22 11:13:46

mageofbl00d
Member
Registered: 2016-03-06
Posts: 19

Re: [SOLVED] PC has connection but "ping" says the opposite

I was messing around for some time and the symptoms became more clear now: apparently something prevents connection to domain names for some time but then kind of goes away: this works for browser, ping and pacman - if I keep pinging like crazy or refresh the page for several times the signal eventually makes it.

Offline

#5 2016-03-22 17:08:58

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: [SOLVED] PC has connection but "ping" says the opposite

Perhaps there are multiple network daemons running. Please make sure that you are only using one method to configure your network.

Offline

#6 2016-03-24 04:21:59

mageofbl00d
Member
Registered: 2016-03-06
Posts: 19

Re: [SOLVED] PC has connection but "ping" says the opposite

Here's the output of systemctl status (the system slice). There's only one service running as far as I can tell. Also I did boot into Arch's liveCD and was able to ping domain names right of the bat without setting anything up.

├─system.slice
           │ ├─dbus.service
           │ │ └─294 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
           │ ├─system-dhcpcd.slice
           │ │ └─dhcpcd@enp2s0.service
           │ │   └─317 /usr/bin/dhcpcd -q -w enp2s0
           │ ├─systemd-journald.service
           │ │ └─184 /usr/lib/systemd/systemd-journald
           │ ├─upower.service
           │ │ └─399 /usr/lib/upower/upowerd
           │ ├─systemd-timesyncd.service
           │ │ └─285 /usr/lib/systemd/systemd-timesyncd
           │ ├─systemd-logind.service
           │ │ └─292 /usr/lib/systemd/systemd-logind
           │ ├─systemd-udevd.service
           │ │ └─204 /usr/lib/systemd/systemd-udevd
           │ ├─polkit.service
           │ │ └─351 /usr/lib/polkit-1/polkitd --no-debug
           │ └─rtkit-daemon.service
           │   └─447 /usr/lib/rtkit/rtkit-daemon

Offline

#7 2016-03-24 07:58:54

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: [SOLVED] PC has connection but "ping" says the opposite

What's in your /etc/resolv.conf?

Offline

#8 2016-03-24 10:54:37

Gordon
Member
From: Scotland
Registered: 2012-06-25
Posts: 19

Re: [SOLVED] PC has connection but "ping" says the opposite

Try ping -4 www.google.com

Offline

#9 2016-03-24 11:59:38

mageofbl00d
Member
Registered: 2016-03-06
Posts: 19

Re: [SOLVED] PC has connection but "ping" says the opposite

lucke wrote:

What's in your /etc/resolv.conf?

# Generated by resolvconf
domain Dlink
nameserver 8.8.8.8
nameserver 8.8.4.4

I manually switched to google's dns, thought it would help.

nohook resolv.conf

Also added this to dhcpcd.conf to prevent rewriting of resolv.conf
_

Gordon wrote:

Try ping -4 www.google.com

It worked, I was able to ping. Does this mean that I somehow should switch to IPv4?

To make it clear, I'm not bothered by the ping thing but by the fact that my progams like wine can't reach the web.

EDIT: Turned off ipv6 in grub.cfg. works fine now. marking as solved.

Last edited by mageofbl00d (2016-03-25 16:52:48)

Offline

Board footer

Powered by FluxBB