Manage Routing Rule
manage_routing_ruleAdd, remove, enable, or disable MikroTik policy routing rules by source, destination, interface, and table, with dry-run preview and conflict detection.
Instructions
Add, remove, enable, or disable a policy routing rule. Idempotent by srcAddress+dstAddress+interface+table composite key; a repeated add with an explicit, different ruleAction is a CONFLICT. Supports dry-run mode.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | Routing table name — part of the composite idempotency key; required for all actions | |
| action | Yes | Action to perform | |
| dryRun | No | Preview changes without applying. | |
| priority | No | Unsupported: RouterOS 7 /routing/rule has no priority (rules apply in list order); add rejects it | |
| routerId | No | Router ID; omit to use the default router. | |
| interface | No | Incoming interface to match | |
| dstAddress | No | Destination CIDR to match | |
| ruleAction | No | Rule action, add only: lookup (default; when the table has no route, later rules and main still apply) or lookup-only-in-table (no fallback) | |
| srcAddress | No | Source CIDR to match | |
| confirmationToken | No | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |