OpenBSD

OpenBSD allows multiple ways to achieve IPv6 connectivity. Depending on your environment, IPv6 connectivity can be achieved via different setups described below.

Using in-kernel pppoe
Edit the file ”/etc/hostname.pppoe0” and add the following

# initiate a pppoe connection on device rl1 with user username@ipv6ote.gr and password 'passwd'
inet 0.0.0.0 255.255.255.255 NONE pppoedev rl1 authproto pap authname 'username@ipv6ote.gr' authkey 'passwd' up
# This is a point-to-point connection
dest 0.0.0.1
# Add default route for IPv4
!/sbin/route add default -ifp pppoe0 0.0.0.1
# Add default route for IPv6
!/sbin/route add -inet6 default -ifp pppoe0 ::0.0.0.1

Now, you can initiate the connection by running

# sh /etc/netstart pppoe0

If you need to disconnect make sure you run the following set of commands

# ifconfig pppoe0 down
# ifconfig pppoe0 destroy

Your gateway interface (**GWIF**) is pppoe0

Using userland pppoe
With userland ”ppp” it’s just like the good old dialup days.
Edit the file ”/etc/ppp/ppp.conf” and add the following

default:
set log IPCP IPV6CP
set device "!/usr/sbin/pppoe -i rl1"
set mtu max 1492
set mru max 1492
set authname "username@ipv6ote.gr"
set authkey "passwd"
add! default HISADDR
add! default HISADDR6

In order to initiate the connection, you issue the following command

# ppp -ddial

In order to stop the connection, issue the following

# pkill ppp

Your gateway interface (**GWIF**) is tun0

OpenBSD Gateway
Assuming your gateway has 3 network interfaces rl0:172.16.10.0/24 and sis0:172.16.50/24 and rl1 which is the interface that connects to our bridged modem. In order to activate IPv6 on your entire network:

* Edit ”/etc/sysctl.conf” (You can run each line with sysctl in order to activate it without rebooting) and add the line

net.inet6.ip6.forwarding=1

* Edit ”/etc/dhcp6c.conf” and add the following

interface rl0 {
information-only;
};

interface sis0 {
information-only;
};

# Replace pppoe0 with tun0 depending on connection
interface pppoe0 {
send ia-pd 0;
};

id-assoc pd {
prefix-interface rl0 {
sla-id 1;
sla-len 8;
};

prefix-interface sis0 {
sla-id 2;
sla-len 8;
};

};

This instructs dhcp6c to set the IP address on sis0/rl0 only and send the request through pppoe0. Once a reply has been received, a separate IPv6 subnet will be assigned on rl0 and sis0 with sla id 1 and 2 respectively.

Initiate your connection with OTEnet according to your preferred method (ppp or ifconfig) and run the following:

# rtadvd rl0 sis0
# dhcp6c pppoe0 #<-------------- Replace pppoe0 with tun0 depending on connection

Verify that IPv6 addresses have been assigned

# ifconfig sis0 inet6
sis0: flags=8843 mtu 1500
lladdr 00:e0:18:fb:29:5e
description: Workstations Network
priority: 0
media: Ethernet autoselect (100baseTX full-duplex)
status: active
inet6 fe80::2e0:18ff:fefb:295e%sis0 prefixlen 64 scopeid 0x1 <------- This is the link local IPv6
inet6 2a02:580:8000:2702:2e0:18ff:fefb:295e prefixlen 64 <--------- This is the OTEnet IPv6 network
# ifconfig rl0 inet6
rl0: flags=8843 mtu 1500
lladdr 00:11:6b:96:c1:2e
description: Living Room Network
priority: 0
media: Ethernet autoselect (100baseTX full-duplex)
status: active
inet6 fe80::211:6bff:fe96:c12e%rl0 prefixlen 64 scopeid 0x2 <------- This is the link local IPv6
inet6 2a02:580:8000:2701:211:6bff:fe96:c12e prefixlen 64 <--------- This is the OTEnet IPv6 network

OpenBSD Host
Assuming your system has one network interface connected to the modem, you need to do the following in order to activate IPv6:
Edit ”/etc/sysctl.conf” and add the line

net.inet6.ip6.accept_rtadv=1
net.inet6.ip6.forwarding=0

Initiate your connection with otenet according to your prefered method (ppp or ifconfig) and run the following:

# rtsold pppoe0

Verify that IPv6 addresses have been assigned by issuing “ifconfig”:

# ifconfig pppoe0 # <-------------- Replace pppoe0 with tun0 depending on connection type
pppoe0: flags=8851 mtu 1492
priority: 0
dev: rl1 state: session
sid: 0x8b9 PADI retries: 1 PADR retries: 0 time: 00:42:42
sppp: phase network authproto pap authname "username@ipv6ote.gr"
groups: pppoe egress
status: active
inet6 fe80::2e0:18ff:fefb:295e%pppoe0 -> prefixlen 64 scopeid 0x6 <------- This is the link local IPv6 address
inet 212.205.28.13 --> 62.103.129.45 netmask 0xffffffff <------- This is our old IPv4 address
inet6 2a02:580:300:0:2e0:18ff:fefb:295e -> prefixlen 64 autoconf pltime 604799 vltime 2591999 <---- This is our PPP IPv6 address

Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Copyright OTE 2017 Suffusion theme by Sayontan Sinha