I am using a Pi2 on raspbian. As I move a lot, it is sometimes connected via WiFi but also via direct lan to my computer (to set up a WiFi or because there is no WiFi).
Therefore I have set a static IP on the Raspbian LAN (192.168.2.2) and a static on the comp (2.1). The WiFi often being 192.168.0.X or 192.168.1.X, I have set both IPs on the Pi (works more or less but that is not the point here).
I am facing an issue on Windows: When my computer is connected on a wifi, raspberry off, I have no issue with internet (pages load in 1s). When I plug the Pi on my LAN port and turn it on, it seems that windows is kind of lost with its internet connectivity. The Pi is not connected to Internet (not connected to the WiFi), but windows needs now 10 seconds or more to display any webpage.
I have tried to play with gateways etc but could not find any working solution, knowing that the WiFi connection states it has an internet connectivity and the LAN connection doesn't.
My best option is to set up the wifi on the Pi through the direct lan and then disconnect it, but I would prefer to find how to solve that.
Did anyone face this issue? Any workaround?
The Eth part of the Pi config file:
auto lo iface lo inet loopback auto eth0 allow-hotplug eth0 iface eth0 inet manual iface eth0 inet static address 192.168.2.2 netmask 255.255.255.0 network 192.168.2.0 broadcast 192.168.2.255 gateway 192.168.2.1
The comp has 2 interfaces:
Wifi: DHCP LAN: Static 192.168.2.1 (I have a cmd DHCP server if needed)