Дерево страниц

Сравнение версий

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.

...

A Shared Block
hiddentrue


Metadata list
hiddentrue
|| Device | SoftWLC |
|| DocMainTitle | Руководство администратора |
|| DocTitle3 | Настройка DHCP-сервера |
|| fwversion | 1.8 |
|| issueDate | 26.10.2017 |


Description

It is suggested to use ISC-DHCP-SERVER free solution as a DHCP server. The solution allows performing the following tasks in relation to Eltex.SoftWLC project:

  • Assigning primary (external) IP addresses to access points with option 43 (suboptions 11 and 12) that makes it possible to create GRE tunnels to ESR.
  • Assigning secondary (management, tunnel) IP addresses to access points with option 43 (suboptions 10 and 13) for AP management, detection and automatic initialization.
  • Assigning IP addresses to Wi-Fi users connecting to access points.
  • DHCP clients classification using option 82, option 60 and giAddrField.

Starting/stopping procedure

To stop the service, the following command is used:

...

Без форматирования
* isc-dhcp-server is not running

if it is not.

DHCP server configuration

Информация
The solutions provided are relevant to typical network organization schemes, but they may differ from the configuration required for your network!

Network settings

Network Interfaces

DHCP server should have interfaces in three subnets:

...

Без форматирования
auto eth1.102 # Interface in outer operator's exchange network
iface eth1.102 inet static
address 192.168.114.8
netmask 255.255.255.192
network 192.168.114.0
vlan_raw_device eth1 
auto eth1.100 # Interface in inner operator network
iface eth1.100 inet static
address 172.17.209.9
netmask 255.255.255.192
network 172.17.209.0
vlan_raw_device eth1 
auto eth1.101 # Interface for assigning IP addresses to access points
iface eth1.101 inet static
address 10.203.5.7
netmask 255.255.255.192
network 10.203.5.0
vlan_raw_device eth1 

Routing

DHCP server should have access to three subnets:

...

Без форматирования
up ip route add 100.65.64.0/22 via 192.168.114.10
up ip route add 192.168.200.0/22 via 192.168.114.10
up ip route add 10.203.32.0/19 via 10.203.5.1

ISC-DHCP-SERVER configuration

/etc/default/isc-dhcp-server

The file contains basic settings, in particular the list of network interfaces used:

Без форматирования
INTERFACES="eth1.101 eth1.102" 


/etc/dhcp/dhcpd.conf

 DHCP server's address pool configuration.

Configuration example

Без форматирования
default-lease-time 60;
max-lease-time 120;
log-facility local7;
class "ELTEX-DEVICES" {
match if (
(substring (option vendor-class-identifier, 0, 14) = "ELTEX_WEP-12AC") or
(substring (option vendor-class-identifier, 0, 14) = "ELTEX_WOP-12AC") or
(substring (option vendor-class-identifier, 0, 14) = "ELTX_WEP-12AC") or
(substring (option vendor-class-identifier, 0, 14) = "ELTX_WOP-12AC")
);
}
subnet 192.168.114.64 netmask 255.255.255.192 {}
subnet 10.203.5.64 netmask 255.255.255.192 {}
#first IP-subnet for assigning primary addresses to access points
subnet 10.203.32.0 netmask 255.255.254.0 {
pool {
option routers 10.203.32.2;
range 10.203.32.130 10.203.32.230;
failover peer "dhcp-failover";
option vendor-encapsulated-options 0B:0c:31:30:2E:32:30:33:2E:35:2E:31:31:32:0C:0C:31:30:2E:32:30:33:2E:35:2E:31:31:33;
allow members of "ELTEX-DEVICES";
}
}
#managed IP-subnet for assigning secondary addresses to access points
subnet 192.168.200.0 netmask 255.255.252.0 {
pool {
option routers 192.168.200.5;
range 192.168.200.120 192.168.200.164;
failover peer "dhcp-failover";
option vendor-encapsulated-options A:F:31:39:32:2E:31:36:38:2E:31:31:34:2E:31:30:34;
allow members of "ELTEX-DEVICES";
}
}
#User IP-subnet for users (clients)
subnet 200.65.64.0 netmask 255.255.240.0 {
pool {
option routers 200.65.64.5;
range 200.65.64.200 200.65.64.250;
failover peer "dhcp-failover";
option domain-name-servers 172.16.0.1, 8.8.8.8;
}
} 


Configuring access points' static addresses

If predetermined IP addresses of access points (secondary addresses) should be used in management network, a list of static hosts can be configured. Take the following steps in order to avoid /etc/dhcp/dhcpd.conf overload:

...

The lists should be created on both servers and kept updated. Restart servers after changing the lists' contents.


Option 82 usage

If option 82 is required, new classes should be created as follows:

...


After that, addresses from the pool will be assigned only to devices of this class.

Option 43 usage

The option is used to transfer vendor-specific data to DHCP clients.
The following suboptions are used in SoftWLC:

...

Примечание

If several suboptions should be transferred in a pool, they should be written in the same line. E.g. for suboptions 10 and 13, it will look like this:

Без форматирования
option vendor-encapsulated-options 0A:0D:31:39:32:2E:31:36:38:2E:31:31:34:2E:34:0D:0A:65:6c:74:65:78:2e:72:6f:6f:74;


dhcpd configuration file check

To check a configuration file for syntax errors without restarting DHCP server and applying a configuration, use dhcpd utility.
To run a check, launch dhcpd utility with -t modifier. If the configuration file is not located in the default directory, add -cf modifier

...

Без форматирования
root@vagrant-ubuntu-trusty-64-test1111:~# dhcpd -t -cf /etc/dhcp/dhcpd_test.conf 
Internet Systems Consortium DHCP Server 4.2.4
Copyright 2004-2012 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
/etc/dhcp/dhcpd_test.conf line 97: semicolon expected.
range 
^
/etc/dhcp/dhcpd_test.conf line 105: Pool declaration with no address range.
}
^
Pool declarations must always contain at least
one range statement.
Configuration file errors encountered – exiting


DHCP-failover configuration

Add a definition to /etc/dhcp/dhcpd.conf configuration file
On the first server:

...

Предупреждение
Server time synchronization is essential for DHCP-failover operation. If desynchronization occurs, failures are possible.

OMAPI configuration

To set monitoring and DHCP servers' status check, generate a key and specify it in DHCP server configuration file. At first, generate keys by adding -K modifier and by specifying destination directory

...