实验拓扑图:
 

 

技术分析图:

 

步骤实施图:


实验装备:
三台PC计算机(基于Windows,Linux,Solaris的操作系统平台),三台路由器,网线若干
网络连接:
Router1 F0/0 <----> XPC P0/0 (loopback1, Solaris)
Router1 F1/0 <----> Router2 F1/0
Router1 F2/0 <----> XPC P0/1 (loopback2,Windows)
Router3 F1/0 <----> XPC P0/2(loopback3, Linux)
Router2 F0/0 <----> Router3 F0/0
实验步骤:
任务一配置信息:配置路由器的网络接口
R1配置
Router>enable
Router#configure terminal
Router(config)#hostname R1
R1(config)#ipv6 unicast-routing
R1(config)#interface fastEthernet 0/0
R1(config-if)#ipv6 address 2001:250:ffff:30::1/64
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface fastEthernet 1/0
R1(config-if)#ipv6 address 2001:250:ffff:10::1/64
R1(config-if)#ip address 166.111.218.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface fastEthernet 2/0
R1(config-if)#ipv6 address 2001:250:ffff:20::1/64
R1(config-if)#ip address 166.111.219.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R2配置
Router>enable
Router#configure terminal
Router(config)#hostname R2
R2(config)#ipv6 unicast-routing
R2(config)#interface fastEthernet 0/0
R2(config-if)#ip address 211.151.88.201 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface fastEthernet 1/0
R2(config-if)#ip address 166.111.218.2 255.255.255.0
R2(config-if)#ipv6 address 2001:250:ffff:10::2/64
R2(config-if)#no shutdown
R2(config-if)#exit
R3配置
Router>enable
Router#configure terminal
Router(config)#hostname R3
R3(config)#ipv6 unicast-routing
R3(config)#interface fastEthernet 0/0
R3(config-if)#ip address 211.151.88.202 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#interface fastEthernet 1/0
R3(config-if)#ipv6 address 2001:c68:ffff:1::1/64
R3(config-if)#no shutdown
R3(config-if)#exit
测试连通性:
R1#ping 166.111.218.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 166.111.218.2, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 24/64/100 ms
R1#ping 2001:250:ffff:10::2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:250:FFFF:10::2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/43/124 ms
R2#ping 211.151.88.202

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 211.151.88.202, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 12/46/116 ms
R2#ping 2001:c68:ffff:1::1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:C68:FFFF:1::1, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
任务二配置信息:在路由器R2和R3上配置隧道接口
R2配置:
R2(config)#interface tunnel 0
R2(config-if)#ipv6 address 2001:250:ffff:1::1/64
R2(config-if)#tunnel source 211.151.88.201
R2(config-if)#tunnel destination 211.151.88.202
R2(config-if)#tunnel mode ipv6ip
R2(config-if)#exit
R2(config)#ipv6 route ::/0 tunnel 0
R2(config)#end
R3配置:
R3(config)#interface tunnel 0
R3(config-if)#ipv6 address 2001:250:ffff:1::2/64
R3(config-if)#tunnel source 211.151.88.202
R3(config-if)#tunnel destination 211.151.88.201
R3(config-if)#tunnel mode ipv6ip
R3(config-if)#exit
R3(config)#ipv6 route 2001:250:ffff::/48 tunnel 0
测试连通性:
R2#ping ipv6 2001:250:ffff:1::2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:250:FFFF:1::2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/51/84 ms
R2#ping ipv6 2001:c68:ffff:1::1
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:C68:FFFF:1::1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/36/72 ms
R2#ping ipv6 2001:250:ffff:20::1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:250:FFFF:20::1, timeout is 2 seconds:
T....
Success rate is 0 percent (0/5)
R2#ping ipv6 2001:250:ffff:30::1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:250:FFFF:30::1, timeout is 2 seconds:
.TT..
Success rate is 0 percent (0/5)
R2#show ipv6 route
IPv6 Routing Table - 7 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
       U - Per-user Static route
       I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
       O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
S   ::/0 [1/0]
     via ::, Tunnel0
C   2001:250:FFFF:1::/64 [0/0]
     via ::, Tunnel0
L   2001:250:FFFF:1::1/128 [0/0]
     via ::, Tunnel0
C   2001:250:FFFF:10::/64 [0/0]
     via ::, FastEthernet1/0
L   2001:250:FFFF:10::2/128 [0/0]
     via ::, FastEthernet1/0
L   FE80::/10 [0/0]
     via ::, Null0
L   FF00::/8 [0/0]
     via ::, Null0
