Hi
does anyone know how to set a static IP address in Occidental. I plan to use web IDE without connection to a router (Ad-Hoc) so no DHCP server involved.
Thanks
Paul.
Static IP address in Occidental
Moderators: adafruit_support_bill, adafruit
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
-
- Posts: 12151
- Joined: Thu Apr 06, 2006 4:21 pm
Re: Static IP address in Occidental
it would be the same as any linux computer - but we're not sure how to do that. any debian linux static IP tutorial should work
- jimmayhugh
- Posts: 58
- Joined: Thu May 17, 2012 8:33 pm
Re: Static IP address in Occidental
Modify the file /etc/network/interfaces and add the static IP, mask and gateway addresses. Pretty simple actually.
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: Static IP address in Occidental
jimmayhugh is correct. The default etc/network/interfaces file looks like this:
You want to comment our the line "iface eth0 inet dhcp", and add the static iface "stanza". Substitute your address, netmask, and gateway for the ones I show here:
After you edit the file, you don't actually have to reboot (if you don't want to). You can apply the new settings by issuing the following 2 commands:
(NOTE: don't do this if you're logged in via ssh or vnc - your network connection will go away!)
Code: Select all
auto lo
iface lo inet loopback
iface eth0 inet dhcp
auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-ssid "myssid"
wpa-psk "mypassword"
Code: Select all
auto lo
iface lo inet loopback
#dhcp configuration of eth0
#iface eth0 inet dhcp
#static configuration of eth0
iface eth0 inet static
address 192.168.1.127
netmask 255.255.255.0
gateway 192.168.1.1
auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-ssid "fios63"
wpa-psk "fepulatorfepu"
Code: Select all
sudo ifdown -v "eth0"
sudo ifup -v "eth0"
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/