Page 1 of 1

Unknown Bridge port remove

Posted: Thu Aug 22, 2019 5:20 pm
by amiltonjustino
Hello everyone,

I am trying to make a script to remove the "unknown" interfaces added in bridges, something like this:
/interface bridge port remove where interface="unknown"

But the "where" can not be used after remove, only "number".

Does anyone have any ideas for automating the removal of these "unknown" interfaces?

Re: Unknown Bridge port remove

Posted: Thu Aug 22, 2019 7:16 pm
by Jotne
How did they get there?

Re: Unknown Bridge port remove

Posted: Thu Aug 22, 2019 7:25 pm
by amiltonjustino
Hi,
These were interfaces dynamically created by capsman, where remote APs were disconnected for some reason and when they came back capsman creates new interfaces and the old ones are "unknown".

Re: Unknown Bridge port remove

Posted: Thu Aug 22, 2019 7:32 pm
by pe1chl
How did they get there?
There are lots of ways to get them there!
But of course the fact that you see interface 'unknown' does not mean it is really named 'unknown' so that match does not work.
No idea if it needs to be done with script, in the UI of course you can sort on name and then delete the entire block.

Re: Unknown Bridge port remove

Posted: Fri Aug 23, 2019 8:27 pm
by amiltonjustino
I need a scheduled task to eliminate without sysadmin interaction.

Re: Unknown Bridge port remove

Posted: Mon Aug 26, 2019 2:48 am
by SiB
You must check few parameter in your case.
Remember that parameter=no and !parameter have differ result.
I add to bridge port a "virtual ethernet" interface and remove it to create a unknow device into bridge port.

In this scenario I found this way:
/interface bridge port print where status=inactive !dynamic !hw-offload
/interface bridge port remove [find status=inactive !dynamic !hw-offload]

Re: Unknown Bridge port remove

Posted: Mon Aug 26, 2019 2:31 pm
by amiltonjustino
Perfect.
Solved with "/interface bridge port remove [find status=inactive !dynamic !hw-offload]"

Thank you very much.