Monday, 28 September 2020

Testing DHCP server configured for v6 only with another Raspberry Pi

I wanted to test the DHCP server installed on Raspberry Pi OS configured for v6 only as described in my recent The ultimate guide for RPD provisioning blog post. To achieve this, I used another Raspberry Pi OS directly connected back to back with a single ethernet patch cable.

First, we need a DHCPv6 client on the other Raspberry Pi OS.

pi@raspberrypi:~ $ sudo apt-get install wide-dhcpv6-client

During installation, specify the eth0 interface and also edit the following configuration file:

pi@raspberrypi:~ $ sudo nano /etc/wide-dhcpv6/dhcp6c.conf
interface eth0 {
  send ia-na 0;
};
id-assoc na 0 {
};

As IPv6 networks learned from a router advertisement, we need to install another tool besides DHCP on the server-side to enable back to back IPv6 communication over the direct ethernet patch cable:

pi@raspberrypi:~ $ sudo apt install radvd

The following config file advertises the same network configured in the previous blog post on the DHCP server:

pi@raspberrypi:~ $ sudo nano /etc/radvd.conf
interface eth0 {
    AdvSendAdvert on;
    prefix fd51:42f8:caae:d92e::/64;
};

This concludes IPv6 connectivity between the DHCP server and DHCP client via acquired IPv6 address. 

No comments:

Post a Comment