|
|
| (2 intermediate revisions by the same user not shown) |
| Line 1: |
Line 1: |
| − | ====Autoboot the wlan0 wireless lan interface====
| |
| − | <pre>
| |
| − | 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
| |
| − | </pre>
| |
| − | ====Assign a fixed IP address====
| |
| − | Get the current IP address and other info
| |
| − | <pre>
| |
| − | ifconfig -a
| |
| − | </pre>
| |
| − | We're interested in these bits:
| |
| − | <pre>
| |
| − | wlan0
| |
| − | inet addr:192.168.1.15 Bcast:192.168.1.255 Mask:255.255.255.0
| |
| − |
| |
| − | </pre>
| |
| − | Get the router/gateway address
| |
| − | <pre>
| |
| − | netstan -rn
| |
| − | </pre>
| |
| − | We're interested in these bits:
| |
| − | <pre>
| |
| − | 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
| |
| − | </pre>
| |
| − | Now edit /etc/network/interfaces and replace the 'dhcp' with 'static' for the required interface
| |
| − | <pre>
| |
| − | 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
| |
| − | </pre>
| |
Latest revision as of 00:28, 24 December 2013
This category currently contains no pages or media.