http://packetlife.net/blog/2010/mar/15/6to4-ipv6-tunneling/
In order to configure a 6to4 tunnel on R2 router, you execute the following commands:
R2(config)# interface tunnel0
R2(config-if)# tunnel mode ipv6ip 6to4
R2(config-if)# tunnel source 10.0.2.1
R2(config-if)# ipv6 address 2002:a00:201::/128
Does anyone know why on earth should I specify the Ipv6 address of the tunnel (last command)? The fact that I've written:
R2(config-if)# ipv6 address 2002:a00:201::/128
is not used by R2 at any point, I believe - R2 doesn't need that information.
When an IPv6 host behind R1 sends a packet to an IPv6 host 2001:db8:0:2::/64
behind R2, the first thing that happens is R1 checks its routing table. We configured R1 in the following way:
ipv6 route 2002::/16 tunnel0
ipv6 route 2001:db8:0:2::/64 2002:a00:201::
It then puts the IPv6 packet inside an IPv4 packet and sets the IPv4 destination address to 10.0.2.1 - it extracts the destination address from the second address in this line, which created an entry in the routing table: ipv6 route 2001:db8:0:2::/64 2002:a00:201::
.
So if we didn't set the IPv6 tunnel address on R2 (R2(config-if)# ipv6 address 2002:a00:201::/128
), I guess it wouldn't change anything, because the packet would arrive to R2 anyway. Then why should we do it?
By the way, 10.0.2.1 is a private IP address, so it shouldn't be used in a 6to4 address (only public IPs are allowed) - I think the article is wrong in this aspect.