Exernal addresses not resolving
up vote
0
down vote
favorite
I recently changed ISPs. I got a new router. After a lot of messing about I have the router running almost the way I want it. However, since then my Raspberry Pi can't resolve external addresses. So, doing stuff like ping www.google.com
the name doesn't resolve. I get the following message:
ping: www.google.com: Temporary failure in name resolution
The interfaces in /etc/network
has this:
auto lo
iface lo inet loopback
iface eth0 inet static
address 192.168.0.42
gateway 192.168.0.1
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
resolv.conf contains this:
domain Home
search Home
nameserver 192.168.0.1
dns raspberry-pi
add a comment |
up vote
0
down vote
favorite
I recently changed ISPs. I got a new router. After a lot of messing about I have the router running almost the way I want it. However, since then my Raspberry Pi can't resolve external addresses. So, doing stuff like ping www.google.com
the name doesn't resolve. I get the following message:
ping: www.google.com: Temporary failure in name resolution
The interfaces in /etc/network
has this:
auto lo
iface lo inet loopback
iface eth0 inet static
address 192.168.0.42
gateway 192.168.0.1
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
resolv.conf contains this:
domain Home
search Home
nameserver 192.168.0.1
dns raspberry-pi
1
Can you edit your question and post the contents of/etc/resolv.conf
?
– Mr Shunz
2 days ago
is the py connected via physical ether-net cable to the router?
– ctrl-alt-delor
2 days ago
It uses ethernet, not wifi.
– snert
yesterday
Edited to show resolv.conf. I have to say I hadn't thought of that but the IP address in there for the nameserver is the IP address of the router. Personally I would have thought the router acts as a DNS for the network wouldn't it?
– snert
yesterday
What do you get if you dodig google.com @192.168.0.1
anddig google.com @8.8.8.8
?
– ctrl-alt-delor
15 hours ago
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I recently changed ISPs. I got a new router. After a lot of messing about I have the router running almost the way I want it. However, since then my Raspberry Pi can't resolve external addresses. So, doing stuff like ping www.google.com
the name doesn't resolve. I get the following message:
ping: www.google.com: Temporary failure in name resolution
The interfaces in /etc/network
has this:
auto lo
iface lo inet loopback
iface eth0 inet static
address 192.168.0.42
gateway 192.168.0.1
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
resolv.conf contains this:
domain Home
search Home
nameserver 192.168.0.1
dns raspberry-pi
I recently changed ISPs. I got a new router. After a lot of messing about I have the router running almost the way I want it. However, since then my Raspberry Pi can't resolve external addresses. So, doing stuff like ping www.google.com
the name doesn't resolve. I get the following message:
ping: www.google.com: Temporary failure in name resolution
The interfaces in /etc/network
has this:
auto lo
iface lo inet loopback
iface eth0 inet static
address 192.168.0.42
gateway 192.168.0.1
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
resolv.conf contains this:
domain Home
search Home
nameserver 192.168.0.1
dns raspberry-pi
dns raspberry-pi
edited yesterday
asked 2 days ago
snert
234
234
1
Can you edit your question and post the contents of/etc/resolv.conf
?
– Mr Shunz
2 days ago
is the py connected via physical ether-net cable to the router?
– ctrl-alt-delor
2 days ago
It uses ethernet, not wifi.
– snert
yesterday
Edited to show resolv.conf. I have to say I hadn't thought of that but the IP address in there for the nameserver is the IP address of the router. Personally I would have thought the router acts as a DNS for the network wouldn't it?
– snert
yesterday
What do you get if you dodig google.com @192.168.0.1
anddig google.com @8.8.8.8
?
– ctrl-alt-delor
15 hours ago
add a comment |
1
Can you edit your question and post the contents of/etc/resolv.conf
?
– Mr Shunz
2 days ago
is the py connected via physical ether-net cable to the router?
– ctrl-alt-delor
2 days ago
It uses ethernet, not wifi.
– snert
yesterday
Edited to show resolv.conf. I have to say I hadn't thought of that but the IP address in there for the nameserver is the IP address of the router. Personally I would have thought the router acts as a DNS for the network wouldn't it?
– snert
yesterday
What do you get if you dodig google.com @192.168.0.1
anddig google.com @8.8.8.8
?
– ctrl-alt-delor
15 hours ago
1
1
Can you edit your question and post the contents of
/etc/resolv.conf
?– Mr Shunz
2 days ago
Can you edit your question and post the contents of
/etc/resolv.conf
?– Mr Shunz
2 days ago
is the py connected via physical ether-net cable to the router?
– ctrl-alt-delor
2 days ago
is the py connected via physical ether-net cable to the router?
– ctrl-alt-delor
2 days ago
It uses ethernet, not wifi.
– snert
yesterday
It uses ethernet, not wifi.
– snert
yesterday
Edited to show resolv.conf. I have to say I hadn't thought of that but the IP address in there for the nameserver is the IP address of the router. Personally I would have thought the router acts as a DNS for the network wouldn't it?
– snert
yesterday
Edited to show resolv.conf. I have to say I hadn't thought of that but the IP address in there for the nameserver is the IP address of the router. Personally I would have thought the router acts as a DNS for the network wouldn't it?
– snert
yesterday
What do you get if you do
dig google.com @192.168.0.1
and dig google.com @8.8.8.8
?– ctrl-alt-delor
15 hours ago
What do you get if you do
dig google.com @192.168.0.1
and dig google.com @8.8.8.8
?– ctrl-alt-delor
15 hours ago
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
It looks like you have set the Py's IP address as a static address. This is probably not what you want.
Most modern networks use DHCP. There will be a DHCP server built into the router/ethernet-switch/modem combo that your ISP provided.
You need to set the mode of the interface to auto.
On my py the file /etc/network/interfaces
contains only
# interfaces(5) file used by ifup(8) and ifdown(8)
# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
and /etc/network/interfaces.d/
is empty directory.
Yes, I do want a static IP. That is why it is configured that way. The static IP range on the router is between 2 and 127. Anything from 128 upwards is the DHCP range. The pi sits on 42 because I need to connect to it from outside using port forwarding, so I give it a static IP
– snert
yesterday
So this may not be the problem, but it can lead to problems. Does your DHCP server have option to statically assign IP addresses. Static-dhcp gives the advantage of static, but better manageability (the DHCP server has to be statically assigned).
– ctrl-alt-delor
15 hours ago
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
It looks like you have set the Py's IP address as a static address. This is probably not what you want.
Most modern networks use DHCP. There will be a DHCP server built into the router/ethernet-switch/modem combo that your ISP provided.
You need to set the mode of the interface to auto.
On my py the file /etc/network/interfaces
contains only
# interfaces(5) file used by ifup(8) and ifdown(8)
# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
and /etc/network/interfaces.d/
is empty directory.
Yes, I do want a static IP. That is why it is configured that way. The static IP range on the router is between 2 and 127. Anything from 128 upwards is the DHCP range. The pi sits on 42 because I need to connect to it from outside using port forwarding, so I give it a static IP
– snert
yesterday
So this may not be the problem, but it can lead to problems. Does your DHCP server have option to statically assign IP addresses. Static-dhcp gives the advantage of static, but better manageability (the DHCP server has to be statically assigned).
– ctrl-alt-delor
15 hours ago
add a comment |
up vote
0
down vote
It looks like you have set the Py's IP address as a static address. This is probably not what you want.
Most modern networks use DHCP. There will be a DHCP server built into the router/ethernet-switch/modem combo that your ISP provided.
You need to set the mode of the interface to auto.
On my py the file /etc/network/interfaces
contains only
# interfaces(5) file used by ifup(8) and ifdown(8)
# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
and /etc/network/interfaces.d/
is empty directory.
Yes, I do want a static IP. That is why it is configured that way. The static IP range on the router is between 2 and 127. Anything from 128 upwards is the DHCP range. The pi sits on 42 because I need to connect to it from outside using port forwarding, so I give it a static IP
– snert
yesterday
So this may not be the problem, but it can lead to problems. Does your DHCP server have option to statically assign IP addresses. Static-dhcp gives the advantage of static, but better manageability (the DHCP server has to be statically assigned).
– ctrl-alt-delor
15 hours ago
add a comment |
up vote
0
down vote
up vote
0
down vote
It looks like you have set the Py's IP address as a static address. This is probably not what you want.
Most modern networks use DHCP. There will be a DHCP server built into the router/ethernet-switch/modem combo that your ISP provided.
You need to set the mode of the interface to auto.
On my py the file /etc/network/interfaces
contains only
# interfaces(5) file used by ifup(8) and ifdown(8)
# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
and /etc/network/interfaces.d/
is empty directory.
It looks like you have set the Py's IP address as a static address. This is probably not what you want.
Most modern networks use DHCP. There will be a DHCP server built into the router/ethernet-switch/modem combo that your ISP provided.
You need to set the mode of the interface to auto.
On my py the file /etc/network/interfaces
contains only
# interfaces(5) file used by ifup(8) and ifdown(8)
# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
and /etc/network/interfaces.d/
is empty directory.
edited 15 hours ago
answered 2 days ago
ctrl-alt-delor
9,87031954
9,87031954
Yes, I do want a static IP. That is why it is configured that way. The static IP range on the router is between 2 and 127. Anything from 128 upwards is the DHCP range. The pi sits on 42 because I need to connect to it from outside using port forwarding, so I give it a static IP
– snert
yesterday
So this may not be the problem, but it can lead to problems. Does your DHCP server have option to statically assign IP addresses. Static-dhcp gives the advantage of static, but better manageability (the DHCP server has to be statically assigned).
– ctrl-alt-delor
15 hours ago
add a comment |
Yes, I do want a static IP. That is why it is configured that way. The static IP range on the router is between 2 and 127. Anything from 128 upwards is the DHCP range. The pi sits on 42 because I need to connect to it from outside using port forwarding, so I give it a static IP
– snert
yesterday
So this may not be the problem, but it can lead to problems. Does your DHCP server have option to statically assign IP addresses. Static-dhcp gives the advantage of static, but better manageability (the DHCP server has to be statically assigned).
– ctrl-alt-delor
15 hours ago
Yes, I do want a static IP. That is why it is configured that way. The static IP range on the router is between 2 and 127. Anything from 128 upwards is the DHCP range. The pi sits on 42 because I need to connect to it from outside using port forwarding, so I give it a static IP
– snert
yesterday
Yes, I do want a static IP. That is why it is configured that way. The static IP range on the router is between 2 and 127. Anything from 128 upwards is the DHCP range. The pi sits on 42 because I need to connect to it from outside using port forwarding, so I give it a static IP
– snert
yesterday
So this may not be the problem, but it can lead to problems. Does your DHCP server have option to statically assign IP addresses. Static-dhcp gives the advantage of static, but better manageability (the DHCP server has to be statically assigned).
– ctrl-alt-delor
15 hours ago
So this may not be the problem, but it can lead to problems. Does your DHCP server have option to statically assign IP addresses. Static-dhcp gives the advantage of static, but better manageability (the DHCP server has to be statically assigned).
– ctrl-alt-delor
15 hours ago
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f482121%2fexernal-addresses-not-resolving%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Can you edit your question and post the contents of
/etc/resolv.conf
?– Mr Shunz
2 days ago
is the py connected via physical ether-net cable to the router?
– ctrl-alt-delor
2 days ago
It uses ethernet, not wifi.
– snert
yesterday
Edited to show resolv.conf. I have to say I hadn't thought of that but the IP address in there for the nameserver is the IP address of the router. Personally I would have thought the router acts as a DNS for the network wouldn't it?
– snert
yesterday
What do you get if you do
dig google.com @192.168.0.1
anddig google.com @8.8.8.8
?– ctrl-alt-delor
15 hours ago