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









share|improve this question




















  • 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 and dig google.com @8.8.8.8?
    – ctrl-alt-delor
    15 hours ago















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









share|improve this question




















  • 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 and dig google.com @8.8.8.8?
    – ctrl-alt-delor
    15 hours ago













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









share|improve this question















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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 do dig google.com @192.168.0.1 and dig google.com @8.8.8.8?
    – ctrl-alt-delor
    15 hours ago














  • 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 and dig 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










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.






share|improve this answer























  • 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











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















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

























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.






share|improve this answer























  • 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















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.






share|improve this answer























  • 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













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.






share|improve this answer














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.







share|improve this answer














share|improve this answer



share|improve this answer








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


















  • 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


















 

draft saved


draft discarded



















































 


draft saved


draft discarded














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





















































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







Popular posts from this blog

Accessing regular linux commands in Huawei's Dopra Linux

Can't connect RFCOMM socket: Host is down

Kernel panic - not syncing: Fatal Exception in Interrupt