MikroTik RouterOS v2.9 Reference Manual page 496

Reference manual
Table of Contents

Advertisement

dhcp-server ( IP address ) - IP address of the DHCP Server
enabled ( yes | no ; default: no ) - whether the DHCP client is enabled
expires-after ( time ) - time, which is assigned by the DHCP Server, after which the lease expires
gateway ( IP address ) - IP address of the gateway which is assigned by DHCP Server
host-name ( text ) - the host name of the client as sent to a DHCP server
interface ( name ) - any Ethernet-like interface (this includes wireless and EoIP tunnels) on which
the DHCP Client searches the DHCP Server
primary-dns ( IP address ) - IP address of the primary DNS server, assigned by the DHCP Server
secondary-dns ( IP address ) - IP address of the secondary DNS server, assigned by DHCP Server
primary-ntp - IP address of the primary NTP server, assigned by the DHCP Server
secondary-ntp - IP address of the secondary NTP server, assigned by the DHCP Server
status ( bound | error | rebinding... | renewing... | requesting... | searching... | stopped ) - shows the
status of DHCP Client
use-peer-dns ( yes | no ; default: yes ) - whether to accept the DNS settings advertized by DHCP
server (they will be ovverriden in /ip dns submenu)
use-peer-ntp ( yes | no ; default: yes ) - whether to accept the NTP settings advertized by DHCP
server (they will override the settings put in the /system ntp client submenu)
Command Description
release - release current binding and restart DHCP client
renew - renew current leases. If the renew operation was not successful, client tries to reinitialize
lease (i.e. it starts lease request procedure (rebind) as if it had not received an IP address yet)
Notes
If host-name property is not specified, client's system identity will be sent in the respective field of
DHCP request.
If client-id property is not specified, client's MAC address will be sent in the respective field of
DHCP request.
If use-peer-dns property is enabled, the DHCP client will unconditionally rewrite the settings in /ip
dns submenu. In case two or more DNS servers were received, first two of them are set as primary
and secondary servers respectively. In case one DNS server was received, it is put as primary
server, and the secondary server is left intact.
Example
To add a DHCP client on ether1 interface:
/ip dhcp-client add interface=ether1 disabled=no
[admin@MikroTik] ip dhcp-client> print detail
Flags: X - disabled, I - invalid
0
interface=ether1 add-default-route=no use-peer-dns=no status=bound
address=192.168.25.100/24 dhcp-server=10.10.10.1 expires-after=2d21:25:12
[admin@MikroTik] ip dhcp-client>
Page 482 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.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents