Sie sind auf Seite 1von 3

Repositrio squeeze

deb http://http.us.debian.org/debian/ squeeze main contrib non-free deb http://security.debian.org/ squeeze/updates main contrib non-free deb http://ftp.br.debian.org/debian/ squeeze-updates main deb-src http://ftp.br.debian.org/debian/ squeeze-updates main deb http://ftp.br.debian.org/debian/ squeeze main contrib non-free deb http://www.debian-multimedia.org squeeze main non-free

Instalao
root@server:~# aptitude install isc-dhcp-server

Configurao
O servio DHCP s dever estar disponvel para a rede interna. Por isso s dever aceitar ligaes pela interface interna (eth0, neste caso), o que definido no ficheiro de configurao /etc/default/isc-dhcp-server: # Defaults for dhcp initscript # sourced by /etc/init.d/dhcp # installed at /etc/default/isc-dhcp-server by the maintainer scripts # # This is a POSIX shell fragment # # On what interfaces should the DHCP server (dhcpd) serve DHCP requests? # Separate multiple interfaces with spaces, e.g. "eth0 eth1". INTERFACES="eth0" A parte principal da configurao mantida no ficheiro /etc/dhcp/dhcpd.conf. Neste ficheiro indicado o nome de domnio (option domain-name "home.lan";), os endereos dos servidores DNS (option domain-name-servers 192.168.1.100, 192.168.1.1;). tambm definida a durao normal e mxima da atribuio do endereo IP atribudo (default-lease-time 600; max-lease-time 7200;). O cliente poder sempre pedir uma nova atribuio antes da actual expirar, podendo receber ou no o mesmo endereo IP. Finalmente, para o segmento de rede 192.168.1.0, indicada a gama de endereos disponvel para a atribuio (range 192.168.1.32 192.168.1.63;), qual o router a utilizar (option routers 192.168.1.1;) e qual o endereo de broadcast (option broadcast-address 192.168.1.255;) # # Sample configuration file for ISC dhcpd for Debian

# # # The ddns-updates-style parameter controls whether or not the server will # attempt to do a DNS update when a lease is confirmed. We default to the # behavior of the version 2 packages ('none', since DHCP v2 didn't # have support for DDNS.) ddns-update-style none; # option definitions common to all supported networks... option domain-name "example.org"; option domain-name-servers ns1.example.org, ns2.example.org; default-lease-time 600; max-lease-time 7200; # If this DHCP server is the official DHCP server for the local # network, the authoritative directive should be uncommented. authoritative; # Use this to send dhcp log messages to a different log file (you also # have to hack syslog.conf to complete the redirection). log-facility local7; ## SubNet home.lan subnet 192.168.1.0 netmask 255.255.255.0 { range 192.168.1.32 192.168.1.63; option routers 192.168.1.1; option broadcast-address 192.168.1.255; } # [...] O protocolo DHCP possibilita a atribuio endereos especficos a determinados sistemas, associando o nmero da placa de rede ao endereo pretendido. No entanto, estes endereos fixos no devem estar na gama dos endereos reservados para atribuio dinmica. # [...] # # Fixed IP addresses can also be specified for hosts. These addresses # should not also be listed as being available for dynamic assignment. # Hosts for which fixed IP addresses have been specified can boot using # BOOTP or DHCP. Hosts for which no fixed address is specified can only # be booted with DHCP, unless there is an address range on the subnet # to which a BOOTP client is connected which has the dynamic-bootp flag # set. host desktop { hardware ethernet 01:23:45:67:89:10; fixed-address 192.168.1.2; } host laptop { hardware ethernet 01:23:45:67:89:11; fixed-address 192.168.1.3;

} # [...] Reiniciar o servio dhcp: root@server:~# /etc/init.d/isc-dhcp-server restart

Configurao dos clientes


Linux
Num cliente Linux, basta instalar o pacote dhcp client. A configurao gerada durante a instalao dever ser suficiente. root@server:~# aptitude install isc-dhcp-client

Windows
Num cliente Windows, dever ser activada a opo "Obter automaticamente um endereo IP", nas propriedades TCP/IP da interface de rede. Numa rede caseira, com acesso Internet via modem ADSL ou cabo, esta opo dever, em princpio, j estar activada.

Das könnte Ihnen auch gefallen