i am trying to get my way around the RouterOS command line and the goal is to put all infrastructure into ansible code. So i am trying to find solutions for common tasks first by command line to then put it into ansible playbooks. Target is currently CRS326 with current RouterOS and i must say i am a bit puzzled or lost (Doing networking for 20+ Years on ALU, Cisco, Juniper, Redback etc)
So is there a command to remove a port from a vlan? From what i found there isnt. One has to get output from the command line, parse it and put it in again right?
So the vlan creation and port association is one single statement like:
Example:
Code: Select all
/interface bridge vlan add bridge=bridge untagged=sfp-sfpplus10,sfp-sfpplus11 vlan-ids=1001
Code: Select all
/interface/bridge/vlan/export
and issue a corresponding set for all vlans with the untagged/tagged port list in the set - For example:
Code: Select all
/interface/bridge/vlan/set untagged=sfp-sfpplus11 [ find vlan-ids=1001 ]
Code: Select all
/interface bridge vlan add bridge=bridge untagged=sfp-sfpplus10 vlan-ids=1002
Is that a correct understanding? Read:
- I can not incrementally remove or add ports for vlans
- I can not remove a port from all vlans in a single statement (or 2 in case for tagged and untagged)
Flo