Hi Roy,

On Mon, Oct 12, 2020 at 03:56:44PM +0100, Roy Marples wrote:
> Can you explain how it was not functional before and how this fixes it?

I think the change was well described in the same commit in the manual
page updates that you did not quote in your message. The "rtsol" keyword
is used to enable the processing of router advertisement messages in
order to pickup the IPv6 default routes as advertised by the routers on
the network. Previously such processing was done in the kernel, but that
code has been removed. This change updates the etc/rc.d/network script
to restore the previous functionality of the "rtsol" keyword by starting
dhcpcd with the necessary options to have it do the work that previously
was done in the kernel.

The key points are to:

- not interfere with (static) IPv4 configuration
- only update the IPv6 routing table, not the IPv6 address configuration

I also think it is very good that with this change we once again have
backwards compatibility for configuring static network addressing.

For the curious, this is what I observed at boot before the change:

    IPv6 mode: host
    Configuring network interfaces: vioif0.
    Adding interface aliases:.
    route: writing to routing socket: File exists
    add net default: gateway File exists
    Waiting for duplicate address detection to finish...

I was also getting repeated errors from ntpd due to DNS lookups failing
(as in my configuration they depend on IPv4 routing working).

Looking at dhcpcd processes, this is what was running:

    myhost$ ps -axuww | grep dhcp 
    _dhcpcd  255  0.0  0.0 22824  1396 ?     I    10:13PM 0:00.00 dhcpcd: [BPF 
BOOTP] vioif0 
    _dhcpcd  505  0.0  0.0 22964  1972 ?     I    10:13PM 0:00.00 dhcpcd: 
[master] [ip4] [ip6] 
    root     506  0.0  0.0 22824  1512 ?     I    10:13PM 0:00.00 dhcpcd: 
[privileged actioneer] 
    _dhcpcd  507  0.0  0.0 22820  1364 ?     I    10:13PM 0:00.00 dhcpcd: 
[network proxy] 
    _dhcpcd  508  0.0  0.0 22756  1316 ?     I    10:13PM 0:00.00 dhcpcd: 
[control proxy] 

This is how the interface was configured (dhcpcd had added IPv4 LL):

    myhost$ ifconfig vioif0
    vioif0: flags=0x8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
            address: 82:1a:bd:99:c1:39
            status: active
            inet broadcast flags 0
            inet broadcast flags 0
            inet6 fe80::801a:bdff:fe99:c139%vioif0/64 flags 0 scopeid 0x1
            inet6 2001:db8::134/64 flags 0

This is what was in the IPv4 routing table (presumably dhcpcd had added
the odd default route without a next hop address):

    myhost$ netstat -rnf inet
    Routing tables

    Destination        Gateway            Flags    Refs      Use    Mtu 
    default            link#1             UC          -        -      -  vioif0  link#1             UC          -        -      -  vioif0     link#1             UHl         -        -      -  lo0
    127/8              UGRS        -        -  33624  lo0          lo0                UHl         -        -  33624  lo0
    169.254/16         link#1             UC          -        -      -  vioif0      link#1             UHl         -        -      -  lo0

Here is the configuration that I'm using in rc.conf and that works
without issues with my change to etc/rc.d/network:


        inet6 2001:db8::134/64 alias

    dns_search='site.example.com example.com'
    dns_options='timeout:1 attempts:5 edns0 no-tld-query'

My preference for a static address configuration would be to also use
defaultroute6, but since on some of my networks the routers do not
support VRRP v3, I cannot configure an IPv6 address in VRRP to be used
as the default gateway.

Kind regards,
+ Kimmo

Reply via email to