配置IPv6基础功能示例
组网需求
如图1所示,RouterA和RouterB分别通过GE1/0/0相连。要求RouterA和RouterB形成邻居关系,RouterB能通过邻居发现功能获得IPv6地址。
图1 配置IPv6基础功能组网图
配置思路
配置IPv6基础功能思路如下:
1. 使能RouterA的IPv6转发能力并配置IPv6地址,使路由器具有对IPv6报文的转发能力。
2. 打开RouterA的RA报文发送开关。RouterB的react routerv6GE1/0/0接口在接收到RouterA发送的RA报文后可根据RA报文中携带的路由前缀等信息进行地址自动配置。
操作步骤
1. 配置RouterA
# 配置RouterA的接口GE1/0/0的IPv6地址。
<Huawei> system-view
[Huawei] sysname RouterA
[RouterA] ipv6
[RouterA] interface gigabitethernet 1/0/0
[RouterA-GigabitEthernet1/0/0] ipv6 enable
[RouterA-GigabitEthernet1/0/0] ipv6 address fc01::1/64
[RouterA-GigabitEthernet1/0/0] quit
# 配置RouterA的邻居发现功能。
[RouterA] interface gigabitethernet 1/0/0
[RouterA-GigabitEthernet1/0/0] undo ipv6 nd ra halt
[RouterA-GigabitEthernet1/0/0] quit
[RouterA] quit
2. 配置RouterB
# 配置RouterB的接口GE1/0/0使能无状态自动生成IPv6地址功能。
<Huawei> system-view
[Huawei] sysname RouterB
[RouterB] ipv6
[RouterB] interface gigabitethernet 1/0/0
[RouterB-GigabitEthernet1/0/0] ipv6 enable
[RouterB-GigabitEthernet1/0/0] ipv6 address auto link-local
[RouterB-GigabitEthernet1/0/0] ipv6 address auto global local-identifier
[RouterB-GigabitEthernet1/0/0] quit
[RouterB] quit
3. 验证配置结果
如果配置成功,可以查看配置的全球单播地址,以及接口状态为Up,IPv6协议状态为Up,并可以查看接口的邻居情况。
# 查看RouterA的接口信息。
<RouterA> display ipv6 interface gigabitethernet 1/0/0
GigabitEthernet1/0/0 current state : UP
IPv6 protocol current state : UP
IPv6 is enabled, link-local address is FE80::A19:A6FF:FECD:A897
Global unicast address(es):
3000::1, subnet is 3000::/64
Joined group address(es):
FF02::1:2
FF02::1:FF00:1
FF02::2
FF02::1
FF02::1:FFCD:A897
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
# 查看RouterB的接口信息。
<RouterB> display ipv6 interface gigabitethernet 1/0/0
GigabitEthernet1/0/0 current state : UP
IPv6 protocol current state : UP
IPv6 is enabled, link-local address is FE80::2D6F:0:7AF3:1
Global unicast address(es):
fc01::15B:E0EA:3524:E791
subnet is fc01::/64 [SLAAC 2012-07-19 17:30:55 2592000S]
Joined group address(es):
FF02::1:FF00:2
FF02::1:FFF3:1
FF02::2
FF02::1
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
# 查看RouterA的接口GE1/0/0的邻居信息。
<RouterA> display ipv6 neighbors gigabitethernet 1/0/0
---------------------------------------------------------
IPv6 Address : fc01::15B:E0EA:3524:E791
Link-layer : 00e0-fc89-fe6e State : STALE
Interface : GigabitEthernet1/0/0 Age : 7
VLAN : - CEVLAN: -
VPN name : Is Router : TRUE
Secure FLAG : UN-SECURE
---------------------------------------------------------
Total: 1 Dynamic: 1 Static: 0
配置文件
∙ RouterA配置文件
∙ #
∙ sysname RouterA
∙ #
∙ ipv6
∙ #
∙ interface GigabitEthernet1/0/0
∙ ipv6 enable
∙ ipv6 address fc01::1/64
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论