IP : IP 版本 6 (IPv6)

DHCPv6使用前缀授权功能配置示例

2015 年 8 月 28 日 - 机器翻译
其他版本: PDFpdf | 英语 (2015 年 4 月 23 日) | 反馈


目录


简介

本文描述如何使用前缀授权功能为了配置DHCPv6 (IPv6的动态主机配置协议)服务器和客户端。此功能可以用于管理链路、子网和站点地址更改。

在此配置示例中,名为DHCPv6服务器的路由器有启用的前缀授权功能并且作为一个委派的路由器。委派的路由器自动化分配前缀进程到请求的路由器(即DHCP客户端)。一旦服务器分配了前缀给客户端,连接对请求的路由器的局域网使用接收的前缀块的接口有一个IPv6地址。请求的路由器然后宣布在路由器通告消息的此地址。客户端路由器(即本地网络的路由器)能使用自动设定选项由DHCP客户端请求从通告的路由器通告消息的全局IP地址。

先决条件

要求

尝试进行此配置之前,请确保满足以下要求:

使用的组件

本文档不限于特定的软件和硬件版本。

在本文的配置根据在Cisco IOS 软件版本软件12.4 (15)T 13的Cisco 3700系列路由器。

规则

有关文档规则的信息,请参阅 Cisco 技术提示规则

配置

本部分提供有关如何配置本文档所述功能的信息。

注意: 有关本文档所用命令的详细信息,请使用命令查找工具仅限注册用户)。

网络图

本文档使用以下网络设置:

http://www.cisco.com/c/dam/en/us/support/docs/ip/ip-version-6-ipv6/113141-DHCPv6-01.gif

配置

本文档使用以下配置:

这是链路到展示在配置在Cisco IOS路由器联机的DHCPv6涉及的步骤在Cisco支持社区的视频leavingcisco.com

DHCPv6的配置在Cisco IOS的leavingcisco.com

http://www.cisco.com/c/dam/en/us/support/docs/ip/ip-version-6-ipv6/113141-DHCPv6-02.gif

DHCP 服务器配置
DHCPSERVER#show running-config

version 12.4
!
hostname DHCPSERVER
!
ipv6 unicast-routing
ipv6 dhcp pool dhcpv6

!--- The DHCP pool is named "dhcpv6."

!
prefix-delegation pool dhcpv6-pool1 lifetime 1800 600

!--- The prefix delegation pool name is "dhcpv6-pool1."

!
dns-server 2001:DB8:3000:3000::42
domain-name example.com
!
interface Serial0/0
 no ip address
 ipv6 address 2010:AB8:0:1::1/64
 ipv6 enable
 ipv6 dhcp server dhcpv6
 clock rate 2000000
!
ipv6 local pool dhcpv6-pool1 2001:DB8:1200::/40 48

!--- The prefix pool named dhcpv6-pool1 has a prefix of  length
!--- /40 from which it will delegate (sub)prefixes of length /48.

!
end

DHCP 客户端配置
DHCPCLIENT#show running-config

version 12.4
!
hostname DHCPCLIENT
!
ipv6 unicast-routing
!
interface Serial0/0
no ip address
ipv6 address autoconfig default

!--- The autoconfig default adds a static ipv6 
!--- default route pointing to upstream DHCP server.

!
ipv6 enable
ipv6 dhcp client pd prefix-from-provider

!--- The DHCP client prefix delegation is 
!--- given the name prefix-from-provider.

!
clock rate 2000000
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
ipv6 address prefix-from-provider ::1:0:0:0:1/64

!--- The first 48 bits are imported from the delegated
!--- prefix (2001:db8:1200) and the ::/64 is the client
!--- identifier that gives the interface Fa0/1 the
!--- global IPv6 address 2001:DB8:1200:1::1/64.

!
ipv6 enable
!
interface FastEthernet0/1
no ip address
duplex auto
speed auto
ipv6 enable
ipv6 address prefix-from-provider ::1/64

!--- Similarly, the global IPv6 address 
!--- for fa0/1 is 2001:DB8:1200::1.

!
end

本地LAN配置
客户端 1 客户端 2
CLIENT1#show running-config

version 12.4
!
hostname CLIENT1
!
ipv6 unicast-routing
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
ipv6 address autoconfig

!--- The clients can run autoconfig to get an IPv6
!--- address depending on the router advertisements 
!--- sent by the DHCP client (requesting router).

!
ipv6 enable
!
end
CLIENT2#show running-config

version 12.4
!
hostname CLIENT2
!
ipv6 unicast-routing
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
ipv6 address autoconfig
ipv6 enable
!
end

验证

请使用本部分描述的命令来验证配置。

