I want to use a local hostname to access the same local server via multiple VLAN's easily.
It works very well when I set netplan to DCHP, and follow these steps: https://linuxconfig.org/how-to-change-hostname-on-ubuntu-18-04-bionic-beaver-linux
The trouble starts when I set netplan to use a static IP-address. Then suddenly, the local hostname does not work anymore.
My netplan configuration for static IP is as follows (I did not configure vlan's just yet):
network:
ethernets:
eno1:
addresses: []
dhcp4: no
eno2:
addresses: []
dhcp4: no
optional: true
eno3:
addresses: []
dhcp4: no
optional: true
eno4:
addresses: []
dhcp4: no
optional: true
bonds:
bond0:
interfaces: [eno1, eno2, eno3, eno4]
addresses: [192.168.55.10/24]
gateway4: 192.168.55.1
nameservers:
search: [local]
addresses: [192.168.55.1, 1.1.1.1]
dhcp4: no
parameters:
mode: 802.3ad
version: 2
I'm quite sure it is not the bonding, because I have also tried this configuration:
network:
version: 2
ethernets:
eno1:
addresses: [192.168.55.10/24]
gateway4: 192.168.55.1
nameservers:
search: [local]
addresses: [192.168.55.1,1.1.1.1]