Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1290258
  • 博文数量: 464
  • 博客积分: 9399
  • 博客等级: 中将
  • 技术积分: 6364
  • 用 户 组: 普通用户
  • 注册时间: 2011-02-19 09:15
文章分类

全部博文(464)

文章存档

2014年(12)

2013年(123)

2012年(173)

2011年(156)

我的朋友

分类:

2012-05-29 10:27:19

The Scenario:
Let's say re are 2 ipv6 sites separated by an ipv4 domain.
ipv6 --------       r-A     ---       ipv4       -----      r-B&nbs p;      ----- ipv6

I want configure a ipv6 ipv4 tunnel between R-A and R-B.
According to the Cisco doc's, I don't need to configure a tunnel destination on either side of the tunnel.
See this link:

Embedded in the ipv6 address of the tunnel interface is an ipv4 address that's local to the router on which this tunnel is configured.

That being the case, how does the one end of the tunnel find the other end?
I assume in this example, R-A and R-B don't have to share a common link.

A Proposed Solution:
My understanding is that because ipv6 to ipv4 tunnels are by their nature automatic then you do not explicitly define a destination address, this allows the underlying IPv4 transport network to act as a psuedo NBMA network.     Each IPv6 network you create on the edge of the domain will have the IPv4 address of its source tunnel embedded.     I shall try and illustrate, using the example below:

Let say RA has a S0 with an ip address of 192.168.99.1/24.     Now this will be the interface to the IPv4 domain.

Now we need to create an IPv6 Prefix for RA using this network address, the rules state that this should be /48 address starting with 2002::     So now our
IPv6 prefix is 2002:c0a8:6301::/48     This prefix can be subnetted to create subnets on the RA router, one for the tunnel and one for the network.

Now our IPv6 domain is on E0 of RA, so I shall assign the address:
2002:c0a8:6301:1::1/64 to this interface.     And to the tunnel interface I shall assign the subnet 2002:c0a8:6301::1/64

Now we have to conduct a similar exercise on RB.

RB has an S0 ipv4 address of 172.16.16.1/24.     This is the interface to the IPv4 domain.

Need to now create an IPv6 /48 prefix as above.     This will result in
2002:ac10:1001::/48     From this prefix I shall create some IPv6 subnets one for the tunnel interface and one for the E0 interface to RB's IPv6 domain.
E0 = 2002:ac10:1001:1::1/64
T0 = 2002:ac10:1001::/64

One last task to conduct on each router, I have to create a static route to the Tunnel interfaces.     On both RA and RB I shall create

ipv6 route 2002::/16 tunnel 0

This has the function that, if after performing a longest match the router does not find a local 2002:: address it will send any packet destined to 2002:: to tunnel 0.

Now here comes the elegance of the solution!!!

A host on the subnet, lets say 2002:c0a8:6301:1::4/64 wants to send to a host on 2002:ac10:1001:1::5/64.     The IPv6 packet will be sent to the RA's E0 interface,     RA will now look at its routing table and send the packet to tunnel 0.

Tunnel 0 will recognise that it is configured for ipv6ip 6to4 and will look at the IPv4 address of S0 and determine the source to be 192.168.199.1     it will now look at the destination IPv6 address 2002:ac10:1001:1::5/64, it will strip of 2002 read the next 4 bytes and determine the destination of the tunnel is 172.16.16.1.     Hey presto we have the source and destination address of the tunnel.





阅读(751) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~