wireless lan on raspberry pi
I just had to rebuild my raspberry pi again. It seems to keep eating its sd card for some reason. I decided to forgo the gui this time since it's a headless server. I just access it via ssh and vnc and I think I'm ready to drop vnc. Generally all I use X for is editing files in leafpad, and I can just as easily run pluma locally and connect over sshfs.
I have a pretty simple wireless setup - an open wireless network with no keys or certificates (I live on a farm, I'm not concerned about people intercepting my wifi). But it took me some time to figure out how to configure it, so I wanted to record what I did.
Anyway, here is my /etc/network/interfaces file:
and here are the contents of /etc/wpa_supplicant/wireless-lan.conf:
I'm not sure why I had to put the gateway into the interfaces file. Supposedly dhcp should set this, but without it I had no defined routes and couldn't get to anything outside my local subnet:
If it had to go anywhere, it seems like it would belong in the network definition in the wireless-lan.conf file, since different wireless networks will probably sport different gateways. When connecting using Network Manager, it's never been a problem, so I'm not sure why it's not getting set automatically here.
I have a pretty simple wireless setup - an open wireless network with no keys or certificates (I live on a farm, I'm not concerned about people intercepting my wifi). But it took me some time to figure out how to configure it, so I wanted to record what I did.
Anyway, here is my /etc/network/interfaces file:
Code:
auto lo iface lo inet loopback iface eth0 inet dhcp allow-hotplug wlan0 iface wlan0 inet dhcp gateway 192.168.0.1 wpa-conf /etc/wpa_supplicant/wireless-lan.conf
Code:
network={ scan_ssid=1 ssid="Wireless" key_mgmt=NONE }
Code:
$ /sbin/route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
Total Comments 0