# 
# dhcpd.conf  
#
ddns-update-style standard;
authoritative;

#log-facility local7;
set vendor-string = option vendor-class-identifier;
log (info, option vendor-class-identifier);


##############################################
# rajoute pour les telephones IP IFSIC/ISTIC
# C'est pour pouvoir utiliser le prise LAN
# derriere le telephone dans l'un des reseau ESIR/ISTIC
##################################################
option space Tel-Sip;
option Tel-Sip.cfg-server-address code 2 = text;
option Tel-Sip.contact-rcs code 3 = boolean;

class "telephones-ip" {
	# voir man dhcp-eval
	match if substring(hardware,1,3) = 00:08:5d;
	option server.min-lease-time 40;
        option ntp-servers 149.56.251.1;
        #option tftp-server-name "149.56.131.108";
	option server.vendor-option-space Tel-Sip;
      	option server.boot-unknown-clients true;
      	option Tel-Sip.contact-rcs true;
      	option Tel-Sip.cfg-server-address "ftp://connexio994:xa3SGXZE74@10.21.7.8";
}

# sacker un peu les smartphones ...
class "android" {
  match if substring(option host-name,0,7) = "android";
  default-lease-time 900 ;
  max-lease-time 900 ;
}
class "iPhone" {
  match if substring(option host-name,0,6) = "iPhone";
  default-lease-time 900 ;
  max-lease-time 900 ;
}
class "iPad" {
  match if substring(option host-name,0,4) = "iPad";
  default-lease-time 900 ;
  max-lease-time 900 ;
}
class "Windows-Phone" {
  match if substring(option host-name,0,13) = "Windows-Phone";
  default-lease-time 900 ;
  max-lease-time 900 ;
}
class "Galaxy" {
  match if substring(option host-name,0,6) = "Galaxy";
  default-lease-time 900 ;
  max-lease-time 900 ;
}
class "HUAWEI" {
  match if substring(option host-name,0,6) = "HUAWEI";
  default-lease-time 900 ;
  max-lease-time 900 ;
}
class "Samsung" {
  match if substring(option host-name,0,7) = "Samsung";
  default-lease-time 900 ;
  max-lease-time 900 ;
}
class "Honor" {
  match if substring(option host-name,0,5) = "Honor";
  default-lease-time 900 ;
  max-lease-time 900 ;
}


#
# machines recevant une IP dynamique dans le vlan2 (lan-free).
#

include "/etc/dhcp/vip.conf";

subnet 149.55.0.0 netmask 255.255.248.0 {
##########################################
option domain-name-servers 149.55.15.109,149.55.15.106 ;
option domain-name "monuniversite.fr" ;
option routers 149.55.7.254 ;
option subnet-mask 255.255.248.0 ;
default-lease-time 86400 ;
max-lease-time 172800 ;

pool {
                allow members of "vip";
                range 149.55.7.200 149.55.7.230;
}

group {
	next-server 149.55.4.1;

class "Legacy" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00000";
        filename "undionly.kkpxe";
    }
    class "UEFI-32-2" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00002";
        filename "i386-efi/ipxe.efi";
    }
    class "UEFI-32-1" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00006";
        filename "i386-efi/ipxe.efi";
    }
    class "UEFI-64-1" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00007";
        filename "ipxe.efi";
    }
    class "UEFI-64-2" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00008";
        filename "ipxe.efi";
    }
    class "UEFI-64-3" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00009";
        filename "ipxe.efi";
    }

