Bug 270942 - FreeBSD Handbook section on VLANs example doesn't up the parent interface
Summary: FreeBSD Handbook section on VLANs example doesn't up the parent interface
Status: Closed FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Website (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-doc (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-19 22:37 UTC by Craig Leres
Modified: 2024-02-23 14:27 UTC (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Craig Leres freebsd_committer freebsd_triage 2023-04-19 22:37:04 UTC
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?
Comment 1 Ed Maste freebsd_committer freebsd_triage 2023-05-10 14:28:16 UTC
Makes sense to me. Care to propose a patch?
Comment 2 Sergio Carlavilla Delgado freebsd_committer freebsd_triage 2023-05-10 16:30:38 UTC
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 :)
Comment 3 Craig Leres freebsd_committer freebsd_triage 2023-05-10 17:10:44 UTC
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.
Comment 4 Chris Moerz 2024-02-20 19:47:55 UTC
Created a patch for this and put it up on Phabricator:
https://reviews.freebsd.org/D43993
Comment 5 commit-hook freebsd_committer freebsd_triage 2024-02-23 14:26:06 UTC
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(+)