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

We will see here the settings for Raspberry PI / Raspbian as a SLAAC Client. Configuration files will be shown.

 

 

  D6a

 

RASPBIAN SLAAC / Stateless DHCPv6 Client

 

We will first see how to setup Raspbian OS as a simple SLAAC + Stateless DHCPv6 client.

Here is the network map used :

 

D6a

 

First, we setup /etc/sysctl.conf. It should contain these lines :

 

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

( the last line may be needed, to erease some previous settings )

 

We need a dhcpv6 client for the Stateless DHCPv6 requests :

 

sudo apt-get install wide-dhcpv6-client

 

The default config file doesn't need to be changed. It will request DNS and Domain name informations. To check it :

 

cat /etc/wide-dhcpv6/dhcp6c.conf

 

( to be added )

 

The default /etc/network/interfaces doesn't need to be changed either. Here is the default one :

 

cat /etc/network/interfaces

 

( to be added )

 

Finally, we need to remember to let RAs ( Router Advertisements ) in using ip6tables

 

 

RASPBIAN SLAAC / RDNSS client

 

Now let's see how to setup our RASPBIAN OS using SLAAC / RDDNS. The network map is :

 

 

D6a

 

First, we setup /etc/sysctl.conf. It should contain these lines :

 

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

( the last line may be needed, to erease some previous settings )

 

We need a RDNSS client for the RDNSS requests :

 

sudo apt-get install rdnss

 

The default config file doesn't need to be changed. It will append IPv6 DNS IPs to /etc/resolv.conf.

 

The default /etc/network/interfaces doesn't need to be changed either. Here is the default one :

 

cat /etc/network/interfaces

 

( to be added )

 

Finally, we need to remember to let RAs in ( Router Advertisements ) using ip6tables

 

There is an important point to look at :

 

Resolvconf only puts 3 records max in /etc/resolv.conf. As an exemple if you happen to have 3 DHCPv4 records advertised to the RASPBIAN OS ( because of dual NIC ) There won't be no place left for RDNSSD to register. one advertised DHCP DNS record as to be removed.

1st solution :

 

edit the resolvconf/interface-order to put rddnsd first :

 

sudo nano /etc/resolvconf/interface-order

and add as first line :

# interface-order(5)
*.rdnssd


2nd solution :

Remove one or two advertised DHCP DNS records from the RASPBIAN OS subnets.


RASPBIAN dual SLAAC client + RDNSS client

 

This third configuration is rarely usefull, but it brings some very interesting points into light. Here is the network map :

 

D6b

 

We wish to have Raspbian 1 request for a full SLAAC configuration via eth0 ( IPv6 addresses, default gateway, DNS server IPs ), and setup to use Internet Gateway as a default gateway via eth0.

We wish too to have eth1 to get too a SLAAC IPv6 address. We don't need to receive DNS IPs from Router 1/eth1, and don't want to have Router 1/eth1 registered as a default gateway.

 

First, we setup /etc/sysctl.conf. It should contain these lines :

 

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

 

( the last two lines may be needed, to erease some previous settings )

Please note this line : net.ipv6.conf.eth1.accept_ra_defrtr=0 :

It prevents eth1 to register a default route, so we will only have one default route listed.

To check the IPv6 default routes registered by the RASPBIAN OS :

 

ip -6 route show

 

 

We need a RDNSS client for the RDNSS requests :

 

sudo apt-get install rdnss

 

The default config file doesn't need to be changed. It will append IPv6 DNS IPs to /etc/resolv.conf.

 

The default /etc/network/interfaces doesn't need to be changed either. Here is the default one :

 

cat /etc/network/interfaces

 

( to be added )

 

Finally, we need to remember to let RAs in ( Router Advertisements ) using ip6tables

 

Again we have the resolv.conf point to look at :

 

Resolvconf only puts 3 records max in /etc/resolv.conf. As an exemple if you happen to have 3 DHCPv4 records advertised to the RASPBIAN OS ( because of dual NIC ) There won't be no place left for RDNSSD to register. one advertised DHCP DNS record as to be removed.

1st solution :

 

edit the resolvconf/interface-order to put rddnsd first :

 

sudo nano /etc/resolvconf/interface-order

and add as first line :

# interface-order(5)
*.rdnssd


2nd solution :

Remove one or two advertised DHCP DNS records from the RASPBIAN OS subnets.


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