IT 263 Introduction aux Réseaux Locaux et à la Sécurité Informatique I



Chapter 05: IP addressing and DHCP






DHCP: Dynamic Host Configuration Protocol

Configuration Steps

  1. Activate DHCP server . Activated by default on routers
    LAB(config)# service dhcp

  2. Addresses exclusion
    LAB(config)# ip dhcp excluded-address IP

  3. Create a DHCP pool
    LAB(config)# ip dhcp pool pool_name

  4. Define pool network or IP marge
    LAB(dhcp-config)# network Net_IP net_mask

  5. Set gateway
    LAB(dhcp-config)# default-router pool gateway IP

  6. Set DNS
    LAB(dhcp-config)# dns-server dns_server_IP
    LAB(dhcp-config)# netbios-name-server netbios server IP
    LAB(dhcp-config)# domain-name domain_name

  7. Lease time
    LAB(dhcp-config)# lease duree_du_bail

Addresses exclusion

exclude reserved IPs for servers printers and specific machines

LAB(config)# ip dhcp excluded-address IP exclude reserved IPs.
LAB(config)# ip dhcp excluded-address first IP last IP for a marge of IPs
LAB(config)# ip dhcp excluded-address IP1 IP2 … IPn for many IP of same pool

DHCP Relay

Un routeur connecte a des réseaux peut relayer leurs adressages DHCP a un routeur ou un serveur DHCP distant

interface port port connecte au reseau client dhcp
ip helper-address DHCP server IP all dhcp queries come on this interface will be redirect on DHCP server. This router serves as DHCP relay

Attribute an fix IP address to a machine in DHCP context
ip dhcp pool PCpoolname
host IP mask
hardware-address MAC @
NB: for mac @ cisco write 4 characters then a point like that bcee.7bc2.5b4f

ip dhcp pool PC1
host IP mask
hardware-address bcee.7bc2.5b4f
NB :for mac address, CISCO write 4 characters and then a dot Router reserves this IP for PC1

Duree du bail d’adresse

lease duree du bail by default it is one day
lease infinite no limit
lease days hours minutes

Configure an router interface to be DHCP client

int interface
no ip address
ip address dhcp

Dépannage du protocole DHCP

debug ip dhcp server events vérifier régulièrement si les périodes d’utilisation ont expiré. S’affichent également les processus des adresses renvoyées et des adresses allouées

Verifying DHCP on Cisco IOS

LAB# show ip dhcp binding show attributed addresses. Lists state information about each IP address currently leased to a client.

LAB# show ip dhcp server statistics fournir les nombres de messages DHCP envoyés et reçus. Lists DHCP server statistics—a lot of them!

show ip dhcp pool poolname Lists the configured range of IP addresses, plus statistics for the number of currently leased addresses and the high watermark for leases from each pool.

LAB# show ip dhcp conflict If someone statically configures an IP address on a LAN and the DHCP server hands out that same address, you’ll end up with a duplicate address. This isn’t good, which is why this command is so helpful!

ip dhcp excluded-address : exclusion des adresses qu’on peut utiliser statiquement 192.168.1.1 a 192.168.1.10


Eninam BAGNABANA     |         |     bagnadavid@outlook.fr     |