I haven't used VLANs with FreeBSD in a bit so I check the handbook to see how to do it. This is the example that is provided: vlans_em0="5" ifconfig_em0_5="inet 192.168.20.20/24" (Which manes use of network.subr helper sh code.) However when I did something similar it didn't work. I eventually figured out my problem was that the parent interface was down; once I brought it up things start working. Would it be reasonable to add: ifconfig_em0="up" to the handbook example?
Makes sense to me. Care to propose a patch?
Yes please, in the handbook working group this chapter will be our next stop. So if you can provide a patch will be so great :)
I might need a little help getting the doc environment going. I started here: https://docs.freebsd.org/en/books/fdp-primer/book/ I installed the docproj but make fails: zinc 300 % make --------------------------------------------------------------- Building the website started on Wed May 10 10:07:00 PDT 2023 included languages: de el en es fr hu it ja nl ru tr zh-cn zh-tw excluded languages: --------------------------------------------------------------- /usr/local/bin/ruby ./tools/releases-toml.rb /usr/local/bin/ruby: No such file or directory -- ./tools/releases-toml.rb (LoadError) *** Error code 1 Stop. make: stopped in /usr/src/DOC/website But ./tools/releases-toml.rb clearly exists.
Created a patch for this and put it up on Phabricator: https://reviews.freebsd.org/D43993
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/doc/commit/?id=c7ccb4f4e882d073f066b0ff10c61d1fa924972c commit c7ccb4f4e882d073f066b0ff10c61d1fa924972c Author: Chris Moerz <freebsd@ny-central.org> AuthorDate: 2024-02-23 14:00:06 +0000 Commit: Joseph Mingrone <jrm@FreeBSD.org> CommitDate: 2024-02-23 14:25:09 +0000 Handbook/Advanced Networking: Add note about VLAN creation When adding a new VLAN, the parent interface must be up. Add notes to remind readers of this. PR: 270942 Reviewed by: jrm, leres Differential Revision: https://reviews.freebsd.org/D43993 .../books/handbook/advanced-networking/_index.adoc | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)