REFERENCE

v6.11.0

IP Addresses

Interface IP addressing (`/ip address`).

Tools

add_ip_address

Add IPv4 Address to Interface · Risk: write

Assigns an IPv4 address to an interface (/ip address add). Use this to add a CIDR address (e.g. '192.168.1.1/24') as the router's own address on a network segment — sets the interface's local address, optional network, and broadcast. For IPv6 use add_ipv6_address. Before creating, this checks the existing /ip address list and REFUSES to add an address that duplicates or overlaps an already-assigned subnet, returning the conflicting entries so you can pick a non-overlapping address. To intentionally add an overlapping/secondary address, set allow_overlap: true. Returns the full detail of the new address entry including its .id.

ParameterRequiredDefinition
addressYesAddress with CIDR, e.g. '192.168.1.1/24' {"type":"string"}
interfaceYes{"type":"string"}
networkNo{"type":"string"}
broadcastNo{"type":"string"}
commentNo{"type":"string"}
disabledYes{"default":false,"type":"boolean"}
allow_overlapYesBypass the duplicate/overlap guard to add a secondary address in an existing subnet {"default":false,"type":"boolean"}

list_ip_addresses

List IPv4 Addresses · Risk: read

Lists IPv4 interface address assignments (/ip address print). Use this to enumerate which addresses are bound to which interfaces, or to find .id values needed by get_ip_address and remove_ip_address. Supports filtering by interface name (interface_filter), address substring (address_filter), network (network_filter), disabled-only, or dynamic-only. For IPv6 use list_ipv6_addresses. Returns all matching entries with address/prefix, interface, network, flags, and .id.

ParameterRequiredDefinition
interface_filterNo{"type":"string"}
address_filterNo{"type":"string"}
network_filterNo{"type":"string"}
disabled_onlyYes{"default":false,"type":"boolean"}
dynamic_onlyYes{"default":false,"type":"boolean"}

get_ip_address

Get IPv4 Address Details · Risk: read

Retrieves full detail for a single IPv4 address entry (/ip address print detail). Accepts either a RouterOS .id (e.g. '*1', obtained from list_ip_addresses) or the dotted-decimal CIDR address string (e.g. '192.168.1.1/24'). Use this to inspect one specific assignment rather than the full list. For IPv6 use get_ipv6_address. Returns the complete record including interface, network, broadcast, flags, and .id.

ParameterRequiredDefinition
address_idYesRouterOS .id (e.g. '*1') or the address value {"type":"string"}

remove_ip_address

Remove IPv4 Address · Risk: destructive

Removes an IPv4 interface address from the device (/ip address remove). Accepts either a RouterOS .id (e.g. '*1', from list_ip_addresses) or the CIDR address value (e.g. '192.168.1.1/24'); performs an existence check before deletion and returns a not-found message if the entry is absent. For IPv6 use remove_ipv6_address. Returns confirmation of successful removal.

ParameterRequiredDefinition
address_idYes{"type":"string"}

On this page