Community discussions

MikroTik App
 
wickedshark
just joined
Topic Author
Posts: 7
Joined: Thu Jul 08, 2021 2:09 am

edit or change interface configuration

Fri Jul 09, 2021 9:07 pm

How do I edit an interface configuration??

If a specific interface is configured like this now:
add bridge=bridge comment=defconf interface=ether15
How do I change it to:
add bridge=bridge comment=defconf frame-types=admit-only-vlan-tagged ingress-filtering=yes interface=ether15
I have tried the set and edit command and when I use the add command I get "failure: device already add as bridge port" this makes sense since it is configured, but I want to change or set different parameters now.
 
jonah1810
Frequent Visitor
Frequent Visitor
Posts: 98
Joined: Tue Jul 30, 2019 10:19 pm

Re: edit or change interface configuration

Fri Jul 09, 2021 9:38 pm

wait did that original command work?!
should be something like:

/interface bridge
add name=Bridge comment="defconf"

/interface bridge port
add interface=ether15 bridge=Bridge

/interface bridge
set [find where name=Bridge] comment="Changed value example"
 
wickedshark
just joined
Topic Author
Posts: 7
Joined: Thu Jul 08, 2021 2:09 am

Re: edit or change interface configuration

Fri Jul 09, 2021 9:51 pm

wait did that original command work?!
should be something like:

/interface bridge
add name=Bridge comment="defconf"

/interface bridge port
add interface=ether15 bridge=Bridge

/interface bridge
set [find where name=Bridge] comment="Changed value example"

Sorry the first command listed was the current configuration. When I try to use the second command it does not work, however I will try one of the options you mentioned now.

I am trying to change some of the parameters of the configuration for that port via terminal. I need to add "frame-types=admit-only-vlan-tagged ingress-filtering=yes" to some of the ports I have configuration now. I know how to do it via WinBox, but I would like to know how to do it via the terminal or cli
 
User4011
newbie
Posts: 38
Joined: Tue Jun 29, 2021 12:36 am

Re: edit or change interface configuration

Fri Jul 09, 2021 10:28 pm

/interface bridge port
set bridge=bridge interface=ether9 frame-types=admit-only-vlan-tagged ingress-filtering=yes
numbers:  6
Worked for me. Pretty new to RoS myself. Still trying to figure out why the OS is prompting me for "numbers:" yet I've specified the interface...
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11439
Joined: Thu Mar 03, 2016 10:23 pm

Re: edit or change interface configuration  [SOLVED]

Fri Jul 09, 2021 11:05 pm

Command "set" takes number of parameters but only single one is used as "change settings of this item" and even that parameter is optional (if omitted, command asks for numbers). The rest of parameters are actions. Your example command changes values of the following properties: bridge, interface, frame-types and ingress-filtering.

What you really wanted to execute is this:
/interface bridge port
set [ find bridge=bridge interface=ether9 ] frame-types=admit-only-vlan-tagged ingress-filtering=yes

The construct inside square brackets actually defines which item will get changed (can be multiple items if desired) while the rest of command defines what to be set on applicable items. If you omit that construct (including brackets), then set command asks for numbers.

Who is online

Users browsing this forum: No registered users and 33 guests