From f345fda1563caf600dd08241114ceb7cefe16e37 Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Fri, 22 Nov 2024 11:12:21 -0600 Subject: [PATCH] Move dhcp reservations inside subnet, so they work --- hosts/genesis/net/hosts | 5 +- hosts/genesis/networking/dhcp.nix | 193 +++++++++++------------------- 2 files changed, 70 insertions(+), 128 deletions(-) diff --git a/hosts/genesis/net/hosts b/hosts/genesis/net/hosts index 1b44492..cf55164 100644 --- a/hosts/genesis/net/hosts +++ b/hosts/genesis/net/hosts @@ -8,7 +8,7 @@ 10.42.1.2 opnsense router opnsense.thehellings.lan router.thehellings.lan 10.42.1.3 printer.thehellings.lan 10.42.1.4 chronicles chronicles.thehellings.lan nas.thehellings.lan s3.thehellings.lan -10.42.1.5 genesis genesis.thehellings.lan dns dns.thehellings.lan smart smart.thehellings.lan jellyfin jellyfin.thehellings.lan speedtest.thehellings.lan nixcache.thehellings.lan gitcache.thehellings.lan +10.42.1.5 genesis genesis.thehellings.lan dns dns.thehellings.lan smart smart.thehellings.lan speedtest.thehellings.lan nixcache.thehellings.lan gitcache.thehellings.lan 10.42.1.6 isaiah isaiah.thehellings.lan minio-01.thehellings.lan 10.42.1.7 hosea hosea.thehellings.lan 10.42.1.8 jeremiah jeremiah.thehellings.lan minio-02.thehellings.lan @@ -17,6 +17,7 @@ # VMs 10.42.4.1 matrix matrix.thehellings.lan +10.42.4.2 jellyfin jellyfin.thehellings.lan vm-jellyfin vm-jellyfin.thehellings.lan # IPMI 10.42.100.6 isaiahbmc isaiahbmc.thehellings.lan @@ -25,7 +26,7 @@ 100.119.228.115 chronicles.home nas.home chronicles.shire-zebra.ts.net 100.88.91.27 dns.home 100.80.99.48 exodus.home -100.88.91.27 genesis.home jellyfin.home smart.home zwave.home nixcache.home gitcache.home +100.88.91.27 genesis.home smart.home zwave.home nixcache.home gitcache.home 100.78.226.76 gitlab.home gitlab.shire-zebra.ts.net gitlab.thehellings.lan registry.thehellings.lan git.thehellings.lan 100.68.203.1 hosea.home hosea.shire-zebra.ts.net 100.84.183.79 isaiah.home isaiah.shire-zebra.ts.net diff --git a/hosts/genesis/networking/dhcp.nix b/hosts/genesis/networking/dhcp.nix index 9ab297c..54075cf 100644 --- a/hosts/genesis/networking/dhcp.nix +++ b/hosts/genesis/networking/dhcp.nix @@ -48,6 +48,73 @@ data = "thehellings.lan"; } ]; + reservations-global = false; + reservations-in-subnet = true; + reservations-out-of-pool = false; + reservations = [ + # Static IPs for personal work + { + hw-address = "00:23:24:72:64:32"; # Joel + ip-address = "10.42.0.4"; + } + { + hw-address = "2a:5d:23:10:4e:22"; # SAN Switch + ip-address = "10.42.0.5"; + } + { + hw-address = "00:00:de:ad:be:ef"; # deadbeef + ip-address = "10.42.2.254"; + } + { + hw-address = "01:a8:a1:59:c7:8a:12"; # BMC management interface for isaiah + ip-address = "10.42.2.253"; + } + { + hw-address = "7c:83:34:b9:ee:ec"; # PVE1 + ip-address = "10.42.1.1"; + } + { + hw-address = "74:ee:2a:66:b3:51"; # printer + ip-address = "10.42.1.3"; + } + { + hw-address = "00:11:32:c6:7c:81"; # chronicles + ip-address = "10.42.1.4"; + } + { + hw-address = "6a:86:56:45:0b:b1"; # Genesis + ip-address = "10.42.1.5"; + } + { + hw-address = "a8:a1:59:c7:20:44"; # isaiah + ip-address = "10.42.1.6"; + } + #{ + # hw-address = ""; # hosea + # ip-address = "10.42.1.7"; + #} + { + hw-address = "b4:2e:99:aa:22:3c"; # jeremiah + ip-address = "10.42.1.8"; + } + { + hw-address = "c8:5e:a9:54:9e:c6"; # IVR laptop Wi-Fi + ip-address = "10.42.1.9"; + } + + ######################################## + # VM servers # + ######################################## + + { + hw-address = "52:54:00:2a:74:2f"; + ip-address = "10.42.4.1"; # Dendrite + } + { + hw-address = "52:54:00:70:ce:fa"; + ip-address = "10.42.4.2"; # Jellyfin + } + ]; } { subnet = "192.168.66.0/24"; @@ -66,131 +133,5 @@ } ]; - reservations = [ - # Static IPs for personal work - { - hw-address = "00:23:24:72:64:32"; # Joel - ip-address = "10.42.0.4"; - } - { - hw-address = "2a:5d:23:10:4e:22"; # SAN Switch - ip-address = "10.42.0.5"; - } - { - hw-address = "00:00:de:ad:be:ef"; # deadbeef - ip-address = "10.42.2.254"; - } - { - hw-address = "01:a8:a1:59:c7:8a:12"; # BMC management interface for isaiah - ip-address = "10.42.2.253"; - } - { - hw-address = "7c:83:34:b9:ee:ec"; # PVE1 - ip-address = "10.42.1.1"; - } - { - hw-address = "74:ee:2a:66:b3:51"; # printer - ip-address = "10.42.1.3"; - } - { - hw-address = "00:11:32:c6:7c:81"; # chronicles - ip-address = "10.42.1.4"; - } - { - hw-address = "6a:86:56:45:0b:b1"; # Genesis - ip-address = "10.42.1.5"; - } - { - hw-address = "a8:a1:59:c7:20:44"; # isaiah - ip-address = "10.42.1.6"; - } - #{ - # hw-address = ""; # hosea - # ip-address = "10.42.1.7"; - #} - { - hw-address = "b4:2e:99:aa:22:3c"; # jeremiah - ip-address = "10.42.1.8"; - } - { - hw-address = "c8:5e:a9:54:9e:c6"; # IVR laptop Wi-Fi - ip-address = "10.42.1.9"; - } - - ######################################## - # VM servers # - ######################################## - - { - hw-address = "52:54:00:2a:74:2f"; - ip-address = "10.43.4.1"; # Dendrite - } - { - hw-address = "52:54:00:6e:eb:83"; - ip-address = "10.43.4.2"; # Jellyfin - } - - ######################################## - # IOT devices # - ######################################## - - # Static IPs for things in the IOT range - { - hw-address = "b4:b0:24:9a:02:4a"; - ip-address = "192.168.66.5"; - } # LD125 - { - hw-address = "f0:03:8c:b3:b0:f6"; - ip-address = "192.168.66.55"; - } # Roomba - { - hw-address = "4c:a1:61:05:cd:52"; - ip-address = "192.168.66.61"; - } # Rainbird - { - hw-address = "48:d6:d5:5d:81:21"; - ip-address = "192.168.66.65"; - } # Google Home - { - hw-address = "28:87:ba:0e:ca:da"; - ip-address = "192.168.66.74"; - } - { - hw-address = "54:af:97:83:ed:33"; - ip-address = "192.168.66.80"; - } - { - hw-address = "ac:84:c6:5e:4b:28"; - ip-address = "192.168.66.100"; - } - { - hw-address = "8c:85:80:1c:f9:d1"; - ip-address = "192.168.66.104"; - } - { - hw-address = "8c:49:62:aa:58:60"; - ip-address = "192.168.66.108"; - } # Roku, HiHandsome - { - hw-address = "92:3e:11:c7:c5:be"; - ip-address = "192.168.66.109"; - } - { - hw-address = "d8:0d:17:19:60:62"; - ip-address = "192.168.66.112"; - } - { - hw-address = "b4:b0:24:9a:12:53"; - ip-address = "192.168.66.130"; - } # KL125 - { - hw-address = "b4:b0:24:9a:14:0e"; - ip-address = "192.168.66.131"; - } - { - hw-address = "e4:f0:42:61:fa:b5"; - ip-address = "192.168.66.149"; - } # Google Home-mini - ]; }; }