Configurar servidor DHCP en Debian/Ubuntu

  • Servirá el rango de direcciones IP comprendidas entre 10.33.1.100 y 10.33.1.200 en la red 10.33.1.0/24
  • Proporcionará los siguientes parámetros de configuración a los hosts clientes:
    • Tiempo de concesión = 1 día
    • Máximo tiempo de concesión = 8 días
    • Mínimo tiempo de concesión = 2 horas
    • Máscara de red = 255.255.255.0
    • Puerta de enlace = 10.33.1.1
    • Servidor DNS = 8.8.8.8

Para instalar un servidor DHCP en Debian/Ubuntu y configurarlo no es tan sencillo como el siguiente>siguiente de Windows, hay que seguir muchísimos más pasos y configurar varios ficheros, a continuación os expongo.

PASOS EN EL SERVER DHCP

1. Instalar el servidor DHCP en Debian/Ubuntu

apt install isc-dhcp-server

2. Poner una IP fija al servidor editando el archivo interfaces

3. Indicar en que interface de red se van a hacer las escuchas de las peticiones DHCP, para ello hay que editar el fichero, yo he puesto que escuche a través de la eth1. Es decir he puesto entre las comillas que viene vacías eth1 como se observa en la figura.

nano /etc/default/isc-dhcp-server

Con ifconfig -a vemos las interfaces de red que tiene la máquina estén levantadas o no.

Si nuestro servidor tiene varias interfaces de red, será necesario indicar la interfaz o interfaces por las cuales se va a ofrecer el servicio DHCP. Para ello, tendremos que editar el archivo /etc/default/isc-dhcp-server:

//Ofrecer DHCP por eth0 y eth1

//Editar /etc/default/isc-dhcp-server y añadir parámetro INTERFACES:

INTERFACES=»eth0 eth1″

4. Editar el archivo de configuración del servidor DHCP, pero recomiendo realizar una copia de seguridad, por si “la liamos parda”.

cp /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf.copia

A continuación explico las diferentes líneas del fichero dhcpd.conf:

  1. Nombre del dominio, en mi caso, dhcp.local
  2. DNS, en mi caso el de Google.
  3. IP del router.
  4. Tiempo de concesión (lease time) expresado en segundos, en este caso 1 día.
  5. Máximo tiempo de concesión, expresado en segundos.
  6. Mínimo tiempo de concesión, expresado en segundos.
  7. En esta línea se encuentra la dirección de red donde se encuentra la máquina, la máscara de la red y el rango de IP’s que va a asignar nuestro servidor DHCP.
  8. Una vez establecida la configuración hay que reiniciar el servidor de la forma deseada, es decir, parándolo y arrancándolo, o haciendo un restart, aconsejo stop/start.

1ª Forma

/etc/init.d/isc-dhcp-server stop

/etc/init.d/isc-dhcp-server start

/etc/init.d/isc-dhcp-server restart

2ª Forma

service isc-dhcp-server stop

service isc-dhcp-server start

service isc-dhcp-server restart

5. Comprobar en el log del sistema si hay errores en:

  • Arranque del servidor.
  • Errores en el fichero dhcpd.conf
  • Si está el servidor asignando bien las IP’s a los clientes observando si se ha realizado bien los pasos para realizar una concesión.
  1. DHCPDISCOVER
  2. DHCPOFFER
  3. DHCPREQUEST
  4. DHCPPACK

http://withfriendship.com/images/f/26903/mapping-sets-of-dhcp-options.gif

6. Podemos verificar también si el proceso está ejecutándose y a la escucha por el puerto 67 UDP. Si el puerto 67 no se encuentra en la lista de netstat, algo hemos hecho mal

ps -ef | grep dhcp

netstat -ltun

7. Si editamos el fichero /var/lib/dhcp/dhcpd.leases vemos las concesiones que ha realizado, y como no, todavía no hemos arrancado ningún cliente, por lo tanto no debe de haber dado.

PASOS EN EL CLIENTE

1. Poner la interface por donde queremos que se conecte al server en DHCP.

