On Thu, Apr 15, 2021 at 12:54:44AM +0000, Lucas wrote:
> >Synopsis:    dhcpleased(8) doesn't handle underlying changes in trunk(4)
> >Category:    system
> >Environment:
>       System      : OpenBSD 6.9
>       Details     : OpenBSD 6.9 (GENERIC.MP) #459: Fri Apr  9 11:31:33 MDT 
> 2021
>                        
> [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> 
>       Architecture: OpenBSD.amd64
>       Machine     : amd64
> 
> >Description:
>       On a trunk(4) interface for wired-WiFi failover, dhcpleased(8)
> isn't able to ask for a new lease on active physical interface change.
> This is a problem for me, because the network for wired and wireless
> devicen on my LAN are different (172.16.0.0/24 for wired, 172.17.0.0/24
> for wireless).
> 
> >How-To-Repeat:
>       Start with a trunk(4) with failover configured as showed below,
> connected over WiFi and without an ethernet cord plugged in. Start
> dhcpleased(8) and get a lease. Now plug ethernet cord and check
> interface status; despite the change on the active physical interface
> dhcpleased(8) doesn't solicite a new lease. dhclient(8) does work in
> this setup.

Rough consensus is that this setup is a poor choice when wired and
wireless are on different L2 networks.

In that case it's better to not have a trunk(4) but request leases on
wired and wireless.  Interface priorities will pick the correct
network.

Trunking is more appropriate when wired and wireless are on the same
L2 network since then the IP address does not change when switching
between wired and wireless and long running sessions (ssh) stay alive.

Arguably the point of trunk(4) is to hide changes in network topology
from upper layers. When the active physical interface changes nothing
changes on the trunk(4) port. The MAC address stays the same, the link
state doesn't change and the interface stays running. Therefore
dhcpleased(8) concludes that there is nothing to do.

I think this working with dhclient(8) is due to a logic error and not
intentional. It also tries to check if something changed on the
interface but gets this wrong.

-- 
I'm not entirely sure you are real.

Reply via email to