No internet when on WiFi when on static IP

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
o/\o

No internet when on WiFi when on static IP

Post by o/\o »

I run my DietPi setup as an NAS. To connect it to the router and the rest of the network, I use TP-Link's WN725N WiFI mini-dongle. Ethernet is absolutely not an option due to the space organization.

Now, if I set a static local IP address to DietPi, the Internet doesn't work. No apt-get, no dietpi-update, nothing but samba, ssh and other local-network protocols. But when i do

Code: Select all

dhclient
the internet link sprouts to life, BUT the Pi loses its static IP and gets assigned a DHCPed one by the router. Since I have mapped the NAS drives on a few networked devices, that won't do.

How to get both the Internet access and the static local IP?
rothchild
Posts: 74
Joined: Sat Jun 27, 2015 10:39 am

Re: No internet when on WiFi when on static IP

Post by rothchild »

On my router one of the settings is to assign a fixed IP address by mac address / hostname, so whilst it's dhcp that's assigning IP addresses my pi always ends up with the same one.

Not sure if you have that option but it may be worth a try?
o/\o

Re: No internet when on WiFi when on static IP

Post by o/\o »

No, my router has no options like that. I can enable, disable or relay DHCP, set starting IP address, pool count etc. That's it.

But my understanding is if the connected device has its own static IP address, the router will let it use it regardless of the DHCP status. And that is what happens, it's just it works on the local network exclusively, for reasons unknown to me.
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: No internet when on WiFi when on static IP

Post by Fourdee »

o/\o wrote:Now, if I set a static local IP address to DietPi, the Internet doesn't work. No apt-get, no dietpi-update, nothing but samba, ssh and other local-network protocols.
Hi,

Could be potential bug, could you please run dietpi-bugreport and follow the onscreen instructions. This will allow me to look into your system/settings and attempt to resolve the issue your experiencing.

If you can verify the internet is working before running dietpi-bugreport (either by running your dhclient fix , or set to DHCP) . This will ensure the bug report gets uploaded.

Thanks
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
o/\o

Re: No internet when on WiFi when on static IP

Post by o/\o »

Did it. Thank in advance, Fourdee.
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: No internet when on WiFi when on static IP

Post by Fourdee »

o/\o wrote:Did it. Thank in advance, Fourdee.
Thanks. I've sent you an email.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
o/\o

Re: No internet when on WiFi when on static IP

Post by o/\o »

Something really weird is going on...

I have TWO local IPs on a single WiFi adapter (first available DHCP and the static IP).

This is the NoIP-setting, listing both interfaces, while ifconfig gives just the static IP address on wlan0. Both work thru SSH, in parallel.
Image

I've done nothing but dhclient fix, and this is the first time this happened.

More importantly, the Internet is reachable, but I can't update via dietpi-update command, the req 404's.
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: No internet when on WiFi when on static IP

Post by Fourdee »

Hi,

Can you send me another dietpi-bugreport please (no need to fill out the info, just paste the reference code).

Code: Select all

dietpi-bugreport
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
o/\o

Re: No internet when on WiFi when on static IP

Post by o/\o »

Ref code

Code: Select all

 b827eb3ef05b-1 
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: No internet when on WiFi when on static IP

Post by Fourdee »

o/\o wrote:Ref code

Code: Select all

 b827eb3ef05b-1 
Thanks,

As i suspected, looks like your settings are corrupt due to power loss. This was a known issue with v77. Please see this link for information and follow the instructions.

Once you have completed the above, see if the issue still occurs.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Post Reply