huangyanzhao05 发表于 2011-4-9 12:21:01

DHCPv6配置2

本帖最后由 huangyanzhao05 于 2011-4-9 12:23 编辑

DHCPv6分配前缀的配置
R1#sho run

hostname R1
!
no ip domain lookup
ipv6 unicast-routing
ipv6 cef
ipv6 dhcp pool cisco--------------------------指定地址池cisco
prefix-delegation pool ciscopress------------地址池绑定创建的前缀池ciscopress(下面有配置前缀池ciscopress)
dns-server 1985::1---------------------------指定DNS Server地址
domain-name ciscopress.com-------------------指定域名
sip address 1985::1--------------------------指定sip Server
sip domain-name cisco.com--------------------指定sip域名

注:还有些information的选项,在这就不一一列出了(根据各个厂商的支持情况决定,可以?看喽)

interface GigabitEthernet1/0
no ip address
negotiation auto
ipv6 address 12::1/64
ipv6 enable
ipv6 dhcp server cisco----------------------这里同分配地址一样,接口使能server绑定地址池
ipv6 ospf 110 area 0

ipv6 local pool ciscopress 23::/60 64------------指定要分配的前缀池ciscopress
ipv6 router ospf 110
router-id 1.1.1.1


relay:

R2#sho run

hostname R2
!
no ip domain lookup
ipv6 unicast-routing
ipv6 cef
!

!
interface GigabitEthernet1/0
no ip address
negotiation auto
ipv6 address 12::2/64
ipv6 enable
ipv6 ospf 110 area 0
!
!
interface GigabitEthernet2/0
no ip address
negotiation auto
ipv6 address 23::2/64
ipv6 enable
ipv6 dhcp relay destination 12::1----------------relay配置只要指定server地址就可以了

这里要说明的是CISCO的destination可以指定组播地址,但要另配置组播路由
ipv6 ospf 110 area 0
!
6 router ospf 110
router-id 2.2.2.2
log-adjacency-changes
!

client:

R3#sho run

hostname R3
!

no ip domain lookup
ipv6 unicast-routing
ipv6 cef

!
interface GigabitEthernet1/0
no ip address
negotiation auto
ipv6 enable
ipv6 dhcp client pd prefix------------------------客户端用此命令获取server分配的前缀
ipv6 ospf 110 area 0
!

ipv6 router ospf 110
router-id 3.3.3.3
log-adjacency-changes


客户端查看获取前缀结果:

R3(config-if)#do sho ipv dh int g1/0
GigabitEthernet1/0 is in client mode
Prefix State is OPEN
Renew will be sent in 3d11h
Address State is REQUEST (0)
Retransmission timer expires in 00:00:00
List of known servers:
    Reachable via address: FE80::C801:DFF:FED4:38
    DUID: 00030001CA000DD40000
    Preference: 0
    Configuration parameters:
      IA PD: IA ID 0x00040001, T1 302400, T2 483840
      Prefix: 23::/64-------------------------------客户端获取的前缀
                preferred lifetime 604800, valid lifetime 2592000
                expires at May 08 2011 11:38 PM (2591977 seconds)
      IA NA: IA ID 0x00040001, T1 0, T2 0
      DNS server: 1985::1
      Domain name: ciscopress.com
      SIP DNS server: 1985::1
      SIP Domain name: cisco.com----------------------客户端获得的一些information
      Information refresh time: 0
Prefix name: prefix
Prefix Rapid-Commit: disabled
Address Rapid-Commit: disabled


Information Request:

思科上的InformationRequest需在Server接口上配置ipv6 nd other-config-flag

客户端接口需配置ipv6 address autoconfig获取information

由于relay暂不支持传递Information Request,所以我就在R2上实验了,现在它是一个申请dns等信息的客户端

R2(config-if)#do sho ipv dh int g1/0
GigabitEthernet1/0 is in client mode
Prefix State is IDLE (0)
Information refresh timer expires in 23:59:53-----在申请地址时提到过,默认Information refresh为24h
Address State is IDLE-----------------------------若只申请dns等信息,地址状态为ldle
List of known servers:
    Reachable via address: FE80::C800:DFF:FED4:1C
    DUID: 00030001CA000DD40000
    Preference: 0
    Configuration parameters:
      DNS server: 1985::1
      Domain name: ciscopress.com
      SIP DNS server: 1985::1
      SIP Domain name: cisco.com--------------------客户端申请的一些information
      Information refresh time: 0
Prefix Rapid-Commit: disabled
Address Rapid-Commit: disabled

最后补充一句,思科客户端申请地址状态的变化为
idle---------solicit------------request-------------open
通过debug可以看到后三个状态变化
其它还有renew、rebind状态

feiji20088 发表于 2011-12-2 15:28:43

ipv6 dhcp client pd prefix------------------------客户端用此命令获取server分配的前缀


请问版主,上面的命令的最后一个prefix从何而来?

满天星 发表于 2011-12-2 19:52:24

需要搞清楚DHCP地址分配和前缀代理(PD)的具体区别和应用场景。
这个问题该让楼主来回答你!
页: [1]
查看完整版本: DHCPv6配置2