I setup a new
Ubuntu 18.04 server and spend some time fighting with
netplan. I only need a very simple network config, but for some reason it does not work and I have no idea what is wrong.
I need a
VLAN with a
The problem: As soon as I configure any
static IP (either on the physical interface or the
VLAN) I loose any connection.
This is my current (not working) yaml (it is the only yaml, so there is no other config interfering)
network: version: 2 renderer: networkd ethernets: eth0: #the physical interface match: macaddress: "xx:xx:xx" dhcp4: no #this is the same IP I would get with dhcp addresses: [ "10.1.0.1/24" ] gateway4: 10.1.0.254 vlans: lab1: id: 10 link: eth0 dhcp4: no addresses: [ "10.1.10.100/24" ]
After applying the config I got following IF<->IP:
eth0 <-> 10.1.0.1
lab1 <-> 10.1.0.1
And I was unable to connect to the server via
ping it at this IP.
Configuration after running
[Match] MACAddress=xx:xx:xx [Network] Address=10.1.0.1/24 Gateway=10.1.0.254 VLAN=lab1
[Match] Name=lab1 [Network] Address=10.1.10.100/24
[NetDev] Name=lab1 Kind=vlan [VLAN] Id=10
If I change both to
dhcp4: yes and remove the addresses/gateway, I get the same addresses as statically configured above from
ssh/ping work for the
If I change
dhcp4: yes and leave the static config for
lab1 gets a
DHCP assigned address.
Why is the static address for
Note: I was assured the switching/routing is correctly configured, but I am willing to check this again.