Debian Networking Doesn't Work with Home Wifi
I've used Ubuntu for a few years at home and I use CentOS at work, but getting tired of Ubuntu's Unity interface and the general direction it's going I decided to switch my home computer to Debian, so I guess this makes me as a Debian noob.
Once I booted for the first time, I noticed that I did not have internet while connected to my home wifi. I thought at first that Comcast might be down again, but then I noticed all my other wifi devices worked fine with the router. I then connected to a neighbor's unsecured wifi, and the internet worked fine, so that rules out a problem with the wifi card. I then got my laptop close to the router and connected them with an ethernet cable, disconnected from wifi, and I once again had internet. However, because I have a laptop, this is not a realistic solution. I thought maybe I MAC address-blocked myself from my router, so I booted to my Windows partition and I was able to get online from my home wifi, so I ruled out that. The only logical thing left is that my Debian system is somewhat misconfigured for that hotspot. So I went to System > Preferences > Network Connections > Wireless and deleted the profile for my hotspot, and reconnected, still nothing. I decided to give myself a manual IP, maybe there was a DHCP failure somewhere, still nothing. While connected I tried to go to 192.168.1.1, my router's config page, but I couldn't even access that. here's my ifconfig: Code:
eth0 Link encap:Ethernet HWaddr 00:26:2d:52:eb:e0 Code:
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data. and finally netstat -nr Code:
Kernel IP routing table |
Try pinging an outside address to see if you get the response from 192.168.1.50 or from 192.168.1.4. You might use 8.8.4.4 or 8.8.8.8 (Google's public DNS array).
|
okay, I was able to fix it :D
I opened up /etc/network/interfaces and noticed that eth0 was defined with the static IP 192.168.1.50 and looked something like this: Code:
auto eth0 Code:
auto eth0 Code:
/etc/init.d/networking restart Now I have no idea why that fixed it, but I figured that since when I pinged it told me that my IP was 192.168.1.50, I figured removing that might do something. I also don't understand why the configuration for eth0 was affecting wlan0, or more specifically only affecting it when connected to the device eth0 was last connected to (my router). |
So what IP address did DHCP give you? Maybe what was happening is that the router blocks IP addresses that it has not assigned, at least if they are within the DHCP pool and not coming from the assigned MAC. If you prefer a static IP address, maybe one outside the pool (check the router configuration) would work.
If you just want static IP for internal purposes, adding another subnet with a second IP address in that range would work, such as 192.168.2.0/24 or 172.16.0.0/16 or 10.0.0.0/8 depending on how greedy you are :) Or try out IPv6 with huge subnets like fc00::/16. In a pinch you can use the IPv6 autoconfigured scope local addresses that Linux gives fixed assignments to based on the MAC address (MS Windows does not do it that way). Do "ifconfig eth0 | grep fe80:" to see yours. These "fe80" addresses need "%eth0" appended when using them (or "%wlan0" or whatever interface you want it to use). This is a good way to test specific interfaces since normal addressing can go by way of other interfaces in many cases. |
You can't properly test wifi while connected to the wired network. Your wired port (eth0) has 192.168.1.50. Your wifi (wlan0) has 192.168.1.4. That will never work because both numbers are from the same network.
|
All times are GMT -5. The time now is 10:22 AM. |