case where you do need to use ifupdown instead of netplan

Bug #1826760 reported by Caffeine Addict on 2019-04-28
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nplan (Ubuntu)

Bug Description

I have use the following config in the past to provide redundancy in the event that someone resets the router to factory defaults ... this is no longer possible in netplan.

auto enp9s0
iface enp9s0 inet dhcp

auto enp9s0:s
iface enp9s0:s inet static

Specifically, I want to be able to configure 1x interface (only have one physical eth on the box) to have both a static IP as well as be able to accept a dynamic ip. This setup allows for remote troubleshooting to continue in the even that someone resets the ip range of the local network which would normally kill network connectivity with a static IP.

oldMonkey (nsun) wrote :

I find a workaround, it is not perfect but works in most the way I expect.

Here is my /etc/netplan/01-netcfg.yaml

# This file describes the network interfaces available on your system
# For more information, see netplan(5).
# and
  version: 2
  renderer: networkd
      dhcp4: yes

given dhcp4 enabled on eth0, and assign an extra static ip address to it. This results the eth0 to require DHCP address as well as a manually assigned static ip address.
The little issue is that through ifconfig, I can only see the static ip address with the eth0, even there is a DHCP address has granted from DHCP server and the granted ip address works all fine. (by checking the DHCP server I saw the granted ip address to that MAC address, so did all the tests). Maybe there is a way to tweak /etc/netplan/01-netcfg.yaml to show all ip bound to eth0? I'm not expert on netplan, someone may help!

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

Other bug subscribers