Skip to content

IP Addressing

IP Addressing is a fundamental networking concept that provides logical addressing for devices on an IP network. RouterOS provides comprehensive support for both IPv4 and IPv6 addressing, allowing you to configure addresses on interfaces, manage address pools, and control address assignment through DHCP.

This documentation covers the /ip address menu for IPv4 configuration and IPv6 address management, explaining address types, subnetting concepts, and practical RouterOS configurations.

IPv4 addresses are 32-bit addresses written in dotted-decimal notation (e.g., 192.168.88.1). Each address consists of a network portion and a host portion, determined by the subnet mask.

An IPv4 address is represented as four octets (0-255) separated by dots:

192.168.88.1

The subnet mask determines how many bits represent the network portion:

CIDR NotationSubnet MaskUsable Hosts
/24255.255.255.0254
/25255.255.255.128126
/26255.255.255.19262
/27255.255.255.22430
/28255.255.255.24014
/29255.255.255.2486
/30255.255.255.2522
/32255.255.255.2551 (point-to-point)

RFC 1918 reserves specific address ranges for private networks. These addresses are not routable on the internet and are commonly used for internal networks:

Address RangeCIDRStartEnd
10.0.0.0/810.x.x.x10.0.0.010.255.255.255
172.16.0.0/12172.16.x.x - 172.31.x.x172.16.0.0172.31.255.255
192.168.0.0/16192.168.x.x192.168.0.0192.168.255.255
RangeDescription
0.0.0.0/8This network (RFC 1122)
127.0.0.0/8Loopback addresses
169.254.0.0/16Link-local (APIPA)
224.0.0.0/4Multicast (Class D)
240.0.0.0/4Reserved (Class E)
255.255.255.255/32Limited broadcast

Add an IP address to an interface using the /ip address menu:

/ip address add address=192.168.88.1/24 interface=ether1

This assigns the address 192.168.88.1 with a /24 subnet mask (255.255.255.0) to ether1.

/ip address print

Output:

Flags: X - disabled, I - invalid, D - dynamic, G - global, P - pending
# ADDRESS NETWORK INTERFACE DHCPSERVER
0 G 192.168.88.1/24 192.168.88.0 ether1

The output shows:

  • ADDRESS: The IP address with CIDR prefix
  • NETWORK: The network address (first address in subnet)
  • INTERFACE: The interface the address is assigned to
  • DHCPSERVER: If DHCP server is running on this address
PropertyDescription
addressIP address with CIDR notation (e.g., 192.168.88.1/24)
netmaskSubnet mask in dotted decimal (alternative to CIDR)
networkNetwork address (auto-calculated or explicitly set)
interfaceInterface to assign the address to
disabledWhether the address is disabled
actual-interfaceShows the actual interface (for bridges, VLANs)
dhcp-serverDHCP server that provides addresses from this pool
dynamicWhether the address was assigned dynamically
publishWhether to publish this address in routing protocols

Add multiple addresses to a single interface:

/ip address add address=192.168.88.1/24 interface=ether1
/ip address add address=10.0.0.1/24 interface=ether1

For point-to-point links, use /32 addresses:

/ip address add address=10.0.0.1/32 network=10.0.0.2 interface=ether1
/ip address add address=10.0.0.2/32 network=10.0.0.1 interface=ether2

Assign an IP address to a bridge:

/ip address add address=192.168.1.1/24 interface=bridge1

These properties are automatically calculated and cannot be modified:

PropertyDescription
dynamicAddress was assigned via DHCP or other dynamic method
invalidAddress configuration is invalid
actual-interfaceThe actual underlying interface

IPv6 addresses are 128-bit addresses typically written in hexadecimal notation with colons. RouterOS supports full IPv6 address configuration including link-local, unique local, and global unicast addresses.

Link-local addresses (fe80::/10) are automatically generated on all interfaces and are used for local communication only:

/ipv6 address add address=fe80::1/64 interface=ether1

RouterOS automatically generates link-local addresses when an interface is enabled. You can verify:

/ipv6 address print

Unique local addresses (ULA, fc00::/7) are similar to IPv4 private addresses:

/ipv6 address add address=fd00::1/64 interface=ether1 advertise=no