任务三配置信息:在路由器R1和R2上配置RIPng
R1配置:
R1(config)#ipv6 router rip ripngr1
R1(config-rtr)#exit      
R1(config)#interface fastEthernet 0/0
R1(config-if)#ipv6 rip ripngr1 enable
R1(config-if)#exit
R1(config)#interface fastEthernet 1/0
R1(config-if)#ipv6 rip ripngr1 enable
R1(config-if)#exit
R1(config)#interface fastEthernet 2/0
R1(config-if)#ipv6 rip ripngr1 enable
R1(config-if)#exit
R1(config)#end
R2配置:
R2(config)#ipv6 router rip ripngr2
R2(config-rtr)#exit
R2(config)#interface fastEthernet 1/0
R2(config-if)#ipv6 rip ripngr2 enable
R2(config-if)#exit
R2(config)#end
测试连通性:
R1#ping ipv6 2001:250:ffff:10::2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:250:FFFF:10::2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 48/92/128 ms
R1#ping 2001:c68:ffff:1::1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:C68:FFFF:1::1, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
R2#ping ipv6 2001:250:ffff:30::1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:250:FFFF:30::1, timeout is 2 seconds:
.TT..
Success rate is 0 percent (0/5)
R2#show ipv6 route
IPv6 Routing Table - 9 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
       U - Per-user Static route
       I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
       O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
S   ::/0 [1/0]
     via ::, Tunnel0
C   2001:250:FFFF:1::/64 [0/0]
     via ::, Tunnel0
L   2001:250:FFFF:1::1/128 [0/0]
     via ::, Tunnel0
C   2001:250:FFFF:10::/64 [0/0]
     via ::, FastEthernet1/0
L   2001:250:FFFF:10::2/128 [0/0]
     via ::, FastEthernet1/0
R   2001:250:FFFF:20::/64 [120/2]
     via FE80::CE00:11FF:FE8C:10, FastEthernet1/0
R   2001:250:FFFF:30::/64 [120/2]
     via FE80::CE00:11FF:FE8C:10, FastEthernet1/0
L   FE80::/10 [0/0]
     via ::, Null0
L   FF00::/8 [0/0]
任务四配置信息:路由优化并实现与IPv6因特网的连通
R1配置
R1(config)#ipv6 router rip ripngr1
R1(config-rtr)#redistribute connected
R1(config-rtr)#exit
R1(config)#interface fastEthernet 0/0
R1(config-if)#no ipv6 rip ripngr1 enable
R1(config-if)#exit
R1(config)#interface fastEthernet 2/0
R1(config-if)#no ipv6 rip ripngr1 enable
R1(config-if)#exit
R1(config)#end
R2配置
R2(config)#interface fastEthernet 1/0
R2(config-if)#ipv6 rip ripngr2 default-information originate
测试连通性:
R1#show ipv6 route
IPv6 Routing Table - 9 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
       U - Per-user Static route
       I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
       O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
R   ::/0 [120/2]
     via FE80::CE00:13FF:FE08:10, FastEthernet1/0
C   2001:250:FFFF:10::/64 [0/0]
     via ::, FastEthernet1/0
L   2001:250:FFFF:10::1/128 [0/0]
     via ::, FastEthernet1/0
C   2001:250:FFFF:20::/64 [0/0]
     via ::, FastEthernet2/0
L   2001:250:FFFF:20::1/128 [0/0]
     via ::, FastEthernet2/0
C   2001:250:FFFF:30::/64 [0/0]
     via ::, FastEthernet0/0
L   2001:250:FFFF:30::1/128 [0/0]
     via ::, FastEthernet0/0
L   FE80::/10 [0/0]
     via ::, Null0
