DHCP and ARP in RouterOS 7
Configure DHCP clients, DHCP servers, and manage the ARP table in MikroTik RouterOS 7.
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
- Go to IP → DHCP Client.
- Click [+].
- Select your WAN Interface (e.g.,
ether1). - Ensure Use Peer DNS and Add Default Route are selected.
- 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
- Go to IP → Pool.
- Click [+].
- Name:
lan-pool. - Addresses:
192.168.88.10-192.168.88.250. - 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
- Go to IP → DHCP Server → Networks tab.
- Click [+].
- Address:
192.168.88.0/24. - Gateway:
192.168.88.1. - DNS Servers:
8.8.8.8and1.1.1.1. - Click OK.
Step C: Enable the DHCP Server
/ip dhcp-server
add name=lan-dhcp interface=bridge1 address-pool=lan-pool disabled=no
- Go to IP → DHCP Server → DHCP tab.
- Click [+].
- Name:
lan-dhcp. - Interface:
bridge1. - Address Pool:
lan-pool. - 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
- Go to IP → ARP. 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
- In IP → ARP, double-click an existing dynamic entry.
- Click Make Static.
- Alternatively, click [+] to manually enter an IP, MAC, and Interface.