Global unicast addresses are publicly routable addresses assigned by an ISP or through other delegation methods:

/ipv6 address add address=2001:db8::1/64 interface=ether1
/ipv6 address add address=2001:db8:cafe::1/64 interface=bridge1 advertise=yes

The advertise=yes parameter enables router advertisement for prefix delegation.

/ipv6 address print

Output:

Flags: D - dynamic, P - pending, G - global, L - link-local
# ADDRESS INTERFACE ADV
0 G 2001:db8:cafe::1/64 bridge1 yes
1 L fe80::215:5dff:fea0:1/64 ether1 no

RouterOS can manage address pools for DHCP server assignments or manual allocation.

/ip pool add name=LAN-Pool ranges=192.168.88.100-192.168.88.200

This creates a pool named LAN-Pool with 101 addresses available for DHCP assignment.

/ip pool print

Output:

# NAME Ranges
0 LAN-Pool 192.168.88.100-192.168.88.200
/ipv6 pool add name=LAN-Pool-v6 prefix=2001:db8:cafe::/64 prefix-length=64

Configure a router as a LAN gateway:

/ip address add address=192.168.88.1/24 interface=ether1
/ip address add address=203.0.113.1/30 interface=ether2

This configures:

  • ether1: LAN interface with 192.168.88.0/24 network
  • ether2: WAN interface with point-to-point link

Add a secondary network to the same interface:

/ip address add address=10.0.0.1/24 interface=ether1
/ip address add address=172.16.0.1/24 interface=ether1

The interface now responds to both networks.

Assign addresses to VLAN interfaces:

/interface vlan add name=VLAN10 vlan-id=10 interface=bridge1
/ip address add address=192.168.10.1/24 interface=VLAN10

For router redundancy or OSPF, use loopback addresses:

/interface loopback add name=loopback
/ip address add address=10.255.255.1/32 interface=loopback

Configure IPv6 with prefix delegation from an upstream router:

/ipv6 dhcp-client add interface=ether1 pool-name=ipv6-pool add-prefix-length=64 request=prefix
/ipv6 pool add name=ipv6-pool prefix=2001:db8:cafe::/48 prefix-length=64

If an address doesn’t appear after configuration:

  1. Verify the interface exists and is running:

    /interface print
  2. Check for address conflicts:

    /ip address print
  3. Verify interface is not disabled:

    /interface ethernet set ether1 disabled=no
  1. Verify the address is assigned:

    /ip address print
  2. Check ARP table:

    /ip arp print
  3. Verify firewall is not blocking:

    /ip firewall filter print
  1. Verify IPv6 is enabled:

    /ipv6 settings print
  2. Check for duplicate addresses:

    /ipv6 address print
  3. Verify router advertisement settings:

    /ipv6 nd print

Using /32 on a regular interface: Using /32 prevents the router from determining the network, causing routing issues:

# Wrong
/ip address add address=192.168.88.1/32 interface=ether1
# Correct
/ip address add address=192.168.88.1/24 interface=ether1

Network address as host address: The first address in a subnet is the network address and cannot be assigned to hosts:

# Wrong - 192.168.88.0 is the network address
/ip address add address=192.168.88.0/24 interface=ether1
# Correct
/ip address add address=192.168.88.1/24 interface=ether1

Broadcast address as host address: The last address in a subnet is the broadcast address:

# Wrong - 192.168.88.255 is the broadcast address
/ip address add address=192.168.88.255/24 interface=ether1
# Correct - use 192.168.88.254 for last usable
/ip address add address=192.168.88.254/24 interface=ether1
  • DHCP Server - Automatically assign addresses to clients: /ip dhcp-server
  • DHCP Client - Obtain address from upstream: /ip dhcp-client
  • IP Settings - Configure system-wide IP parameters: /ip settings
  • ARP - Address resolution: /ip arp
  • IPv6 ND - Neighbor discovery: /ipv6 nd
  • Routing - Route management: /ip route
  • RFC 791 - Internet Protocol
  • RFC 826 - Address Resolution Protocol (ARP)
  • RFC 1918 - Address Allocation for Private Internets
  • RFC 4193 - Unique Local IPv6 Unicast Addresses
  • RFC 4291 - IPv6 Addressing Architecture