Ir al contenido principal

Instalación DHCP

DHCP.


Instalación en Español e Inlges
1. Cómo instalar el rol de DHCP en Ubuntu 18 / 19
Para poder instalar esta funcionalidad en nuestro servidor y disfrutar de una administración central del direccionamiento, vamos a ejecutar el siguiente comando en el servidor: “sudo apt install isc-dhcp-server”
Ingresamos la letra S para confirmar la descarga e instalación del rol y una vez finalice este proceso veremos lo siguiente: "Ya hemos instalado el rol de DHCP en el servidor de Ubuntu."
1. How to install the DHCP role in Ubuntu 18/19
In order to install this functionality on our server and enjoy a central administration of the address, we will execute the following command on the server:
“Sudo apt install isc-dhcp-server”
Enter the letter S to confirm the download and installation of the role and once this process is finished we will see the following:
We have already installed the DHCP role on the Ubuntu server.
2. Cómo configurar la tarjeta de red en Ubuntu 19
El siguiente paso para lograr un control total de DHCP es configurar la tarjeta de red de nuestro equipo, para ello debemos editar el archivo isc-dhcp-server con el fin de establecer los valores asociados a la tarjeta de red ya que su función será la de entregar el direccionamiento IP.
2. How to configure the network card in Ubuntu 19
The next step to achieve full control of DHCP is to configure the network card of our team, for this we must edit the file isc-dhcp-server in order to establish the values associated with the network card since its function will be the to deliver the IP address.
Paso 1
Para realizar esta tarea podemos usar algún editor de texto y ejecutar lo siguiente:
“sudo nano /etc/default/isc-dhcp-server”
Allí veremos lo siguiente:
Step 1
To perform this task we can use some text editor and execute the following:
“Sudo nano / etc / default / isc-dhcp-server”
There we will see the following:
Paso 2
En la parte inferior encontramos las siguientes líneas:
INTERFACESv4
Esta permite configurar el direccionamiento IPv4
INTERFACESv6
Esta permite configurar el direccionamiento IPv6
En este punto debemos saber en detalle el nombre de la tarjeta de red del servidor, para esto podemos ejecutar, antes de acceder al archivo, el comando ifconfig y allí veremos el nombre de la tarjeta el cual en este caso es enp0s3: 
Step 2
At the bottom we find the following lines:
INTERFACESv4
This allows you to configure IPv4 addressing
INTERFACESv6
This allows you to configure IPv6 addressing
At this point we must know in detail the name of the server's network card, for this we can execute, before accessing the file, the ifconfig command and there we will see the name of the card which in this case is enp0s3:
Paso 3
Ahora vamos de nuevo al archivo de configuración de DHCP y en la sección INTERFACESv4 ingresamos el nombre de la tarjeta de red:
Guardamos los cambios usando la combinación de teclas Ctrl + O y salimos del editor usando las teclas Ctrl + X
Step 3
Now we go back to the DHCP configuration file and in the INTERFACESv4 section we enter the name of the network card:
We save the changes using the key combination Ctrl + O and exit the editor using the keys Ctrl + X
4. Cómo hacer uso del servidor DHCP
Hasta este punto hemos instalado y configurado el servidor DHCP con los parámetros necesarios para que la conectividad sea la correcta, de modo que ahora veremos cómo trabaja DHCP en los equipos cliente.
4. How to make use of the DHCP server
Up to this point we have installed and configured the DHCP server with the necessary parameters so that the connectivity is correct, so that we will now see how DHCP works on the client computers.
Paso 1
Contamos con un equipo Ubuntu 18.04 el cual tiene la siguiente configuración de red:
-Dirección MAC: 08:00:27:be:0d:d1
-Dirección IP: 192.168.0.42
Step 1
We have an Ubuntu 18.04 device which has the following network configuration:
-MAC Address: 08: 00: 27: be: 0d: d1
-IP Address: 192.168.0.42
Paso 2
Podemos ir al archivo de configuración dhcp.conf y establecer una dirección IP reservada solo para dicho equipo, ejecutamos lo siguiente:
“sudo nano /etc/dhcp/dhcpd.conf”
Allí vamos a registrar las siguientes líneas:
“host localhost Ubuntu {hardware ethernet 08:00:27:be:0d:d1;fixed-address 192.168.0.48;}”
En este caso hemos indicado la dirección MAC de la tarjeta de red así como una dirección IP del rango del servidor DHCP, guardamos los cambios con las teclas Ctrl + O y salimos con las teclas Ctrl + X.
Step 2
We can go to the dhcp.conf configuration file and set an IP address reserved only for that device, we execute the following:
“Sudo nano /etc/dhcp/dhcpd.conf”
There we will register the following lines:
“Ubuntu localhost host {ethernet hardware 08: 00: 27: be: 0d: d1; fixed-address 192.168.0.48;}”
In this case we have indicated the MAC address of the network card as well as an IP address of the DHCP server range, we save the changes with the Ctrl + O keys and exit with the Ctrl + X keys.
Paso 3
Reiniciamos el sistema y al ejecutar el comando ifconfig veremos que el servidor DHCP ha otorgado esa IP exclusiva a dicho equipo:
Step 3
Restart the system and when executing the ifconfig command we will see that the DHCP server has granted that exclusive IP to said equipment:


Paso 4
Ahora bien, para que se otorguen las direcciones IP de forma automática y aleatoria, en este caso usaremos un equipo cliente con interfaz gráfica, allí debemos pulsar en el ícono de red ubicado en la parte superior de la pantalla y damos clic sobre nuestro tipo de red y luego seleccionamos la opción “Configuración de red cableada” en este caso:
Step 4
Now, for IP addresses to be granted automatically and randomly, in this case we will use a client computer with a graphical interface, there we must click on the network icon located at the top of the screen and click on our type of network and then select the option “Wired network configuration” in this case:
Paso 5
Será desplegado lo siguiente:
Step 5
The following will be displayed:



Paso 6
Allí damos clic sobre el ícono de piñón ubicado en el tipo de red y en la ventana desplegada vamos a la pestaña IPv4 y allí definimos en el campo Método IPv4 la casilla Automático (DHCP)
Step 6
There we click on the pinion icon located in the type of network and in the displayed window we go to the IPv4 tab and there we define in the IPv4 Method field the Automatic box (DHCP)

Paso 7
Pulsamos en Aplicar para guardar los cambios y de ahora en adelante en cada conectividad el servidor DHCP será quien se encargue de asignar la dirección IP a dicho equipo.
Step 7
Click on Apply to save the changes and from now on in each connectivity the DHCP server will be responsible for assigning the IP address to that equipment.

Comentarios

Entradas populares de este blog

Ubuntu

Instala y Configura Aplicaciones y Servicios Integrantes: Cruz Alavez Gerardo. Flores Flores Alexis Geovanni. Martinez Gonzalez Josue Tadeo. Reyes Garcia Francisco Salvador Grupo: 512