thiagoradical
(usa Debian)
Enviado em 12/12/2011 - 08:37h
Seguinte estou fazendo o seguinte, a internet vem da etho, a eth1 é a intranet, na intranet nao consigo passar via dhcp, tive que pega um roteador sem fio, coloca em modo IPSTATIC, configura nele o ip da eth1 pra assim o roteador sem fio distribiu o ip em modo dhcp pela switch.
Há um aplicativo que faça isso sem a necessidade do roteador sem fio.
Tabela de IPs
eth0 192.168.0.10
eth1 10.1.1.11
Roteador sem fio 192.168.1.0 com ip da eth1 pra poder passar a internet
Arquivo #/etc/rc.local
/usr/local/bin/dhcpd ### eu testei adaptando um script inicializavel e tambem tentei adicionando as linhas comentadas abaixo sem inicializar o script que criei.
#!/bin/sh -e
#Start/Stop/Restart the DHCP server
#INTERFACES ="eth1"
#case "$1" in
#'start')
#dhcpd eth1
#;;
#'stop')
#killall dhcpd
#;;
#'restart')
#killall dhcpd
#dhcpd eth1
#;;
#*)
#echo "usage $0 start|stop|restart"
#esac
############################################
#/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="eth1"
#####################################################
#/etc/network/interface
auto eth0
iface eth0 inet static
address 192.168.0.10
netmask 255.255.255.0
gateway 192.168.0.1
network 192.168.0.0
broadcast 192.168.0.255
auto eth1
iface eth1 inet dhcp
###########################################################
#/etc/dhcp/dhcpd.conf
ddns-update-style none;
default-lease-time 600;
max-lease-time 7200;
authoritative;
log-facility local7;
subnet 10.1.1.0 netmask 255.255.255.0 {
range 10.1.1.12 10.1.1.250;
option domain-name-servers 8.8.8.8;
option domain-name-servers 8.8.4.4;
option domain-name "tuxnetwork.local.net";
option routers 10.1.1.11;
option broadcast-address 10.1.1.255;
}
#host tux {
#hardware ethernet 08:00:07:26:c0:a5;
#fixed-address tux.tuxnetwork.local.net;
#}