IP Pools
IP Pools
Section titled “IP Pools”Summary
Section titled “Summary”IP Pools in RouterOS provide a mechanism to define ranges of IP addresses that can be dynamically assigned to network clients. These pools are used by various RouterOS services including DHCP servers, Point-to-Point servers, and other services that require dynamic IP address allocation.
This documentation covers both IPv4 pools (/ip pool) and IPv6 pools (/ipv6 pool), including configuration options, practical examples, and common use cases.
Command Path
Section titled “Command Path”- IPv4 Pool:
/ip pool - IPv6 Pool:
/ipv6 pool - Used Addresses (IPv4):
/ip pool used - Used Addresses (IPv6):
/ipv6 pool used
IPv4 Pool
Section titled “IPv4 Pool”Sub-menu: /ip pool
IPv4 pools define ranges of IPv4 addresses that can be assigned to clients. When possible, RouterOS maintains consistent address assignments based on the owner/info pair (e.g., DHCP MAC address).
Properties
Section titled “Properties”comment (string; Default: )
Short description of the pool for documentation purposes.
name (string; Default: )
Unique identifier for the pool. This name is referenced when configuring services like DHCP servers.
next-pool (string; Default: )
Specifies a fallback pool to use when the current pool has exhausted its available addresses. When an IP address acquisition is requested and the current pool has no free addresses, RouterOS will attempt to allocate from the next-pool.
ranges (IP; Default: )
Comma-separated list of non-overlapping IP address ranges. Format: from1-to1,from2-to2,...,fromN-toN
Example: 10.0.0.1-10.0.0.27,10.0.0.32-10.0.0.47
Creating an IPv4 Pool
Section titled “Creating an IPv4 Pool”Create a basic pool with a single range:
/ip pool add name=my-pool ranges=192.168.88.10-192.168.88.250Create a pool with multiple non-contiguous ranges:
/ip pool add name=my-pool ranges=10.0.0.2-10.0.0.99,10.0.0.101-10.0.0.126Viewing Pool Information
Section titled “Viewing Pool Information”Display all configured pools:
/ip pool printDisplay a specific pool:
/ip pool print where name=my-poolUsing Next-Pool for Overflow
Section titled “Using Next-Pool for Overflow”Configure pool chaining for handling address exhaustion:
/ip pool add name=primary-pool ranges=192.168.88.10-192.168.88.200/ip pool add name=secondary-pool ranges=192.168.88.201-192.168.88.250/ip pool set primary-pool next-pool=secondary-poolIPv4 Pool Used Addresses
Section titled “IPv4 Pool Used Addresses”Sub-menu: /ip pool used
View all IP addresses currently allocated from pools:
/ip pool used printRead-only Properties
Section titled “Read-only Properties”address (IP)
The IP address assigned to the client.
info (string)
For DHCP: MAC address from leases. For PPP: username of the PPP client.
owner (string)
The service using this IP address (e.g., DHCP, PPP).
pool (string)
Name of the pool the address belongs to.
IPv6 Pool
Section titled “IPv6 Pool”Sub-menu: /ipv6 pool
IPv6 pools manage IPv6 prefix allocation for prefix delegation. Unlike IPv4 pools that assign individual addresses, IPv6 pools assign address prefixes to clients.
Properties
Section titled “Properties”name (string; Default: )
Descriptive name for the pool.
prefix (IPv6/0..128; Default: )
The IPv6 address prefix that will be divided among clients. For example, 2001:db8::/60.
prefix-length (integer [1..128]; Default: )
The prefix size allocated to each client. For example, if prefix is 2001::/60 and prefix-length is 62, clients receive /62 prefixes.
from-pool (string; Default: )
Name of another pool from which to acquire the prefix dynamically (used with DHCPv6).
Creating an IPv6 Pool
Section titled “Creating an IPv6 Pool”Create a pool to delegate /62 prefixes from a /60 prefix:
/ipv6 pool add name=ipv6-pool prefix=2001:db8::/60 prefix-length=62Viewing IPv6 Pools
Section titled “Viewing IPv6 Pools”/ipv6 pool printIPv6 Pool Used Addresses
Section titled “IPv6 Pool Used Addresses”Sub-menu: /ipv6 pool used
View currently allocated IPv6 prefixes:
/ipv6 pool used printRead-only Properties
Section titled “Read-only Properties”info (string)
Shows DUID (DHCP Unique Identifier) information received from the client (value in hex).
owner (string)
Service that reserved the prefix (e.g., “DHCP”).
pool (string)
Name of the pool.
prefix (IPv6/0..128)
The IPv6 prefix assigned to the client.
Practical Examples
Section titled “Practical Examples”DHCP Server with IP Pool
Section titled “DHCP Server with IP Pool”Configure a DHCP server using an IP pool:
/ip pool add name=dhcp-pool ranges=192.168.88.10-192.168.88.250/ip dhcp-server add name=dhcp1 interface=bridge1 address-pool=dhcp-pool lease-time=1d/ip dhcp-server network add address=192.168.88.0/24 gateway=192.168.88.1 dns-server=192.168.88.1Excluding Gateway from Pool
Section titled “Excluding Gateway from Pool”Create a pool that excludes the gateway address:
/ip pool add name=dhcp-pool ranges=192.168.88.10-192.168.88.254This assumes gateway is at 192.168.88.1 which is not included in the pool.
Multiple Subnets with Next-Pool
Section titled “Multiple Subnets with Next-Pool”Handle multiple subnets with overflow:
/ip pool add name=office-pool ranges=10.0.0.10-10.0.0.200/ip pool add name=guest-pool ranges=10.0.1.10-10.0.1.200/ip pool set office-pool next-pool=guest-poolPPPoE Server with IP Pool
Section titled “PPPoE Server with IP Pool”Configure PPPoE server to assign addresses from a pool:
/ip pool add name=pppoe-pool ranges=172.16.0.10-172.16.0.250/ppp profile add name=pppoe-profile local-address=172.16.0.1 remote-address=pppoe-pool/ppp secret add name=user1 password=secret profile=pppoe-profileIPv6 Prefix Delegation
Section titled “IPv6 Prefix Delegation”Configure DHCPv6 server with prefix delegation:
/ipv6 pool add name=delegation-pool prefix=2001:db8:cafe::/48 prefix-length=64/ipv6 dhcp-server add name=dhcpv6 interface=bridge1 address-pool=static-only prefix-pool=delegation-pool/ipv6 dhcp-server network add address=2001:db8:cafe::/64Troubleshooting
Section titled “Troubleshooting”Pool Shows No Free Addresses
Section titled “Pool Shows No Free Addresses”Verify available addresses in the pool:
/ip pool print/ip pool used printIf exhausted, either:
- Add more ranges to the pool
- Configure next-pool for overflow
- Create additional pools
DHCP Clients Not Receiving Addresses
Section titled “DHCP Clients Not Receiving Addresses”Ensure the pool is correctly referenced in the DHCP server:
/ip dhcp-server print/ip dhcp-server exportVerify the address-pool setting points to the correct pool name.
IPv6 Prefix Not Being Delegated
Section titled “IPv6 Prefix Not Being Delegated”Check DHCPv6 server configuration:
/ipv6 dhcp-server print detailEnsure prefix-pool is configured with the correct pool name and prefix-length.
Address Already in Use
Section titled “Address Already in Use”Check which service is using the address:
/ip pool used print where address=192.168.88.10Remove the lease or connection, or adjust pool ranges to exclude used addresses.
Common Issues
Section titled “Common Issues”Pool range overlaps with static addresses
- Ensure pool ranges don’t include gateway or statically assigned addresses
- Use exclusion ranges (e.g.,
10.0.0.1-10.0.0.99,10.0.0.101-10.0.0.126)
DHCP lease not released
- Check
/ip dhcp-server leasefor active leases - Remove stale leases:
/ip dhcp-server lease remove [find]
IPv6 pool exhausted
- Consider using a larger prefix for the pool
- Ensure prefix-length is appropriate for the number of clients
Related Features
Section titled “Related Features”- DHCP Server - Uses IP pools for dynamic address assignment (
/ip dhcp-server) - PPPoE Server - Uses IP pools for PPP connections (
/ppp) - Hotspot - Can use IP pools for client addresses (
/ip hotspot) - DHCPv6 Server - Uses IPv6 pools for prefix delegation (
/ipv6 dhcp-server) - Point-to-Point - Various PPP types can use IP pools