case where you do need to use ifupdown instead of netplan

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

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
  address 192.168.4.2
  netmask 255.255.255.0
  gateway 192.168.4.1
  dns-nameservers 8.8.4.4 8.8.8.8
```

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 https://netplan.io/examples
network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      dhcp4: yes
      addresses:
        - 192.168.4.2/24

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