beginner

DHCP and ARP in RouterOS 7

Configure DHCP clients, DHCP servers, and manage the ARP table in MikroTik RouterOS 7.

30-45 min

DHCP and ARP in RouterOS 7

Dynamic Host Configuration Protocol (DHCP) assigns IP addresses automatically, while Address Resolution Protocol (ARP) maps IP addresses to physical MAC addresses. Both are foundational for devices to communicate on a local network.

1. Configuring a DHCP Client

If your ISP or an upstream router provides IP addresses dynamically, you must set up a DHCP Client on the WAN-facing interface.

/ip dhcp-client
add interface=ether1 add-default-route=yes use-peer-dns=yes
  1. Go to IPDHCP Client.
  2. Click [+].
  3. Select your WAN Interface (e.g., ether1).
  4. Ensure Use Peer DNS and Add Default Route are selected.
  5. Click OK.

2. Configuring a DHCP Server

To hand out IP addresses to your LAN devices, configure a DHCP Server. This involves defining an IP pool, setting up DHCP network parameters (gateway, DNS), and binding the server to an interface (usually a bridge).

Step A: Create an IP Pool

/ip pool
add name=lan-pool ranges=192.168.88.10-192.168.88.250
  1. Go to IPPool.
  2. Click [+].
  3. Name: lan-pool.
  4. Addresses: 192.168.88.10-192.168.88.250.
  5. Click OK.

Step B: Setup DHCP Network Options

/ip dhcp-server network
add address=192.168.88.0/24 gateway=192.168.88.1 dns-server=8.8.8.8,1.1.1.1
  1. Go to IPDHCP ServerNetworks tab.
  2. Click [+].
  3. Address: 192.168.88.0/24.
  4. Gateway: 192.168.88.1.
  5. DNS Servers: 8.8.8.8 and 1.1.1.1.
  6. Click OK.

Step C: Enable the DHCP Server

/ip dhcp-server
add name=lan-dhcp interface=bridge1 address-pool=lan-pool disabled=no
  1. Go to IPDHCP ServerDHCP tab.
  2. Click [+].
  3. Name: lan-dhcp.
  4. Interface: bridge1.
  5. Address Pool: lan-pool.
  6. Click OK.

3. Managing ARP

RouterOS builds its ARP table dynamically as it sees traffic. Sometimes, you may want to assign a static ARP entry for security or static routing reasons.

Viewing the ARP Table

/ip arp print
  1. Go to IPARP. You will see a list of dynamically learned IP-to-MAC mappings.

Making an ARP Entry Static

/ip arp
add address=192.168.88.50 mac-address=00:11:22:33:44:55 interface=bridge1
  1. In IPARP, double-click an existing dynamic entry.
  2. Click Make Static.
  3. Alternatively, click [+] to manually enter an IP, MAC, and Interface.