一、实验拓扑
二、路由配置
路由R1、R2、R3、R4、R5详细配置:
1、配置R1:
R1(config)#interface fastEthernet 0/1
R1(config-if)#ipv6 address 2001:db8:019:2::1/64
R1(config-if)#no shutdown
R1(config-if)#
*Mar 1 00:35:22.231: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up
*Mar 1 00:35:23.231: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
R1(config-if)#exit
R1(config)#interface fastEthernet 0/0
R1(config-if)#ipv6 address 2001:db8:019:1::1/64
R1(config-if)#no shutdown
R1(config-if)#
*Mar 1 00:36:18.859: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar 1 00:36:19.859: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
R1(config-if)#exit
R1(config)#ipv6 unicast-routing
R1(config)#ipv6 route 2001:db8:019:a::/64 2001:db8:019:1::2
R1(config)#ipv6 route 2001:db8:019:b::/64 2001:db8:019:2::2
2、配置R2:
R2(config)#interface fastEthernet 0/0
R2(config-if)#ipv6 address 2001:db8:019:1::2/64
R2(config-if)#no shutdown
R2(config-if)#
*Mar 1 00:26:32.643: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar 1 00:26:33.643: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
R2(config-if)#exit
R2(config)#interface fastEthernet 0/1
R2(config-if)#ipv6 address 2001:db8:019:a::1/64
R2(config-if)#no shutdown
R2(config-if)#
*Mar 1 00:28:46.047: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up
*Mar 1 00:28:47.047: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
R2(config-if)#exit
R2(config)#ipv6 unicast-routing
R2(config)#ipv6 route 2001:db8:019:2::/64 2001:db8:019:1::1
R2(config)#ipv6 route 2001:db8:019:b::/64 2001:db8:019:1::1
3、配置R3:
R3(config)#interface fastEthernet 0/1
R3(config-if)#ipv6 address 2001:db8:019:2::2/64
R3(config-if)#no shutdown
R3(config-if)#
*Mar 1 00:40:52.811: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up
*Mar 1 00:40:53.811: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
R3(config-if)#exit
R3(config)#interface fastEthernet 0/0
R3(config-if)#ipv6 address 2001:db8:019:b::2/64
R3(config-if)#no shutdown
R3(config-if)#
*Mar 1 00:41:21.427: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar 1 00:41:22.427: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
R3(config-if)#exit
R3(config)#ipv6 unicast-routing
R3(config)#ipv6 route 2001:db8:019:1::/64 2001:db8:019:2::1
R3(config)#ipv6 route 2001:db8:019:a::/64 2001:db8:019:2::1
4、配置R4:
R4(config)#ipv6 unicast-routing
R4(config)#interface fastEthernet 0/1
R4(config-if)#ipv6 enable
R4(config-if)#ipv6 address autoconfig
R4(config-if)#no shutdown
R4(config-if)#
*Mar 1 00:40:17.211: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up
*Mar 1 00:40:18.211: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
R4(config-if)#exit
R4(config)#ipv6 route 2001:db8:019:1::/64 2001:db8:019:a::1
R4(config)#ipv6 route 2001:db8:019:2::/64 2001:db8:019:a::1
R4(config)#ipv6 route 2001:db8:019:b::/64 2001:db8:019:a::1
5、配置R5:
R5(config)#ipv6 unicast-routing
R5(config)#interface fastEthernet 0/0
R5(config-if)#ipv6 enable
R5(config-if)#ipv6 address autoconfig
R5(config-if)#no shutdown
R5(config-if)#
*Mar 1 00:43:58.783: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar 1 00:43:59.783: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
R5(config-if)#exit
R5(config)#ipv6 route 2001:db8:019:1::/64 2001:db8:019:b::1
R5(config)#ipv6 route 2001:db8:019:2::/64 2001:db8:019:b::1
R5(config)#ipv6 route 2001:db8:019:a::/64 2001:db8:019:b::1
三、地址检验
使用指令“show ipv6 interface brief”查询每个接口的IPv6地址配置情况:
1、 R1:
R1#show ipv6 interface brief
FastEthernet0/0 [up/up]
FE80::CE01:1FFF:FE64:0
2001:DB8:19:1::1
FastEthernet0/1 [up/up]
FE80::CE01:1FFF:FE64:1
2001:DB8:19:2::1
2、R2:
R2#show ipv6 interface brief
FastEthernet0/0 [up/up]
FE80::CE02:28FF:FEE8:0
2001:DB8:19:1::2
FastEthernet0/1 [up/up]
FE80::CE02:28FF:FEE8:1
2001:DB8:19:A::1
3、R3:
R3#show ipv6 interface brief
FastEthernet0/0 [up/up]
FE80::CE03:15FF:FEF8:0
2001:DB8:19:B::2
FastEthernet0/1 [up/up]
FE80::CE03:15FF:FEF8:1
2001:DB8:19:2::2
4、R4:
R4#show ipv6 interface brief
FastEthernet0/0 [administratively down/down]
FastEthernet0/1 [up/up]
FE80::CE04:24FF:FE20:1
2001:DB8:19:A:CE04:24FF:FE20:1
5、R5:
R5#show ipv6 interface brief
FastEthernet0/0 [up/up]
FE80::CE05:28FF:FE38:0
2001:DB8:19:B:CE05:28FF:FE38:0
FastEthernet0/1 [administratively down/down]
四、网络互ping测试
1、相邻网段互ping测试(R1 ping R2):
2、不同网段互ping测试(R4 ping R1):
3、全局互ping测试(R5 ping R4):
五、报文分析
报文类型包括128、129、133、134、135、136类型:
1、128类型(回送请求)报文
作用:用于发送到目的节点,以使目标节点立即发回一个回送应答报文。
2、129类型(回送应答)报文
作用:当收到一个回送请求报文时,ICMPv6会用回送应答报文响应。
3、133类型(路由RS请求)报文
作用:很多情况下主机接入网络后希望尽快获取前缀进行通信,那么此时主机可以立刻发送RS报文,网络上的路由器将回应RA报文。RS报文的type字段值为133。
4、134类型(路由RA通告)报文
作用:每台路由器为了让二层网络上的主机和路由器知道自己的存在,定时都会组播发送RA报文,RA报文中会带有网络前缀信息,及其他一些标志位信息。RA报文的type字段值为134。
5、135类型(邻居NS请求)报文
作用:Type字段值为135,Code字段值为0,在地址解析中的作用类似于IPv4中的ARP请求报文。
6、136类型(邻居NA通告)报文
作用:Type字段值为136,Code字段值为0,类似于IPv4中的ARP应答报文。