Skip to content

Instantly share code, notes, and snippets.

@coolnumber9
Created December 17, 2017 07:48
Show Gist options
  • Save coolnumber9/820420d6b50beeb93b573c58cf6e2c5d to your computer and use it in GitHub Desktop.
Save coolnumber9/820420d6b50beeb93b573c58cf6e2c5d to your computer and use it in GitHub Desktop.
Static IP Setup on Raspberry Pi
1.) Connect to ACLC KomSpec
2.) Login - use your account/code
3.) type command "ifconfig"
- take note of wlan0
- look for "inet addr:xxx.xxx.xxx.xxx"
4.) type command "netstat -r"
- take note of Gateway IP
5.) type command "ip -4 addr show dev wlan0 | grep inet"
- take note
- inet xxx.xxx.xxx.xxx/xx -> take note of last digits after slash
[Optional]
6.) type "ip route | grep default | awk '{print $3}'
- Expect the same as the gateway above
7.) type "cat /etc/resolv.conf"
- Expect the same as the gateway above
- nameserver xxx.xxx.xxx.xxx
8.) sudo nano /etc/dhcpcd.conf
- at the bottom, add the following
#-------- ACLC config -----
interface wlan0
# IP is our pre-assigned static IP, take note of digits after forward slash.
# It should be the same as the number seen in Step 5.
static ip_address=10.80.101.10X/24
# These should be the gateway IP found in Step 4
static routers=10.80.101.254
static domain_name_servers=10.80.101.254
9.) Save the file. <CTRL + O>. Press enter.
10.) Exit. <CTRL + X>
11.) type "sudo shutdown -r now" to restart the pi
12.) Once booted up, type "ifconfig" to re-check the IP address. It should show the IP address you set in Step 8. Look for "inet addr:" under "wlan0"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment