dhcpd.conf

Ejemplo de fichero de configuración DHCP con varias subredes

Plain Text icon dhcpd.conf — Plain Text, 7 kB (7177 bytes)

Continguts del fitxer

#
# Rangos asignados en cada red:
#
#	192.168.1.1	->	192.168.1.50	Servidores
#	192.168.1.51	->	192.168.1.100	Equipos de red (switches, impresoras, etc...)
#	192.168.1.101	->	192.168.1.200	Clientes de aula (Concesiones dinámicas)
#	192.168.1.201	->	192.168.1.254	Rango alternativo para pruebas
#

ddns-update-style none;
authoritative;
	

	subnet 192.168.0.0 netmask 255.255.255.0 {
		option routers 192.168.0.8;
		option domain-name "tierramedia.puigcastellar.";
		option domain-name-servers 192.168.0.8;
		deny unknown-clients;
		group {

			host hobbiton {
				option domain-name "iespuigcastellar.xeill.net.";
				option host-name "hobbiton";
				option domain-name-servers hobbiton.tierramedia.puigcastellar;
				hardware ethernet 00:00:E2:1A:AA:70;
				fixed-address 192.168.0.3;
			}
	
	
			host gondolin {
				hardware ethernet 00:30:05:7A:0C:E4;
				fixed-address 192.168.0.9;
			}

			host romen {
				option domain-name "elpuig.xeill.net.";
				option host-name "romen";
				option domain-name-servers 192.168.0.8;
				option routers 192.168.0.8;

                                hardware ethernet 00:22:15:F3:F7:57;
                                fixed-address 192.168.0.13;
                        }


		    	host Director {
		      		hardware ethernet 00:22:68:83:ef:54;
		      		fixed-address 192.168.0.100;
		    	}

			host secretaria {
				hardware ethernet 00:10:5C:E1:AC:91;
				fixed-address 192.168.0.205;
			}


			host CAPS1 {
				hardware ethernet 00:16:17:36:1A:B4;
				fixed-address 192.168.0.208;
			}	

			host CAPS2 {
				hardware ethernet 00:40:C7:85:0B:3F;
				fixed-address 192.168.0.209;
			}

			host ADM2 {
				hardware ethernet 00:10:5A:07:73:0A;
				fixed-address 192.168.0.210;
			}

			host ADM3 {
				hardware ethernet 00:22:68:80:08:F8;
				fixed-address 192.168.0.211;
			}

			host laser-secretaria {
				hardware ethernet 00:01:E6:55:5A:6D;
				fixed-address 192.168.0.212;
			}

			host fotocopiadora-conserjeria {
                                hardware ethernet bc:b1:81:ee:cc:2d;
                                fixed-address 192.168.0.213;
                        }
		}
	}

	# TORVALDS
	subnet 192.168.10.0 netmask 255.255.255.0 {
		option routers 192.168.10.8;
		option domain-name "asi1.puigcastellar.";
		option domain-name-servers 192.168.10.8;
		option ntp-servers 192.168.10.8;

		range 192.168.10.101 192.168.10.200;
           	allow unknown-clients;

		# SAN BOOT iSCSI
		next-server 192.168.10.12; # TFTP
		if exists user-class and option user-class = "iPXE" {
			filename "http://192.168.10.12/menu.php";
		} 
		else {
			filename "undionly.kpxe";
		}
	}
	
	# STALLMAN
	subnet 192.168.11.0 netmask 255.255.255.0 {
		option routers 192.168.11.8;
		option domain-name "asi2.puigcastellar.";
		option domain-name-servers 192.168.11.8;
		option ntp-servers 192.168.11.8;

		range 192.168.11.101 192.168.11.200;
           	allow unknown-clients;

                # SAN BOOT iSCSI
                next-server 192.168.11.12; # TFTP
                if exists user-class and option user-class = "iPXE" {
                        filename "http://192.168.11.12/menu.php";
                }
                else {
                        filename "undionly.kpxe";
                }
	}
		
	# ADA
	subnet 192.168.12.0 netmask 255.255.255.0 {
		option routers 192.168.12.8;
		option domain-name "esi.puigcastellar.";
		option domain-name-servers 192.168.12.8;
		option ntp-servers 192.168.12.8;
		
		range 192.168.12.101 192.168.12.200;
           	allow unknown-clients;		

		# SAN BOOT iSCSI
		next-server 192.168.12.12; # TFTP
		if exists user-class and option user-class = "iPXE" {
			filename "http://192.168.12.12/menu.php";
		} 
		else {
			filename "undionly.kpxe";
		}
	}
	
	# AIF	
	subnet 192.168.14.0 netmask 255.255.255.0 {
		option routers 192.168.14.8;
		option domain-name "aif.puigcastellar.";
		option domain-name-servers 192.168.14.8;
		option ntp-servers 192.168.14.8;
		
		range 192.168.14.101 192.168.14.200;
           	allow unknown-clients;
	}


	# DARWIN
	subnet 192.168.15.0 netmask 255.255.255.0 {
		option routers 192.168.15.8;
		option domain-name "taller.puigcastellar.";
		option domain-name-servers 192.168.15.8;
		option ntp-servers 192.168.15.8;

		range 192.168.15.101 192.168.15.200;
           	allow unknown-clients;

		group {			
			host HP2300 {
				hardware ethernet 00:0E:7F:37:0D:8E;
				fixed-address 192.168.15.51;
			}

			host TAC-carpeta {
				hardware ethernet 40:61:86:c4:2b:65;
				fixed-address 192.168.15.196;
			}
		}

                # SAN BOOT iSCSI
                next-server 192.168.15.12; # TFTP
                if exists user-class and option user-class = "iPXE" {
                        filename "http://192.168.15.12/menu.php";
                }
                else {
                        filename "undionly.kpxe";
                }
	}
		
	# ESOBATX
	subnet 192.168.16.0 netmask 255.255.255.0 {
		option routers 192.168.16.8;
		option domain-name "esobatx.puigcastellar.";
		option domain-name-servers 192.168.16.8;
		option ntp-servers 192.168.16.8;

		range 192.168.16.101 192.168.16.200;
           	allow unknown-clients;		
	}
	
	subnet 192.168.17.0 netmask 255.255.255.0 {
		option routers 192.168.17.8;
		option domain-name "departaments.puigcastellar.";
		option domain-name-servers 192.168.17.8;
		option ntp-servers 192.168.17.8;
		
		range 192.168.17.101 192.168.17.200;
           	allow unknown-clients;
		
		#
		# DEPT. INFORM�TICA
		#
		group {		
			host laser-dept-inf {
				hardware ethernet 00:00:48:3F:C5:1E;
				fixed-address 192.168.17.20;
			}
			
			host hp-deskjet-6940 {
				hardware ethernet 00:17:A4:69:16:E5;
				fixed-address 192.168.17.21;
			}

			host Laser-SALAPROFES {
				hardware ethernet 00:14:38:D4:C8:6E;
				fixed-address 192.168.17.22;
			}

			host Laser-DPT-Informatica {
				hardware ethernet 1c:c1:de:13:2e:1a;
				fixed-address 192.168.17.23;
			}
		}

                # SAN BOOT iSCSI
                next-server 192.168.17.12; # TFTP
                if exists user-class and option user-class = "iPXE" {
                        filename "http://192.168.17.12/menu.php";
                }
                else {
                        filename "undionly.kpxe";
                }
		

	}

	# Turing
	subnet 192.168.18.0 netmask 255.255.255.0 {
		option routers 192.168.18.8;
		option domain-name "turing.elpuig.xeill.net.";
		option domain-name-servers 192.168.18.8;
		option ntp-servers 192.168.18.8;

		range 192.168.18.101 192.168.18.200;
           	allow unknown-clients;

                # SAN BOOT iSCSI
                next-server 192.168.18.12; # TFTP
                if exists user-class and option user-class = "iPXE" {
                        filename "http://192.168.18.12/menu.php";
                }
                else {
                        filename "undionly.kpxe";
                }		
	}
	
	# Darwin
	subnet 192.168.19.0 netmask 255.255.255.0 {
		option routers 192.168.19.8;
		option domain-name "darwin.elpuig.xeill.net.";
		option domain-name-servers 192.168.19.8;
		option ntp-servers 192.168.19.8;

		range 192.168.19.101 192.168.19.200;
           	allow unknown-clients;		
	}