Monday, May 11, 2015

ipv6 unifi on centos using PPPoE (final)

ref: https://www.bidon.ca/en/node/634

This is working setting for IPv6 unifi.

I uses route announcements (RA) so that the home router configures the default route as well as a /64 prefix for auto-configuration. We don't need the /64, but it can be useful for the default route.
For PPP on a router, this is disabled by default.
To enable the default route from route advertisements:
# sysctl -w net.ipv6.conf.ppp0.accept_ra=2
To auto-configure an IP address to ppp0:
# sysctl -w net.ipv6.conf.ppp0.autoconf=1
After a few seconds, "ifconfig ppp0" should show a global IPv6 address, and "ip -6 route" will show a default route. You should also be able to "ping6 google.com" or he.net from your router.
IMPORTANT: to make sysctl configurations permanent, you can try to add them to /etc/sysctl.conf, or to /etc/ppp/ipv6-up.d/my-network (script executed when the ppp connection is enabled).

Configuring the /56 prefix with DHCPv6-PD

A /64 network prefix is recommend for a single network. However, most IPv6 home topologies need more than one network. For example, the wireless access point (AP) should use its own network (bye bye network bridging), the wired network another network, another for home servers, appliances, etc.
Install the 'WIDE DHCPv6 client':
# apt-get install wide-dhcpv6-client
The Debian configuration wizard may ask for which interface to listen on: ppp0.
Sample configuration in /etc/wide-dhcpv6/dhcp6c.conf :
# c.f. http://www.ipcalypse.ca/?p=204
interface ppp0 {
  # Identity Association for Prefix Delegation
  send ia-pd 1;

  # Identity Association for Non-temporary Addresses
  send ia-na 1;

  # request domain-name-servers;
  # request domain-name;
  # script "/etc/wide-dhcpv6/dhcp6c-script";
};

id-assoc pd 1 {
  prefix-interface eth1 {
    # Assign subnet 1 to eth1
    sla-id 1;

    # IP address "postfix". if not set it will use EUI-64 address of the interface.
    # Combined with SLA-ID'd prefix to create full IP address of interface.
    ifid 1;

    # Prefix bits assigned.
    # Take the prefix size you're assigned (/48 or /56) and subtract it from 64.
    # In my case I was being assigned a /56, so 64-56=8
    sla-len 8;
  };
};

id-assoc na 1 {
};
Test from the command line:
# dhcp6c -fD -c /etc/wide-dhcpv6/dhcp6c.conf ppp0

Configure radvd for auto-configuration on the networks

Each network with clients (desktops/workstations/laptops) will need radvd so that the clients can auto-configure themselves.
Install radvd:
# apt-get install radvd
Example configuration for a subnet, in /etc/radvd.conf :
interface eth1
{
  AdvSendAdvert on;
  MaxRtrAdvInterval 30;

  prefix ::/64
  {
    AdvOnLink on;
    AdvAutonomous on;
    AdvRouterAddr off;
    AdvValidLifetime 300;
    AdvPreferredLifetime 120;
  };
};
Then restart radvd:
# services radvd restart

Tuesday, May 05, 2015

Enable ipv6 on centos PPPoE unifi

ref: http://wandin.net/dotclear/index.php?post/2011/02/10/Native-IPv6-with-Internode-and-CentOS

Note: you will need new BTU from unifi technician that support ipv6. old btu does not support ipv6 at my place.

remember to put ipv6[space],


# vi /etc/ppp/options 
lock
ipv6 ,
May  5 15:24:46 backup pppd[15296]: PAP authentication succeeded
May  5 15:24:46 backup pppd[15296]: local  LL address fe80::78e0:xxxx:xxxx:xxxx
May  5 15:24:46 backup pppd[15296]: remote LL address fe80::2a6e::xxxx:xxxx:xxx
May  5 15:24:46 backup pppd[15296]: local  IP address 175.143.xx.xx
May  5 15:24:46 backup pppd[15296]: remote IP address 175.143.xx.xx
Related Posts Plugin for WordPress, Blogger...