News:

The Latest electronic and computer Tips that work!

Main Menu

Raspberry PI static an address (Wifi or eth0)

Started by branx86, December 16, 2015, 02:57:39 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

branx86

  nano /etc/network/interfaces
add the following under eth0 or wlan? The address is your Static IP and netmask scheme and your gateway.

iface (eth0 or wlan?) inet static


Your File should look like the one below for dhcp to eth0 and static wlan0.

auto lo



iface lo inet loopback

iface eth0 inet dhcp



allow-hotplug wlan0

iface wlan0 inet manual

wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf

iface default inet static

address 192.168.1.102

netmask 255.255.255.0

network 192.168.1.0

gateway 192.168.1.1


OR

auto wlan0
    allow-hotplug wlan0
    iface wlan0 inet static
    address 10.232.1.99
    netmask 255.255.255.0
    gateway 10.232.1.1
    wpa-passphrase password
    wpa-ssid myssid