Andyroo

Multiple STATIC IP addresses on one interface - BUSTER

Sat Sep 07, 2019 8:58 pm

Following on from my WRONG answer on this thread I've opened up this to see if we can get multiple IPv4 addresses on one interface from Buster.

So far I know that these DO NOT work:

Code: Select all

interface eth0:0
static ip_address=192.168.1.12/24
static routers=192.168.1.254
static domain_name_servers=192.168.1.253

Code: Select all

profile 192.168.1.11
static ip_address=192.168.1.11/24
static routers=192.168.1.254
static domain_name_servers=192.168.1.2
hostname = web.local

profile 192.168.1.12
static ip_address=192.168.1.12/24
static routers=192.168.1.254
static domain_name_servers=192.168.1.2
Also running these post boot does not work:

Code: Select all

sudo dhcpcd -S ip_address=192.168.1.12/24 -S routers=192.168.1.254 -S domain_name_servers=192.168.1.2 eth0
sudo dhcpcd --renew eth0

sudo dhcpcd -S ip_address=192.168.1.12/24 -S routers=192.168.1.254 -S domain_name_servers=192.168.1.2 eth0:0
sudo dhcpcd --renew eth0:0
Using rebind rather than renew failed

At this point I'm about the limit of my networking skills and deleting a pile of Evernote pages :lol:

Andyroo

Re: Multiple STATIC IP addresses on one interface - BUSTER

Sat Sep 07, 2019 9:01 pm

Now also trying to work out why my 3B+ will boot but not reboot :?: :roll: :!:
Oh what a day (evening / night)...

Andyroo

Re: Multiple STATIC IP addresses on one interface - BUSTER

Sat Sep 07, 2019 9:04 pm

This works:

Code: Select all

sudo ip address add 192.168.1.12/24 dev eth0
That could go in rc.local, a system.d program or /etc/dhcpcd.exit-hook

dazz100
Posts: 41
Joined: Mon Apr 17, 2017 4:54 am

Re: Multiple STATIC IP addresses on one interface - BUSTER

Wed Oct 02, 2019 9:57 am

Andyroo wrote:
Sat Sep 07, 2019 9:04 pm
This works:

Code: Select all

sudo ip address add 192.168.1.12/24 dev eth0
That could go in rc.local, a system.d program or /etc/dhcpcd.exit-hook
Yes, this works for me too.

To remove an ip address:

Code: Select all

sudo ip address del 192.168.1.200/24 dev eth0
I can confirm this works also.

Return to “Raspberry Pi OS”