host admin01 { hardware ethernet 74:e6:e2:d9:dd:cf; fixed-address admin01; option Host-name "admin01";} # 
host admin02 { hardware ethernet b8:85:84:ac:89:fa; fixed-address admin02; option Host-name "admin02";} # proto windows salles istic
host admin05 { hardware ethernet d8:d3:85:91:b4:28; fixed-address admin05; option Host-name "admin05";} # HP8100 AIO
# Salle_conf
host d001m01 { hardware ethernet e4:b9:7a:f0:e3:43; fixed-address d001m01; option Host-name "d001m01";} #AmphiP
### Profs_win
#
host d279m01 { hardware ethernet e4:b9:7a:f0:e4:8c; fixed-address d279m01; option Host-name "d279m01";} #
host d270m01 { hardware ethernet 80:C1:6E:E0:23:4B; fixed-address d270m01; option Host-name "d270m01";}# D270 EIT
host agot { hardware ethernet 78:ac:c0:af:bd:f1; fixed-address agot; option Host-name "agot";} # HP8100 
# 
### Profs_unix
#
#host d279m02 { hardware ethernet 9c:8e:99:f5:5f:3b; fixed-address d279m02; option Host-name "d279m02";} # HP 8300
host d279m02 { hardware ethernet 74:e6:e2:da:6f:29; fixed-address d279m02; option Host-name "d279m02";} # Dell 9030
#
### Salle_e003
#
host e003m01 { hardware ethernet e4:b9:7a:f0:e4:b8; fixed-address e003m01; option Host-name "e003m01";}
host e003m02 { hardware ethernet e4:b9:7a:e6:d2:52; fixed-address e003m02; option Host-name "e003m02";}

# marque debut pour dhcp-vm vlan 2, pas touche SVP.

# marque fin pour dhcp-vm vlan 2, pas touche SVP.


}

group {
# Groupe pointant vers le pxe du Fog de test                                                                                                                                    
  	option domain-name-servers 149.55.15.109,149.55.15.106;
        next-server 149.55.4.2;

class "Legacy" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00000";
        filename "undionly.kkpxe";
    }
    class "UEFI-32-2" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00002";
        filename "i386-efi/ipxe.efi";
    }
    class "UEFI-32-1" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00006";
        filename "i386-efi/ipxe.efi";
    }
    class "UEFI-64-1" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00007";
        filename "ipxe.efi";
    }
    class "UEFI-64-2" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00008";
        filename "ipxe.efi";
    }
    class "UEFI-64-3" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00009";
        filename "ipxe.efi";
    }
#
#Machine test cosinus

#host centos7-6 { hardware ethernet 52:54:00:b3:30:b5; fixed-address centos7-6; option Host-name "centos7-6";} # VM sur admin11
#host admin01 { hardware ethernet 74:e6:e2:d9:dd:cf; fixed-address admin01; option Host-name "admin01";} # 
#host admin02 { hardware ethernet b8:85:84:ac:89:fa; fixed-address admin02; option Host-name "admin02";} # proto windows salles istic
#host admin07 { hardware ethernet c8:1f:66:b1:e0:86; fixed-address admin07; option Host-name "admin07";} # AIO Dell 9030
#host admin08 { hardware ethernet 9C:8E:99:F5:68:9D; fixed-address admin08; option Host-name "admin08";} # HP8300 AIO Windows
#host admin09 { hardware ethernet 9c:8e:99:f5:0f:8c; fixed-address admin09; option Host-name "admin09";} 
#host admin12 { hardware ethernet 9c:8e:99:f5:9a:a8; fixed-address admin12; option Host-name "admin12";} # HP8300
#host admin14 { hardware ethernet 14:b3:1f:23:ab:07; fixed-address admin14; option Host-name "admin14";} # Dell 7440
#host admin15 { hardware ethernet 14:b3:1f:02:4b:b3; fixed-address admin15; option Host-name "admin15";} # Dell 7440
#host admin16 { hardware ethernet 14:b3:1f:23:ab:07; fixed-address admin16; option Host-name "admin16";}
}