L   FF00::/8 [0/0]
R1#ping 166.111.218.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 166.111.218.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 56/115/184 ms
R1#ping 211.151.88.202

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 211.151.88.202, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
任务五配置信息:使用OSPF实现IPv4网络之间动态路由
R1配置
R1(config)#router ospf 1
R1(config-router)#network 166.111.218.0 0.0.0.255 area 0
R1(config-router)#network 166.111.219.0 0.0.0.255 area 0
R2配置
R2(config)#ip route 0.0.0.0 0.0.0.0 211.151.88.202
R2(config)#router ospf 1
R2(config-router)#network 166.111.218.0 0.0.0.255 area 0
R2(config-router)#default-information originate
R3配置
R3(config)#ip route 0.0.0.0 0.0.0.0 211.151.88.201
任务六配置信息:在路由器R2上启用动态NAT-PT(NAT-PT)
R2配置:
R2(config)# interface fastEthernet 1/0
R2(config-if)#ipv6 nat
R2(config-if)# interface fastEthernet f0/0
R2(config-if)#ipv6 nat
R2(config-if)#exit 
R2(config)#ipv6 access-list onlyipv6net permit 2001:250:ffff::/48 any
R2(config)#ipv6 nat prefix 2001:250:ffff:0:0:1::/96
R2(config)# ipv6 nat v6v4 pool ipv4-pool 211.151.88.210 211.151.88.250 prefix-length 24
R2(config)#ipv6 nat v6v4 source list onlyipv6net pool ipv4-pool
任务七配置信息:在Solaris上启用IPv6
#ifconfig  –a
#touch /etc/hostname6.e1000g0
#mv /etc/pcn0 /etc/e1000g0
//vm6 版本需改成e1000g0网卡,配置文件添加Ethernet0.virtualdev = e1000g0
# reboot
# ifconfig e1000g0 inet6 addif 2001:250:ffff:30::2/64
#ping 2001:250:ffff:1::2
2001:250:ffff:1::2 is alive
#ping 2001:c68:ffff:1::1
2001:c68:ffff:1::1 is alive
任务八配置信息:在XP和Vista上启用IPv6
XP
ip 166.111.219.2 255.255.255.0
gw 166.111.219.1
ping 166.111.219.1
ping 166.111.218.2
ping 211.151.88.202
pathping 211.151.88.202
启用IPv6
c:/ ipv6 install(无状态自动配置)
ipv6 if 查看端口
ipv6 adu 5/2001:250:ffff:20::2
ipconfig /all
ipv6 rtu ::/0 5/2001:250:ffff:20::1
ping6 2001:250:ffff:20::1
ping6 2001:250:ffff:10::2
ping6 2001:c68:ffff:1::1
vista
ip 166.111.219.2 255.255.255.0
gw 166.111.219.1
ipv6 2001:250:ffff:20::2/64
gw  2001:250:ffff:20::1/64
DNS: 2001:c68:ffff:1::2
ping 166.111.218.2
ping 211.151.88.202
ping 2001:c68:ffff:1::1
tracert 2001:c68:ffff:1::1
任务九配置信息:在Linux上配置基于IPv6的DNS服务
[root@linux~]#ifconifg eth0 inet6 add 2001:c68:ffff:1::2/64
[root@linux~]#route –A inet6 add ::/0 gw 2001:c68:ffff:1::1
[root@linux~]#ping6 2001:258:ffff:30::1
[root@linux~]#rpm –qa | grep bind
bind-9.3.3-7.el5
bind-libs-9.3.3-7.el5
bind-chroot-9.3.3.7.el5
bind-utils-9.3.3-7.el5
[root@linux~]#vim /etc/named.caching-nameserver.conf
// listen-on port 53 { any };
// allow-query { localhost; };
// match-clients   { localhost; };
// match-destinations { localhost; };
[root@linux~]#vi /etc/named.rfc1912.zones
Zone “wnt.com.cn” IN {
    type master;
    file “wnt.zone”;
};
[root@linux~]#cd /var/named/chroot/var/named
[root@linux~]#cp localhost.zone wnt.zone
[root@linux~]#chown named.named wnt.zone
[root@linux~]#vim wnt.zone
$TTL 86400
@     IN SOA  ns.wnt.com.cn. (
     20100808
     28800
14400
360000
86400
)
     IN NS  ns.wnt.com.cn.
ns.wnt.com.cn. IN AAAA  2001:c68:ffff:1::2
www    IN CNAME ns.wnt.com.cn.
[root@linux~]#service named start
[root@linux~]#vim /etc/resolv.conf
Nameserver 2001:c68:ffff:1::2
[root@linux~]#host www.wnt.com.cn
[root@linux~]#dig www.wnt.com.cn
任务十配置信息:在Linux上配置基于IPv6的WWW服务
[root@linux~]#vi /etc/httpd/conf/httpd.conf
Listen:80修改为Listen [2001:c68:ffff:1::2]:80
任务十一配置信息:客户端的使用
Solaris10:
#ping 2001:c68:ffff:1::2
2001:c68:ffff:1::2 is alive
使用firefox浏览器浏览http://[ 2001:c68:ffff:1::2]/
Windows:
C:\ping 2001:c68:ffff:1::2
配置DNS服务器: 2001:c68:ffff:1::2
使用浏览器访问2001:c68:ffff:1::2
使用域名访问:www.wnt.com.cn
Linux
[root@linux~]#netstat –na | more
查看链接

 


IPv6网络架构已搭建完成

 


至此实验结束,希望上述内容对大家学习IPv6技术能够有所帮助!

 

本文文档资源下载