I'm using Ubuntu 18.04. I added a new NIC (network interface card) to the box and I disabled the old one in BIOS. This is obviously required to amend a configuration. I just simply swapped
eth0 with the new
enp2s0 in the
netplan config. All looked good and all services have worked.
After some time, I wanted to add a vlan configuration to the
netplan yaml file, but it was not so simple as in the examples found over forums and netplan.io. The configuration showed the new vlan and IP, but I spotted that the main interface has 2 IP addresses: a static one as per
netplan and secondary one via
2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000 link/ether 74:da:38:d8:db:41 brd ff:ff:ff:ff:ff:ff inet 192.168.6.6/24 brd 192.168.6.255 scope global enp2s0 valid_lft forever preferred_lft forever inet 192.168.6.56/24 brd 192.168.6.255 scope global secondary enp2s0 valid_lft forever preferred_lft forever inet6 fe80::76da:38ff:fed8:db41/64 scope link valid_lft forever preferred_lft forever ip route default via 192.168.6.1 dev enp2s0 src 192.168.6.56 metric 202 192.168.6.0/24 dev enp2s0 proto kernel scope link src 192.168.6.56 metric 202
I started digging: removed vlan config, removed
cloud-init from the system (I don't need this).
Below is my
network: ethernets: enp2s0: addresses: [192.168.6.6/24] gateway4: 192.168.6.1 nameservers: addresses: [192.168.16.253, 188.8.131.52, 184.108.40.206] dhcp4: false version: 2 renderer: networkd # vlans: # vlan.15: # id: 15 # link: enp2s0 # addresses: [192.168.15.99/24]
How to get rid of the DCHP assigned address?
Where can I find the config responsible for that part of a system?
I thought that
cloud-init did it, but, even after removing it, nothing has changed in the network subsystem behaviour.