====== Mikrotik RouterOS DHCP Notes ====== FIXME This page is under construction and is not yet accurate. ===== DHCP Server ===== :!: If you have any problems with the DHCP server (maybe it didn't hand out a gateway address?), try deleting all existing pools and all existing DHCP servers, then run the **DHCP Setup Wizard**. In fact, this is probably the **fastest, easiest way to configure the DHCP server** in most all cases. ==== Data VLAN Scope ==== * Voice traffic is on VLAN 200 in this example * Factory defaulted phones boot up on the data VLAN 1 * **Option 2** (Time Offset hex value ''0xffff9d90'' is **GMT-7** hours or **-25200** seconds) * **Option 66** (TFTP Server) * **Option 160** (Polycom server) /ip pool add name=dhcp_pool1 ranges=192.168.62.65-192.168.62.199 /ip dhcp-server add address-pool=dhcp_pool1 disabled=no interface=bridge lease-time=1d name="LAN DHCP" /ip dhcp-server option add code=2 name=time-offset value=0xffff9d90 add code=66 name=tftp-server value="'http://192.168.61.30:83/'" add code=160 name=polycom-server value="'http://192.168.61.30:83/'" /ip dhcp-server network add address=192.168.62.0/24 dhcp-option=polycom-server,tftp-server,time-offset dns-server=\ 8.8.8.8,8.8.4.4 domain=mydomain.local gateway=192.168.62.1 netmask=24 next-server=\ 192.168.61.30 ntp-server=192.168.61.1 ==== Voice VLAN Scope ==== * Option 43 (Yealink, Ubiquiti, Ruckus and others) * Option 132 (Voice VLAN; most phones want text string) * Option :!: LLDP and manual VLAN configurations override DHCP option 132. **Factory-reset your phones** to be sure manual configurations are nullified. /ip dhcp-server add add-arp=yes address-pool=DataPool always-broa interface=vlan1 name=DHCPdata add add-arp=yes address-pool=VoicePool disabled=n DHCPvoice /ip dhcp-server option add code=132 name=VoiceVLAN value="s'200'" /ip dhcp-server config set store-leases-disk=10m /ip dhcp-server network add address=192.168.1.0/24 dhcp-option=VoiceVLAN gateway=192.168.1.1 add address=192.168.88.0/24 comment="default conf 209.244.0.3,8.8.8.8 gateway=192.168.88.1 netm add address=192.168.200.0/24 dns-server=8.8.8.8,8.8.4.4 gateway=\ 192.168.200.1 {{ :networking:router:mikrotik_dhcp_server_1.png?700 |}} {{ :networking:router:mikrotik_dhcp_server_2.png?700 |}} {{ :networking:router:mikrotik_dhcp_server_3.png?700 |}}