REFERENCE

v6.11.0

Switch — Settings

Hardware switch chips: mirroring, CPU flow control (`/interface ethernet switch`).

Tools

list_switches

List Hardware Switch Chips · Risk: read

Lists hardware switch chips (/interface ethernet switch). Use to discover switch chip names and types present on the device before targeting a chip with get_switch or update_switch. Accepts optional name_filter and type_filter for partial-match filtering. Returns chip name, type, and mirror/flow-control configuration for each matching entry; returns an empty message if none match.

ParameterRequiredDefinition
name_filterNoPartial switch-name match {"type":"string"}
type_filterNoPartial switch-type match {"type":"string"}

get_switch

Get Hardware Switch Chip Details · Risk: read

Fetches full detail for a single hardware switch chip (/interface ethernet switch print detail). Use to inspect the current cpu-flow-control flag and mirror-source, mirror-target, and mirror-egress settings before modifying them with update_switch. switch_id accepts the chip name (e.g. 'switch1') or the RouterOS .id returned by list_switches — tries .id lookup first, then falls back to name lookup. Returns detailed chip settings or a not-found message.

ParameterRequiredDefinition
switch_idYesSwitch name (e.g. 'switch1') or RouterOS '.id' {"type":"string"}

update_switch

Update Hardware Switch Chip Settings · Risk: write-idempotent

Modifies settings on a hardware switch chip (/interface ethernet switch set) — use to configure port mirroring (SPAN) or CPU flow control on the chip itself. switch_id accepts the chip name (e.g. 'switch1') or the RouterOS .id returned by list_switches.

cpu_flow_control: pauses CPU-bound traffic when the CPU port is congested. mirror_source / mirror_target: span a port's traffic to a monitor port or 'cpu' (chip-dependent availability). mirror_egress: egress mirror source port on newer chips. Pass mirror_source / mirror_target / mirror_egress='none' to disable mirroring.

Returns updated switch details on success.

ParameterRequiredDefinition
switch_idYesSwitch name (e.g. 'switch1') or RouterOS '.id' {"type":"string"}
nameNoRename the switch {"type":"string"}
cpu_flow_controlNo{"type":"boolean"}
mirror_sourceNoSource port to mirror, or 'none' {"type":"string"}
mirror_targetNoMonitor port, 'cpu', or 'none' {"type":"string"}
mirror_egressNoEgress mirror source port (newer chips), or 'none' {"type":"string"}
mirror_egress_targetNoEgress mirror target port (88E6393X/88E6191X/88E6190 chips), or 'none' {"type":"string"}
switch_all_portsNoSwitch all ports together (RB450G/RB435G/RB850Gx2 only) {"type":"boolean"}

On this page