Professional Documents
Culture Documents
6.2 DHCP
6.2 DHCP
Utilidad de DHCP
•DHCP es un protocolo
TCP/IP que proporciona un
método para asignar
dinámicamente direcciones
IP a los equipos de una red
marcotrujillo@hotmail.com
marcotrujillo@hotmail.com
Manual Vs. Automatic TCP/IP Configuration
Disadvantages Advantages
DCHP Operation
DHCP Client DHCP Client IP addres Information sent by
IP Automatic IP automatic DHCP server to DHCP clients
including:
•An IP Address
IP address 1
•A Subnet Mask
Non-DHCP Client
Static IP •Optional values, such as:
IP address 2 Non-DHCP Clients
– A default gateway
Static IP address
DHCP Server – The IP address of DNS
– The IP address of WINS
Switch LAN
marcotrujillo@hotmail.com
Steps to lease IP
addressing information to
clients:
• (1) IP Lease Request
– Begins when client starts up
or renew and is denied
– Client send Broadcast
(255.255.255.255) a
DHCPDISCOVER message
– Client uses 0.0.0.0 as source
IP
– The message also contains
MAC address
marcotrujillo@hotmail.com
(4) IP Lease
Acknowledgement
– The DHCP server issuing the
accepted offer broadcast a
DHCPACKNOWLEDGEMENT
message to acknowledge the
succesful lease.
– The message includes :
» A valid lease for the IP
address
» Other information
– When client receives the ack,
TCP/IP initializ by using the
configuration information that the
DHCP server provides .
marcotrujillo@hotmail.com
The DHCP Lease Renuewal Process
DHCPREQUEST Automatic Lease Renewal
Source IP Address = 192.168.0.77
Dist. IP Address = 192.168.0.108 – Cliente automatically attempts
Request IP Address = 192.168.0.77 to renew its lease when 50%
Hardware Address = 000102 . . .
of the lease duration expires
– Sends DHCPREQUEST to the
server from which it obtained
the lease
– The server renew the lease
and any updated configuration
DHCP Client DHCP Server with DHCPACK message
DHCPACK – If cannot renew continues to
Source IP Address = 192.168.0.108 use current configuration and
Dest. IP Address = 192.168.0.77 then send broadcast a
Offered IP Address = 192.168.0.77 DHCPDISCOVER to update
Client Hardware Address = 000102 . . . when 87.5% of the current
Subnet Mask = 255.255.255.0 lease duration expires.
Length of Lease = 8 days
Server identifier = 192.168.0.108 – If server respod with
DHCP Options: Router = 192.168.0.1 DHCPOFFER the client renew
its lease.
marcotrujillo@hotmail.com
The DHCP Lease Renuewal Process
DHCPREQUEST
Source IP Address = 192.168.0.77
Dist. IP Address = 192.168.0.108
Request IP Address = 192.168.0.77
Hardware Address = 000102 . . . Manual Lease Renewal
– To renew the lease manually,
use ipconfig command with
the /renew switch.
c:\>ipconfig /renew
– This sends a DCHPREQUEST
DHCP Client DHCP Server to the DHCP server tu update
DHCPACK configurationoptions and to
Source IP Address = 192.168.0.108 renew the lease time.
Dest. IP Address = 192.168.0.77 – You can use ipconfig
Offered IP Address = 192.168.0.77 command the /release switch
Client Hardware Address = 000102 . . . for release a lease
Subnet Mask = 255.255.255.0
Length of Lease = 8 days c:\>ipconfig /release
Server identifier = 192.168.0.108
DHCP Options: Router = 192.168.0.1
marcotrujillo@hotmail.com
Others messages
If the client detects a problem with the parameters in the
DHCPACK message (the address is already in use on
the network for example), the client sends a
DHCPDECLINE message to the server and restarts the
configuration process.
DHCPINFORM Message from a client that already has an IP address (manually configured
for example), requesting further configuration parameters from the DHCP server.
marcotrujillo@hotmail.com
Lease duration
Decrease Increase
Qué es un Agente de
retransmisión DHCP
Un Agente de retransmisión DHCP es un equipo o enrutador configurado para
escuchar difusiones DHCP/BOOTP procedentes de clientes DHCP y, a continuación,
retransmitir dichos mensajes a los servidores DHCP ubicados en distintas subredes
Unicast
Difusión Difusión
Subred A Subred B
Enrutadores
No admitido
según el
documento
RFC 1542
Cliente Cliente Cliente Cliente
marcotrujillo@hotmail.com
Cómo funciona un Agente de
retransmisión DHCP
Agente de
Agente de
retransmisión DHCP
retransmisión DHCP Servidor
Servidor DHCPDHCP
Cliente2
Cliente2 Enrutador
Enrutador Cliente3
Cliente1 No No
admitido según Cliente3
Cliente1 admitido
el documento RFC según
1542
el documento RFC 1542
Desafío:
Capturar y analizar el tráfico DHCP