Chapter 5 Lab 5-2 - DHCP: Topology
Chapter 5 Lab 5-2 - DHCP: Topology
Chapter 5 Lab 5-2 - DHCP: Topology
1 SWITCH
Objectives
Configure DHCP for IPv4
Configure Stateless DHCP for IPv6
Configure Stateful DHCP for IPv6
Background
To practice the various configuration and options associated with DHCP for IPv4 and IPv6, you will configure
a DHCP server on switch DLS1. Hosts A and B will receive IP addresses from DLS1 and validate continued
connectivity.
Note: This lab uses Cisco Catalyst 3560 and 2960 switches running Cisco IOS 15.0(2)SE6 IP Services and
LAN Base images, respectively. The 3560 and 2960 switches are configured with the SDM templates “dual-
ipv4-and-ipv6 routing” and “lanbase-routing”, respectively. Depending on the switch model and Cisco IOS
Software version, the commands available and output produced might vary from what is shown in this lab.
Catalyst 3650 switches (running any Cisco IOS XE release) and Catalyst 2960-Plus switches (running any
comparable Cisco IOS image) can be used in place of the Catalyst 3560 switches and the Catalyst 2960
switches.
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 1 of 25
CCNPv7.1 SWITCH: Lab 5-2 – DHCP
Required Resources
2 Cisco 2960 with the Cisco IOS Release 15.0(2)SE6 C2960-LANBASEK9-M or comparable
2 Cisco 3560v2 with the Cisco IOS Release 15.0(2)SE6 C3560-IPSERVICESK9-M or comparable
Computer with terminal emulation software
Ethernet and console cables
3 Windows 7 PCs with appropriate software
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 2 of 25
CCNPv7.1 SWITCH: Lab 5-2 – DHCP
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 3 of 25
CCNPv7.1 SWITCH: Lab 5-2 – DHCP
Step 2: Configure IPv4 DHCP server on DLS1 for VLAN 99 and 120
Configure a DHCP server for IPv4 on DLS1 using the following parameters:
For VLAN 99:
- Exclude addresses 10.1.99.1 through 10.1.99.2 and 10.1.99.100 through 10.1.99.104
- Set the default router to 10.1.99.1
- Set the DNS server to 10.1.99.100
For VLAN 120:
- Exclude addresses 10.1.120.1 through 10.1.120.2 and 10.1.120.100 through 10.1.120.104
- Set the default router to 10.1.120.1
- Set the DNS server to 10.1.99.100
Configure Interface F0/6 as an access port in VLAN 99 and issue the no shut command
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 4 of 25
CCNPv7.1 SWITCH: Lab 5-2 – DHCP
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 5 of 25
CCNPv7.1 SWITCH: Lab 5-2 – DHCP
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 6 of 25
CCNPv7.1 SWITCH: Lab 5-2 – DHCP
Step 5: Configure a STATELESS DHCP server for IPv6 on DLS1 using the following
parameters:
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 7 of 25
CCNPv7.1 SWITCH: Lab 5-2 – DHCP
Step 6: Configure DHCP Relay on DLS2 for the VLAN 120 network
Redirect IPv4 and IPv6 DHCP requests to DLS1 at 10.1.99.1 and 2001:db8:3115:99::d1 respectively
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 8 of 25
CCNPv7.1 SWITCH: Lab 5-2 – DHCP
Note: The passwords configured here are required for NETLAB compatibility only and are NOT
recommended for use in a live environment
First, verify that Host D (connected to DLS2 F0/6) receives an IP address from the VLAN 110 pool.
For the rest of this step, you will work with Host A connected to ALS1.
Once the interface on ALS1 is associated with proper VLAN, use the commands appropriate to the PC
operating system to obtain IPv4 and IPv6 addressing.
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 9 of 25
CCNPv7.1 SWITCH: Lab 5-2 – DHCP
For a computer with Windows 7 installed (must be machine administrator): At the command prompt, issue the
command ipconfig /renew to get an IPv4 address and ipconfig /renew6 to get an IPv6 address.
In the ipconfig output above, notice that there are two IPv6 addresses. The first address listed,
2001:db8:3115:99:a940:91fe:38dd:da0c is a permanent address while the second address listed,
2001:db8:3115:99:75b4:31b7:6c26:50ad, is a temporary address.
Also notice that the interface portion of the permanent address is the same as the interface portion of the link-
local address.
The temporary address is generated automatically because privacy extensions are enabled.
The permanent address will be used in DNS registration and when this host is providing a service, while the
temporary address will be used when this host is serving in the client role and requesting services from
another host, with the idea that this helps provide some privacy to the host.
The temporary address is valid for one day then a new temporary address is generated and then the old
temporary address goes into a "deprecated" mode for seven days. The "active" temporary address may also
be referred to as "preferred".
The second thing to note is from the output of the route print -6 command:
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 10 of 25
CCNPv7.1 SWITCH: Lab 5-2 – DHCP
The default route, expressed as ::/0, points to the link-local address of the default gateway; there is also a
route to the local IPv6 network 2001:db8:3115:99::/64 noted as "on link".
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 11 of 25
CCNPv7.1 SWITCH: Lab 5-2 – DHCP
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 12 of 25
CCNPv7.1 SWITCH: Lab 5-2 – DHCP
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 13 of 25
CCNPv7.1 SWITCH: Lab 5-2 – DHCP
Notice the IPv6 addresses. This machine has two addresses with the 2001:db8:3115:120::/64 prefix, and only
one from the 3333:120::/64 prefix. What happened?
The results here are a result of the autoconfig flag being set in the router advertisements sent by DLS2. The
“A” flag being on tells the host to use the RA to create an address, even if the “M” flag is on. To see the “A”
flag, you could use Wireshark on the host or simply debug ipv6 nd on DLS2:
We used different numbers on the DLS2 VLAN120 interface and the DHCP scope to illustrate the impact of
the autoconfig flag.
To make DLS2 remove the autoconfig flag from the RA, add the ipv6 nd prefix xx::/yy no-autoconfig
interface configuration command (xx::/yy is the prefix assigned to int VLAN 120).
Please note that as of this writing, the no-autoconfig parameter is hidden, so it will not appear in help or tab-
completion.
Note: Due to the way the values are stored, your Windows 7 host may not release the originally configured
addresses in the 2001::db8:3115:120::/64 network.
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 14 of 25
CCNPv7.1 SWITCH: Lab 5-2 – DHCP
Now, reconfigure the DHCP pool at DLS1 to use the correct prefix for VLAN 120 (2001:db8:3115:120::/64),
disable and re-enable the adapter on HOST B, and the host should receive a single IPv6 address. Due to the
fact that this is the same prefix, and the way Windows generates the random interface ID, this will most likely
be the same address.
DLS1(config)# no ipv6 dhcp pool VLAN120-IPV6-POOL
DLS1(config)# ipv6 dhcp pool VLAN120-IPV6-POOL
DLS1(config-dhcpv6)# address prefix 2001:db8:3115:120::/64
DLS1(config-dhcpv6)# dns-server 2001:db8:3115:99::100
DLS1(config-dhcpv6)# domain-name switch.ccnp
DLS1(config-dhcpv6)# interface po2
DLS1(config-if)# ipv6 dhcp server VLAN120-IPV6-POOL
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 15 of 25
CCNPv7.1 SWITCH: Lab 5-2 – DHCP
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 16 of 25
CCNPv7.1 SWITCH: Lab 5-2 – DHCP
Device Configurations:
Below are the final configurations for each switch.
DLS1:
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 17 of 25
CCNPv7.1 SWITCH: Lab 5-2 – DHCP
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 18 of 25
CCNPv7.1 SWITCH: Lab 5-2 – DHCP
DLS2:
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 19 of 25
CCNPv7.1 SWITCH: Lab 5-2 – DHCP
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 20 of 25
CCNPv7.1 SWITCH: Lab 5-2 – DHCP
ALS1:
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 21 of 25
CCNPv7.1 SWITCH: Lab 5-2 – DHCP
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 22 of 25
CCNPv7.1 SWITCH: Lab 5-2 – DHCP
ALS2:
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 23 of 25
CCNPv7.1 SWITCH: Lab 5-2 – DHCP
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 24 of 25
CCNPv7.1 SWITCH: Lab 5-2 – DHCP
CONCLUSIONES
En este trabajo dirigido se realizo la configuracion de DHCP en IPV4, lo que me permitió conocer, aprender y
aplicar este protocolo de red que facilita la administración de direccionamiento IPv4. Este proceso es importante
pues aun se utilizan este direccionamiento en equipos actuales, por lo tanto me facilita la administración de
muchos equipos que puedan ser configurados de manera dinámica, así mismo aprendí que en un Switch capa 3
puedo configurar diferentes Pool DHCP acorde a su numero de VLAN.
Para el direccionamiento IPv6 se incorporan dos tecnologías de DHCP que nos permite realizar el asignamiento
de IPs, los laboratorios me ayudaron a comprender y aplicar la configuracion:
En la configuracion Stateless DHCP IPv6 encontre que no se requieren muchas configuraciones, por lo tanto es
un método que me permite realizar integración de nuevos dispositivos IPv6, iot, o computadores personales.
Respecto a la configuracion Stateful DHCP IPv6 se asemeja mas a a la configuración de IPv4 DHCP, donde se
deben determinar todos los parámetros para la configuracion DHCP, esto significa que tenemos un control mayor
de las configuraciones.
Finalmente con estas opciones de configuracion DHCP podemos realizar configuraciones de direccionamiento
dinamico con el fin de poner en fnuncionamiento una red de computadores y que la administración de las
direcciones IPs no sea un problema.
© 2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 25 of 25