2. Ver con ifconfig -a si se ha realizado la concesión correctamente, y como se aprecia en la figura, así ha sido.

En nuevas distribuciones usar el comando ip a

Para usar el comando ifconfig instalar el paquete net-tools (apt install net-tools)

3. Podemos ver en el fichero dhcpd.leases que ya hay contenido en el de las concesiones que ha realizado.

4. Ver en el syslog del server como se ha realizado la concesión, es decir, DHCPDISCOVER, DHCPOFFER, DHCPREQUEST, DHCPPACK, como se comprueba en la figura, pero sé inteligente y realiza un tail -10 del fichero, que es un tochaco.

HACER RESERVAS DE IP A EQUIPOS

1. Añadir la reserva dentro del bloque subnet si la reserva pertenece a la misma red, en mi caso es la ip 10.33.1.14 y tendría que añadirla dentro del blque de subnet porque pertenece a la red de la subnet, es decir, la 10.33.1.0

Hay que mirar en el host cliente, la MAC que posee.

  • Si trabajamos, por ejemplo con VMware, lo podemos ver en Network Adapter Advanced
  • En Windows, ipconfig/all
  • En Linux, ifconfig -a

2. Si no pertenece la reserva a la subnet hay que ponerla fuera.

host jesus {
hardware ethernet 00:0c:29:c9:46:80;
fixed-address 192.168.1.50;
option routers 192.168.1.254;

}

EJEMPLO FICHERO DHCPD.CONF

