hostingnuggets
Posts: 34
Joined: Fri Dec 28, 2012 5:52 pm

Howto configure a static IPv6 gateway with dhcpcd

Fri Nov 01, 2019 3:50 pm

Hello,

I need to configure IPv6 manually (static) on my Raspbian buster Pi because my network does not provide DHCPv6 nor RA.

In the past (Raspbian jessie for example) I would do that very easily using /etc/network/interfaces like this:

Code: Select all

iface eth0 inet6 static
	address <MY_v6_IP>
	netmask 64
	gateway <MY_v6_GATEWAY>
But now it seems that Rasbpian uses /etc/dhcpcd.conf instead, so I configured it like that:

Code: Select all

interface eth0
static ip6_address=<MY_v6_IP>/64
I did not find any paramter in dhcpcd.conf in order to specify the IPv6 gateway of my network. The only parameter I found is "static routers" but that seems to be only for IPv4.

Does anyone have an idea?

Best regards,
John

User avatar
rpdom
Posts: 16313
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Howto configure a static IPv6 gateway with dhcpcd

Fri Nov 01, 2019 4:33 pm

It seems that you can't set a IPv6 static route in dhcpcd because it shouldn't be necessary. IPv6 is supposed to work our routing itself from the routers advertising what they provide.

Sounds like bad voodoo to me, but there you go.

hostingnuggets
Posts: 34
Joined: Fri Dec 28, 2012 5:52 pm

Re: Howto configure a static IPv6 gateway with dhcpcd

Fri Nov 01, 2019 4:44 pm

In an ideal world yes I agree the whole thing would be automatic but unfortunately I do not control the network and I have to configure the IPv6 manually with the static addresses I have been given. As mentioned that network does not have DHCPv6 nor RA this is the reason why I have to enter manually the IPv6 address of the gateway.

kozlynx
Posts: 5
Joined: Fri Feb 08, 2019 7:59 am

Re: Howto configure a static IPv6 gateway with dhcpcd

Fri Nov 08, 2019 7:09 pm

I did not find any paramter in dhcpcd.conf in order to specify the IPv6 gateway of my network. The only parameter I found is "static routers" but that seems to be only for IPv4.
I've had the same problem a while ago but I couldn't find how to specify IPv6 gateway either. Would like to know that too.

epoch1970
Posts: 4445
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: Howto configure a static IPv6 gateway with dhcpcd

Fri Nov 08, 2019 8:21 pm

You can always use a dhcpcd script. See "man dhcpcd-run-hooks"
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

Return to “General discussion”