Chapter 5 of 6 · MikroTik MTCTCE

DHCP Client, Relay and Server

Analysing DHCP messages, configuring the DHCP client, the DHCP server with options and pools, and the DHCP relay.

  • 5topics
  • 25 minfast track
  • 1diagrams and exhibits

Topics in this chapter

Take them in order, or jump to the one you need.

  1. 1DHCP Communication AnalysisLearn the DHCP exchange of discover, offer, request and acknowledge, the UDP ports, lease renewal, and how to capture DHCP…5 min
  2. 2DHCP ClientLearn how to configure the RouterOS DHCP client: default route, peer DNS and NTP, client identification by host name and client…5 min
  3. 3DHCP Server Networks and PoolsLearn how to build a RouterOS DHCP server: the IP pool, the network entry with gateway and DNS, the server, lease time, and…5 min
  4. 4DHCP Options and Advanced Server SettingsLearn built in and custom DHCP options in RouterOS, option codes and value formats, option sets, and advanced server settings…5 min
  5. 5DHCP RelayLearn how the RouterOS DHCP relay forwards client requests to a remote server, how giaddr selects the pool, and the checks for a…Diagram5 min

About this chapter

What this chapter covers

This chapter covers DHCP, the protocol that gives hosts an address, a gateway and other settings automatically.

RouterOS can play three roles. It can be a client that takes an address from a provider, a server that hands out addresses on a LAN, and a relay that carries requests to a server on another network.

The chapter starts with the messages on the wire, because every later topic depends on understanding them.

How the topics fit together

The message exchange is the base, and the client, server and relay are the three parts that take part in it.

Clientasks for an addressRelayforwards the requestServeroffers address and optionsClientaccepts and configures
  • Communication analysis explains the four message exchange and how to watch it.
  • The client is the side that asks, and it applies what it receives.
  • The server owns the pool of addresses, the network settings and the options.
  • The relay exists so that one server can serve several subnets.
Note

A relay is only needed when the server is not on the same Layer 2 network as the client. On a single LAN the client and server talk directly.

How to use these pages

Each topic page has the same shape, so you can skim for what you need.

  • What it is: the idea in plain words.
  • How it works: the mechanism, with diagrams and example commands.
  • What to remember for the exam: the facts to memorise.
  • Common mistakes: the classic traps.
  • Check yourself: three questions to test your understanding.

DHCP is easy to practise. Set up a server on one router and a client on another, then watch the exchange with the packet sniffer. Repeat with a relay between them to see how the messages change.

When something fails, work along the path in order: link, server settings, pool, then firewall.

Ready for more practice?

The full MikroTik MTCTCE question bank has 479 questions, with timed practice exams and an explanation for every answer.

This study guide is independent and is not affiliated with, endorsed by, or sponsored by MikroTik. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.