update_route
Modify existing router routes by changing gateway, distance, or routing table to control traffic flow and failover in MikroTik RouterOS.
Instructions
Updates a route.
Notes: route_id: "*N" or "N" from list output e.g. "*3" dst_address: CIDR e.g. "192.168.1.0/24" check_gateway: "ping" or "arp" distance: 1-255 routing_table: name of a table from /routing table; "" moves the route back to "main", since every RouterOS 7 route belongs to a table. Pass "" to vrf_interface or pref_src to clear them.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scope | No | ||
| device | No | ||
| comment | No | ||
| gateway | No | ||
| disabled | No | ||
| distance | No | ||
| pref_src | No | ||
| route_id | Yes | ||
| dst_address | No | ||
| target_scope | No | ||
| check_gateway | No | ||
| routing_table | No | ||
| vrf_interface | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |