tech-net archive

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

Re: dhcpcd: switching off or down-priorising SLAAC addresses



On Wed, Nov 30, 2022 at 12:25 PM <is%netbsd.org@localhost> wrote:
>
> I noticed that for dhcpcd using clients, they get the
> SLAAC-address/64 and additionally the dhcp-assigned/128
>
> Now, for some uses, I'd like (e.g. servers) to use ONLY the
> dhcp-assigned address, also for outgoing TCP connections.
>
> If I recall correctly, this used to work with ISC's dhclient.
>
> Any idea how to do this?
>
> (This is netbsd-9.3 with the bundled dhcpcd - 8.1.9. I think I have
> the same effect with debian-10 and -11's dhcpcd version.)

I researched this a little bit with the caveat that I am not a
developer and I did not look at the code.

"Another OS" seems to choose the outbound IP somewhat randomly which
implies this isn't really a dhcpcd thing, it's a kernel thing.

You might be able to control this by adding a source route for the
address you want to use.

I don't think there is a way to just say "use this source address and
not that one" if they both can reach the peer. But I could be wrong. I
hope someone addresses that directly.

Andy


Home | Main Index | Thread Index | Old Index