Overblog Suivre ce blog
Editer l'article Administration Créer mon blog
1 juillet 2013 1 01 /07 /juillet /2013 17:16

We will see here the SLAAC settings for Raspberry PI / Raspbian : Default Gateway, Default Gateway + SLAAC advertiser

Configuration files will be shown.

 

D7b.gif

 

 

RASPBIAN as a Default Gateway

 

 

For this setup, we want Raspbian 1 to advertise itself as a Default Gateway through RAs ( Router
Advertisements ), advertising hosts to request for a full DHCPv6 on the Subnet. Here is the network map :

 

D7a.gif

 

First we set static IPv6 Addresses for eth0 and eth1.
We allow routing and disable SLAAC autoconfiguration for the Raspbian :

sudo nano /etc/sysctl.conf :

net.ipv6.conf.all.forwarding=1
net.ipv6.conf.all.autoconf=0
net.ipv6.conf.eth1.autoconf=0
net.ipv6.conf.eth0.autoconf=0

( the last two line may be needed to erease previous configurations)

We install the radvd package :

sudo apt-get update
sudo apt-get install radvd

We edit the radvd config file :

sudo nano /etc/radvd.conf :

interface eth1 {
 AdvSendAdvert on;
 AdvManagedFlag on;
 AdvOtherConfigFlag on;
 MinRtrAdvInterval 3;
 MaxRtrAdvInterval 10;
 prefix 2001:db8:0:1::/64 {
  AdvOnLink on;
  AdvAutonomous off;
  AdvRouterAddr on;
 };
};

not much to comment about this configuration file :

RA advertisement is on                                 Raspbian do send RA

Managed + OtherConfig are on                   Client should request full statefull DHCPv6 on the

subnet

MinRtr + MaxRtr                                               Advertisement Timings

AdvOnLink on                                                  Raspbian precise he's on-link ( not

behind a router )

AdvAutonomous off                                        Clients should not perform SLAAC

autoconfiguration

AdvRouterAddr on                                           MAC address of the Rasbian is sent

 

 

RPI advertised as default gateway + SLAAC + Stateless DHCPv6 provider

D7b

Here we wish to have the Raspbian OS perform as a full Gateway :

. Advertise itself as a default gateway

. Send SLAAC autoconfiguration datas

. Send DNS Servers IPs + Domain name

First, we static IPv6 Addresses for eth0 and eth1.

We allow routing and disable SLAAC autoconfiguration for Raspbian interfaces :

the /etc/sysctl.conf file needs to contain this part :

#  based on Router Advertisements for this host
net.ipv6.conf.all.forwarding=1
net.ipv6.conf.all.autoconf=0
net.ipv6.conf.eth1.autoconf=0
net.ipv6.conf.eth0.autoconf=0

( The last two line may be needed, to erease previous interfaces configuration )

We install the radvd package :

sudo apt-get update
sudo apt-get install radvd

We edit the radvd configuration file :

sudo nano /etc/radvd.conf :

interface eth1 {
 AdvSendAdvert on;
 AdvManagedFlag off;
 AdvOtherConfigFlag on;
 MinRtrAdvInterval 3;
 MaxRtrAdvInterval 10;
 prefix 2001:db8:0:1::/64 {
  AdvOnLink on;
  AdvAutonomous on;
  AdvRouterAddr on;
 };
};

It's the same as the previous example ( see for details ), except for the Managed and Autonomous

flags :

Managed flag is off, and Autonomous flag is on :

The host will autoconfigure its IPv6 addresses using SLAAC. Do note that because the OtherConfig flag

is on, hosts will send a DHCPv6 request for DNS / Domain name datas.

So we need to install the wide-dhcpv6-server package for this :

sudo apt-get install wide-dhcpv6-server

and create its configuration file :

sudo nano /etc/wide-dhcpv6/dhcp6s.conf

 

option domain-name-servers 2001:4860:4860::8888;
option domain-name "example.com";

interface eth1 {
};


( See previous posts for full explainations about the wide-dhcpv6 packages and Raspbian )

Do remember to take care of firewall rules, for the RAs and DHCPv6 requests to get in.

Finally, for precision, here is a static IPv6 configuration file :

cat /etc/network/interfaces


auto lo

iface lo inet loopback
iface eth0 inet dhcp
iface eth1 inet dhcp

iface eth0 inet6 static
address 2001:db8:0:0::240
netmask 64
gateway 2001:db8:0:0::1

iface eth1 inet6 static
address 2001:db8:0:1::1
netmask 64


allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp

 

 

RASPBIAN OS as a Default Gateway / SLAAC / RDNSS provider

 

[ to be written soon. A network component is needed ]

 

Partager cet article

Repost 0
Published by computer outlines - dans RASPBERRY PI
commenter cet article

commentaires

Présentation

  • : Computer Outlines Blog
  • : Blog mainly focused over IPv6, Windows Server, and Networking in general.
  • Contact

Recherche

Liens