MikroTik API icon

MikroTik API

Community Node for MikroTik RouterOS API

Actions67

IP Address → Add

AI-generated

Summary

Adds an IP address to a MikroTik interface.

Inputs

  • ipAddr (required) — IP address with subnet, e.g. 192.168.88.1/24
  • ipInterface (required) — Interface name to assign the address to
  • commentText — Optional comment for the address

Output shape

Array containing a single object with keys: resource, operation, count (number of returned items), data (raw MikroTik response). If the option 'cleanKeys' is true, response keys have - and / replaced with _.

The command sent is '/ip/address/add' with parameters address, interface, and comment. On success the MikroTik API returns the added item(s). Errors are captured in the error handling flow.

Examples

Example 1: Add address 10.0.0.5/24 to interface ether2 with comment 'Management IP'

ipAddr: 10.0.0.5/24, ipInterface: ether2, commentText: Management IP

Links

Discussion