Contributed by weerd on from the 1st-2nd-3rd-4rd-5rd-6rd-version-of-IP dept.
Reader David Hill wrote in with an article explaining how to set up 6rd tunneling in OpenBSD:
There are many websites claiming OpenBSD doesn't support 6rd. There are also user-space 6rd implementations that do not work on OpenBSD.
Well, 6rd works just fine with OpenBSD if you do it manually.
My ISP is Charter Communcations. As they slowly roll IPv6 out, they have offered IPv6 connectivity via their 6rd Border Relay.
Their settings are as follows:
6rd Prefix = 2602:100::/32 Border Relay Address = 68.114.165.1 6rd prefix length = 32 IPv4 mask length = 0So I wrote a quick perl script (excuse the code) to generate a hostname.gif0:
#!/usr/bin/perl sub convert { my $ip = @_[0]; my ($a, $b, $c, $d) = (split(/\./, $ip)); $out = sprintf("%x%x%x%x:%x%x%x%x", $a / 16, $a % 16, $b / 16, $b % 16, $c / 16, $c % 16, $d / 16, $d % 16); return $out; } my ($prefix, $bip, $ip); print "Enter IPv6 6rd Prefix (2602:100:): "; chomp($prefix = <STDIN>); print "Enter IPv4 Border Relay address: "; chomp($bip = <STDIN>); print "Enter your public IP: "; chomp($ip = <STDIN>); $dest = convert($bip); $src = convert($ip); print "\n\nmtu 1480\n", "tunnel ", $ip, " ", $bip, "\n", "inet6 alias ", $prefix, $src, "::1 128\n", "dest ", $prefix, $dest, "::1\n", "!/sbin/route -qn add -inet6 default ", $prefix, $dest, "::1\n";If I run it with my settings:
$ perl 6rd.pl Enter IPv6 6rd Prefix (2602:100:): 2602:100: Enter IPv4 Border Relay address: 68.114.165.1 Enter your public IP: 24.247.20.162 mtu 1480 tunnel 24.247.20.162 68.114.165.1 inet6 alias 2602:100:18f7:14a2::1 128 dest 2602:100:4472:a501::1 !/sbin/route -qn add -inet6 default 2602:100:4472:a501::1Now I just paste that into /etc/hostname.gif0 and run:
# sh /etc/netstart gif0Using mtr -6 www.google.com, I see that it is working.
1.|-- ??? 100.0 1 0.0 0.0 0.0 0.0 0.0 2.|-- 2001:506:100:6c::1 0.0% 1 22.2 22.2 22.2 22.2 0.0 3.|-- bbr01olvemo-tge0-3-0-4.mo.olve.charter.com 0.0% 1 28.4 28.4 28.4 28.4 0.0 4.|-- bbr02chcgil-tge0-0-0-4.il.chcg.charter.com 0.0% 1 39.1 39.1 39.1 39.1 0.0 5.|-- prr01chcgil-tge2-1.il.chcg.charter.com 0.0% 1 37.4 37.4 37.4 37.4 0.0 6.|-- 2001:4860:1:1:0:4e93:0:18 0.0% 1 35.5 35.5 35.5 35.5 0.0 7.|-- 2001:4860::1:0:3f7 0.0% 1 35.2 35.2 35.2 35.2 0.0 8.|-- 2001:4860:0:1::4da 0.0% 1 35.6 35.6 35.6 35.6 0.0 9.|-- ord08s08-in-x13.1e100.net 0.0% 1 35.0 35.0 35.0 35.0 0.0So, that is basically it in a nutshell. If you want to use ipv6 by default, add 'family inet6 inet4' to your /etc/resolv.conf
(Comments are closed)
By Simon Perreault (sperreault) sperreault@openbsd.org on http://nomis80.org
Now, if they (the ISP) configured their stuff correctly, the BR should relay packets correctly even for intra-domain communication. In that case, what you're losing is just a tiny bit of efficiency.
Comments
By Simon Perreault (sperreault) on http://nomis80.org
By Logan Velvindron (2001:470:1f14:a6b:4d13:3d81:e836:9538) logan@elandsys.com on http://lugm.org/
Let's hope one day, we'll get 6rd, or native v6 in Mauritius !
Comments
By Anonymous Coward (2001:470:89e9:1:8843:6d86:3d34:ed86) on
My ISP (Comcast) is in the process of rolling out native IPv6 throughout their coverage area (see here for info). Unfortunately, I've had to leave OpenBSD behind, as OpenBSD cannot accept router advertisements on the WAN interface while forwarding packets. So I've switched to FreeBSD for my firewall / router.
Comments
By jared spiegel (63.251.248.156) on
i've got comcast too.
i use the wide-dhcp package and that works for me well enough. every now and again i have to restart it manually to regain working v6 connectivity on the openbsd host -- LAN hosts behind openbsd don't get affected.
i put fd00::1/64 on the lan iface and rtadvd does the right thing for all my lan clients.
also i just put my wan iface's ipv6 lladdr in as my default route and it Just Works.
By Morten Taksrud (51.174.73.127) morten@taksrud.net on www.taksrud.net
-morten