Disabled interface, has an IP?

Hey all

As the subject summarises, yesterday I came across a rather strange issue. Unfortunately I forgot to screenshot it but here’s a summary of what I did:

  • I setup a simple bash script to
    a) Run ‘configure’
    b) Disable a virtual interface - lets say eth0.123
    c) Enable an interface - eth1
    d) Update a routing policy and nat source rule
    e) Run ‘commit’
    f) Run ‘exit’

So far so good - the script ran correctly and the changes were made.

A few minutes later I checked the interfaces and:

  1. eth0 had an IP assigned to it (DHCP, directly through the ISP) - Shocking, since the interface was marked disabled earlier
  2. eth1, as expected had an IP assigned to it.

Digging a bit further I went to “configure” the interfaces, and verified that eth0 was indeed marked as “disabled”.

I’m not really sure how to debug this, has anyone seen this before?
As an FYI I’ve never seen this problem prior to running the bash scripts, if I run the commands manually (as I’ve been doing for the last few weeks) the above behaviour never happens.

Vyos Version: VyOS 1.3.0-rc6


Do you mind sharing your script?
Did you checkout command-scripting?