dhcp (dhcpd.conf)

duas redes no dhcp

Categoria: Networking

Software: dhcp

[ Hits: 12.910 ]

Por: Tiago R. de Oliveira


Galera, este é um dhcpd.conf que eu uso aqui, que faz o roteamento pra duas subnets, uma com ips predefinidos por mac, e outra com acesso livre!
Ali tem uma opção que esta com a talha na frente, que da o ip somente para os macs cadastrados, ou seja, sem cadastro no dhcp nada de ip!!
Espero ajudar!!
Até mais


# a minimal /etc/dhcpd.conf example

# this statement is needed by dhcpd-3 needs at least this statement.
# you have to delete it for dhcpd-2, because it does not know it.
ddns-update-style none;   ddns-updates off; 

# this subnet is served by us
authoritative;      

#nega acesso a macs não cadastrados
#deny unknown-clients;

# declare the lease times (the time after which a client will renew its lease)
default-lease-time       600;   # 10 minutes (short for testing... increase these)
max-lease-time          7200;   # 2 hours

# let's give the local domain a name
# (which should correlate to your name server configuration)

shared-network placa1 {


option domain-name       "seudominio.com.br";   

# this assumes that your dhcp server is also the router for the subnet
option routers          192.168.0.1;

# clients shall use this host as nameserver, too
option domain-name-servers    XXX.XXX.XXX.XXX;

# this can explicitely be specified
#option broadcast-address    192.168.0.255;   

# range da faixa 2
subnet 192.168.2.0 netmask 255.255.255.0
 {
   option broadcast-address 192.168.2.255;
   option routers          192.168.2.1;
   range 192.168.2.1 192.168.2.254;
 } 

# these 10 addresses will be given out dynamically
subnet 192.168.0.0 netmask 255.255.255.0 
 {
   option broadcast-address 192.168.0.255;

#-----------------------------------------Servidor------------------------------------------------
#
# ServLab
host serv_lab { hardware ethernet 00:60:97:DF:24:C9; fixed-address 192.168.0.3; }
#
# Sislab
host sislab-1788 { hardware ethernet 00:08:54:34:BE:C8; fixed-address 192.168.0.2; }
#
# Acesso
host acesso_7672 { hardware ethernet 00:10:5A:1E:11:CA; fixed-address 192.168.0.5; }
#
#------------------------------------- LAB-23 ----------------------------------------------------
#
# RESERVADO 192.168.0.11 to 192.168.0.50
#
host LAB-23-M01 { hardware ethernet 00:40:A7:07:91:28; fixed-address 192.168.0.11; }
host LAB-23-M02 { hardware ethernet 00:40:A7:07:91:11; fixed-address 192.168.0.12; }
host LAB-23-M03 { hardware ethernet 00:40:A7:07:92:2B; fixed-address 192.168.0.13; }
host LAB-23-M04 { hardware ethernet 00:40:A7:07:91:20; fixed-address 192.168.0.14; }
host LAB-23-M05 { hardware ethernet 00:40:A7:07:92:7C; fixed-address 192.168.0.15; }
host LAB-23-M06 { hardware ethernet 00:40:A7:07:88:AA; fixed-address 192.168.0.16; }
host LAB-23-M07 { hardware ethernet 00:40:A7:07:90:80; fixed-address 192.168.0.17; }
host LAB-23-M08 { hardware ethernet 00:40:A7:07:90:88; fixed-address 192.168.0.18; }
host LAB-23-M09 { hardware ethernet 00:40:A7:07:90:6E; fixed-address 192.168.0.19; }
host LAB-23-M10 { hardware ethernet 00:40:A7:07:90:B9; fixed-address 192.168.0.20; }
host LAB-23-M11 { hardware ethernet 00:40:A7:07:91:22; fixed-address 192.168.0.21; }
host LAB-23-M12 { hardware ethernet 00:40:A7:07:90:F5; fixed-address 192.168.0.22; }
host LAB-23-M13 { hardware ethernet 00:40:A7:07:91:24; fixed-address 192.168.0.23; }
host LAB-23-M14 { hardware ethernet 00:40:A7:07:90:7A; fixed-address 192.168.0.24; }
host LAB-23-M15 { hardware ethernet 00:40:A7:07:89:7E; fixed-address 192.168.0.25; }
host LAB-23-M16 { hardware ethernet 00:40:A7:07:90:78; fixed-address 192.168.0.26; }
host LAB-23-M17 { hardware ethernet 00:40:A7:07:92:84; fixed-address 192.168.0.27; }
host LAB-23-M18 { hardware ethernet 00:40:A7:07:90:8F; fixed-address 192.168.0.28; }
host LAB-23-M19 { hardware ethernet 00:40:A7:07:90:EF; fixed-address 192.168.0.29; }
host LAB-23-M20 { hardware ethernet 00:40:A7:07:90:70; fixed-address 192.168.0.30; }
host LAB-23-M21 { hardware ethernet 00:40:A7:07:92:8A; fixed-address 192.168.0.31; }
host LAB-23-M22 { hardware ethernet 00:40:A7:07:90:8A; fixed-address 192.168.0.32; }
host LAB-23-M23 { hardware ethernet 00:40:A7:07:92:87; fixed-address 192.168.0.33; }
host LAB-23-M24 { hardware ethernet 00:40:A7:07:91:26; fixed-address 192.168.0.34; }
host LAB-23-M25 { hardware ethernet 00:40:A7:07:90:61; fixed-address 192.168.0.35; }
host LAB-23-M26 { hardware ethernet 00:40:A7:07:90:7E; fixed-address 192.168.0.36; }
host LAB-23-M27 { hardware ethernet 00:40:A7:07:90:86; fixed-address 192.168.0.37; }
host LAB-23-M28 { hardware ethernet 00:40:A7:07:90:CB; fixed-address 192.168.0.38; }
host LAB-23-M29 { hardware ethernet 00:40:A7:07:91:0F; fixed-address 192.168.0.39; }
host LAB-23-M30 { hardware ethernet 00:40:A7:07:90:87; fixed-address 192.168.0.40; }
host LAB-23-M31 { hardware ethernet 00:40:A7:07:90:CD; fixed-address 192.168.0.41; }
host LAB-23-M32 { hardware ethernet 00:40:A7:07:91:13; fixed-address 192.168.0.42; }
host LAB-23-M33 { hardware ethernet 00:40:A7:07:90:71; fixed-address 192.168.0.43; }
host LAB-23-M34 { hardware ethernet 00:40:A7:07:90:7D; fixed-address 192.168.0.44; }
host LAB-23-M35 { hardware ethernet 00:40:A7:07:90:79; fixed-address 192.168.0.45; }
host LAB-23-M36 { hardware ethernet 00:40:A7:06:9A:AA; fixed-address 192.168.0.46; }
#
# ------------------------------------- LAB-27 -----------------------------------------------------
#
# RESERVADO 192.168.0.51 TO 192.168.0.80
#
host LAB-27-M01 { hardware ethernet 00:C0:26:00:01:F5; fixed-address 192.168.0.51; }
host LAB-27-M02 { hardware ethernet 00:00:E8:0E:2B:39; fixed-address 192.168.0.52; }
host LAB-27-M03 { hardware ethernet 00:00:E8:0E:04:92; fixed-address 192.168.0.53; }
host LAB-27-M04 { hardware ethernet 00:00:E8:0E:34:99; fixed-address 192.168.0.54; }
host LAB-27-M05 { hardware ethernet 00:C0:26:00:03:56; fixed-address 192.168.0.55; }
host LAB-27-M06 { hardware ethernet 00:C0:26:00:01:E0; fixed-address 192.168.0.56; }
host LAB-27-M07 { hardware ethernet 00:00:E8:1F:74:D6; fixed-address 192.168.0.57; }
host LAB-27-M08 { hardware ethernet 00:50:DA:70:83:7A; fixed-address 192.168.0.58; }
host LAB-27-M09 { hardware ethernet 00:C0:26:00:01:F3; fixed-address 192.168.0.59; }
host LAB-27-M10 { hardware ethernet 00:00:E8:0E:32:6B; fixed-address 192.168.0.60; }
host LAB-27-M11 { hardware ethernet 00:00:E8:0E:39:91; fixed-address 192.168.0.61; }
host LAB-27-M12 { hardware ethernet 00:00:E8:0E:36:05; fixed-address 192.168.0.62; }
host LAB-27-M13 { hardware ethernet 00:C0:26:00:03:50; fixed-address 192.168.0.63; }
host LAB-27-M14 { hardware ethernet 00:C0:26:A0:84:86; fixed-address 192.168.0.64; }
host LAB-27-M15 { hardware ethernet 00:00:E8:0E:34:A1; fixed-address 192.168.0.65; }
host LAB-27-M16 { hardware ethernet 00:C0:DF:C0:7A:BD; fixed-address 192.168.0.66; }
host LAB-27-M17 { hardware ethernet 00:C0:26:00:01:F1; fixed-address 192.168.0.67; }
host LAB-27-M18 { hardware ethernet 00:C0:26:00:01:ED; fixed-address 192.168.0.68; }
host LAB-27-M19 { hardware ethernet 00:A1:B0:09:68:E0; fixed-address 192.168.0.69; }
host LAB-27-M20 { hardware ethernet 00:A1:B0:09:66:96; fixed-address 192.168.0.70; }
host LAB-27-M21 { hardware ethernet 00:C0:26:A0:83:FD; fixed-address 192.168.0.71; }
host LAB-27-M22 { hardware ethernet 00:02:44:33:B6:A2; fixed-address 192.168.0.72; }
host LAB-27-M23 { hardware ethernet 00:00:E8:0E:35:F0; fixed-address 192.168.0.73; }
host LAB-27-M24 { hardware ethernet 00:C0:26:00:01:6E; fixed-address 192.168.0.74; }
host LAB-27-M25 { hardware ethernet 00:00:E8:0E:3D:A7; fixed-address 192.168.0.75; }
#
# ------------------------------------- LAB-28 -----------------------------------------------------
#
# RESERVADO 192.168.0.81 TO 192.168.0.115 
#
host LAB-28-M01 { hardware ethernet 00:40:A7:07:90:4E; fixed-address 192.168.0.81; }
host LAB-28-M02 { hardware ethernet 00:10:5A:7A:C7:0A; fixed-address 192.168.0.82; }
host LAB-28-M03 { hardware ethernet 00:50:DA:CE:84:24; fixed-address 192.168.0.83; }
host LAB-28-M04 { hardware ethernet 00:10:5A:5D:23:F1; fixed-address 192.168.0.84; }
host LAB-28-M05 { hardware ethernet 00:40:A7:08:E7:D6; fixed-address 192.168.0.85; }
host LAB-28-M06 { hardware ethernet 00:40:A7:08:E6:8E; fixed-address 192.168.0.86; }
host LAB-28-M07 { hardware ethernet 00:40:A7:08:E6:2A; fixed-address 192.168.0.87; }
host LAB-28-M08 { hardware ethernet 00:50:DA:6D:13:C8; fixed-address 192.168.0.88; }
host LAB-28-M09 { hardware ethernet 00:50:DA:70:79:F8; fixed-address 192.168.0.89; }
host LAB-28-M10 { hardware ethernet 00:50:DA:C6:10:68; fixed-address 192.168.0.90; }
host LAB-28-M11 { hardware ethernet 00:50:DA:B9:DC:31; fixed-address 192.168.0.91; }
host LAB-28-M12 { hardware ethernet 00:50:DA:6D:10:AB; fixed-address 192.168.0.92; }
host LAB-28-M13 { hardware ethernet 00:50:DA:6D:14:89; fixed-address 192.168.0.93; }
host LAB-28-M14 { hardware ethernet 00:50:DA:C6:10:DA; fixed-address 192.168.0.94; }
host LAB-28-M15 { hardware ethernet 00:50:DA:C6:10:BB; fixed-address 192.168.0.95; }
host LAB-28-M16 { hardware ethernet 00:60:98:EF:AC:37; fixed-address 192.168.0.96; }
host LAB-28-M17 { hardware ethernet 00:01:02:48:78:E1; fixed-address 192.168.0.97; }
host LAB-28-M18 { hardware ethernet 00:50:DA:72:BF:5A; fixed-address 192.168.0.98; }
host LAB-28-M19 { hardware ethernet 00:50:DA:70:83:BF; fixed-address 192.168.0.99; }
host LAB-28-M20 { hardware ethernet 00:50:DA:70:46:1F; fixed-address 192.168.0.100; }
host LAB-28-M21 { hardware ethernet 00:50:DA:C6:12:17; fixed-address 192.168.0.101; }
host LAB-28-M22 { hardware ethernet 00:01:02:BD:DD:91; fixed-address 192.168.0.102; }
host LAB-28-M23 { hardware ethernet 00:01:03:DD:45:9E; fixed-address 192.168.0.103; }
host LAB-28-M24 { hardware ethernet 00:60:08:52:D2:A7; fixed-address 192.168.0.104; }
host LAB-28-M25 { hardware ethernet 00:50:DA:6D:13:94; fixed-address 192.168.0.105; }
host LAB-28-M26 { hardware ethernet 00:50:DA:72:BE:C8; fixed-address 192.168.0.106; }
host LAB-28-M27 { hardware ethernet 00:50:DA:C6:10:BD; fixed-address 192.168.0.107; }
host LAB-28-M28 { hardware ethernet 00:50:DA:C6:10:B8; fixed-address 192.168.0.108; }
host LAB-28-M29 { hardware ethernet 00:01:03:DD:56:CF; fixed-address 192.168.0.109; }
host LAB-28-M30 { hardware ethernet 00:10:5A:9B:31:14; fixed-address 192.168.0.110; }
host LAB-28-M31 { hardware ethernet 00:0A:E6:57:C2:06; fixed-address 192.168.0.111; }
host LAB-28-M32 { hardware ethernet 00:0D:87:51:35:0A; fixed-address 192.168.0.112; }
host LAB-28-M33 { hardware ethernet 00:50:DA:6D:13:09; fixed-address 192.168.0.113; }
host LAB-28-M34 { hardware ethernet 00:50:DA:C6:0C:1B; fixed-address 192.168.0.114; }
#
# ------------------------------------- LAB-29 -----------------------------------------------------
#
# RESERVADO 192.168.0.115 TO 192.168.0.150 
#
host LAB-29-M01 { hardware ethernet 00:04:75:B2:FB:51; fixed-address 192.168.0.115; }
host LAB-29-M02 { hardware ethernet 00:01:03:DD:56:FC; fixed-address 192.168.0.116; }
host LAB-29-M03 { hardware ethernet 00:01:03:DD:5B:8A; fixed-address 192.168.0.117; }
host LAB-29-M04 { hardware ethernet 00:01:6C:39:C8:DD; fixed-address 192.168.0.118; }
host LAB-29-M05 { hardware ethernet 00:01:03:DD:3D:A1; fixed-address 192.168.0.119; }
host LAB-29-M06 { hardware ethernet 00:01:03:DD:56:F6; fixed-address 192.168.0.120; }
host LAB-29-M07 { hardware ethernet 00:08:54:06:87:09; fixed-address 192.168.0.121; }
host LAB-29-M08 { hardware ethernet 00:04:75:B2:F1:FB; fixed-address 192.168.0.122; }
host LAB-29-M09 { hardware ethernet 00:50:DA:70:46:26; fixed-address 192.168.0.123; }
host LAB-29-M10 { hardware ethernet 00:01:03:DD:38:F1; fixed-address 192.168.0.124; }
host LAB-29-M11 { hardware ethernet 00:01:03:dd:5c:17; fixed-address 192.168.0.125; }
host LAB-29-M12 { hardware ethernet 00:15:58:06:00:B5; fixed-address 192.168.0.126; }
host LAB-29-M13 { hardware ethernet 00:01:03:DD:5A:F6; fixed-address 192.168.0.127; }
host LAB-29-M14 { hardware ethernet 00:83:08:00:55:74; fixed-address 192.168.0.128; }
host LAB-29-M15 { hardware ethernet 00:01:03:DD:56:C3; fixed-address 192.168.0.129; }
host LAB-29-M16 { hardware ethernet 00:01:03:DD:56:F8; fixed-address 192.168.0.130; }
host LAB-29-M17 { hardware ethernet 00:01:03:DD:5B:F9; fixed-address 192.168.0.131; }
host LAB-29-M18 { hardware ethernet 00:04:75:7D:C1:F3; fixed-address 192.168.0.132; }
host LAB-29-M19 { hardware ethernet 00:50:DA:0C:08:74; fixed-address 192.168.0.133; }
host LAB-29-M20 { hardware ethernet 00:01:03:DD:56:F7; fixed-address 192.168.0.134; }
host LAB-29-M21 { hardware ethernet 00:01:03:DD:5C:01; fixed-address 192.168.0.135; }
host LAB-29-M22 { hardware ethernet 00:01:03:DD:56:D4; fixed-address 192.168.0.136; }
host LAB-29-M23 { hardware ethernet 00:01:03:DD:30:20; fixed-address 192.168.0.137; }
host LAB-29-M24 { hardware ethernet 00:01:01:C7:29:A6; fixed-address 192.168.0.138; }
host LAB-29-M25 { hardware ethernet 00:60:97:07:89:B8; fixed-address 192.168.0.139; }
host LAB-29-M26 { hardware ethernet 00:01:03:DD:56:59; fixed-address 192.168.0.140; }
host LAB-29-M27 { hardware ethernet 00:0A:E6:CB:64:71; fixed-address 192.168.0.141; }
host LAB-29-M28 { hardware ethernet 00:01:03:DD:5C:00; fixed-address 192.168.0.142; }
host LAB-29-M29 { hardware ethernet 00:01:03:DD:56:FB; fixed-address 192.168.0.143; }
host LAB-29-M30 { hardware ethernet 00:01:03:DD:56:A4; fixed-address 192.168.0.144; }
host LAB-29-M31 { hardware ethernet 00:08:54:34:BA:4B; fixed-address 192.168.0.145; }
host LAB-29-M32 { hardware ethernet 00:50:DA:6D:13:C7; fixed-address 192.168.0.146; }
host LAB-29-M33 { hardware ethernet 00:01:02:63:3F:33; fixed-address 192.168.0.147; }
host LAB-29-M34 { hardware ethernet 00:01:03:DD:44:63; fixed-address 192.168.0.148; }
host LAB-29-M35 { hardware ethernet 00:01:03:DD:5B:88; fixed-address 192.168.0.149; }
host LAB-29-M36 { hardware ethernet 00:40:A7:05:4A:F0; fixed-address 192.168.0.150; }
#
# ------------------------------------- LAB-30 -----------------------------------------------------
#
# RESERVADO 192.168.0.151 TO 192.168.0.180
#
host LAB-30-M01 { hardware ethernet 00:A1:B0:09:66:BB; fixed-address 192.168.0.151; }
host LAB-30-M02 { hardware ethernet 00:10:5A:7A:C3:E4; fixed-address 192.168.0.152; }
host LAB-30-M03 { hardware ethernet 00:10:5A:7A:C6:E6; fixed-address 192.168.0.153; }
host LAB-30-M04 { hardware ethernet 00:50:04:D9:D4:B6; fixed-address 192.168.0.154; }
host LAB-30-M05 { hardware ethernet 00:50:04:D9:D7:17; fixed-address 192.168.0.155; }
host LAB-30-M06 { hardware ethernet 00:10:5A:7A:C3:EA; fixed-address 192.168.0.156; }
host LAB-30-M07 { hardware ethernet 00:50:04:E3:24:EE; fixed-address 192.168.0.157; }
host LAB-30-M08 { hardware ethernet 00:10:5A:7A:C6:F5; fixed-address 192.168.0.158; }
host LAB-30-M09 { hardware ethernet 00:50:04:11:CC:C8; fixed-address 192.168.0.159; }
host LAB-30-M10 { hardware ethernet 00:10:5A:7A:C7:1C; fixed-address 192.168.0.160; }
host LAB-30-M11 { hardware ethernet 00:10:5A:7A:C2:9E; fixed-address 192.168.0.161; }
host LAB-30-M12 { hardware ethernet 00:01:03:DD:5B:5D; fixed-address 192.168.0.162; }
host LAB-30-M13 { hardware ethernet 00:01:02:48:78:CE; fixed-address 192.168.0.163; }
host LAB-30-M14 { hardware ethernet 00:10:5A:7A:C6:C7; fixed-address 192.168.0.164; }
host LAB-30-M15 { hardware ethernet 00:10:4B:C8:62:02; fixed-address 192.168.0.165; }
host LAB-30-M16 { hardware ethernet 00:10:4B:37:FF:7C; fixed-address 192.168.0.166; }
host LAB-30-M17 { hardware ethernet 00:10:5A:7A:C6:F1; fixed-address 192.168.0.167; }
host LAB-30-M18 { hardware ethernet 00:50:04:D9:D7:E7; fixed-address 192.168.0.168; }
host LAB-30-M19 { hardware ethernet 00:10:5A:7A:C6:FE; fixed-address 192.168.0.169; }
host LAB-30-M20 { hardware ethernet 00:10:5A:7A:C2:61; fixed-address 192.168.0.170; }
host LAB-30-M21 { hardware ethernet 00:50:04:D9:D4:8C; fixed-address 192.168.0.171; }
host LAB-30-M22 { hardware ethernet 00:10:5A:7A:C6:CA; fixed-address 192.168.0.172; }
host LAB-30-M23 { hardware ethernet 00:04:75:71:13:F3; fixed-address 192.168.0.173; }
host LAB-30-M24 { hardware ethernet 00:01:02:48:78:D7; fixed-address 192.168.0.174; }
host LAB-30-M25 { hardware ethernet 00:10:5A:70:2F:EE; fixed-address 192.168.0.175; }
host LAB-30-M26 { hardware ethernet 00:50:DA:C6:12:0F; fixed-address 192.168.0.176; }
host LAB-30-M27 { hardware ethernet 00:A1:B0:09:6D:30; fixed-address 192.168.0.177; }

#----------------------------------Switch Intel 510T------------------------------------------------
#
# RESERVADO 192.168.0.250
#
host swth510 { hardware ethernet 00:03:47:7E:A1:68; fixed-address 192.168.0.250; }

#---------------------------------------- ACCESS POINT ---------------------------------------------
#
# RESERVADO 192.168.0.249 TO 192.168.0.246
#
# Acess Point 1 - 2° Andar 
host AP1 { hardware ethernet 00:11:95:e5:58:af; fixed-address 192.168.0.249; }

# Acess Point 2 - 1° Andar
host AP2 { hardware ethernet 00:11:95:e5:58:b4; fixed-address 192.168.0.248; }

# Adaptador Usb
host AdapUsb { hardware ethernet 00:13:46:62:9A:81; fixed-address 192.168.0.247; }

#Placa imagem 1
host img1 { hardware ethernet 00:83:08:00:56:7f; fixed-address 192.168.0.238; }

#Placa imagem 2
host img2 { hardware ethernet 00:08:54:34:B2:AE; fixed-address 192.168.0.239; }
}
}
  


Comentários
[1] Comentário enviado por cah666 em 15/04/2006 - 16:22h

muito boa a dica

[2] Comentário enviado por pcnmota em 18/04/2006 - 16:59h

legal cara... isso eh mto procurado nas listas...


Contribuir com comentário

  



Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts