Note, that e-mail can be sent, using /system logging action add target=email
DHCP Option
Home menu level: /ip dhcp-server option
Description
With help of DHCP Option, it is possible to define additional custom options for DHCP Server.
Property Description
code ( integer : 1 ..254 ) - dhcp option code. All codes are available at
http://www.iana.org/assignments/bootp-dhcp-parameters
name ( name ) - descriptive name of the option
value ( text ) - parameter's value in form of a string. If the string begins with "0x", it is assumed as
a hexadecimal value
Notes
The defined options you can use in /ip dhcp-server network submenu
According to the DHCP protocol, a parameter is returned to the DHCP client only if it requests this
parameter, specifying the respective code in DHCP request Parameter-List (code 55) attribute. If the
code is not included in Parameter-List attribute, DHCP server will not send it to the DHCP client.
Example
This example shows how to set DHCP server to reply on DHCP client's Hostname request (code
12) with value Host-A.
Add an option named Option-Hostname with code 12 (Hostname) and value Host-A:
[admin@MikroTik] ip dhcp-server option> add name=Hostname code=12 \
value="Host-A"
[admin@MikroTik] ip dhcp-server option> print
# NAME CODE VALUE
0 Option-Hostname 12 Host-A
[admin@MikroTik] ip dhcp-server option>
Use this option in DHCP server network list:
[admin@MikroTik] ip dhcp-server network> add address=10.1.0.0/24 \
\... gateway=10.1.0.1 dhcp-option=Option-Hostname dns-server=159.148.60.20
[admin@MikroTik] ip dhcp-server network> print detail
0 address=10.1.0.0/24 gateway=10.1.0.1 dns-server=159.148.60.20
dhcp-option=Option-Hostname
[admin@MikroTik] ip dhcp-server network>
Now the DHCP server will reply with its Hostname Host-A to DHCP client (if requested)
DHCP Relay
Page 490 of 695
Copyright 1999-2007, MikroTik. All rights reserved. Mikrotik, RouterOS and RouterBOARD are trademarks of Mikrotikls SIA.
Other trademarks and registred trademarks mentioned herein are properties of their respective owners.