4

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.

1 Answer 1

2

The IPv6 address is the network address assigned to the interface of the tunnel. I don't know where you came up with the /128 because that is used for something like a loopback.

Specifies the IPv6 network assigned to the interface and enables IPv6 processing on the interface.

Something like this from the Cisco documentation:

Example: Configuring 6to4 Tunnels

The following example configures a 6to4 tunnel on a border router in an isolated IPv6 network. The IPv4 address is 192.168.99.1, which translates to the IPv6 prefix of 2002:c0a8:6301::/48. The IPv6 prefix is subnetted into 2002:c0a8:6301::/64 for the tunnel interface: 2002:c0a8:6301:1::/64 for the first IPv6 network, and 2002:c0a8:6301:2::/64 for the second IPv6 network. The static route ensures that any other traffic for the IPv6 prefix 2002::/16 is directed to tunnel interface 0 for automatic tunneling.

interface GigabitEthernet0/0/0
 description IPv4 uplink
 ip address 192.168.99.1 255.255.255.0
!
interface GigabitEthernet1/0/0
 description IPv6 local network 1
 ipv6 address 2002:c0a8:6301:1::1/64 
!
interface GigabitEthernet2/0/0
 description IPv6 local network 2
 ipv6 address 2002:c0a8:6301:2::1/64 
!
interface Tunnel0
 description IPv6 uplink
 no ip address
 ipv6 address 2002:c0a8:6301::1/64 
 tunnel source GigabitEthernet0/0/0
 tunnel mode ipv6ip 6to4
!
ipv6 route 2002::/16 tunnel 0
6
  • I'm just wondering if it's necessary to give it an IPv6 address if the tunnel could operate without it for the reasons I've explained above. I've seen the official documentation as well. Dec 9, 2015 at 23:15
  • If you don't assign an IPv6 address to an interface, it will not be enabled for IPv6 processing. While not perfect, the Cisco documentation and examples are probably a better place to start. The 6to4 stuff is really a kludge, and doesn't work very well. You are probably better off dual-stacking things.
    – Ron Maupin
    Dec 9, 2015 at 23:18
  • Yes, but my point is that it doesn't need to be enabled for IPv6 processing. The router receives a packet addressed to 2002::, it checks its routing table to see it should forward it to tunnel0, then it checks the configuration data for tunnel0 to see its IPv4 source address it should send it from, sends it in IPv4 packet, R2 receives the packet, removes the IPv4 header, and routes the remaining IPv6 packet. It means the IPv6 tunnel interfaces never see an IPv6 packet directly... I guess. Dec 9, 2015 at 23:30
  • The IPv6 route in the routing table would not exist if the interface didn't have an IPv6 address. The router will not forward a packet to an interface not configured for the layer-3 protocol of the packet, and it needs to be able to forward it to the interface for it to be in the routing table. How do you think the router will send IPv6 packets to an interface with no IPv6 address? For an interface to process IPv6 packets, it must have an IPv6 address. The packet do go to the tunnel interface, else why would you need the tunnel interface?
    – Ron Maupin
    Dec 9, 2015 at 23:37
  • @user4205580, try this: have or create an interface with no IPv4 address. Create a static route to that interface. Then look in your routing table. That route will not exist. The same thing happens with IPv6. If you don't have that protocol on an interface, you will not get a route to that interface.
    – Ron Maupin
    Dec 9, 2015 at 23:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.