1.15.2012

dhcp server on rhel 6


dhcp


Instalemos con yum  :

[root@localhost Packages]# yum install dhcp
Loaded plugins: rhnplugin
This system is not registered with RHN.
RHN support will be disabled.
local                                                                                                                                                | 3.7 kB     00:00 ...
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package dhcp.i686 12:4.1.1-12.P1.el6 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

============================================================================================================================================================================
 Package                              Arch                                 Version                                              Repository                             Size
============================================================================================================================================================================
Installing:
 dhcp                                 i686                                 12:4.1.1-12.P1.el6                                   local                                 868 k

Transaction Summary
============================================================================================================================================================================
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 868 k
Installed size: 2.1 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : 12:dhcp-4.1.1-12.P1.el6.i686                                                                                                                         1/1

Installed:
  dhcp.i686 12:4.1.1-12.P1.el6

Complete!
[root@localhost Packages]#

Tomar como referencia el archivo de ejemplo en
/usr/share/doc/dhcp-4.1.1/dhcpd.conf.sample

Iniciar el servicio

# service dhcpd start

Tendríamos en /etc/dhcp/dhcpd.conf :

option domain-name "unas.edu";
default-lease-time 600;
max-lease-time 7200;
subnet 192.168.2.0 netmask 255.255.255.0 {
  range 192.168.2.240 192.168.2.250;
  option routers 192.168.2.1;
}
host vmware_prueba {
        option host-name "vmware_prueba";
        hardware ethernet 00:0c:29:fd:31:25;
        fixed-address 192.168.2.249;
}

Ir al laboratorio de instalación desatendida mediante KickStart  (ks), para cerrar la practica de método de instalaciones.

La sección :

host vmware_prueba {
        option host-name "vmware_prueba";
        hardware ethernet 00:0c:29:fd:31:25;
        fixed-address 192.168.2.249;
}


Es muy útil por ejemplo para asignarle ip estáticos a impresoras u otros devices.

No hay comentarios.:

Publicar un comentario