Todas las líneas que comienzan por almoadilla (#) son líneas de comentarios y son ignoradas por el servidor DHCP. Todas las líneas que especifican parámetros deben terminar en punto y coma ‘;’)

Deja un comentario

slot thailand

slot gacor

slot gacor

https://badudu.org/

badudu

slot gacor

https://siakad.unikamamuju.ac.id/fonts/-/starlight-princess/

slot gacor

slot gacor 4d

slot gacor

https://labskill.umtas.ac.id/wp-content/slot-gacor/

https://kamalinews.co.id/wp-content/slot-deposit-qris/

https://lsgi.org/

https://lsgi.org/

slot777

slot88

http://upforfifty.xyz/

slot gacor

slot88

slot

https://katalog.uinsyahada.ac.id/slot/

slot gacor

slot

slot gacor

slot gacor

slot gacor

slot demo

toto4d

pay4d

https://bpbd.tulangbawangkab.go.id/shop/server-thailand/

https://게이코슬롯.com/

gacor88

slot gacor

slot thailand

slot demo

slot gacor

slot gacor

situs slot gacor

situs slot gacor

slot-thailand

slot gacor

slot88

slot gacor

slot gacor

slot gacor

slot gacor

slot gacor

slot demo

https://manajemen.unik-kediri.ac.id/wp-content/files/-/slot-toto/

slot4d

slot gacor

https://simpatda.rohilkab.go.id/public/

https://pajak.gunungmaskab.go.id/js/

slot88

https://ojs.trigunadharma.ac.id/public/

https://ojs.trigunadharma.ac.id/up_load/site/

https://kip-kuliah.itbi.ac.id/images/

https://itbi.ac.id/asset/

https://kabanjahe.itbi.ac.id/asset/

https://dindikbud.pekalongankab.go.id/assets/js/

https://dindikbud.pekalongankab.go.id/styles/img/

https://rsud.tulangbawangkab.go.id/shop/

https://dindikbud.pekalongankab.go.id/styles/fonts/

https://ppdb.dindikbud.pekalongankab.go.id/img/

https://simppdb.dindikbud.pekalongankab.go.id/.well-known/pki-validation/

https://akpergshwng.ac.id/assets/js/

https://slot88.smkmuhkandanghaur.sch.id/

https://myexist.muallimaat.sch.id/.well-known/

slot gacor

toto macau

slot gacor

slot gacor

slot gacor hari ini

slot gacor

slot maxwin

https://keclasem.rembangkab.go.id/error/

https://ak.polnep.ac.id/slot-gacor/

slot thailand

https://pmbtest.akpergshwng.ac.id/data/slot-qris-gacor/

slot gacor 4d

https://elsa.polteksahid.ac.id/elsa/files/slot-gacor-thailand/

https://ppdb.smai-soedirman-kotabekasi.sch.id/assets/

slot-gacor

slot-gacor

olxtoto

slot gacor

slot gacor

https://roadpowersystems.com/pages/

slot4d

slot gacor

slot gacor

slot gacor

slot thailand

togel online

slot88

togel online

slot gacor

https://fkomputer.umku.ac.id/wp-content/plugins/

https://feb.umku.ac.id/wp-includes/

https://fgizi.umku.ac.id/wp-content/languages/

https://fmipa.umku.ac.id/wp-includes/

slot gacor

slot88

slot88

slot gacor

slot gacor

slot gacor

slot gacor

https://fkip.umku.ac.id/wp-content/uploads/

https://fkesehatan.umku.ac.id/wp-content/plugins/

slot gacor

slot gacor

https://fst.umku.ac.id/wp-content/plugins/

https://fkeperawatan.umku.ac.id/wp-content/plugins/

olx toto

https://akparjakarta.ac.id/wp-content/

slot qris

slot qris

slot gacor

slot gopay

slot thailand

slot gacor

slot gopay

slot5000

https://ppdb.smai-soedirman-kotabekasi.sch.id/assets/

https://pmbtest.akpergshwng.ac.id/data/slot-qris-gacor/

https://cbt.dindikbud.pekalongankab.go.id/assets/

slot ovo

https://jdih.pn-labuanbajo.go.id/images/

https://pn-labuanbajo.go.id/wp-content/uploads/

https://fst.umku.ac.id/wp-content/uploads/

slot gacor

slot gacor

slot gacor

slot88

slot gacor

https://smkpelitanusantara.sch.id/

https://wibs.sch.id/

https://smkm3-alkamal.sch.id/

https://pelitanusantara.sch.id/

slot hoki

slot gacor kamboja

slot777

slot gacor 4d

http://esptpd.kaimanakab.go.id/public/img/

slot gacor

slot server luar

slot gacor

slot88

slot hoki

https://api.kelastryout.id/assets/

slot gacor

slot gacor

slot gacor

slot gacor 2023

https://perpustakaan.poltekkespangkalpinang.ac.id/macau-slot-gacor/

https://sipp.pn-labuanbajo.go.id/resources/

http://bphtb.mitrakab.go.id/public/js/

slot88

https://lppm.upr.ac.id/assets/uploads/

slot gacor

slot88

slot88

slot gacor

slot gacor

slot maxwin

slot gacor

slot gacor

slot maxwin

slot gacor

slot gacor

slot777

slot gacor

http://bphtb.mitrakab.go.id/public/img/

slot demo

https://fkg.unimus.ac.id/wp-content/

slot-thailand

https://gizi.unimus.ac.id/wp-content/

https://statistik.unimus.ac.id/wp-content/

https://pmb.akpergshwng.ac.id/js/

https://pmb.akpergshwng.ac.id/css/

https://pmb.akpergshwng.ac.id/images/

slot maxwin

slot thailand

slot gacor

slot

slot gacor

slot gacor

slot maxwin

slot gacor

slot gacor

slot777

https://pajak.gunungmaskab.go.id/bphtb/public/fonts/

http://bphtb.mitrakab.go.id/public/img/

slot demo

slot4d

slot88

slot maxwin

slot gacor

slot gacor

slot thailand

slot gacor

slot thailand

slot gacor

slot gacor

slot gacor

www.oooms.org/

slot gacor

slot gacor

slot gacor

slot gacor

https://descubripunilla.com/

slot gacor

slot88

slot777

https://walnuttavern.com/

https://royalharbor.org/

slot gacor

https://ppdb.smai-soedirman-kotabekasi.sch.id/js/

https://asik.sman1marabahan.sch.id/js/

slot garansi

https://dindikbud.pekalongankab.go.id/stats/

slot dana

slot dana

slot gacor

slot gacor

https://ppdb.smai-soedirman-kotabekasi.sch.id/web/

https://programmes.help.edu.my/wp-content/ninjajago/

https://surgalt.mof.gov.mn/public/ninjajago/

https://www.funteacherprivate.com/ninjajago/

server vietnam

https://lms.cpraedcourse.com/public/store/ninjajago/

slot gopay

slot thailand

slot thailand

slot88

slot gacor

slot gacor

slot gacor

slot777

slot gacor

togel

slot thailand

slot88

slot gacor

slot gacor

slot gacor

slot5000

slot gacor

slot demo

slot88

slot gacor

https://cas.beetleware.com/ninjajago/

https://savadrasane.ir/ninjajago/

https://wilipso.edu.pe/ninjajago/

https://innovacionescyc.net/HOME/wp-content/ninjajago/

https://e-classe.mfr-pontonx.com/cours/web/ninjajago/

https://softwarevilla.com/uploads/

slot gacor

slot88

https://online-sattaking.com/js/

https://aqualtrend.addinol.cz/ninjajago/

https://app.rekola.cz/assets/ninjajago/

https://cas.beetleware.com/assets/ninjajago/

https://quimicaantupiren.com/wp-content/uploads/ninjajago/

https://patrickboisclair.com/ninjajago/

slot gacor

slot gacor

slot thailand

slot gacor

http://simrsud.pasamankab.go.id/slot-luar-negeri/

https://colegiodentistasgranada.org/static/ckeditor/

slot gacor

slot gacor

slot gacor

slot gacor

slot gacor

slot gacor

slot gacor

slot gacor

slot gacor

slot gacor

slot gacor

slot thailand

https://longwood.ibot.cas.cz/mpo-slot/

slot thailand

slot thailand

slot gacor

slot thailand

slot gacor

slot thailand

slot777

http://simrsud.pasamankab.go.id/slot-luar-negeri/

slot gacor

slot luar negeri

slot777

slot gacor hari ini

slot777

slot gacor

slot gacor

situs slot gacor

slot gacor

slot gacor

slot demo

slot demo

https://psb.bbpkmakassar.or.id/blog/thailand/

https://www.france-boissons.fr/slot-gacor/

slot777

slot gacor hari ini

slot gacor hari ini

slot88

slot gacor

slot gacor

http://poskocovid19.perhubungan.jatengprov.go.id/products/ninjajago-gacor/

slot gacor

slot thailand

https://simppdb.dindikbud.pekalongankab.go.id/products/server-thailand/

https://poskocovid19.perhubungan.jatengprov.go.id/products/gacor/

slot gacor

slot thailand

slot thailand

https://siakad-d2.poltekesos.ac.id/ninjajago/

slot thailand

https://www.bsides.nz/

https://pmb.akpergshwng.ac.id/products/ninja-gacor/

slot gacor

https://murnajati.jatimprov.go.id/assets/ninjajago-gacor/

slot gacor

slot thailand

https://pbb-p2.balikpapan.go.id/-/

https://lib.murnajati.jatimprov.go.id/pg/

https://ppid.murnajati.jatimprov.go.id/rekomendasi-gacor/

https://antareja.upnyk.ac.id/produk/gacor-ninjajago/

https://unigres.ac.id/ninjajago/

http://poskocovid19.perhubungan.jatengprov.go.id/link-gacor/

slot777

toto togel

https://slot-gacor.center/

slot thailand

https://gemarimart.gemri.id/

slot gacor maxwin

https://parkir.salatiga.go.id/products/gacor-server-thailand/

https://슬롯88.org/

https://antareja.upnyk.ac.id/product/88gacor/

https://simbphtb.kuduskab.go.id/simbphtb/-/

https://katalog.uinsyahada.ac.id/slot-luar-negeri/

https://repository.stiem-bongaya.ac.id/files/gacor-dong/

https://ebphtb.rohilkab.go.id/shop/situs-wd/

slot gacor

slot demo

slot gacor