0

I have configured multiple Vlan under a single interface. For operations need we have to change two Vlan, so i have just changed the Vlan id and name only other all information like IP address, route all are unchanged. After applying the configuration now i am seeing four Vlan. Two old vlan and two new vlan.

N.B. I have just changed the Vlan ID 244,242 with 254,252

ifconfig output netplan config

Masud Rana
  • 11
  • 1
  • 1

1 Answers1

2

When you remove an interface completely from your netplan config, netplan (or specifically, networkd) can no longer distinguish between a removed config and an interface that you have manually configured outside of netplan. You can remove the no-longer-used vlans manually at runtime from the command line after applying the netplan config, or you can reboot the system to get a clean network state.

slangasek
  • 5,562
  • Can you please help at https://askubuntu.com/questions/1201815/vlan-over-netplan-in-18-04-lts/1201864?noredirect=1#comment2016401_1201864 – heynnema Jan 11 '20 at 22:52
  • Dear @slangasek, Thank you very much for your answer. I have resolved the issue by restarting the server. But i would like to know how can i remove unused vlan manually at runtime. – Masud Rana Jan 16 '20 at 06:23
  • @MasudRana You need to run a command like ip address delete dev en0.999 as shown at http://manpages.ubuntu.com/manpages/trusty/man8/ip-address.8.html . Unfortunately, you cannot do this and activate interfaces via netplan at the same time, so you may get locked out of the node one way or another. – Stefan Lasiewski Sep 04 '20 at 01:30
  • I found that ip address delete dev en0.999 gave back RTNETLINK answers: Operation not supported Using ip link delete en0.999 worked for me. – Dave Apr 21 '22 at 19:47