owaizshareef
Posts: 14
Joined: Wed Apr 06, 2016 1:33 pm

Static ip - no internet

Thu May 19, 2016 11:05 pm

i have used "sudo nano /etc/dhcpcd.conf" and added static address, after reboot the raspberry pi shows static address in ifconfig and i can also access it using putty, but it is not able to connect to the internet. i have checked the router and this device does not show up. I am sure there is nothing wrong with the router or cable as i was able to access internet before setting the static ip address.

lines i have typed.. "interfaces eth0
static ip_address=192.168.1.150
static routers=192.168.1.1
static domain_name_servers=192.168.1.1"

User avatar
topguy
Posts: 4914
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Static ip - no internet

Fri May 20, 2016 10:57 am

Is the 150 address inside or outside of the router DHCP pool of adresses ?
Some routers only show devices that have an active lease but others show all devices (MAC-addresses) it can see.
I dont know if some routers will refuse traffic from addresses within the DHCP-pool but without an active lease.

How did you test for internet connection ? Have you tried to ping 8.8.8.8 for example ?
I just want to differentiate between a routing problem and DNS problems.

User avatar
DougieLawson
Posts: 34096
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Static ip - no internet

Sat May 21, 2016 7:28 am

Run the following commands and post the results here

ifconfig -a
ip route
ping -c3 $(ip route | awk '/default/ {print $3}')
ping -c3 8.8.8.8
ping -c3 google.com
cat /etc/resolv.conf
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

mehdi.heris
Posts: 2
Joined: Fri Mar 10, 2017 1:11 am

Re: Static ip - no internet

Mon Mar 20, 2017 11:32 pm

Hi,

did you resolve your issue? I have the same problem. Would you post the results?
Thanks

SurferTim
Posts: 1763
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Static ip - no internet

Tue Mar 21, 2017 12:36 am

You should follow DougieLawson's post and do what he suggests.

If you had no problems with dhcp network settings, revert to that setting and post the same.

murksiuke
Posts: 18
Joined: Thu Feb 15, 2018 9:33 am

Re: Static ip - no internet

Sat Nov 10, 2018 1:21 pm

I know this is an old post, but i have the same problem.
Ping results in 'destination host unreachable'
Ip route is 'default via 192.168.0.1 dev wlan0 src 193.168.0.10 metric 303 192.168.0.0/24 dev wlan0 proto kernel scope link src 192.168.0.10 metric 303'
Last edited by murksiuke on Sat Nov 10, 2018 1:26 pm, edited 1 time in total.

User avatar
DougieLawson
Posts: 34096
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Static ip - no internet

Sat Nov 10, 2018 1:23 pm

Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

murksiuke
Posts: 18
Joined: Thu Feb 15, 2018 9:33 am

Re: Static ip - no internet

Sat Nov 10, 2018 1:28 pm

DougieLawson wrote:
Sat Nov 10, 2018 1:23 pm
Please see my reply viewtopic.php?f=91&t=226637&p=1390306#p1390306
So the static ip adress i chose is ivalid? Thank you,i will try to fix it

DirkS
Posts: 9211
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Static ip - no internet

Sat Nov 10, 2018 1:35 pm

murksiuke wrote:
Sat Nov 10, 2018 1:28 pm
DougieLawson wrote:
Sat Nov 10, 2018 1:23 pm
Please see my reply viewtopic.php?f=91&t=226637&p=1390306#p1390306
So the static ip adress i chose is ivalid? Thank you,i will try to fix it
Looks like you tried to set 193.x.x.x instead of 192.x.x.x

murksiuke
Posts: 18
Joined: Thu Feb 15, 2018 9:33 am

Re: Static ip - no internet

Sat Nov 10, 2018 11:28 pm

DirkS wrote:
Sat Nov 10, 2018 1:35 pm
murksiuke wrote:
Sat Nov 10, 2018 1:28 pm
DougieLawson wrote:
Sat Nov 10, 2018 1:23 pm
Please see my reply viewtopic.php?f=91&t=226637&p=1390306#p1390306
So the static ip adress i chose is ivalid? Thank you,i will try to fix it
Looks like you tried to set 193.x.x.x instead of 192.x.x.x
Well thats embarrassing. :D Thank you!

Return to “Troubleshooting”