To set up a static IP address on the Pi 3 which will remain constant inside you LAN open /etc/dhcpcd.conf
$ sudo nano dhcpcd.conf
Add to the bottom of this file,
Here 18.104.22.168.30 is the static ip address I am creating.
22.214.171.124.1 is the gateway address, the address of my router from inside the network.
You will need to access your router’s settings and reserve the ip address 126.96.36.199.30 or whatever you chose, so that no other device on your network will be allocated this address.
Your router external address, that is the ip with which it is identified on the internet is usually dynamic. You can fix this using ‘no-ip’, this will allow you set it to a name instead of having to find the ever changing ip address.
Sign up for a free account at no-ip.com The free account needs to be renewed every 30 days. But this is a excellent and very useful service.
The instructions for setting up noip2 on a Raspberry Pi 3 can be found on the no-ip website.