注意: 为了保存空间,在此部分换行的若干输出到新的一行。

在DHCP服务器

在此部分的输出显示活动客户端数量是1并且显示其他配置参数信息,例如域名服务器地址和首选的生命时间信息。

显示ipv6 dhcp pool
DHCPv6 pool: dhcpv6
  Prefix pool: dhcpv6-pool1
  preferred lifetime 600, valid lifetime 1800
  DNS server: 2001:DB8:3000:3000::42
  Domain name: example.com
  Active clients: 1

显示IPv6 dhcp捆绑命令提供关于客户端的信息,包括他们的DUIDs、IAPDs、前缀和首选和有效寿命。

显示绑定的IPv6 dhcp
Client: FE80::C002:FFF:FEB4:0
  DUID: 00030001C2020FB40000
  Username : unassigned
  Interface : Serial0/0
  IA PD: IA ID 0x00060001, T1 300, T2 480
  Prefix: 2001:DB8:1200::/48
  preferred lifetime 600, valid lifetime 1800
  expires at Mar 02 2002 01:26 AM (1707 seconds)

在DHCP客户端

显示IPv6 dhcp interface命令显示接口S0/0在客户端模式配置并且显示DNS服务器地址的详细信息,并且该的域名从DHCP服务器接收。

显示IPv6 dhcp interface
Serial0/0 is in client mode
  State is OPEN
  Renew will be sent in 00:04:37
  List of known servers:
  Reachable via address: FE80::C003:FFF:FEB4:0
  DUID: 00030001C2030FB40000
  Preference: 0
  Configuration parameters:
  IA PD: IA ID 0x00060001, T1 300, T2 480
  Prefix: 2001:DB8:1200::/48
  preferred lifetime 600, valid lifetime 1800
  expires at Mar 01 2002 10:59 AM (1777 seconds)
  DNS server: 2001:DB8:3000:3000::42
  Domain name: example.com
  Information refresh time: 0
  Prefix name: prefix-from-provider
  Rapid-Commit: disabled

显示IPv6 interface命令在快速以太网接口Fa0/0和Fa0/1提供此输出:

显示IPv6 int fa0/0 显示IPv6 int fa0/1
FastEthernet0/0 is up, line protocol is up
  IPv6 is enabled, link-local address 
          is FE80::C002:FFF:FEB4:0
  No Virtual link-local address(es):
  Global unicast address(es):
    2001:DB8:1200:1::1, subnet is 
          2001:DB8:1200:1::/64 [CAL/PRE]
      valid lifetime 1535 preferred lifetime 335

!--- Output omitted.

FastEthernet0/1 is up, line protocol is up
  IPv6 is enabled, link-local address 
          is FE80::C002:FFF:FEB4:1
  No Virtual link-local address(es):
  Global unicast address(es):
    2001:DB8:1200::1, subnet is 
          2001:DB8:1200::/64 [CAL/PRE]
      valid lifetime 1712 preferred lifetime 512

!--- Output omitted.

显示IPv6常规前缀命令通过前缀授权验证所有接收的前缀(一般前缀)从DHCP服务器。

显示IPv6常规前缀
IPv6 Prefix prefix-from-provider, acquired via DHCP PD
  2001:DB8:1200::/48 Valid lifetime 1656, preferred lifetime 456

!--- 2001:DB8:1200::/48 is the general prefix received from server.


   FastEthernet0/1 (Address command)
   FastEthernet0/0 (Address command)

在本地LAN客户端

显示IPv6 interface命令在客户端路由器Client1和Client2的快速以太网接口Fa0/0提供此输出:

显示IPv6 int fa0/0
客户端 1 客户端 2
FastEthernet0/0 is up, line protocol is up
  IPv6 is enabled, link-local address 
          is FE80::C000:FFF:FEB4:0
  No Virtual link-local address(es):
  Global unicast address(es):
  2001:DB8:1200:1:C000:FFF:FEB4:0, subnet is 
          2001:DB8:1200:1::/64 [EUI/CAL/PRE]
  valid lifetime 1709 preferred lifetime 509
FastEthernet0/0 is up, line protocol is up
  IPv6 is enabled, link-local address 
          is FE80::C001:FFF:FEB4:0
  No Virtual link-local address(es):
  Global unicast address(es):
  2001:DB8:1200:0:C001:FFF:FEB4:0, subnet 
          is 2001:DB8:1200::/64 [EUI/CAL/PRE]
  valid lifetime 1770 preferred lifetime 570

故障排除

目前没有针对此配置的故障排除信息。

相关的思科支持社区讨论

思科支持社区是您提问、解答问题、分享建议以及与工作伙伴协作的论坛。


相关信息


Document ID: 113141