group {
host imp-2a-020 { hardware ethernet 00:11:85:FA:28:9A; fixed-address imp-2a-020; option Host-name "imp-2a-020";} # 
host imp-2a-022 { hardware ethernet 00:11:85:D7:B4:B5; fixed-address imp-2a-022; option Host-name "imp-2a-022";} # 
host imp-2a-024 { hardware ethernet 00:12:79:DE:DB:64; fixed-address imp-2a-024; option Host-name "imp-2a-024";} # 
host imp-2a-026 { hardware ethernet 00:1B:78:16:2E:51; fixed-address imp-2a-026; option Host-name "imp-2a-026";} # 
host imp-2a-028 { hardware ethernet 00:14:38:CC:70:DB; fixed-address imp-2a-028; option Host-name "imp-2a-028";} # 
host imp-2a-122 { hardware ethernet 00:14:38:CC:80:73; fixed-address imp-2a-122; option Host-name "imp-2a-122";} # 
#host imp-2b-002 { hardware ethernet 00:14:38:CB:5C:F3; fixed-address imp-2a-122; option Host-name "imp-2a-122";} # 
host imp-2b-001 { hardware ethernet 34:64:A9:6C:D7:C1; fixed-address imp-2b-001; option Host-name "imp-2b-001";} # 
host imp-2b-101 { hardware ethernet 2c:59:e5:d7:53:32; fixed-address imp-2b-101; option Host-name "imp-2b-101";} # 
#host imp-b05-001 { hardware ethernet 00:1f:29:1f:23:c9; fixed-address imp-b05-001; option Host-name "imp-b05-001";} 

}
group {
#
#
# groupe  : commut
#
#
host c12eb { hardware ethernet ; fixed-address c12eb; option Host-name "c12eb";} # 
host c12ea { hardware ethernet ; fixed-address c12ea; option Host-name "c12ea";} # 
host c12ee { hardware ethernet ; fixed-address c12ee; option Host-name "c12ee";} # 
host c2ba { hardware ethernet ; fixed-address c2ba; option Host-name "c2ba";} # 
host c2bb { hardware ethernet ; fixed-address c2bb; option Host-name "c2bb";} # 
host c12du { hardware ethernet ; fixed-address c12du; option Host-name "c12du";} # 
}
	####################################################
        # pool d'adresse dynamique reserve aux telephones IP
	# masque de 255.255.255.240 pour le firewall
        pool {
                allow members of "telephones-ip";
                range 149.55.0.224 149.55.0.239;
        }
}


#subnet 149.55.8.0 netmask 255.255.255.0 {
##########################################                                                
#option domain-name-servers 149.55.15.109,149.55.15.106 ;
#option domain-name "monuniversite.fr" ;
#option routers 149.55.8.254 ;
#option subnet-mask 255.255.255.0 ;
#default-lease-time 6000 ;
#max-lease-time 12000 ;
#group {
#host cassius { hardware ethernet 00:11:e2:61:00:19; fixed-address cassius; option Host-name "cassius";}
#}
#}

subnet 149.55.10.0 netmask 255.255.255.0 {
##########################################
option domain-name-servers 149.55.15.109,149.55.15.106 ;
option domain-name "monuniversite.fr" ;
option routers 149.55.10.254 ;
option subnet-mask 255.255.255.0 ;
default-lease-time 600 ;
max-lease-time 1200 ;

group {
#serveur pxe (FOG): 
 	next-server 149.55.4.1;

class "Legacy" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00000";
        filename "undionly.kkpxe";
    }
    class "UEFI-32-2" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00002";
        filename "i386-efi/ipxe.efi";
    }
    class "UEFI-32-1" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00006";
        filename "i386-efi/ipxe.efi";
    }
    class "UEFI-64-1" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00007";
        filename "ipxe.efi";
    }
    class "UEFI-64-2" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00008";
        filename "ipxe.efi";
    }
    class "UEFI-64-3" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00009";
        filename "ipxe.efi";
    }

host arrakis { hardware ethernet 00:23:AE:6A:83:FA; fixed-address arrakis; option Host-name "arrakis";} # Gx360 Gentoo AD
host admin11 { hardware ethernet 9c:8e:99:f5:68:ca; fixed-address admin11; option Host-name "admin11";} #linux test 8300 AD
host brisbane { hardware ethernet 00:23:ae:74:4c:c9; fixed-address brisbane; option Host-name "brisbane";} # Windows SA
host sydney { hardware ethernet C8:CB:B8:24:4A:22; fixed-address sydney; option Host-name "sydney";}
}

	pool {
		deny members of "telephones-ip";
		range 149.55.10.180 149.55.10.220;
		next-server 149.55.4.1;
        	#filename "pxelinux.0";
	}

	####################################################
	# pool d'adresse dynamique reserve aux telephones IP
	# testsip
	pool {
		allow members of "telephones-ip";
		range 149.55.10.224 149.55.10.239; #avec un masque de 255.255.255.240 pour erebus
	}
}

