Mikrotik Server

Mikrotik-Server

The DHCP (Dynamic Host Configuration Protocol) is used for the easy distribution of IP addresses in a network. The MikroTik RouterOS implementation includes both server and client parts and is compliant with RFC 2131.

The router supports an individual server for each Ethernet-like interface. The MikroTik RouterOS DHCP server supports the basic functions of giving each requesting client an IP address/netmask lease, default gateway, domain name, DNS-server(s) and WINS-server(s) (for Windows clients) information (set up in the DHCP networks submenu)

In order for the DHCP server to work, IP pools must also be configured (do not include the DHCP server’s own IP address into the pool range) and the DHCP networks.

It is also possible to hand out leases for DHCP clients using the RADIUS server; the supported parameters for a RADIUS server is as follows:
Access-Request:

    o

  • NAS-Identifier – router identity
  • o

  • NAS-IP-Address – IP address of the router itself
  • o

  • NAS-Port – unique session ID
  • o

  • NAS-Port-Type – Ethernet
  • o

  • Calling-Station-Id – client identifier (active-client-id)
  • o

  • Framed-IP-Address – IP address of the client (active-address)
  • o

  • Called-Station-Id – name of DHCP server
  • o

  • User-Name – MAC address of the client (active-mac-address)
  • o

  • Password – “”

Access-Accept:

    o

  • Framed-IP-Address – IP address that will be assigned to client
  • o

  • Framed-Pool – ip pool from which to assign ip address to client
  • o

  • Rate-Limit – Datarate limitation for DHCP clients. Format is: rx-rate[/tx-rate] [rx-burst-rate[/tx-burst-rate] [rx-burst-threshold[/tx-burst-threshold] [rx-burst-time[/tx-burst-time][priority] [rx-rate-min[/tx-rate-min]]]]. All rates should be numbers with optional ‘k’ (1,000s) or ‘M’ (1,000,000s). If tx-rate is not specified, rx-rate is as tx-rate too. Same goes for tx-burst-rate and tx-burst-threshold and tx-burst-time. If both rx-burst-threshold and tx-burst-threshold are not specified (but burst-rate is specified), rx-rate and tx-rate are used as burst thresholds. If both rx-burst-time and tx-burst-time are not specified, 1s is used as default. Priority takes values 1..8, where 1 implies the highest priority, but 8 – the lowest. If rx-rate-min and tx-rate-min are not specified rx-rate and tx-rate values are used. The rx-rate-min and tx-rate-min values can not exceed rx-rate and tx-rate values.
  • o

  • Ascend-Data-Rate – tx/rx data rate limitation if multiple attributes are provided, first limits tx data rate, second – rx data rate. If used together with Ascend-Xmit-Rate, specifies rx rate. 0 if unlimited
  • o

  • Ascend-Xmit-Rate – tx data rate limitation. It may be used to specify tx limit only instead of sending two sequential Ascend-Data-Rate attributes (in that case Ascend-Data-Rate will specify the receive rate). 0 if unlimited
  • o

  • Session-Timeout – max lease time (lease-time)

Recommended Articles