case where you do need to use ifupdown instead of netplan
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
nplan (Ubuntu) |
Invalid
|
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.
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 /netplan. io/examples
# For more information, see netplan(5).
# and https:/
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. 01-netcfg. yaml to show all ip bound to eth0? I'm not expert on netplan, someone may help!
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/