subnet 149.55.11.0 netmask 255.255.255.0 {
##########################################
option domain-name-servers 149.55.15.109,149.55.15.106 ;
option domain-name "monuniversite.fr" ;
option routers 149.55.11.254 ;
option subnet-mask 255.255.255.0 ;
default-lease-time 86400 ;
max-lease-time 172800 ;
range 149.55.11.1 149.55.11.9 ;

group {
host cloudiot6 {hardware ethernet 00:11:E7:61:01:82; fixed-address cloudiot6; option Host-name "cloudiot6";}     # Ajout par dhcp-vm le 26/9/2019 (15:57:53)
host cloudiot7 {hardware ethernet 00:11:E7:61:01:84; fixed-address cloudiot7; option Host-name "cloudiot7";}     # Ajout par dhcp-vm le 26/9/2019 (15:58:27)
#
host palme01 { hardware ethernet 30:5A:3A:21:4D:A1; fixed-address palme01; option Host-name "palme01";} # poste asso Palme d193 Maxime Lambert 12006967
host palme02 { hardware ethernet 00:23:ae:74:66:85; fixed-address palme02; option Host-name "palme02";} # poste asso Palme d193 Maxime Lambert 12006967
}
}

subnet 149.55.12.0 netmask 255.255.255.0 {
##########################################
option domain-name-servers 149.55.15.109,149.55.15.106 ;
option domain-name "monuniversite.fr" ;
option routers 149.55.12.254 ;
option subnet-mask 255.255.255.0 ;
default-lease-time 86400 ;
max-lease-time 172800 ;
#
group {
	next-server 149.55.4.1;

class "Legacy" {
      match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00000";
        filename "undionly.kkpxe";
    }
    class "UEFI-32-2" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00002";
        filename "i386-efi/ipxe.efi";
    }
    class "UEFI-32-1" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00006";
        filename "i386-efi/ipxe.efi";
    }
    class "UEFI-64-1" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00007";
        filename "ipxe.efi";
    }
    class "UEFI-64-2" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00008";
        filename "ipxe.efi";
    }
    class "UEFI-64-3" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00009";
        filename "ipxe.efi";
    }
#
### Salle_i204
#
host i204m01 { hardware ethernet 14:b3:1f:19:81:02; fixed-address i204m01; option Host-name "i204m01";}
host i204m02 { hardware ethernet 14:b3:1f:19:80:36; fixed-address i204m02; option Host-name "i204m02";}

}
group {
#
#
host psyche { hardware ethernet 00:13:72:08:e1:93; fixed-address psyche; option Host-name "psyche";} # 
host anubis { hardware ethernet 00:14:22:75:AF:18; fixed-address anubis; option Host-name "anubis";} # 
}
range 149.55.12.101 149.55.12.140 ;
#range 149.55.12.100 149.55.12.199 ;
}

subnet 149.55.13.0 netmask 255.255.255.0 {
##########################################
option domain-name-servers 149.55.15.109,149.55.15.106 ;
option domain-name "monuniversite.fr" ;
option routers 149.55.13.254 ;
option subnet-mask 255.255.255.0 ;
option ntp-servers 149.56.128.22;
default-lease-time 3600 ;
max-lease-time 3600 ;
adaptive-lease-time-threshold 80;
min-lease-time 900;
range 149.55.13.1 149.55.13.247 ;
group {
#
}
}

subnet 149.55.14.0 netmask 255.255.255.0 {
##########################################
option domain-name-servers 149.55.15.109,149.55.15.106 ;
option domain-name "monuniversite.fr" ;
option routers 149.55.14.254 ;
option subnet-mask 255.255.255.0 ;
option ntp-servers 149.56.128.22;
default-lease-time 3600 ;
max-lease-time 3600 ;
adaptive-lease-time-threshold 80;
min-lease-time 900;
range 149.55.14.16 149.55.14.253 ;

group {
#
#
host pr040153w { hardware ethernet 00:24:D7:5D:53:48; fixed-address pr040153w; option Host-name "pr040153w";} # 
}
}
subnet 149.55.15.0 netmask 255.255.255.0 {
##########################################
option domain-name-servers 149.55.15.109,149.55.15.106 ;
option domain-name "monuniversite.fr" ;
option routers 149.55.15.254 ;
option subnet-mask 255.255.255.0 ;
default-lease-time 2592000 ;
max-lease-time 5184000 ;

#
group {
#
        next-server 149.55.4.1;

class "Legacy" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00000";
        filename "undionly.kkpxe";
    }
    class "UEFI-32-2" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00002";
        filename "i386-efi/ipxe.efi";
    }
    class "UEFI-32-1" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00006";
        filename "i386-efi/ipxe.efi";
    }
    class "UEFI-64-1" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00007";
        filename "ipxe.efi";
    }
    class "UEFI-64-2" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00008";
        filename "ipxe.efi";
    }
    class "UEFI-64-3" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00009";
        filename "ipxe.efi";
    }

