配置IPv6基础功能拓扑结构:
R1和R2分别通过GE0/0/0相连。要求R1和R2形成邻居关系,R2能通过邻居发现功能获得IPv6地址。
拓扑图
配置IPv6基础功能配置方法:
1、使能R1的IPv6转发能力并配置IPv6地址,使路由器具有对IPv6报文的转发能力。
2、打开R1的RA报文发送开关。R2的GE0/0/0接口在接收到R1发送的RA报文后可根据RA报文中携带的路由前缀等信息进行地址自动配置。
配置IPv6基础功能步骤:
1、配置R1
[Huawei]sysname R1
[R1]ipv6
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ipv6 enable
[R1-GigabitEthernet0/0/0]ipv6 address 2001::1/64
[R1-GigabitEthernet0/0/0]undo ipv6 nd ra halt
2、配置R2
[Huawei]sysname R2
[R2]ipv6
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ipv6 enable
[R2-GigabitEthernet0/0/0]ipv6 add auto link-local
[R2-GigabitEthernet0/0/0]ipv6 address auto global
查看R2接口g0/0/0信息
[R1]display ipv6 interface GigabitEthernet 0/0/0
GigabitEthernet0/0/0 current state : UP
IPv6 protocol current state : UP
IPv6 is enabled, link-local address is FE80::2E0:FCFF:FE96:252C
Global unicast address(es):
2001::1, subnet is 2001::/64
Joined group address(es):
FF02::1:FF00:1
FF02::2
FF02::1
FF02::1:FF96:252C
MTU is 1500 bytes
ND DAD is enabled, number of DAD attempts: 1
ND reachable time is 30000 milliseconds
ND retransmit interval is 1000 milliseconds
ND advertised reachable time is 0 milliseconds
ND advertised retransmit interval is 0 milliseconds
ND router advertisement max interval 600 seconds, min interval 200 seconds
ND router advertisements live for 1800 seconds
ND router advertisements hop-limit 64
ND default router preference medium
Hosts use stateless autoconfig for addresses
查看R1的接口GE0/0/0的邻居信息
[R1]display ipv6 neighbors GigabitEthernet 0/0/0
IPv6 Address : 2001::2E0:FCFF:FE04:2D1C
Link-layer : 00e0-fc04-2d1c State : STALE
Interface : GE0/0/0 Age : 4
VLAN : - CEVLAN: -
VPN name : Is Router: TRUE
Secure FLAG : UN-SECURE
IPv6 Address : FE80::2E0:FCFF:FE04:2D1C
Link-layer : 00e0-fc04-2d1c State : STALE
Interface : GE0/0/0 Age : 4
VLAN : - CEVLAN: -
VPN name : Is Router: TRUE
Secure FLAG : UN-SECURE
Total: 2 Dynamic: 2 Static: 0
在R2上测试连通性
ping ipv6 2001::1
PING 2001::1 : 56 data bytes, press CTRL_C to break
Reply from 2001::1
bytes=56 Sequence=1 hop limit=64 time = 20 ms
Reply from 2001::1
bytes=56 Sequence=2 hop limit=64 time = 30 ms
Reply from 2001::1
bytes=56 Sequence=3 hop limit=64 time = 20 ms
Reply from 2001::1
bytes=56 Sequence=4 hop limit=64 time = 30 ms
Reply from 2001::1
bytes=56 Sequence=5 hop limit=64 time = 20 ms