cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
55165
Views
30
Helpful
3
Comments

     

    Introduction

    This document discuss with an example how to configure Stateful DHCPv6 in Relay mode. Mostly, while configuring the DHCP, the DHCP server may not be connected to clients directly in practical scenarios due to management reasons.In such cases, a DHCP relay agent serves the purpose relaying the messages coming from the clients and server.The DHCPv6 Relay Agent uses Relay forward/Reply messages to relay the messages between Servers and clients.

    Requirements
    Background

     

    In this configuration example,the router R1 is configured as DHCPv6 server and R2 is configured as Relay Agent. The routers R3 and R4 are configured as DHCPv6Client.

     

    Note: All configurations are tested in a lab environment involving ASR 1000 series router as DHCP server and Cisco 2800 series router as DHCP Clients.

     

    Topology Diagram

    dhcpv6relay.jpeg

    Summary Steps
    Server Configuration

    In Global Configuration Mode

    1. ipv6 unciast-routing
    2. ipv6 dhcp pool <pool name>
    3. address prefix <specify address prefix> lifetime <infinite> <infinite>
    4. dns-server <specify the dns server address>
    5. domain-name <specify the domain name>
    6. exit

    In Interface Configuration Mode

    1. ipv6 address <specify IPv6 Address>
    2. ipv6 dhcp server <server name>rapid-commit
    Relay Agent Configuration

    In Global Configuration Mode

    1. enable
    2. configure terminal
    3. ipv6 unicast-routing

     

    In Interface Configuration Mode

     

    In DHCPv6 server Facing Interface:

    1. ipv6 address autoconfig
    2. ipv6 enable
    3. exit

    In Clients Facing Interface

    1. ipv6 address <specify IPv6 address>
    2. ipv6 dhcp relay destination <specify destination IPv6 address><interface type>

     

    Note: Specify a destination address to which client packets are forwarded and enables DHCPv6 relay service on the interface.

    Client Configuration

    In Global Configuration Mode

    1. enable
    2. configure terminal
    3. ipv6 unicast-routing
    4. ipv6 nd route-owner

    In Interface Configuration Mode

    1. ipv6 address dhcp rapid commit
    2. ipv6 enable
    3. ipv6 nd autoconfig prefix
    4. ipv6 nd autoconfig default-route
    5. exit
    Configuration

     

    DHCPv6 ServerDHCPv6 Relay Agent
    DHCPv6 Client

    !
    version 15.0
    !
    hostname R1
    !
    ipv6 unicast-routing
    ipv6 cef
    ipv6 dhcp pool test
    address prefix 2001:DB8:11::/64 lifetime infinite infinite
    dns-server AAAA:BBBB:FE10::100
    dns-server 2001:DB8::5
    domain-name example.com
    !
    !
    !
    interface FastEthernet1/0
    no ip address
    duplex auto
    speed auto
    ipv6 address 2001:DB8:10::1/64
    ipv6 dhcp server test
    !
    !
    !
    ipv6 route 2001:DB8:11::/64 2001:DB8:10:0:C804:1AFF:FEAC:1C
    !
    !
    end
    !
    version 15.0
    !
    hostname R2
    !
    ipv6 unicast-routing
    ipv6 cef
    !
    !
    interface FastEthernet1/0
    no ip address
    duplex auto
    speed auto
    ipv6 address autoconfig
    ipv6 enable
    !
    !
    interface FastEthernet1/1
    no ip address
    duplex auto
    speed auto
    ipv6 address 2001:DB8:11::2/64
    ipv6 enable
    ipv6 dhcp relay destination 2001:DB8:10::1 FastEthernet1/0
    !
    !
    !
    end
    !
    version 15.0
    !
    hostname R3/hostname R4
    !
    ipv6 nd route-owner
    ipv6 unicast-routing
    ipv6 cef
    !
    !
    interface FastEthernet1/0
    no ip address
    duplex auto
    speed auto
    ipv6 address dhcp rapid-commit
    ipv6 enable
    ipv6 nd autoconfig prefix
    ipv6 nd autoconfig default-route
    !
    !
    !
    end

     

    Note: 

    • Static route to reach the clients (client prefix 2001:db8:11::/64) is added in the DHCPv6 Server so that it can reach clients
    • Under Client configuration

    The command ipv6 nd route-owner inserts Neighbor Discovery-learned routes into the routing table with "ND" status and enables ND autoconfiguration behavior.This command is configured in Global Configuration mode.

     

    Enabling the command ipv6 nd autoconfig prefix in the interface configuration mode, uses Neighbor Discovery to install all valid on-link prefixes from RAs received on the interface.

     

    To allow Neighbor Discovery to install a default route to the Neighbor Discovery-derived default router, use the command  ipv6 nd autoconfig default-route in the interface configuration mode

     

     

    Verify Commands

     

    show ipv6 route

     

    In client routers R3 and R4 default route is installed for the ND derived default router.Use this command show ipv6 route to check the routing table. 

     

    R3#show ipv6 route
    IPv6 Routing Table - default - 5 entries
    Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
           B - BGP, HA - Home Agent, MR - Mobile Router, R - RIP
           I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
           D - EIGRP, EX - EIGRP external, ND - Neighbor Discovery
           O - OSPF Intra, OI - OSPF Inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
           ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
    ND  ::/0 [2/0]
         via FE80::C804:1AFF:FEAC:1D, FastEthernet1/0
    ND  2001:DB8:11::/64 [2/0]
         via FastEthernet1/0, directly connected
    LC  2001:DB8:11:0:209E:3F6C:3900:7602/128 [0/0]
         via FastEthernet1/0, receive
    ND  2001:DB8:11:0:F145:5C6F:3658:7DB6/128 [2/0]
         via FastEthernet1/0, directly connected
    L   FF00::/8 [0/0]
         via Null0, receive

    show ipv6 dhcp pool

     

    To display the DHCPv6 pool information, in the DHCPv6 server use this command. The output shows that the number of active clients is 2 and  also displays other configuration parameter information, such as domain  name server address and preferred life time information.

     

    R1#show ipv6 dhcp pool
    DHCPv6 pool: test
      Address allocation prefix: 2001:DB8:11::/64 valid 4294967295 preferred 4294967295 (2 in use, 0 conflicts)
      DNS server: AAAA:BBBB:FE10::100
      DNS server: 2001:DB8::5
      Domain name: example.com
      Active clients: 2

    show ipv6 dhcp binding

     

    To display the information information about the clients, which includes their DUIDs, IAPDs, prefixes, and preferred and valid lifetimes.

     

    R1#sh ipv6 dhcp bin
    Client: FE80::C805:FFF:FE84:1C
      DUID: 00030001CA050F840000
      Username : unassigned
      IA NA: IA ID 0x00040001, T1 43200, T2 69120
        Address: 2001:DB8:11:0:F145:5C6F:3658:7DB6
                preferred lifetime INFINITY, , valid lifetime INFINITY,
    Client: FE80::C806:FFF:FE84:1C
      DUID: 00030001CA060F840000
      Username : unassigned
      IA NA: IA ID 0x00040001, T1 43200, T2 69120
        Address: 2001:DB8:11:0:209E:3F6C:3900:7602
                preferred lifetime INFINITY, , valid lifetime INFINITY,

    show ipv6 dhcp interface

    This command shows that interface Fa1/1 is configured in Relay Mode and displays the relay destination to which  messages from clients should be forwarded.

     

    R2#show ipv6 dhcp interface
    FastEthernet1/1 is in relay mode
      Relay destinations:
        2001:DB8:10::1 via FastEthernet1/0

    The configuration on the client's side can be verified using the same command in router R3 and R4.

     

    R4#show ipv6 dhcp interface
    FastEthernet1/0 is in client mode
      Prefix State is IDLE
      Address State is OPEN
      Renew for address will be sent in 06:26:48
      List of known servers:
        Reachable via address: FE80::C804:1AFF:FEAC:1D
        DUID: 00030001CA031AAC0000
        Preference: 0
        Configuration parameters:
          IA NA: IA ID 0x00040001, T1 43200, T2 69120
            Address: 2001:DB8:11:0:F145:5C6F:3658:7DB6/128
                    preferred lifetime INFINITY, valid lifetime INFINITY
          DNS server: AAAA:BBBB:FE10::100
          DNS server: 2001:DB8::5
          Domain name: example.com
          Information refresh time: 0
      Prefix Rapid-Commit: disabled
      Address Rapid-Commit: disabled

     

    R3#show ipv6 dhcp interface
    FastEthernet1/0 is in client mode
      Prefix State is IDLE
      Address State is OPEN
      Renew for address will be sent in 06:11:30
      List of known servers:
        Reachable via address: FE80::C804:1AFF:FEAC:1D
        DUID: 00030001CA031AAC0000
        Preference: 0
        Configuration parameters:
          IA NA: IA ID 0x00040001, T1 43200, T2 69120
            Address: 2001:DB8:11:0:209E:3F6C:3900:7602/128
                    preferred lifetime INFINITY, valid lifetime INFINITY
          DNS server: AAAA:BBBB:FE10::100
          DNS server: 2001:DB8::5
          Domain name: example.com
          Information refresh time: 0
      Prefix Rapid-Commit: disabled
      Address Rapid-Commit: enabled

     

    Ping

     

    You can check the connectivity between the DHCPv6 server and Clients using the ping command

     

    R1#ping 2001:DB8:11:0:209E:3F6C:3900:7602 (Pinging Client 1 R3 from DHCPv6 Server)

    Type escape sequence to abort.
    Sending 5, 100-byte ICMP Echos to 2001:DB8:11:0:209E:3F6C:3900:7602, timeout is 2 seconds:
    !!!!!
    Success rate is 100 percent (5/5), round-trip min/avg/max = 24/66/120 ms

    R1#ping 2001:DB8:11:0:F145:5C6F:3658:7DB6(Pinging Client 2 R4 from DHCPv6 Server)

     

    Type escape sequence to abort.
    Sending 5, 100-byte ICMP Echos to 2001:DB8:11:0:F145:5C6F:3658:7DB6, timeout is 2 seconds:
    !!!!!
    Success rate is 100 percent (5/5), round-trip min/avg/max = 0/113/400 ms

     

    Now ping the DHCPv6 server address from the clients R3 and R4.

     

    R3#ping 2001:db8:10::1 (DHCPv6 server Fa1/0 Interface IPv6 address)

     

    Type escape sequence to abort.
    Sending 5, 100-byte ICMP Echos to 2001:DB8:10::1, timeout is 2 seconds:
    !!!!!
    Success rate is 100 percent (5/5), round-trip min/avg/max = 8/48/168 ms

     

    R4#ping 2001:db8:10::1

     

    Type escape sequence to abort.
    Sending 5, 100-byte ICMP Echos to 2001:DB8:10::1, timeout is 2 seconds:
    !!!!!
    Success rate is 100 percent (5/5), round-trip min/avg/max = 8/80/140 ms

     

    References
    Routing Information Protocol
    Comments
    jd219
    Level 1
    Level 1

    very good explanation.

    rrsstefano
    Level 1
    Level 1

    Hi, very interesting.

     

    One question : if I'm not wrong, in this setup dhcp server is releasing only dns address and domain name, while addres is get by the client through nd from the router.

    I'm trying to test an environment where dhcp offer also the ipv6 address to the client but for now it is not working.

    Do you have a similar setup to share ?

     

    thanks

    Stefano

      

    May i have the file? Or if possible, can you send the file to my email? or send the download link by replying to my comment

    Thanks! 

    Getting Started

    Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: