DæmonNews: News and views for the BSD community

October 2000 Get BSD New to BSD? Search BSD Submit News FAQ Contact Us Join Us
Search


Get BSD Stuff

IPv6 over NAT Response

by Nick Sayer <nsayer@quack.kfu.com>

In response to last month's IPv6 over NAT article, I would like to encourage everyone who has even a single static IPv6 address to try setting up 6to4.

6to4 is an ad-hoc mechanism by which anyone can participate in IPv6 without having to make any arrangements to hook up to an existing IPv6 network.

The secret is a special prefix, 2002::. To make a 6to4 prefix, turn the IPv4 address of the machine you pick to be your gateway into hex. For example, 192.168.57.99 would be 0xc0a83963 (obviously this won't really work, since it's a martian address). Take this hex address and tack it onto the end of 2002, so our example would be 2002:c0a8:3963::/48. Put this stuff in rc.conf on the gateway box:

  ipv6_enable="YES"
  ipv6_router_enable="YES"
  ipv6_network_interfaces="lo0 nn0"
  ipv6_prefix_nn0="2002:c0a8:3963"
  stf_interface_ipv4addr="192.168.57.99"

In the above, change nn0 to your Ethernet interface. Make sure you have "pseudo-device stf 1" in your kernel config.

That configuration should be sufficient to communicate with any other 6to4 user. In order to communicate with folks on the 6bone, you will need to find a 6to4 router. This is someone who has set up both 6to4 and a 6bone connection. I have one of these at 6to4.kfu.com. There are a few others. Pick the closest to you.

Add this to your rc.conf:

  ipv6_static_routes="default"
  ipv6_route_default="default 6to4.kfu.com"

Note that packets to 6bone sites will, in general, take different paths to go from you and to you. The reason for this has to do with the nature of 6to4.

Do all this and ping6 www.6bone.net and you should get replies. Then you can go look at the dancing kame!




Author maintains all copyrights on this article.
Images and layout Copyright © 1998-2004 Dæmon News. All Rights Reserved.