Procházet zdrojové kódy

added support for UniFi DHCP option 43

tags/v2.1.0^0
Robin Thoni před 5 roky
rodič
revize
ddd97e071e
6 změnil soubory, kde provedl 18 přidání a 0 odebrání
  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 Zobrazit soubor

@@ -2,6 +2,7 @@ DHCP_DNS_MASTER
2 2
 DHCP_DNS_SERVERS
3 3
 DHCP_TFTP_SERVER
4 4
 DHCP_ROUTERS
5
+DHCP_UNIFI_CONTROLLER_IP
5 6
 
6 7
 DHCP_DOMAIN
7 8
 DHCP_SITE_DOMAIN

+ 1
- 0
bind/vars-vars Zobrazit soubor

@@ -2,6 +2,7 @@ DHCP_DNS_MASTER
2 2
 DHCP_DNS_SERVERS
3 3
 DHCP_TFTP_SERVER
4 4
 DHCP_ROUTERS
5
+DHCP_UNIFI_CONTROLLER_IP
5 6
 
6 7
 DHCP_DOMAIN
7 8
 DHCP_SITE_DOMAIN

+ 1
- 0
env Zobrazit soubor

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

+ 13
- 0
isc-dhcp/config/dhcpd.conf Zobrazit soubor

@@ -24,6 +24,16 @@ zone DHCP_REV_DOMAIN {
24 24
 option classless-routes code 121 = array of unsigned integer 8;
25 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 37
 # Leases settings
28 38
 default-lease-time 600;
29 39
 max-lease-time 7200;
@@ -51,6 +61,9 @@ subnet DHCP_SUBNET netmask DHCP_NETMASK {
51 61
   option broadcast-address DHCP_BROADCAST;
52 62
   option routers DHCP_ROUTERS;
53 63
 
64
+  # UniFi settings
65
+  option ubnt.unifi-address DHCP_UNIFI_CONTROLLER_IP;
66
+
54 67
   # DNS settings
55 68
   option domain-name "DHCP_SITE_DOMAIN";
56 69
   option domain-search "DHCP_SITE_DOMAIN", "DHCP_DOMAIN", "DHCP_DYN_IPS_DOMAIN";

+ 1
- 0
isc-dhcp/vars-vars Zobrazit soubor

@@ -2,6 +2,7 @@ DHCP_DNS_MASTER
2 2
 DHCP_DNS_SERVERS
3 3
 DHCP_TFTP_SERVER
4 4
 DHCP_ROUTERS
5
+DHCP_UNIFI_CONTROLLER_IP
5 6
 
6 7
 DHCP_DOMAIN
7 8
 DHCP_SITE_DOMAIN

+ 1
- 0
tftpd/vars-vars Zobrazit soubor

@@ -2,6 +2,7 @@ DHCP_DNS_MASTER
2 2
 DHCP_DNS_SERVERS
3 3
 DHCP_TFTP_SERVER
4 4
 DHCP_ROUTERS
5
+DHCP_UNIFI_CONTROLLER_IP
5 6
 
6 7
 DHCP_DOMAIN
7 8
 DHCP_SITE_DOMAIN

Načítá se…
Zrušit
Uložit