配置静态IPV6 NAT-PT

一.概述:
IPV6 NAT-PT( Network Address Translation - Port Translation)应用与ipv4和ipv6网络互访的情况,根据参考链接配置时出现一些问题,所以记录下来。
参考链接:
http://www.cisco.com/en/US/tech/tk648/tk361/technologies_configuration_example09186a0080b9a911.shtml
---配置有些小错误:ipv4接口没有敲ipv6 enable;ipv6接口没有敲ipv6 nat
http://blog.sina.com.cn/s/blog_5ec353710101e8mb.html
---配置有些小错误:ipv4接口没有敲ipv6 enable;并测试时发现单向通不了

二.基本思路:
A.测试环境:
GNS,Cisco IOS Software, 7200 Software (C7200-ADVENTERPRISEK9-M), Version 12.4(24)T7, RELEASE SOFTWARE (fc2)

B.IPV4访问IPV6网络时,将IPV4地址转换成带IPV6 NAT前缀的地址

 IPV6访问IPV4网络,使用IPV4转换后的IPV6地址访问。

C.测试发现处于IPV4和IPV6的双栈路由器,IPV4的接口需要配置ipv6 nat和ipv6 enable

D.测试环境ip cef和ipv6 cef对NAT转换有时有影响,有时没有影响
E.不知是否是IOS的问题,只配置v6v4的NAT,通不了,路由器不会自动根据nat前缀将IPV4的地址转成IPV6的地址
F.经过测试,双栈路由器配置IPV6地址的接口可以不用配置Iipv6 enable,而只配置IPV4地址的接口需要敲ipv6 enable
G.动态NAT-PT,V6可以主动访问V4(使用V4地址池),还是V4可以主动访问V6(使用V6地址池),跟动态NAT类似,每次都需要占用一个地址,而不能像PAT那样

三.测试拓扑:

101950771.jpg

spacer.gif
四.配置步骤:
A.R1:
interface FastEthernet0/0
    ip address 192.168.30.1 255.255.255.0
    no shut
!
ip route 0.0.0.0 0.0.0.0 192.168.30.2
B.R2:
interface FastEthernet0/0
    ip address 192.168.30.2 255.255.255.0
    ipv6 enable
    ipv6 nat
!
interface FastEthernet0/1
    ipv6 address 2001:DB8:3002::2/64
    ipv6 nat
!        
ipv6 route ::/0 2001:DB8:3002::3
ipv6 nat v4v6 source 192.168.30.1 2000::C0A8:1E01
ipv6 nat v6v4 source 3001:11:0:1::1 150.11.3.1
ipv6 nat prefix 2000::/96
C.R3:
interface Loopback0
    ipv6 address 3001:11:0:1::1/64
!
interface FastEthernet0/0
    ipv6 address 2001:DB8:3002::3/64
!
ipv6 route ::/0 2001:DB8:3002::2
五.测试:
R1#ping 150.11.3.1    

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 150.11.3.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 60/87/168 ms
R1#

R3#debug ipv6 icmp
 ICMP Packet debugging is on
R3#
*Dec 28 17:24:06.699: ICMPv6: Received echo request, Src=2000::C0A8:1E01, Dst=3001:11:0:1::1
*Dec 28 17:24:06.703: ICMPv6: Sent echo reply, Src=3001:11:0:1::1, Dst=2000::C0A8:1E01
*Dec 28 17:24:06.779: ICMPv6: Received echo request, Src=2000::C0A8:1E01, Dst=3001:11:0:1::1
*Dec 28 17:24:06.783: ICMPv6: Sent echo reply, Src=3001:11:0:1::1, Dst=2000::C0A8:1E01
*Dec 28 17:24:06.839: ICMPv6: Received echo request, Src=2000::C0A8:1E01, Dst=3001:11:0:1::1
*Dec 28 17:24:06.843: ICMPv6: Sent echo reply, Src=3001:11:0:1::1, Dst=2000::C0A8:1E01
*Dec 28 17:24:06.907: ICMPv6: Received echo request, Src=2000::C0A8:1E01, Dst=3001:11:0:1::1
R3#
*Dec 28 17:24:06.907: ICMPv6: Sent echo reply, Src=3001:11:0:1::1, Dst=2000::C0A8:1E01
*Dec 28 17:24:07.015: ICMPv6: Received echo request, Src=2000::C0A8:1E01, Dst=3001:11:0:1::1
*Dec 28 17:24:07.015: ICMPv6: Sent echo reply, Src=3001:11:0:1::1, Dst=2000::C0A8:1E01
R3#

R2#show ipv6 nat translations
Prot  IPv4 source              IPv6 source
     IPv4 destination         IPv6 destination
---   ---                      ---
     192.168.30.1             2000::C0A8:1E01

---   150.11.3.1               3001:11:0:1::1
     ---                      ---


你可能感兴趣的:(ipv6,配置静态)