Objetivo: Mostra a configuração DHCP para 3 subredes com LTSP.
default-lease-time 302400;
max-lease-time 604800; # não reparem me lease, ele é um pouco alto mesmo, maxímo 7 dias.
ddns-update-style none;
allow booting;
allow bootp;
option option-128 code 128 = string;
option option-129 code 129 = text;
option option-221 code 221 = text;
# configuração da primeira subrede
shared-network REDE1 {
subnet 192.168.0.0 netmask 255.255.255.0 {
range dynamic-bootp 192.168.0.10 192.168.0.79;
range dynamic-bootp 192.168.0.140 192.168.0.220;
use-host-decl-names on;
option log-servers 192.168.0.9;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;
option routers 192.168.0.2;
option domain-name-servers 192.168.0.2;
next-server 192.168.0.9;
option domain-name "muriae.lan";
option root-path "192.168.0.9:/opt/ltsp/i386";
authoritative;
# trick from Peter Rundle <peter.rundle@au.interpath.net>
# newer Macs
if substring (option vendor-class-identifier, 0, 9) = "AAPLBSDPC"
{
filename "yaboot";
option vendor-class-identifier "AAPLBSDPC";
}
# really old iMacs
elsif substring (option option-221, 0, 5) = "Apple"
{
filename "yaboot";
option vendor-class-identifier "AAPLBSDPC";
}
# Intel PXE
elsif substring (option vendor-class-identifier, 0, 9) = "PXEClient"
{
# NOTE: kernels are specified in /tftpboot/lts/pxe/pxelinux.cfg/
filename "/lts/2.6.20.9-ltsp-1/pxelinux.0";
}
# default to an i386 BOOTP image
else
{
filename "/lts/2.6.20.9-ltsp-1/vmlinuz-2.6.20.9-ltsp-1";
}
if substring (option vendor-class-identifier, 20, 3) = "ppc" {
option root-path "192.168.0.9:/opt/ltsp/ppc";
} else {
option root-path "192.168.0.9:/opt/ltsp/i386";
}
}
}
# example configurations for specifying specific kernels to specific clients
group {
use-host-decl-names on;
option log-servers 192.168.0.9;
# essa parte você amarra o ip com mac e configura para dar boot pela rede
host WD01 {
hardware ethernet 00:03:99:88:F6:DB;
fixed-address 192.168.0.80;
filename "/lts/2.6.20.9-ltsp-1/pxelinux.0";
}
# configuração da segunda subrede
### REDE2 #########################
subnet 192.168.8.0 netmask 255.255.255.0 {
range dynamic-bootp 192.168.8.10 192.168.8.79;
range dynamic-bootp 192.168.8.140 192.168.8.220;
use-host-decl-names on;
option log-servers 192.168.8.9;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.8.255;
option routers 192.168.8.9;
option domain-name-servers 192.168.0.2;
next-server 192.168.8.9;
option domain-name "muriae.lan";
option root-path "192.168.8.9:/opt/ltsp/i386";
authoritative;
# trick from Peter Rundle <peter.rundle@au.interpath.net>
# newer Macs
if substring (option vendor-class-identifier, 0, 9) = "AAPLBSDPC"
{
filename "yaboot";
option vendor-class-identifier "AAPLBSDPC";
}
# really old iMacs
elsif substring (option option-221, 0, 5) = "Apple"
{
filename "yaboot";
option vendor-class-identifier "AAPLBSDPC";
}
# Intel PXE
elsif substring (option vendor-class-identifier, 0, 9) = "PXEClient"
{
# NOTE: kernels are specified in /tftpboot/lts/pxe/pxelinux.cfg/
filename "/lts/2.6.20.9-ltsp-1/pxelinux.0";
}
# default to an i386 BOOTP image
else
{
filename "/lts/2.6.20.9-ltsp-1/vmlinuz-2.6.20.9-ltsp-1";
}
if substring (option vendor-class-identifier, 20, 3) = "ppc" {
option root-path "192.168.8.9:/opt/ltsp/ppc";
} else {
option root-path "192.168.8.9:/opt/ltsp/i386";
}
}
}
# example configurations for specifying specific kernels to specific clients
group {
use-host-decl-names on;
option log-servers 192.168.8.9;
host SD01 {
hardware ethernet 00:03:99:88:F2:A5;
fixed-address 192.168.8.82;
filename "/lts/2.6.20.9-ltsp-1/pxelinux.0";
}
# configuração da terceira subrede
### REDE03 #########################
subnet 192.168.10.0 netmask 255.255.255.0 {
range dynamic-bootp 192.168.10.10 192.168.10.79;
range dynamic-bootp 192.168.10.140 192.168.10.220;
use-host-decl-names on;
option log-servers 192.168.10.9;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.10.255;
option routers 192.168.10.9;
option domain-name-servers 192.168.0.2;
next-server 192.168.10.9;
option domain-name "muriae.lan";
option root-path "192.168.10.9:/opt/ltsp/i386";
authoritative;
# trick from Peter Rundle <peter.rundle@au.interpath.net>
# newer Macs
if substring (option vendor-class-identifier, 0, 9) = "AAPLBSDPC"
{
filename "yaboot";
option vendor-class-identifier "AAPLBSDPC";
}
# really old iMacs
elsif substring (option option-221, 0, 5) = "Apple"
{
filename "yaboot";
option vendor-class-identifier "AAPLBSDPC";
}
# Intel PXE
elsif substring (option vendor-class-identifier, 0, 9) = "PXEClient"
{
# NOTE: kernels are specified in /tftpboot/lts/pxe/pxelinux.cfg/
filename "/lts/2.6.20.9-ltsp-1/pxelinux.0";
}
# default to an i386 BOOTP image
else
{
filename "/lts/2.6.20.9-ltsp-1/vmlinuz-2.6.20.9-ltsp-1";
}
if substring (option vendor-class-identifier, 20, 3) = "ppc" {
option root-path "192.168.10.9:/opt/ltsp/ppc";
} else {
option root-path "192.168.10.9:/opt/ltsp/i386";
}
}
}
# example configurations for specifying specific kernels to specific clients
group {
use-host-decl-names on;
option log-servers 192.168.10.9;
host wd01 {
hardware ethernet 00:03:99:88:FA:3E;
fixed-address 192.168.10.99;
filename "/lts/2.6.20.9-ltsp-1/pxelinux.0";
}
Fazendo dessa forma ai você consegue 3 subredes, lembrando que você pode colocar quantas quiser.
Esse conteúdo está disponibilizado sobre a licença de uso - Tiu enhavo estas disponebla sur uza permesilo LiPE
Nenhum comentário:
Postar um comentário