I originally had one WAN static IP address assigned to my Raspberry Pi (i.e. 188.8.131.52). I wanted to add a second (184.108.40.206).
The way I did that was to leave dhcpcd.conf alone, which included this definition of the first IP.
interface eth0 static ip_address=220.127.116.11/29 static routers=18.104.22.168 static domain_name_servers=22.214.171.124
To add the second IP, I created a file in /etc/network/interfaces.d called eth0-subs and added the info for the second IP.
auto eth0:1 allow-hotplug eth0:1 iface eth0:1 inet static vlan-raw-device eth0 address 126.96.36.199 netmask 255.255.255.248 gateway 188.8.131.52
I rebooted the Raspberry Pi:
and when it came back up both IPs were functional.
See the following for more information:
Jason works as a project specialist at an IT MSP in Pennsylvania, USA. He’s an IT/security professional with 20 years experience.