IPv6-Cloud.org/IPv6-Howto
|
- FreeBSD .. IPv6 Test Lab ..
|
| Kernel Requirements
|
- Compile the Kernel with IPv6 Support
- option INET6
- option IPv6_FIREWALL .. check real value later
- Check the Kernel Supports IPv6
- FreeBSD-6.x kldstat -v | egrep "ipfw|ip6fw" .. should be listed ..
- FreeBSD-7.x 8.x kldstat -v | egrep "ipfw|ip6fw" .. should be listed ..
- Manually Load the IPv6 Kernel Modules
- FreeBSD-6.x kldload ip6fw
- FreeBSD-7.x 8.x kldload ipfw
- Check sysctl net.inet6.ip6.forwarding .. should be 1 ..
- Assign it sysctl -w net.inet6.ip6.forwarding=1
|
| Create Your Local IPv6 Address
|
- Convert IPv4 Address into Hex format
- Lets assume a typical IPv4 Infrastructure:
- Network at 192.168.1.0 aka in hex = C0A8:0100
- GateWay at 192.168.1.1 aka in hex = C0A8:0101
- DNS at 192.168.1.2 aka in hex = C0A8:0102
- Server at 192.168.1.22 aka in hex = C0A8:0116 <<--- notice
- Client at 192.168.1.33 aka in hex = C0A8:0121 <<--- notice
- Broadcast at 192.168.1.255 aka in hex = C0A8:01FF
- Typical Way to Create the Equivalent IPv6 Address
- For Point-to-Point IPv6 Tunnels 2001::/32
Server == 2001:C0A8:0116::1 ( aka 192.168.1.22 )
Client == 2001:C0A8:0121::1
- For 6to4 IPv6 Tunnels 2002::/8
Server == 2002:C0A8:0116::1
Client == 2002:C0A8:0121::1
|
| Edit Your System Files for IPv6
|
vi /etc/rc.firewall6
..
[Client] Section
..
#
# Change ip= for server or client
net="2002:C0A8:0100::"
ip="2002:C0A8:0116::1"
..
- Reload the IPv6 firewall rules after modifying /etc/rc.firewall6 file
vi /etc/named.conf
- Configure your IPv6 DNS server later ...
- Reload the DNS changes after modifying /etc/named.conf file
|
| Manually Configuring an 6to4 IPv6 Tunnel
|
- Configure your IPv6 Server at 2002:C0A8:0116::1 ( aka 192.168.1.22 )
- Configure your IPv6 Client at 2002:C0A8:0121::1 ( aka 192.168.1.33 )
- Corresponding Network address is 2002:C0A8:0100::1 ( aka 192.168.1.0 )
- Create the 6to4 interface
- ifconfig create stf0
- ifconfig stf0 inet6 2002:C0A8:0116::1 prefixlen 16
- Check the 6to4 interface
- Remove the 6to4 interface
- ifconfig stf0 destroy
- ifconfig stf0 down
- Update the IPv6 routing table
- route add -inet6 2002:C0A8:0116::1 [ -iface stf0 ]
- route add -inet6 default 2002:C0A8:0100::1 [ -iface stf0 ]
- Check the IPv6 routing table
- Remove the IPv6 routes
- route delete -inet6 IPv6_address
- route delete -inet6 default
- Load the IPv6 Firewall
- vi /etc/rc.firewall6
# Client section
net=2002:C0A8:0100::1
ip=2002:C0A8:0116::1
- /etc/rc.d/ip6fw stop ; ip6fw list (?empty?) ; /etc/rc.ip6fw start
- make sure the IPv6 firewall is empty if you stop the IPv6 firewall
- Check the IPv6 firewall rules
- ip6fw list
- ip6fw show
- # Additional IPv6 firewall rule might be needed for FreeBSD-6.x .. if ping6 hangs
- ip6fw add 5000 allow 41 from any to any
- Remove the IPv6 firewall rules
|
| Sanity Checking
|
- Example Local IPv6 Test Environment
- ping itself by IPv6 address via its localloop (lo) interface
- ping itself by name via its localloop (lo) interface
- Ping itself by IPv6 Address via stf0 interface
- client# ping6 -c 3 2002:C0A8:0121::1
- server# ping6 -c 3 2002:C0A8:0116::1
- Ping itself by name via its stf0 interface
- client# ping6 -c 3 ClientIPv6
- server# ping6 -c 3 ServerIPv6
- IPv6 Client pinging IPv6 Server on stf0 interface
- client# ping6 -c 3 ServerIPv6
- server# ping6 -c 3 ClientIPv6
- Local IPv6 LAN pinging the Outside IPv6 cloud on stf0 interface
- Pinging will fail until you get your IPv6 connectivity
from your ISP or Tunnel Broker
- It should at least resolve www.kame.net into it's IPv6 address
- client# ping6 -c 3 www.kame.net
- server# ping6 -c 3 www.kame.net
|
| IPv6 Error Messages
|
- ping6: UDP connect: No route to host
- ping6: sendmsg: Permission denied
- your IPv6 firewall is NOT properly configured
- ping6 just hangs
- your firewall is not passing port 41 thru
|
| Real World IPv6 Connectivity
|
- Check if your ISP provides native IPv6 connectivity
- If not, you will need to contact an IPv6 Tunnel Broker
|