22 Dynamic Host Configuration Protocol – MikroTik DHCP Relay
Mathew J. Heath Van Horn, PhD and Jacob Christensen
Typically, larger networks are segmented into smaller LANs. However, one concern that can arise from this is the issue of distributing IP addresses across individual subnets. This is because DHCP discover packets are designed to be broadcasted within local networks. While a network administrator could configure a dedicated DHCP server for each LAN, we demonstrated in Static Networking Part 1 that this can quickly become tedious to configure and maintain. Luckily, DHCP relays can be configured to re-transmit IP requests to remote servers. This way, one server can lease addresses to multiple networks at once. In this chapter, we will configure a DHCP relay with a MikroTik router to service two networks.
Estimated time for completion: 60 minutes
Learning Objectives
- Create three functional LANs
- RED – PCs
- BLUE – PCs
- GRAY – DHCP Server
- Configure a router to serve as a functional DHCP relay
- Configure a DHCP server successfully
Prerequisites
Deliverables
- Screenshot of GNS Workspace with labels
- Screenshot of Wireshark DHCP
- LAN1 end devices requesting and receiving IP addresses
- LAN2 end devices requesting and receiving IP addresses
Resources
- MikroTik RouterOS Documentation – “DHCP Relay” – https://wiki.mikrotik.com/wiki/Manual:IP/DHCP_Relay
Contributors and Testers
- Dante A. Rocca, Cybersecurity Student, ERAU-Prescott
Phase I -Build the Network Topology
The following steps are to create a baseline environment for completing the lab. It makes assumptions about learner knowledge from completing previous labs.
By the end of this lab your network should look like the following:
- Start GNS3
- Create a new project: LAB_08
- Build a small network will the following specifications:
- Subnet – Red
- One switch – Ethernet switch
- Two client machines – VPCS
- Minimize wasted address space for 250 hosts
Network Information Network <IP_ADDRESS> Netmask <IP_ADDRESS> (/24) Broadcast <IP_ADDRESS> Gateway <IP_ADDRESS> DHCP Lower Bound <IP_ADDRESS> DHCP Upper Bound <IP_ADDRESS>
- Subnet – Blue
- One switch – Ethernet switch
- Two client machines – VPCS
- Minimize wasted address space for 100 hosts
Network Information Network <IP_ADDRESS> Netmask <IP_ADDRESS> (/25) Broadcast <IP_ADDRESS> Gateway <IP_ADDRESS> DHCP Lower Bound <IP_ADDRESS> DHCP Upper Bound <IP_ADDRESS>
- Subnet – Gray
- One DHCP server – Ubuntu Server / Windows Server / Tiny Core / MikroTik CHR
NOTE: This example will use <IP_ADDRESS> as the server’s static IP address.
- Minimize wasted address space for 10 hosts
Network Information Network <IP_ADDRESS> Netmask <IP_ADDRESS> (/28) Broadcast <IP_ADDRESS> Gateway <IP_ADDRESS>
- One DHCP server – Ubuntu Server / Windows Server / Tiny Core / MikroTik CHR
- Subnet – Red
- Add a MikroTik router to the workspace
- Connect all three networks to the router
- Configure the router with static IP addresses on all active interfaces (Chapt