Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Static IPv6, dhcpcd, and defaultroute6 issue writes:

> I want to configure a static IPv6 along with a DHCP IPv4 on my Rock64
> running NetBSD10_beta. However, I'm not able to get the default route for
> IPv6 set on boot.
> Here are my interface specific dhcpcd.conf entries:
> interface awge0
> noipv6rs
> static ip6_address=2001:x:x:x/64
> Entries in rc.conf:
> dhcpcd=YES
> ip6mode=host
> defaultroute6="fe80::x:x:x%awge0"
> After reboot no default is listed under Internet6 output for route show.
> Explicitly doing route add -inet6 default fe80::x:x:x%awge0 fixes this,
> and my static IPv6 works perfectly.
> What makes me dig deeper is I can instead do a service network restart,
> and the defaultroute6 in rc.conf is applied correctly.
> Is there a potential race condition in the network rc script with dhcpcd?

This feels like a slightly odd way to do things.  If you want a static
ip6, why don't you create ifconfig.awge and put in

  inet6 2001:x:x:x/64

Also, why don't you want RS?  but that's your call.

I wonder if defaultroute6 doest't work because the interface is not yet
up.   You are, I think, relying on dhcpcd enumerating interfaces,
bringing them up, and trying to configure them.   And that I bet runs
after networking

  /etc/rc.d $ rcorder  *|egrep 'network|dhcp'

You should also be able to put in an ifconfig.awge0 that has (not

  !/sbin/route add -inet6 default fe80::foo

after "up" and "inet6".

Home | Main Index | Thread Index | Old Index