You are not logged in.

#1 2015-08-02 14:56:40

anark10n
Member
Registered: 2012-10-13
Posts: 211

[Solved] Can't reach internet on dyanmic IP address

Hey there

So, I've got this weird problem the title reads. If I set my machine to get a dynamic IP address, my machine can't resolve domain names, it can however reach it if i enter IP addresses. If i put my machine on a static IP address, it can resolve domain names easy enough. Every other device I have can reach the internet on a dynamic IP. Anyone know what could be causing this?

Last edited by anark10n (2015-09-19 10:42:53)

Offline

#2 2015-08-02 15:07:15

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: [Solved] Can't reach internet on dyanmic IP address

"Set my machine" is far too vague. Show the instructions you're using.

Some other useful info to give:

ip route
ip addr
cat /etc/resolv.conf

Offline

#3 2015-08-02 15:39:20

anark10n
Member
Registered: 2012-10-13
Posts: 211

Re: [Solved] Can't reach internet on dyanmic IP address

I don't understand what you mean by too vague. I set my IP address using wicd. If I set it to get an IP dynamically, it doesn't resolve domain names. If I set it on static then it resolves domain names. This is the first time this has ever happened.

Output of ip route

default via 192.168.178.1 dev eth0  metric 203 
192.168.178.0/24 dev eth0  proto kernel  scope link  src 192.168.178.32  metric 203 

Output of ip addr

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 98:fc:11:e7:0d:45 brd ff:ff:ff:ff:ff:ff
3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 1c:6f:65:25:c0:47 brd ff:ff:ff:ff:ff:ff
    inet 192.168.178.32/24 brd 192.168.178.255 scope global eth0
       valid_lft forever preferred_lft forever

Output of cat /etc/resolv.conf

# Generated by dhcpcd from eth0.dhcp
# /etc/resolv.conf.head can replace this line
domain fritz.box
nameserver 192.168.178.1
# /etc/resolv.conf.head can replace this line
# /etc/resolv.conf.tail can replace this line
domain fritz.box
nameserver 192.168.178.1
# /etc/resolv.conf.tail can replace this line

Offline

#4 2015-08-02 15:56:53

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,349

Re: [Solved] Can't reach internet on dyanmic IP address

Is that resolv.conf from when you've a static address, or a dynamic address?

What happens, when you have a dynamic address, if you change the file to read

nameserver 8.8.8.8

 
?
That should use a Google DNS server.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#5 2015-08-02 16:12:38

anark10n
Member
Registered: 2012-10-13
Posts: 211

Re: [Solved] Can't reach internet on dyanmic IP address

It's from when i'm on dynamic.

Edit: Changing the line didn't help. I even tried using 8.8.8.8 as a DNS server in wicd before I posted and all of my pings, whether to the domain name or the IP address, returned "Destination Host Unreachable". Tried the same when I'm on static, first with my default gateway as DNS and then 8.8.8.8, and it was resolving domain names with both just fine.

Last edited by anark10n (2015-08-02 16:21:58)

Offline

#6 2015-08-03 17:07:01

anark10n
Member
Registered: 2012-10-13
Posts: 211

Re: [Solved] Can't reach internet on dyanmic IP address

Update: okay, it seems that when it happens that i cannot connect to the internet, there's nothing in /etc/resolv.conf. It will connect to the internet only after i disconnect, set it to static, disconnect static, and then reconnect on dynamic, and then the above contents of resolv.conf appears. Why does it happen that it doesn't write anything to resolv.conf sometimes?

Offline

#7 2015-08-04 19:59:31

Scrivener
Member
Registered: 2009-04-05
Posts: 25

Re: [Solved] Can't reach internet on dyanmic IP address

I'm having the same issue on two boxes. I believe it's due to the latest update on dhcpcd. When I first start the PC, /etc/resolv.conf is empty and I can't connect to any sites or ping by domain name. If I edit /etc/resolv.conf with a nameserver and a hostname:

nameserver 8.8.8.8
hostname 192.168.1.250

then I can connect and resolv.conf gets overwritten (by dhcpcd, I'm guessing) to:

# Generated by dhcpcd from eth0.dhcp
# /etc/resolv.conf.head can replace this line
nameserver 192.168.1.1
# /etc/resolv.conf.tail can replace this line

I'm not sure what's going on or how to fix it. I'll post an update if I find anything.

Offline

#8 2015-08-04 20:26:12

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,349

Re: [Solved] Can't reach internet on dyanmic IP address

The Arch mailing lists are discussing this issue:

the mail list wrote:

> Hello,
>
> since the last systemd update I have to "systemctl restart
> dhcpcd@..." every time I boot my system.
>
> What do I have to do to get sure that dhcpcd updates /etc/resolv.conf
> on the first time?

Are you running systemd-224?  There was a systemd-networkd bug
introduced in that version that (hopefully) should be fixed in
systemd-224-1.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#9 2015-08-05 05:45:10

Scrivener
Member
Registered: 2009-04-05
Posts: 25

Re: [Solved] Can't reach internet on dyanmic IP address

Thanks Ewaller. I have upgraded to systemd-224-1, but after rebooting I still have the issue. Maybe it will go away after a power cycle.

Looking in my pacman cache I don't see systemd-224. I have the following:
systemd-222-1-x86_64.pkg.tar.xz
systemd-223-1-x86_64.pkg.tar.xz
systemd-224-1-x86_64.pkg.tar.xz

Interestingly, another box that upgraded to systemd-224-1 today is not having any issues.

Offline

#10 2015-09-19 10:42:35

anark10n
Member
Registered: 2012-10-13
Posts: 211

Re: [Solved] Can't reach internet on dyanmic IP address

Ok, upgrade to the systemd-225-1-x86_64.pkg.tar.xz solved this issue.

Offline

Board footer

Powered by FluxBB