CCNP-ipv6下启用ospfv3,tunnle隧道技术实现v6到v4转换

来源:互联网 发布:淘宝钓鱼椅子图片价格, 编辑:程序博客网 时间:2024/05/18 03:20
by-小世界
http://redcisco.blog.163.com
实验拓扑图:
CCNP-ipv6下启用ospfv3,利用tunnle隧道技术实现ipv6到ipv4的转换 - 小世界 - 小世界
实验配置:
R1参考配置:
ipv6 unicast-routing    
interface FastEthernet0/0
 no ip address
 ipv6 address 2001::1/64
 ipv6 ospf 100 area 0

ipv6 router ospf 100
 router-id 1.1.1.1
(//如果在R1上不手工指定router-id,ospf进程会在R1上的ipv4地址中找到一个,但是由于R1上没有ipv4的地址,所以就没有router-id,这是不行的,但是R2、R4就可以不指定;)
R2参考配置:R2#conf t
R2(config)#ipv6 unicast-routing 
R2(config)#inter f0/0
R2(config-if)#ipv6 address 2001::2/64
R2(config-if)#no sh
R2(config-if)#inter f1/0ip add 23.1.1.2 255.255.255.0no sh
R2(config-if)#router eigrp 100//隧道技术两端的源和目的首先保证能够通信,所以启用IGP
R2(config-router)#no auto-summary 
R2(config-router)#network 23.1.1.2 0.0.0.0

R2(config-router)#do show ipv6 inter bri
FastEthernet0/0            [up/up]
    FE80::CE01:7FF:FE64:0
    2001::2
FastEthernet1/0            [up/up]

R2(config)#inter tunnel 0
R2(config-if)#ipv6 address 2024::2/64//配置隧道接口的地址
R2(config-if)#tunnel source 23.1.1.2
R2(config-if)#tunnel destination ?
  Hostname or A.B.C.D  ip address or host name
  X:X:X:X::X           IPv6 address
R2(config-if)#tunnel destination 34.1.1.4
R2(config-if)#tunnel mode ?
  aurp    AURP TunnelTalk AppleTalk encapsulation
  cayman  Cayman TunnelTalk AppleTalk encapsulation
  dvmrp   DVMRP multicast tunnel
  eon     EON compatible CLNS tunnel
  gre     generic route encapsulation protocol
  ipip    IP over IP encapsulation
  ipsec   IPSec tunnel encapsulation
  iptalk  Apple IPTalk encapsulation
  ipv6    Generic packet tunneling in IPv6
  ipv6ip  IPv6 over IP encapsulation
  mpls    MPLS encapsulations
  nos     IP over IP encapsulation (KA9Q/NOS compatible)
  rbscp   RBSCP in IP tunnel

R2(config-if)#tunnel mode ipv6ip //配置隧道的模式,默认为GRE
R2(config-if)#do p 2024::4
Sending 5, 100-byte ICMP Echos to 2024::4, timeout is 2 seconds:
!!!!!
R2(config)#ipv6 router ospf 100
R2(config-rtr)#router-id 2.2.2.2

R2(config-rtr)#inter f0/0
R2(config-if)#ipv6 ospf 100 area 0
R2(config-if)#inter tunn 0
R2(config-if)#ipv6 ospf 100 area 0

R3参考配置:
interface FastEthernet0/0ip address 23.1.1.3 255.255.255.0
interface FastEthernet1/0 ip address 34.1.1.3 255.255.255.0
router eigrp 100
 network 23.1.1.3 0.0.0.0
 network 34.1.1.3 0.0.0.0
 no auto-summary
R4参考配置:R4#conf t
R4(config)#ipv6 unicast-routing 
R4(config)#inter f0/0ip add 34.1.1.4 255.255.255.0no sh
R4(config-if)#inter f1/0
R4(config-if)#ipv6 address 2002::4/64
R4(config-if)#no sh
R4(config-if)#router ei 100
R4(config-router)#no auto-summary 
R4(config-router)#network 34.1.1.4 0.0.0.0 
R4(config-router)#do pi 23.1.1.2
Sending 5, 100-byte ICMP Echos to 23.1.1.2, timeout is 2 seconds:
!!!!!
R4(config)#inter tunnel 0
R4(config-if)#ipv6 address 2024::4/64
R4(config-if)#no sh
R4(config-if)#tunnel source 34.1.1.4 
R4(config-if)#tunnel destination 23.1.1.2 
R4(config-if)#tunnel mode ipv6ip 

R4(config)#ipv6 router ospf 100
R4(config-rtr)#router-id 4.4.4.4

R4(config)#inter tunnel 0
R4(config-if)#ipv6 ospf 100 area 0
R4(config-if)#inter f1/0
R4(config-if)#ipv6 ospf 100 area 0
也可以通过路由表查看:
R4#show ipv6 route
IPv6 Routing Table - 7 entries
O   2001::/64 [110/11112]
     via FE80::1701:102, Tunnel0
C   2002::/64 [0/0]
     via ::, FastEthernet1/0
L   2002::4/128 [0/0]
     via ::, FastEthernet1/0
C   2024::/64 [0/0]
     via ::, Tunnel0
L   2024::4/128 [0/0]
     via ::, Tunnel0
L   FE80::/10 [0/0]
     via ::, Null0
L   FF00::/8 [0/0]
     via ::, Null0
R4#
R5参考配置:R5#conf tR5(config)#ipv6 unicast-routing 
R5(config)#inter f0/0
R5(config-if)#ipv6 address 2002::5/64
R5(config-if)#do show ipv inter bri
FastEthernet0/0            [up/up]
    FE80::CE04:15FF:FE1C:0
    2002::5
R5(config-if)#ipv6 router ospf 100
R5(config-rtr)#router-id 5.5.5.5
R5(config)#inter f0/0
R5(config-if)#ipv6 ospf 100 area 0
*Mar  1 00:24:21.859: %OSPFv3-5-ADJCHG: Process 100, Nbr 4.4.4.4 on FastEthernet0/0 from LOADING to FULL, Loading Done
实验测试:
R5#ping 2001::1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001::1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 68/108/160 ms
CCNP-ipv6下启用ospfv3,利用tunnle隧道技术实现ipv6到ipv4的转换 - 小世界 - 小世界
理解效果配置图:
CCNP-ipv6下启用ospfv3,tunnle隧道技术实现v6到v4转换 - 小世界 - 小世界

实验总结:
1.Tunnel(隧道)接口是系统虚拟的接口,用来实现标准的点对点的传输,必须在两端进行配置。
2.IPv6 over IPv4隧道机制是在IPv6数据包前封装上IPv4的包头,通过隧道使IPv6数据包穿越IPv4网络,实现隔离的IPv6网络的互通;即在IPv4网络中通过隧道技术传输IPv6流量要求边缘路由器将IPv6报文封装至IPv4报文中,而在另一端的路由器将之解封装
3.如果在交换机上启用IPv6路由功能,首先要做如下配置:
SW1(config)#sdm prefer dual-ipv4-and-ipv6 routing
SW1#reload        //重启后,才能支持IPv4和IPv6路由功能
SW1(config)#ipv6 unicast-routing        //启用IPv6路由功能
4.请参考http://blog.sina.com.cn/s/blog_635e1a9e01019009.html,谢谢LZ。
5.如果模拟器link-local一致,请修改本地链路地址,方法ipv6 address FE80::5 link-local。
感谢Node汤sir!
0 0
原创粉丝点击