konigabriel
(usa Fedora)
Enviado em 11/03/2009 - 15:11h
Olá Pessoal,
Solicito ajuda de vocês com relação a DHCP.
Quero um servidor DHCP que possua diversas redes e dentro dessas redes range's especificos. Alem disso quero que seja feito restrição de atribuição de endereço IP por MAC, ou seja, cadastro uma lista de MAC's mas NÃO digo que determinado MAC recebe determinado IP.
O que acontece é o seguinte:
Tenho 1 servidor DHCP e 2 estações. Cadastrei no servidor os dois MACs das estações, porem cada um deles em redes diferentes. Então "service dhcpd start". As duas estações recebem endereços IPs, porem uma delas recebe toda configuração de gateway, dns e etc da rede atribuida a outra estação. Deu para entender? Se não, veja o meu conf:
######################################################
# Opções gerais
authoritative;
default-lease-time 600;
max-lease-time 7200;
ddns-update-style none;
deny unknown-clients;
# Opções especificas
subnet 192.168.10.0 netmask 255.255.255.0 {
range dynamic-bootp 192.168.10.20 192.168.10.220;
option routers 192.168.10.221;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.10.255;
option domain-name-servers 192.168.10.221;
option domain-name "imbsp";
not authoritative;
host ironmoun-521942 { hardware ethernet 00:14:C2:E6:03:06; }
}
subnet 192.168.20.0 netmask 255.255.255.0 {
range dynamic-bootp 192.168.20.20 192.168.20.220;
option routers 192.168.20.221;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.20.255;
option domain-name-servers 192.168.20.221;
option domain-name "imbsp";
not authoritative;
host sp-nb-001 { hardware ethernet 00:08:0D:C1:97:F9; }
}
######################################################
Em /etc/sysconfig/dhcpd
######################################################
DHCPDARGS="eth0 eth0:1"
######################################################
Minha configuração de eth0 e eth0:1
######################################################
# Broadcom Corporation NetXtreme BCM5721 Gigabit Ethernet PCI Express
DEVICE=eth0
BOOTPROTO=static
BROADCAST=192.168.10.255
HWADDR=00:18:8b:f7:46:a8
IPADDR=192.168.10.1
NETMASK=255.255.255.0
NETWORK=192.168.10.0
ONBOOT=yes
DNS1=192.168.10.221
GATEWAY=192.168.10.221
DEVICE=eth0:1
BOOTPROTO=static
BROADCAST=192.168.20.255
HWADDR=00:18:8b:f7:46:a8
IPADDR=192.168.20.1
NETMASK=255.255.255.0
NETWORK=192.168.20.0
ONBOOT=yes
DNS1=192.168.20.221
GATEWAY=192.168.20.221
######################################################
O meu syslog /var/log/messeges no momento que "start" do serviço
######################################################
dhcpd: Internet Systems Consortium DHCP Server 4.0.0
dhcpd: Copyright 2004-2007 Internet Systems Consortium.
dhcpd: All rights reserved.
dhcpd: For info, please visit
http://www.isc.org/sw/dhcp/
dhcpd: WARNING: Host declarations are global. They are not limited to the scope you declared them in.
dhcpd: Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file
dhcpd: Wrote 0 deleted host decls to leases file.
dhcpd: Wrote 0 new dynamic host decls to leases file.
dhcpd: Wrote 2 leases to leases file.
dhcpd:
dhcpd: No subnet declaration for eth0:1 (no IPv4 addresses).
dhcpd: ** Ignoring requests on eth0:1. If this is not what
dhcpd: you want, please write a subnet declaration
dhcpd: in your dhcpd.conf file for the network segment
dhcpd: to which interface eth0:1 is attached. **
dhcpd:
dhcpd: Listening on LPF/eth0/00:18:8b:f7:46:a8/192.168.10.0/24
dhcpd: Sending on LPF/eth0/00:18:8b:f7:46:a8/192.168.10.0/24
dhcpd: Sending on Socket/fallback/fallback-net
######################################################
A estação 1 pegou a seguinte configuração:
sufix imbsp
ip 192.168.10.20
mask 255.255.255.0
gateway 192.168.10.221
OBS; Correto, não há problemas.
A estação 2 pegou a seguinte configuração:
sufix imbsp
ip 192.168.10.22
mask 255.255.255.0
gateway 192.168.20.221
OBS; O problemas está aqui... esta estação não pegou ip da rede 192.168.20.0/24 somente o gateway correto.
Alguem tem alguma sugestão?