#
host printhost-test {hardware ethernet 52:54:00:0b:59:c1; fixed-address printhost-test; option Host-name "printhost-test";}
host olibrius {hardware ethernet 00:11:E2:61:00:07; fixed-address olibrius; option Host-name "olibrius";} 
host cacti-old {hardware ethernet 00:11:E2:61:00:10; fixed-address cacti-old; option Host-name "cacti-old";}
}
}
subnet 149.56.15.0 netmask 255.255.255.0 {
##########################################
option domain-name-servers 149.55.15.109,149.55.15.106 ;
option domain-name "monuniversite.fr" ;
option routers 149.56.15.254 ;
option subnet-mask 255.255.255.0 ;
default-lease-time 2592000 ;
max-lease-time 172800 ;
#
group {
# On commente les deux lignes suivantes pour eviter le menu de Fog 
 	next-server 149.55.4.1;

class "Legacy" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00000";
	filename "undionly.kkpxe";
    }
    class "UEFI-32-2" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00002";
        filename "i386-efi/ipxe.efi";
    }
    class "UEFI-32-1" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00006";
        filename "i386-efi/ipxe.efi";
    }
    class "UEFI-64-1" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00007";
        filename "ipxe.efi";
    }
    class "UEFI-64-2" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00008";
        filename "ipxe.efi";
    }
    class "UEFI-64-3" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00009";
        filename "ipxe.efi";
    }
                                                                                                                                                                               #
host ad-istic1 { hardware ethernet 00:15:5d:0f:fb:00; fixed-address ad-istic1; option Host-name "ad-istic1";}
host machine-package { hardware ethernet 98:e7:43:6f:38:9d; fixed-address machine-package; option Host-name "machine-package";}
host ir112015  {hardware ethernet 00:21:b7:e4:9f:98; fixed-address ir112015;option Host-name "ir112015";} #imprimante b42-012
host b06-010m01-b { hardware ethernet 8c:ec:4b:0c:6c:04; fixed-address b06-010m01-b; option Host-name "b06-010m01-b";} # portable davis levalois
host b06-014m01 { hardware ethernet 8c:04:ba:5d:81:cc; fixed-address b06-014m01; option Host-name "b06-014m01";} # portable Samuel Crand 2019-06
host bug { hardware ethernet 9c:8e:99:f5:9c:2e; fixed-address bug; option Host-name "bug";} # HP 8300 
}
group {
# boot cosinus pour 149.56.15
    next-server 149.55.4.1;

class "Legacy" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00000";
        filename "undionly.kkpxe";
    }
    class "UEFI-32-2" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00002";
        filename "i386-efi/ipxe.efi";
    }
    class "UEFI-32-1" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00006";
        filename "i386-efi/ipxe.efi";
    }
    class "UEFI-64-1" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00007";
        filename "ipxe.efi";
    }
    class "UEFI-64-2" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00008";
        filename "ipxe.efi";
    }
    class "UEFI-64-3" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00009";
        filename "ipxe.efi";
    }
#host d000m02 { hardware ethernet c8:1f:66:aa:26:b2; fixed-address d000m02; option Host-name "d000m02";}
#host b42-015m01new {hardware ethernet b8:85:84:b5:ea:9c; fixed-address b42-015m01new;option Host-name "b42-015m01new";}

}


	####################################################
	# pool d'adresse dynamique reserve aux telephones IP
	# testsip
	pool {
		allow members of "telephones-ip";
		range 149.56.15.224 149.56.15.239; #avec un masque de 255.255.255.240 pour erebus
	}
}

# host smartaccess {hardware ethernet 00:11:E3:61:00:08; fixed-address smartaccess; option Host-name "smartaccess";}     # Ajout par dhcp-vm le 16/10/2018 (16:15:50)
