Ero sivun ”RouterOS DHCP/en” versioiden välillä
(Ak: Uusi sivu: RouterOS DHCP) |
(Ak: Uusi sivu: * Interface = Port to ask for the DHCP settings from * disable no = Enable feature) |
||
(11 välissä olevaa versiota samalta käyttäjältä ei näytetä) | |||
Rivi 2: | Rivi 2: | ||
− | DHCP | + | With DHCP (Dynamic Host Configuration Protocol) it is easy to manage and assign IP-addresses for client devices in your network. Mikrotik RouterOS has DHCP client and DHCP server support. |
== DHCP Server == | == DHCP Server == | ||
− | + | Make sure you have defined a static IP address for the Mikrotik router. In our example we use the 192.168.100.0 /24 network. In Mikrotik we have assigned the first address of the network to be 192.168.100.1 /24. Note, that Mikrotik starts assigning addresses from the address pool's end instead of the start like most DHCP servers. | |
− | 1. | + | 1. We create a DHCP pool. In our example the pool assigns addresses between 192.168.100.10 and 192.167.100.200. |
/ip pool add name=dhcp_pool address=192.168.100.10-192.168.100.200 | /ip pool add name=dhcp_pool address=192.168.100.10-192.168.100.200 | ||
Rivi 17: | Rivi 17: | ||
</gallery> | </gallery> | ||
− | 2. | + | 2. We create the settings for the new DHCP pool. In the settings we define the default gateway and DNS servers. |
/ip dhcp-server network add address=192.168.100.0/24 gateway=192.168.100.1 netmask=24 dns-server=192.168.100.1 | /ip dhcp-server network add address=192.168.100.0/24 gateway=192.168.100.1 netmask=24 dns-server=192.168.100.1 | ||
Rivi 26: | Rivi 26: | ||
</gallery> | </gallery> | ||
− | 3. | + | 3. We create the DHCP server. Here we define which ports will get their addresses by DHCP and from which pool (we add the pool we just created) as well as lease time (time until an assigned address is released, once the device the address has been given to is disconnected.). |
/ip dhcp-server add name=dhcp-server interface=ether1 lease-time=24:00:00 address-pool=dhcp_pool | /ip dhcp-server add name=dhcp-server interface=ether1 lease-time=24:00:00 address-pool=dhcp_pool | ||
Rivi 35: | Rivi 35: | ||
− | === DHCP | + | === DHCP Exclusion === |
− | DHCP | + | With DHCP Exclusion you can define certain IP addresses to only be given to devices with a specific MAC address. When a device with the defined MAC address is connected to the network, it will be given the predefined address from the DHCP server. |
/ip dhcp-server lease add address=192.168.100.100 mac-address=11:22:33:44:55:66 | /ip dhcp-server lease add address=192.168.100.100 mac-address=11:22:33:44:55:66 | ||
Rivi 45: | Rivi 45: | ||
</gallery> | </gallery> | ||
− | === Mikrotik | + | === Mikrotik and Windows Deployment Services === |
− | + | Here is an example how you can get Mikrotik DHCP to work with WDS. Define additional settings to your DHCP server in the same fashion as the pictures. | |
− | Next Server = WDS | + | Next Server = WDS server IP address |
− | Boot File Name = | + | Boot File Name = File which is first loaded from the WDS server |
DHCP Options = 060 PXEClient | DHCP Options = 060 PXEClient | ||
Rivi 60: | Rivi 60: | ||
== DHCP Client == | == DHCP Client == | ||
− | DHCP Client | + | The DHCP Client feature enables Mikrotik to get it's network settings from a DHCP server. |
/ip dhcp-client add interface=ether1 disable=no | /ip dhcp-client add interface=ether1 disable=no | ||
− | * Interface = | + | * Interface = Port to ask for the DHCP settings from |
− | * disable no = | + | * disable no = Enable feature |
<gallery> | <gallery> |
Nykyinen versio 21. elokuuta 2015 kello 07.35
With DHCP (Dynamic Host Configuration Protocol) it is easy to manage and assign IP-addresses for client devices in your network. Mikrotik RouterOS has DHCP client and DHCP server support.
Sisällysluettelo
DHCP Server
Make sure you have defined a static IP address for the Mikrotik router. In our example we use the 192.168.100.0 /24 network. In Mikrotik we have assigned the first address of the network to be 192.168.100.1 /24. Note, that Mikrotik starts assigning addresses from the address pool's end instead of the start like most DHCP servers.
1. We create a DHCP pool. In our example the pool assigns addresses between 192.168.100.10 and 192.167.100.200.
/ip pool add name=dhcp_pool address=192.168.100.10-192.168.100.200
2. We create the settings for the new DHCP pool. In the settings we define the default gateway and DNS servers.
/ip dhcp-server network add address=192.168.100.0/24 gateway=192.168.100.1 netmask=24 dns-server=192.168.100.1
3. We create the DHCP server. Here we define which ports will get their addresses by DHCP and from which pool (we add the pool we just created) as well as lease time (time until an assigned address is released, once the device the address has been given to is disconnected.).
/ip dhcp-server add name=dhcp-server interface=ether1 lease-time=24:00:00 address-pool=dhcp_pool
DHCP Exclusion
With DHCP Exclusion you can define certain IP addresses to only be given to devices with a specific MAC address. When a device with the defined MAC address is connected to the network, it will be given the predefined address from the DHCP server.
/ip dhcp-server lease add address=192.168.100.100 mac-address=11:22:33:44:55:66
Mikrotik and Windows Deployment Services
Here is an example how you can get Mikrotik DHCP to work with WDS. Define additional settings to your DHCP server in the same fashion as the pictures.
Next Server = WDS server IP address Boot File Name = File which is first loaded from the WDS server DHCP Options = 060 PXEClient
DHCP Client
The DHCP Client feature enables Mikrotik to get it's network settings from a DHCP server.
/ip dhcp-client add interface=ether1 disable=no
- Interface = Port to ask for the DHCP settings from
- disable no = Enable feature