Sunday 20 October 2019

DHCPv6 Configuration On Cisco Router

DHCPv6 Configuration On Cisco Router

In this post you will learn DHCPv6 Configuration On Cisco Router. We will share command and topology example for better understanding. If you want to learn about what is DHCPv4 and how to configure DHCPv4 on Cisco, You can visit here. This post is purely related to DHCPv6 Configuration On Cisco Router.

Configure a router as a stateless DHCPv6 server

As will be shown below, there are four steps to configure a router as a DHCPv6 server:

  • Step 1: Enable IPv6 routing

The use of the ipv6 unicast-routing command is required to enable IPv6 routing. This command is not necessary for the router to be a stateless DHCPv6 server, but it is required for the router to originate the ICMPv6 RA messages.
Router (config) # ipv6 unicast-routing

  • Step 2: Configure a DHCPv6 pool

The ipv6 dhcp pool set-name creates a set and the router enters the DHCPv6 configuration command, which is identified by the Router line (config-dhcpv6) #.
Router (config) # ipv6 dhcp pool  pool-name 
Router (config-dhcpv6) #

  • Step 3: Configure the pool parameters

During the SLAAC process, the client received the information he needed to create a global unicast IPv6 address. The client also received the default gateway information through the source IPv6 address of the RA message, which is the router's link-local address. However, the stateless DHCPv6 server can be configured to provide other information that may not have been included in the RA message, such as the DNS server address and domain name.
Router (config-dhcpv6) # dns-server  dns-server-address 
Router (config-dhcpv6) # domain-name  domain-name

  • Step 4: Configure the DHCPv6 interface

The ipv6 dhcp server interface-configuration mode set-name links the DHCPv6 set with the interface. The router responds to DHCPv6 requests without status on this interface with the information included in the pool. The O indicator must be changed from 0 to 1 using the ipv6 nd other-config-flag interface command . RA messages sent on this interface indicate that additional information is available from a stateless DHCPv6 server.

Router (config) # interface type number
Router (config-if) # ipv6 dhcp server pool-name
Router (config-if) # ipv6 nd other-config-flag

SAMPLE DHCPV6 SERVER WITHOUT STATUS

In Image 1 together with the commands, an example configuration is shown for a router to be configured as a stateless DHCPv6 server. Note that router R3 is shown as a DHCPv6 client. R3 is configured as a client to help verify stateless DHCPv6 operations.

R1 (config) # ipv6 unicast-routing
R1 (config) # ipv6 dhcp pool IPV6-STATELESS
R1 (config-dhcpv6) # dns-server 2001: db8: cafe: aaaa :: 5
R1 (config-dhcpv6) # domain-name example.com
R1 (config-dhcpv6) # exit
R1 (config) # interface g0 / 1
R1 (config-if) # ipv6 address 2001: db8: cafe: 1 :: 1/64
R1 (config-if) # ipv6 dhcp server IPV6-STATELESS
R1 (config-if) # ipv6 nd other-config-flag

 Configure a router as a stateless DHCPv6 client

Following the example in Image 1, a Cisco router is used as the stateless DHCPv6 client. This is not a typical situation and is used only for demonstration purposes. Generally, a stateless DHCPv6 client is a device, such as a computer, a tablet PC, a mobile device or a webcam.
The client router needs a link-local IPv6 address on the interface to send and receive IPv6 messages, such as RS messages and DHCPv6 messages. The link-local address of a router is created automatically when IPv6 is enabled on the interface. This can happen when a global unicast address is configured on the interface or when the ipv6 enable command is used  . After the router receives a local link address, it can participate in the detection of IPv6 neighbors.
In this example, the ipv6 enable command is used  , because the router does not yet have a global unicast address.
R3 (config) # interface g0 / 1
R3 (config-if) # ipv6 enable
R3 (config-if) # ipv6 address autoconfig
R3 (config-if) #
The ipv6 address autoconfig command   enables automatic configuration of IPv6 addressing using SLAAC. It is assumed that the server router is configured for stateless DHCPv6, so it sends an RA message to inform the client router that it uses stateless DHCPv6 to obtain DNS information.

Verification of DHCPv6 without status

Continuing with the example in Image 1, the show ipv6 dhcp pool  command  verifies the name of the DHCPv6 pool and its parameters. The number of active clients is 0, because the server does not maintain any status.
R1 # show ipv6 dhcp pool
DHCPv6 pool: IPV6-STATELESS
 DNS server: 2001: DB8: CAFE: AAAA :: 5
 Domain name: example.com
 Active clients: 0
R1 #
The show running-config command   can also be used to verify all the commands that were previously configured.

DHCPV6 CLIENT VERIFICATION WITHOUT STATUS

In this example, a router is used as a stateless DHCPv6 client. The result of the show ipv6 interface  command  shows that the router has “Stateless address autoconfig enabled” and an IPv6 global unicast address. The IPv6 global unicast address was created using SLAAC, which includes the prefix contained in the RA message. The IID was generated through EUI-64. DHCPv6 was not used to assign the IPv6 address.
R3 # show ipv6 interface g0 / 1
GigabitEthernet0 / 1 is up, line protocol is up
 IPv6 is enabled, link-local address is
FE80 :: 32F7: DFF: FE25: 2DE1 
 No Virtual link-local address (s):
 Stateless address autoconfig enabled 
Global unicast address (s): 
2001: DB8: CAFE: 1: 32F7: DFF: FE25: 2DE1, subnet is
2001: DB8: COFFEE: 1 :: / 64 [EUI / CAL / PRE]
 valid lifetime 2591935 preferred lifetime 604735
 Joined group address (es):
 FF02 :: 1
 FF02 :: 1: FF25: 2DE1
 MTU is 1500 bytes
 ICMP error messages limited to one every 100 milliseconds
 ICMP redirects are enabled
 ICMP unreachables are sent
 ND DAD is enabled, number of DAD attempts: 1
 ND reachable time is 30000 milliseconds (using 30000)
 ND NS retransmit interval is 1000 milliseconds
 Default router is FE80 :: D68C: B5FF: FECE: A0C1 on 
GigabitEthernet0 / 1 
R3 #
The default router information also comes from the RA message. This was the source IPv6 address of the packet containing the RA message and the router's link-local address.

In the result of the debug ipv6 dhcp detail command   in Image 2, the DHCPv6 messages exchanged between the client and the server are displayed. In this example, the command was entered on the client. The INFORMATION-REQUEST message is displayed, because it is sent from a DHCPv6 client without status. Note that the client, router R3, sends DHCPv6 messages from its link-local address to the address of all DHCPv6 relay agents and servers, FF02 :: 1: 2.

The debug result shows all DHCPv6 messages sent between the client and the server, including the DNS server and domain name options that were configured on the server.



No comments:

Post a Comment