Documente Academic
Documente Profesional
Documente Cultură
Login | Register
Select Language
I recommend doing this on a fresh install, however if you have attempted to set a static IP address already,
you may have found yourself editing the interfaces le (/etc/network/interfaces). I hope you made a backup,
because youll need to remove any edits you have made, and revert it back to its original state!
The following is done over SSH, but you could just as well plug your Pi into a monitor, hook up a keyboard
and mouse, and use the Terminal instead.
Scroll all the way to the bottom of the le and add one, or both of the following snippets. Depending on
whether you want to set a static IP address for a wired connection or a wireless connection eth0 = wired,
wlan0 = wireless.
Youll need to edit the numbers in the snippet so they match your network conguration.
CODE
http://www.modmypi.com/blog/howtogiveyourraspberrypiastaticipaddressupdate 1/6
6/12/2016 ModMyPi|HowtogiveyourRaspberryPiaStaticIPAddressUPDATE
interfaceeth0
staticip_address=192.168.0.10/24
staticrouters=192.168.0.1
staticdomain_name_servers=192.168.0.1
interfacewlan0
staticip_address=192.168.0.10/24
staticrouters=192.168.0.1
staticdomain_name_servers=192.168.0.1
interface = This denes which network interface you are setting the conguration for.
static ip_address = This is the IP address that you want to set your device to. (Make sure you leave the /24 at
the end)
static routers = This is the IP address of your gateway (probably the IP address or your router)
static domain_name_servers = This is the IP address of your DNS (probably the IP address of your router).
You can add multiple IP addresses here separated with a single space.
reboot
ifcong
http://www.modmypi.com/blog/howtogiveyourraspberrypiastaticipaddressupdate 2/6
6/12/2016 ModMyPi|HowtogiveyourRaspberryPiaStaticIPAddressUPDATE
james
May 21, 2016 22:53
Thank you! Finally! A simple how-to for Static IP with Jessie. Worked perfectly! Saving this locally for
reference!
No idea why they changed Raspbian so much with this Jessie release. What was wrong with the way it
was before? Anyways, thanks again!
Reply
sam hook
May 19, 2016 15:43
How do i setup multiple static ip addresses?
(sorry i am another noob)
Reply
Eric Tai
May 18, 2016 13:07
Is it possible for a string to be used for the static IP address? Sorry, beginner here.
Reply
Dimitris Dermanis
May 06, 2016 08:58
Reply
Bob McLean
May 08, 2016 15:46
The /24 denotes that the leading 24 bits are common to all IP addresses on this network. It's
equivalent to the old way of providing a net mask:
255.255.255.0 (leading 24 bits are 1's)
John Paton
May 03, 2016 10:11
How would you enter the SSID and WPA key if using WiFi?
Thanks,
John
Reply
Charles P.
May 05, 2016 04:10
It is set in conguration le referenced by the main networking conguration le.
allow-hotplug wlan0
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
network={
ssid="MyNetwork"
psk="MyPreSharedKey"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
}
It is possible to add more than network{} blocks. Use priority=# to indicate higher priority.
Jairo Sanchez
April 27, 2016 03:30
Thank you. Funcion para mi raspberry pi 3.
Reply
PREV 1 of 1 NEXT
Leave a Comment
Leave a Reply
* Name: * Comment:
http://www.modmypi.com/blog/howtogiveyourraspberrypiastaticipaddressupdate 4/6
6/12/2016 ModMyPi|HowtogiveyourRaspberryPiaStaticIPAddressUPDATE
Verication code:
Submit
Home Contact Us
Delivery Information
Returns Policy
Privacy Policy
WEEE
Find us on Google+
My Account
Your Name
Order History
Newsletter
Submit
http://www.modmypi.com/blog/howtogiveyourraspberrypiastaticipaddressupdate 5/6
6/12/2016 ModMyPi|HowtogiveyourRaspberryPiaStaticIPAddressUPDATE
http://www.modmypi.com/blog/howtogiveyourraspberrypiastaticipaddressupdate 6/6