Configuring DHCP and NAT
Purpose: Automate client IP address assignment on the LAN via DHCP Server and translate private RFC1918 addresses to the public WAN IP using Source NAT.
Prerequisites
- Configured WAN interface with internet reachability and LAN bridge IP (e.g., 192.168.88.1/24).
Step-by-Step Configuration
Under IP -> Pool, create lan-pool with range 192.168.88.20-192.168.88.254 (reserving .2–.19 for static printers and access points).
Under IP -> DHCP Server, add Network 192.168.88.0/24 with Gateway 192.168.88.1 and DNS 192.168.88.1, then create the DHCP Server on bridge-lan.
Under IP -> Firewall -> NAT, add chain=srcnat out-interface=ether1 action=masquerade (or action=src-nat with to-addresses for static public IPs).
CLI / Configuration Snippet
# RouterOS v7.x — DHCP Server & Outbound NAT /ip pool add name=lan-pool ranges=192.168.88.20-192.168.88.254 /ip dhcp-server network add address=192.168.88.0/24 gateway=192.168.88.1 dns-server=192.168.88.1 /ip dhcp-server add name=dhcp-lan interface=bridge-lan address-pool=lan-pool disabled=no # Outbound NAT translation on WAN interface /ip firewall nat add chain=srcnat out-interface=ether1 action=masquerade comment="LAN to WAN NAT"
Connected workstations automatically obtain 192.168.88.x leases and browse external websites cleanly.
Troubleshooting Matrix
Enable DHCP Snooping on bridge switches so rogue routers plugged into wall ports cannot hand out unauthorized DHCP leases.
Save a configuration export after verifying client DHCP lease renewal.
Manages daily NOC telemetry, subscriber ticket queues, and on-site client turn-ups across corporate and residential estates in Nairobi.