Browse Source

added support for UniFi DHCP option 43

tags/v2.1.0^0
Robin Thoni 5 years ago
parent
commit
ddd97e071e
6 changed files with 18 additions and 0 deletions
  1. 1
    0
      apache/vars-vars
  2. 1
    0
      bind/vars-vars
  3. 1
    0
      env
  4. 13
    0
      isc-dhcp/config/dhcpd.conf
  5. 1
    0
      isc-dhcp/vars-vars
  6. 1
    0
      tftpd/vars-vars

+ 1
- 0
apache/vars-vars View File

2
 DHCP_DNS_SERVERS
2
 DHCP_DNS_SERVERS
3
 DHCP_TFTP_SERVER
3
 DHCP_TFTP_SERVER
4
 DHCP_ROUTERS
4
 DHCP_ROUTERS
5
+DHCP_UNIFI_CONTROLLER_IP
5
 
6
 
6
 DHCP_DOMAIN
7
 DHCP_DOMAIN
7
 DHCP_SITE_DOMAIN
8
 DHCP_SITE_DOMAIN

+ 1
- 0
bind/vars-vars View File

2
 DHCP_DNS_SERVERS
2
 DHCP_DNS_SERVERS
3
 DHCP_TFTP_SERVER
3
 DHCP_TFTP_SERVER
4
 DHCP_ROUTERS
4
 DHCP_ROUTERS
5
+DHCP_UNIFI_CONTROLLER_IP
5
 
6
 
6
 DHCP_DOMAIN
7
 DHCP_DOMAIN
7
 DHCP_SITE_DOMAIN
8
 DHCP_SITE_DOMAIN

+ 1
- 0
env View File

2
 DHCP_DNS_SERVERS=10.15.100.3
2
 DHCP_DNS_SERVERS=10.15.100.3
3
 DHCP_TFTP_SERVER=10.15.100.3
3
 DHCP_TFTP_SERVER=10.15.100.3
4
 DHCP_ROUTERS=10.15.100.2
4
 DHCP_ROUTERS=10.15.100.2
5
+DHCP_UNIFI_CONTROLLER_IP=10.15.100.10
5
 
6
 
6
 DHCP_DOMAIN=example.com
7
 DHCP_DOMAIN=example.com
7
 DHCP_SITE_DOMAIN=site1.example.com
8
 DHCP_SITE_DOMAIN=site1.example.com

+ 13
- 0
isc-dhcp/config/dhcpd.conf View File

24
 option classless-routes code 121 = array of unsigned integer 8;
24
 option classless-routes code 121 = array of unsigned integer 8;
25
 option classless-routes-win code 249 = array of unsigned integer 8;
25
 option classless-routes-win code 249 = array of unsigned integer 8;
26
 
26
 
27
+# UniFi classes
28
+option space ubnt;
29
+option ubnt.unifi-address code 1 = ip-address;
30
+
31
+class "ubnt" {
32
+  match if substring (option vendor-class-identifier, 0, 4) = "ubnt";
33
+  option vendor-class-identifier "ubnt";
34
+  vendor-option-space ubnt;
35
+}
36
+
27
 # Leases settings
37
 # Leases settings
28
 default-lease-time 600;
38
 default-lease-time 600;
29
 max-lease-time 7200;
39
 max-lease-time 7200;
51
   option broadcast-address DHCP_BROADCAST;
61
   option broadcast-address DHCP_BROADCAST;
52
   option routers DHCP_ROUTERS;
62
   option routers DHCP_ROUTERS;
53
 
63
 
64
+  # UniFi settings
65
+  option ubnt.unifi-address DHCP_UNIFI_CONTROLLER_IP;
66
+
54
   # DNS settings
67
   # DNS settings
55
   option domain-name "DHCP_SITE_DOMAIN";
68
   option domain-name "DHCP_SITE_DOMAIN";
56
   option domain-search "DHCP_SITE_DOMAIN", "DHCP_DOMAIN", "DHCP_DYN_IPS_DOMAIN";
69
   option domain-search "DHCP_SITE_DOMAIN", "DHCP_DOMAIN", "DHCP_DYN_IPS_DOMAIN";

+ 1
- 0
isc-dhcp/vars-vars View File

2
 DHCP_DNS_SERVERS
2
 DHCP_DNS_SERVERS
3
 DHCP_TFTP_SERVER
3
 DHCP_TFTP_SERVER
4
 DHCP_ROUTERS
4
 DHCP_ROUTERS
5
+DHCP_UNIFI_CONTROLLER_IP
5
 
6
 
6
 DHCP_DOMAIN
7
 DHCP_DOMAIN
7
 DHCP_SITE_DOMAIN
8
 DHCP_SITE_DOMAIN

+ 1
- 0
tftpd/vars-vars View File

2
 DHCP_DNS_SERVERS
2
 DHCP_DNS_SERVERS
3
 DHCP_TFTP_SERVER
3
 DHCP_TFTP_SERVER
4
 DHCP_ROUTERS
4
 DHCP_ROUTERS
5
+DHCP_UNIFI_CONTROLLER_IP
5
 
6
 
6
 DHCP_DOMAIN
7
 DHCP_DOMAIN
7
 DHCP_SITE_DOMAIN
8
 DHCP_SITE_DOMAIN

Loading…
Cancel
Save