Freebsd as an IPv6 router – Turn your ADSL router into an ADSL modem by changing the Encapsulation on the WAN side from RFC 2516 PPPoE to Bridged Mode Only

  • Logon to your freebsd router and add the following lines to your /etc/rc.confipv6_enable=”YES”

    * vr1 is the internal network interface

    and reboot your machine.

    Setup ppp on the Freebsd host.Add a ppp profile to /etc/ppp/ppp.conf

    set device PPPoE:vr0
    resolv readonly
    set authname
    set authkey XXXXXXX
    set dial
    set login
    set mtu max 1492
    set mru max 1492
    enable echo
    enable lqr
    enable ipv6cp
    add default HISADDR
    add default HISADDR6

    * vr0 is the interface connected via the bridged ADSL modem

    Start ppp service

    # ppp -ddial ipv6ote

    and the PPP interface will be up

    tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1492
    inet6 fe80::20d:b9ff:fe12:6a44%tun0 prefixlen 64 scopeid 0x9
    inet –> netmask 0xffffffff
    Opened by PID 1186

    Also the default gateways ipv4 and ipv6 have been set:

    # netstat -rn |grep default

    default UGS 4 1512228 tun0
    default fe80::215:c7ff:fed0:841b%tun0 UGS tun0

    The next step is to grab an allocation of IPv6 addresses for our network: First install the net/dhcp6 port and use the following configuration for /usr/local/etc/dhcp6c.conf:

    interface vr1 {

    interface tun0 {
    send ia-pd 0;
    id-assoc pd {
    prefix-interface sk0 {
    sla-id 1;
    sla-len 8;

    * Interface vr1 is the interface on which the IPv6 subnet should be defined.
    * Interface tun0 is the interface which ppp is created

    The dhcp6c program is not very informative with its output:
    # dhcp6c -f -d tun0
    Nov/06/2009 11:59:35: dhcp6_ctl_authinit: failed to open /usr/local/etc/dhcp6cctlkey: No such file or directory
    Nov/06/2009 11:59:35: client6_init: failed initialize control message authentication
    Nov/06/2009 11:59:35: client6_init: skip opening control port

    But ifconfig vr1 now gives the proper output:

    vr1: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
    ether 00:0d:b9:12:6a:45
    inet6 fe80::20d:b9ff:fe12:6a45%vr1 prefixlen 64 scopeid 0x2

    Now you have one FreeBSD computer with IPv6 connectivity. The next step is to enable it on the rest of the network.
    So run: (if you have not setup rc.conf for rtadvd)

    rtadvd -c /etc/rtadvd.conf vr1

    and test your ipv6 connectivity

    # ping6
    PING6(56=40+8+8 bytes) 2a02:580:8000:2401:20d:b9ff:fe12:6a45 –> 2a02:580:200::200
    16 bytes from 2a02:580:200::200, icmp_seq=0 hlim=62 time=39.647 ms
    16 bytes from 2a02:580:200::200, icmp_seq=1 hlim=62 time=38.129 ms

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 2018 Suffusion theme by Sayontan Sinha