Category:RaspberryPi
From dbawiki
Autoboot the wlan0 wireless lan interface
root@raspberrypi:/# cat /etc/network/interfaces
auto lo
iface lo inet loopback
iface eth0 inet dhcp
#iface wlan0 inet manual
#wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
autp wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-ssid "<SSID>"
wpa-psk "<PASSPHRASE>"
iface default inet dhcp
Assign a fixed IP address
Get the current IP address and other info
ifconfig -a
We're interested in these bits:
wlan0
inet addr:192.168.1.15 Bcast:192.168.1.255 Mask:255.255.255.0
Get the router/gateway address
netstan -rn
We're interested in these bits:
Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0
Now edit /etc/network/interfaces and replace the 'dhcp' with 'static' for the required interface
address 192.168.1.100 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 gateway 192.168.1.1
This category currently contains no pages or media.