Add Second IP on Raspberry Pi

I originally had one WAN static IP address assigned to my Raspberry Pi ( I wanted to add a second (

The way I did that was to leave dhcpcd.conf alone, which included this definition of the first IP.


interface eth0
static ip_address=
static routers=
static domain_name_servers=

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

I rebooted the Raspberry Pi:

sudo reboot 

and when it came back up both IPs were functional.

See the following for more information:

This was performed on Raspian 9 (stretch) in May, 2019.

Leave a Reply

Your email address will not be published. Required fields are marked *