On 2022-04-30 00:49 -04, Josh Grosse <j...@jggimi.net> wrote:
> On Fri, Apr 29, 2022 at 09:33:50PM -0700, George Morgan wrote:
>> I created a hostname.vlan10 file which has a single line:
>> 
>> inet autoconf parent vge0 vnetid 10 lladdr ...
>> 
>> At boot the interface fails to configure but after boot I can login to the 
>> console and run "doas sh /etc/netstart" and the interface will configure.
>> 
>> What am I doing wrong?  Do I need to add something to rc.conf.local to force 
>> the parent to configure first?  The parent (vge0) has a static IPv4 address.
>
> The vlan has to be created and assigned parentage before autoconfiguration.
> Craft your hostname.vlan10 file in two lines:
>
>     vnetid 10 parent vge0 addrr ...
>     inet autoconf
>
> This information brought to my attention via Reddit:
>
> https://www.reddit.com/r/openbsd/comments/ua0wqd/no_longer_able_to_connect_to_the_internet_after/i5z24fj/
>

The explanation on reddit is not quite correct though.
You are trying to configure a vlan interface before setting vlan
parameters, i.e:

# ifconfig vlan10 destroy
# ifconfig vlan10 inet 192.0.2.23/24
ifconfig: SIOCAIFADDR: Device not configured
# ifconfig vlan10 destroy
# ifconfig vlan10 inet autoconf
ifconfig: SIOCSIFXFLAGS: Device not configured

It has nothing to do with requesting a dhcp lease.

I think this kinda maybe worked previously but IIRC dlg shuffled some
code around and tightened the requirements. This has fewer surprises and
works correctly.

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

Reply via email to