Browse Source

fix double default gateway on Windows

Blaine Story 1 year ago
parent
commit
d3f8ad63f5
1 changed files with 19 additions and 10 deletions
  1. 19 10
      roles/name-resolution/templates/dhcpd/dhcpd.conf.j2

+ 19 - 10
roles/name-resolution/templates/dhcpd/dhcpd.conf.j2

@@ -10,16 +10,17 @@ authoritative;
 default-lease-time 43200; # 12 hours
 max-lease-time 86400;     # 24 hours
 
-option rfc3442-classless-static-routes code 121 = array of integer 8;
-option ms-classless-static-routes code 249 = array of integer 8;
-option rfc3442-classless-static-routes 24, 192, 168, 1, 10, 0, 0, 8, 0, 10, 0, 0, 1;
-option ms-classless-static-routes 24, 192, 168, 1, 10, 0, 0, 8, 0, 10, 0, 0, 1;
+# needed for static routes for Windows clients
+#option rfc3442-classless-static-routes code 121 = array of integer 8;
+#option ms-classless-static-routes code 249 = array of integer 8;
+#option rfc3442-classless-static-routes 24, 192, 168, 1, 10, 0, 0, 8, 0, 10, 0, 0, 1;
+#option ms-classless-static-routes 24, 192, 168, 1, 10, 0, 0, 8, 0, 10, 0, 0, 1;
 
 subnet {{ dhcp_cidr|ipaddr('network') }} netmask {{ dhcp_cidr|ipaddr('netmask') }} {
 
-  option routers {{ dhcp_default_gateway }};
+  option routers {{ dhcp_gw_default }};
 
-  option domain-name-servers {{ dhcp_secure_gateway }}, {{ dns_primary }}, {{ dns_secondary }};
+  option domain-name-servers {{ dhcp_gw_secured }}, {{ dns_primary }}, {{ dns_secondary }};
   option domain-name "home.arpa";
 
   ## WINS info for Windows capability
@@ -30,19 +31,27 @@ subnet {{ dhcp_cidr|ipaddr('network') }} netmask {{ dhcp_cidr|ipaddr('netmask')
   range {{ dhcp_range_start }} {{ dhcp_range_end }};
 
   class "secured" {
-    option routers {{ dhcp_secure_gateway }};
+    option routers {{ dhcp_gw_secured }};
 
     # 192.168.1.0/24 thru 10.0.0.8, 10.0.0.2 as default route
     #option rfc3442-classless-static-routes 24, 192, 168, 1, 10, 0, 0, 8, 0, 10, 0, 0, 2;
-    option rfc3442-classless-static-routes 24, 192, 168, 1, 10, 0, 0, 8, 0, 10, 0, 0, 2;
-    option ms-classless-static-routes 24, 192, 168, 1, 10, 0, 0, 8, 0, 10, 0, 0, 2;
+    #option rfc3442-classless-static-routes 24, 192, 168, 1, 10, 0, 0, 8, 0, 10, 0, 0, 2;
+    #option ms-classless-static-routes 24, 192, 168, 1, 10, 0, 0, 8, 0, 10, 0, 0, 2;
 
     match hardware;
   }
 
   class "cloudflare" {
     option domain-name-servers 1.1.1.3, 1.0.0.3; # cloudflare block malware + porn
-    
+
+    match hardware;
+  }
+
+  class "alphasite" {
+    option domain-name-servers 1.1.1.3, 1.0.0.3; # cloudflare block malware + porn
+
+    option routers {{ dhcp_gw_alphasite }};
+
     match hardware;
   }