3

I'm currently learning the IPv6 tunneling via IPv4 in GNS3. I've done manual tunnels, 6to4 and now I'm tackling 6rd. I've read on the subject and I think I get the whole concept..The IPv6 prefix, the common IPv4 suffix/prefix etc. Then I've read a config example on the web >>here<<. What I have hard time to comprehend is the whole ipv6 general-prefix options. Could someone explain these two lines from the CE config?

  • ipv6 general-prefix DELEGATED_PREFIX 6rd Tunnel0
  • ipv6 address DELEGATED_PREFIX ::/128 anycast (on int Tunnel 0)

maybe this as well:

  • ipv6 address DELEGATED_PREFIX ::/64 eui-64 (on int Ethernet 0)
5
ipv6 general-prefix DELEGATED_PREFIX 6rd Tunnel0

This line defines DELEGATED_PREFIX. It automatically calculates the IPv6 prefix based on the 6rd settings of the Tunnel0 interface.

ipv6 address DELEGATED_PREFIX ::/128 anycast (on int Tunnel 0)

This line sets an IPv6 address on the Tunnel0 interface using the DELEGATED_PREFIX defined before. It tells the router to take the prefix, leave the other bits zero (::) and configure it as a single anycast address. The anycast flag tells the router that the address may be used on multiple devices at the same time. It will therefore not perform any Duplicate Address Detection (not really relevant for a tunnel interface) and it will not use that address as a source address (because the return traffic might end up at one of the other anycast nodes).

ipv6 address DELEGATED_PREFIX ::/64 eui-64 (on int Ethernet 0)

This does the same for the Ethernet0 interface. It uses the DELEGATED_PREFIX to give an address to the interface. One problem is that you're using the same subnet on the tunnel interface. You should use separate subnets for different interfaces. The eui-64 flag tells the router to generate the last 64 bits of the interface address based on its MAC address.

An example to (hopefully) make things clearer:

Let's take the 6rd settings from the example:

  • 6rd IPv4 prefix: 10.0.0.0/8
  • 6rd IPv6 prefix: 2001:db80::/28

Then if your router has IPv4 address 10.0.0.10 you will get IPv6 prefix 2001:db80:0:a000::/52. The /8 in the IPv4 prefix means that the first 8 bits are fixed. So when constructing the IPv6 prefix it will only use the last 24 (32 - 8) bits from the IPv4 address. These have binary value 0000 0000 0000 0000 0000 1010. When written in hexadecimal that is 00 00 0a. This is appended to the /28 IPv6 prefix, giving a /52 (28 + 24).

So DELEGATED_PREFIX will get value 2001:db80:0:a000::/52. Therefore the Tunnel0 interface will get address 2001:db80:0:a000::/128 and the Ethernet0 interface will get something like 2001:db80:0:a000:1234:56ff:fe78:90ab/64 (assuming MAC address 12.34.56.78.90.ab).

It would be better to give the ethernet interface an address from a different subnet, like:

ipv6 address DELEGATED_PREFIX 0:0:0:1::/64 eui-64

That would result in 2001:db80:0:a001:1234:56ff:fe78:90ab/64. And if you don't want to make the address dependent on the MAC address you can also just give it a fixed address:

ipv6 address DELEGATED_PREFIX 0:0:0:1::1/64

That would result in 2001:db80:0:a001::1/64.

  • Great answer, thank you! In case of the anycast tunnel address: you wrote, that it won't use that address as source for obvious reason. My question is: what address would be used as source address in that case? – Davs Dec 26 '14 at 19:15
  • One more question: ipv6 address DELEGATED_PREFIX 0:0:0:1::1/64. If I want to use DELEGATED_PREFIX, I have to set it's 'placeholder' bits to 0? Like the first 3 zeros in 0:0:0:1::1/64 are 'placeholders' as 'here goes the value of DELEGATED_PREFIX'? What would happen if I were to specifiy a non-zero value on those places? – Davs Dec 26 '14 at 19:18
  • If it sends it to a link-local address it will use the link-local address from the outgoing interface. Those are always present on any IPv6 interface. If it initiated traffic to a global address it will If the router initiates traffic it will not use an anycast address. It will take an address of a different interface instead. If it doesn't have a global address at all then it won't be able to communicate. This is a simplified explanation as the full algorithm is much more complex. See tools.ietf.org/html/rfc6724 for the full algorithm. – Sander Steffann Dec 27 '14 at 17:41
  • I'm not sure what will happen if there are conflicting bits in the delegated prefix and the interface configuration. I'll have to try that ☺ – Sander Steffann Dec 27 '14 at 17:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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