I’m working on some first-pass code for integrating dhcpcd into VyOS and had a question about interfaces and priority.
I’m sure that, in the vast majority of cases, users of VyOS only have one interface on which they want a DHCP client to configure addresses (usually the outward-facing/WAN interface). To be frank, in more complicated setups than home networks, the WAN interface isn’t usually DHCP. But it is still possible—and supported in VyOS and dhcpcd—for multiple interfaces to be configured using DHCPv(4|6). Given that, it occurs to me that there’s the possibility for conflict. The DHCP client retrieves a default route, DNS servers, and a search domain from the DHCP server. As far as I can tell looking at the code, VyOS will retrieve these things from the DHCP server on all interfaces configured using DHCP. What happens if conflicting routes/servers/search domains are returned from all DHCP servers? How does VyOS pick a winning default route / search domain? I ask because dhcpcd has a way to handle said conflicts. By default, it uses the order in which the kernel returns the interfaces when probed to determine priority. It uses the default route from the first interface in order of priority to return a default route, the search domain from the first interface to return a search domain, etc. You can also manually configure interface priority, by setting a priority number (“metric”) for each interface in the configuration file. So how should I proceed with this? Are we OK with the default behavior (priority by kernel order), or does VyOS have an existing mechanism for prioritizing interfaces that I should use to set metric options in the dhcpcd configuration file? Thanks, Nick _______________________________________________ Vyos-developers mailing list Vyos-developers@lists.tuxis.nl https://lists.tuxis.nl/listinfo/vyos-developers