Cara Konfigurasi DHCP Server di Mikrotik
DHCP Server berfungsi untuk memberikan IP Address kepada komputer client secara otomatis.
Konfigurasi DHCP Server
Interface DHCP Server ether2
IP Network 192.168.10.0/24
Gateway 192.168.10.1
IP Client 192.168.10.10 – 192.168.10.254
DNS server 192.168.1.1
Lease time/Lamanya waktu peminjaman sebuah IP Address kepada client diset 30 menit
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ip dhcp-server setup Select interface to run DHCP server on dhcp server interface: ether2 Select network for DHCP addresses dhcp address space: 192.168.10.0/24 Select gateway for given network gateway for dhcp network: 192.168.10.1 Select pool of ip addresses given out by DHCP server addresses to give out: 192.168.10.10-192.168.10.254 Select DNS servers dns servers: 192.168.1.1 Select lease time lease time: 00:30:00 |
Tampilkan DHCP Server
1 2 3 4 | ip dhcp-server print Flags: X - disabled, I - invalid # NAME INTERFACE RELAY ADDRESS-POOL LEASE-TIME ADD-ARP 0 dhcp1 ether2 dhcp_pool1 30m |
Tampilkan DHCP server network
1 2 3 | ip dhcp-server network print # ADDRESS GATEWAY DNS-SERVER WINS-SERVER DOMAIN 0 192.168.10.0/24 192.168.10.1 |
Tampilkan IP yang sedang terpakai
1 2 3 4 | ip dhcp-server lease print Flags: X - disabled, R - radius, D - dynamic, B - blocked # ADDRESS MAC-ADDRESS HOST-NAME SERVER RATE-LIMIT STATUS 0 D 192.168.10.30 08:00:27:B4:E2:34 pc-winxp dhcp1 bound |
Proteksi DHCP Server
Proteksi ini diberikan agar komputer harus memakai DHCP. Jika menggunakan IP Static tetap tidak akan bisa terkoneksi walaupun IP Address dan Gateway sudah betul.
1 | ip dhcp-server set numbers=0 add-arp=yes |
1 2 3 4 | ip dhcp-server print Flags: X - disabled, I - invalid # NAME INTERFACE RELAY ADDRESS-POOL LEASE-TIME ADD-ARP 0 dhcp1 ether2 dhcp_pool1 30m yes |
1 2 3 4 5 6 7 | interface ethernet print Flags: X - disabled, R - running, S - slave # NAME MTU MAC-ADDRESS ARP 0 R ether1 1500 08:00:27:1B:CC:5E enabled 1 R ether2 1500 08:00:27:8C:F2:84 enabled 2 R ether3 1500 08:00:27:F2:D2:8E enabled 3 R ether4 1500 08:00:27:55:35:00 enabled |
1 | interface ethernet set numbers=1 arp=reply-only |
1 2 3 4 5 6 7 | interface ethernet print Flags: X - disabled, R - running, S - slave # NAME MTU MAC-ADDRESS ARP 0 R ether1 1500 08:00:27:1B:CC:5E enabled 1 R ether2 1500 08:00:27:8C:F2:84 reply-only 2 R ether3 1500 08:00:27:F2:D2:8E enabled 3 R ether4 1500 08:00:27:55:35:00 enabled |
selamat mencoba 🙂