Foros del Web » Administración de Sistemas » Unix / Linux »

Servidor DHCP en ubuntu 12.04

Estas en el tema de Servidor DHCP en ubuntu 12.04 en el foro de Unix / Linux en Foros del Web. Hola a todos, estoy instalando un servidor DHCP en ubuntu que tiene 2 tarjetas de red eth0 y eth1. La idea es que ka tarjeta ...
  #1 (permalink)  
Antiguo 12/12/2012, 18:58
Avatar de Melecio  
Fecha de Ingreso: julio-2011
Ubicación: Coahuila
Mensajes: 320
Antigüedad: 12 años, 9 meses
Puntos: 8
Servidor DHCP en ubuntu 12.04

Hola a todos, estoy instalando un servidor DHCP en ubuntu que tiene 2 tarjetas de red eth0 y eth1.

La idea es que ka tarjeta eth1 estara conectado a el modem infinitum que me da internet al servidor y la eth0 es la que ira a un switch que conectara a varias pc y les dara internet.

Ejemplo:

Modem Puerta de enlace =192.168.1.254-----eth1=192.168.1.3---Serv DHCP----eth0 192.168.1.1----Switch---PC´S


el primer problema es que quiero configurar las tarjetas manualmente pero no me conecta a internet en la eth1 reinicio las tarjetas conel comando sudo /etc/init.d/networking restart y se tarda demaciado en resetear, abeces me dice que ignora las tarjetas y al final dice [ok]

sudo gedit /etc/network/interfaces


auto lo
iface lo inet loopback



auto eth1
iface eth1 inet static
address 192.168.1.4
netmask 255.255.255.0
gateway 192.168.1.254



auto eth0
iface eth0 inet static
address 192.168.4.1
netmask 255.255.255.0
gateway "aquy no se que ip se debe de poner"



despues le configuro en /etc/default/isc-dhcp-server

INTERFACES="eth0"



y por ultimo en dhcpd.conf


ddns-update-stylr none;
default-lease-time 600
max-lease-time 7200;
authoritative;
log-facility local7;
option broadcast-adress 192.168.1.255;
option routers 192.168.1.254
option domain-name-servers 192.168.1.254
option domain-name "MI SUB RED";
subnet 192.168.1.0 netmask 255.255.255.0{
range 192.168.1.60 192.168.1.70;
}




Alguno ha tenido suerte para que quede funcionando al 100%

Alguien me podria alludar con algun tutorial que no sea muy confuso.

Gracias
  #2 (permalink)  
Antiguo 30/01/2013, 20:27
Avatar de Melecio  
Fecha de Ingreso: julio-2011
Ubicación: Coahuila
Mensajes: 320
Antigüedad: 12 años, 9 meses
Puntos: 8
Respuesta: Servidor DHCP en ubuntu 12.04

sigan los pasos solamente configuren las ip de la tarjeta eth0 segun el segmento del modem que les provee de internet una vez que vean que si funciona modifiquenlo a su gusto.

Asignarle direcciones ip fijas

Sudo gedit /etc/network/interfaces
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.1.25
netmask 255.255.255.0
gateway 192.168.1.1
network 192.168.1.0
broadcast 19.168.1.255
dns-nameservers 8.8.8.8 8.8.4.4
dns-search google.com

auto eth1
iface eth1 inet static
address 172.22.22.1
netmask 255.255.255.0
network 172.22.22.0
broadcast 172.22.22.255



sudo gedit /etc/sysctl.conf
Buscar esta linea
# net.ipv4.ip_forward=1
Quitarle el signo de gato y guardar
net.ipv4.ip_forward=1

sudo gedit /etc/rc.local
agregarle antes de exit 0
/sbin/iptables -P FORWARD ACCEPT
/sbin/iptables --table nat -A POSTROUTING -o eth0 -j MASQUERADE
















Asignación de servicio dhcp
Sudo gedit /etc/dhcp/dhcpd.conf
ddns-update-style none;
option domain-name "google.com";
option domain-name-servers 8.8.8.8, 8.8.4.4;
default-lease-time 3600;
max-lease-time 7200;
authoritative;
log-facility local7;
subnet 172.22.22.0 netmask 255.255.255.0 {
range 172.22.22.21 172.22.22.250;
option subnet-mask 255.255.255.0;
option broadcast-address 172.22.22.255;
option routers 172.22.22.1;
}

sudo gedit /etc/default/isc-dhcp-server
hay que agregarle eth1
INTERFACES=""
INTERFACES="eth1"
Parar y reiniciar dehcp server y despues reiniciar
sudo service isc-dhcp-server stop (if the service is already running; skip if it’s not running)
sudo service isc-dhcp-server start
  #3 (permalink)  
Antiguo 31/01/2013, 10:30
Avatar de BrujoNic
Super Moderador
 
Fecha de Ingreso: noviembre-2001
Ubicación: Costa Rica/Nicaragua
Mensajes: 16.935
Antigüedad: 22 años, 5 meses
Puntos: 655
Respuesta: Servidor DHCP en ubuntu 12.04

Te recomiendo encarecidamente y para tu propio beneficio, que utilices correctores ortográficos cuando escribas algo porque tu horrografía, deja mucho que desear y a nivel profesional, te ayudaría mucho.
__________________
La tecnología está para ayudarnos. No comprendo el porqué con esa ayuda, la gente escribe TAN MAL.
NO PERDAMOS NUESTRO LINDO IDIOMA ESPAÑOL

Etiquetas: servidor
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 12:46.