Bootstrap

ipv6中实现DHCPv6有状态和无状态地址的配置

实验目的:1.实现路由器可以有状态的获取IPv6地址

                  2.实现路由器可以无状态的获取IPv6地址

配置思路:

  1. 配置路由器接口的IPv6地址
  2. 在路由器2上创建DHCP地址池,进入路由器3对应接口,开启应用DHCP地址池服务,进入路由器4对应的接口,配置无状态获取IPv6地址方式

 拓扑图

AR2的配置

dhcp enable    //使能dhcp

#

dhcpv6 pool pool1   //创建DHCP地址池,取名为pool1

 address prefix 2002::/64      //地址池前缀

 excluded-address 2002::1

interface GigabitEthernet0/0/0

 ipv6 enable

 ipv6 address 2002::1/64

 ipv6 address auto link-local

 dhcpv6 server pool1              //进行DHCP有状态地址配置,应用pool1地址池

interface GigabitEthernet0/0/1

 ipv6 enable

 ipv6 address 2003::1/64

 ipv6 address auto link-local

 undo ipv6 nd ra halt    //使能接口发布ra报文,使接口能够进行IPv6无状态地址配置

interface GigabitEthernet0/0/2

 ipv6 enable

 ipv6 address 2001::2/64

 ipv6 address auto link-local

AR1的配置

[Huawei]ipv6

[Huawei]int g0/0/0

[Huawei-GigabitEthernet0/0/0]ipv6 enab

[Huawei]int g0/0/0

[Huawei-GigabitEthernet0/0/0]ipv6 address 2001::1 64

[Huawei]ipv6 route-static 2002:: 15 2001::2    //配置一条到AR3网段的静态路由

 

AR3的配置

[Huawei]dhcp enable    //开启dhcp服务

Info: The operation may take a few seconds. Please wait for a moment.done.

[Huawei]int g0/0/0

 [Huawei-GigabitEthernet0/0/0]ipv6 address auto link-local

[Huawei]int g0/0/0

[Huawei-GigabitEthernet0/0/0]ipv6 address auto dhcp  //设置接口的配置方式为DHCP

[Huawei]ipv6 route-static :: 0 2002::1 //配置一条默认路由

查看结果在AR3上,成功获取到IPv6地址

[Huawei]dis ipv6 interface

GigabitEthernet0/0/0 current state : UP

IPv6 protocol current state : UP

IPv6 is enabled, link-local address is FE80::2E0:FCFF:FE61:7DC3

  Global unicast address(es):

2002::2, subnet is 2002::2/128

AR4的配置

[Huawei]int g0/0/0

[Huawei-GigabitEthernet0/0/0]ipv6 address auto global  //设置接口的配置方式为global(无状态获取)

[Huawei]ipv6 route-static 2001:: 64 2003::1

[Huawei]ipv6 route-static 2002:: 64 2003::1     //配置静态路由实现通信

测试结果

 

 

悦读

道可道,非常道;名可名,非常名。 无名,天地之始,有名,万物之母。 故常无欲,以观其妙,常有欲,以观其徼。 此两者,同出而异名,同谓之玄,玄之又玄,众妙之门。

;