Network interface aliases with dhcpcd (static IP's)

Bug #1811971 reported by AquaL1te
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Raspbian
New
Undecided
Unassigned

Bug Description

As far as I understand, /etc/network/interfaces isn't meant to be used anymore. Instead /etc/dhcpcd.conf must be used to setup static IP's [1]. This works fine indeed, but I can't seem to find out how to configure network interface aliases. The goal is to set multiple IP's for the same interface. There are several threads [2] online discussing this issue, many people fallback to the 'old' /etc/network/interfaces method.

I do too use the interfaces method because I need multiple IP's for my network interface. But this introduces problems as well. Below is my config, when I restart networking.service I get the error "Failed to start Raise network interfaces.", without being specific about the problem.

---
source-directory /etc/network/interfaces.d

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
    address 10.1.0.2
    netmask 255.255.255.0
    gateway 10.1.0.10
    dns-nameservers 10.1.0.53 10.1.0.10
    dns-search home.lan home.vpn

iface eth0:0 inet static
    address 10.1.0.53
    netmask 255.255.255.0

iface eth0 inet6 static
    address 2001:abc:1234:1:10:1:0:2
    netmask 64
    gateway fe80::abff:abff:fe12:abcd
    dns-nameservers 2001:abc:1234:1:10:1:0:53 fe80::abff:abff:fe12:abcd
    dns-search home.lan home.vpn
    accept_ra 1
    privext 2
---

So what I would like to know is this:
1) Is it possible to configure multiple IP's for the same network interface with dhcpcd?
2) If not, how to proceed? And please update the documentation accordingly [1].
3) Little out of scope of this report, but if someone can see the problem with my interfaces configuration, then that would be appreciated as well. Even without the interface alias (eth0:0) it fails.

[1] https://www.raspberrypi.org/learning/networking-lessons/rpi-static-ip-address/
[2] https://raspberrypi.stackexchange.com/questions/45330/set-multiple-static-ip-in-dhcpcd-conf-raspbian-8-jessie

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.