git: c7ccb4f4e8 - main - Handbook/Advanced Networking: Add note about VLAN creation

Joseph Mingrone <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.doc
Message-ID <[email protected]>
The branch main has been updated by jrm:

URL: https://cgit.FreeBSD.org/doc/commit/?id=c7ccb4f4e882d073f066b0ff10c61d1fa924972c

commit c7ccb4f4e882d073f066b0ff10c61d1fa924972c
Author:     Chris Moerz <[email protected]>
AuthorDate: 2024-02-23 14:00:06 +0000
Commit:     Joseph Mingrone <[email protected]>
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(+)

diff --git a/documentation/content/en/books/handbook/advanced-networking/_index.adoc b/documentation/content/en/books/handbook/advanced-networking/_index.adoc
index 1a6e239cf7..a1f861079b 100644
--- a/documentation/content/en/books/handbook/advanced-networking/_index.adoc
+++ b/documentation/content/en/books/handbook/advanced-networking/_index.adoc
@@ -2406,6 +2406,17 @@ To configure VLANs at run time, with a NIC of `em0` and a VLAN tag of `5` the co
 See how the interface name includes the NIC driver name and the VLAN tag, separated by a period? This is a best practice to make maintaining the VLAN configuration easy when many VLANs are present on a machine.
 ====
 
+[NOTE]
+====
+When defining VLANs, ensure that the parent network interface is also configured and enabled.
+The minimum configuration for the above example would be:
+
+[source,shell]
+....
+# ifconfig em0 up
+....
+====
+
 To configure VLANs at boot time, [.filename]#/etc/rc.conf# must be updated.
 To duplicate the configuration above, the following will need to be added:
 
@@ -2417,6 +2428,17 @@ ifconfig_em0_5="inet 192.168.20.20/24"
 
 Additional VLANs may be added, by simply adding the tag to the `vlans_em0` field and adding an additional line configuring the network on that VLAN tag's interface.
 
+[NOTE]
+====
+When defining VLANs in [.filename]#/etc/rc.conf#, make sure that the parent network interface is configured and enabled as well.
+The minimum configuration for the above example would be:
+
+[.programlisting]
+....
+ifconfig_em0="up"
+....
+====
+
 It is useful to assign a symbolic name to an interface so that when the associated hardware is changed, only a few configuration variables need to be updated.
 For example, security cameras need to be run over VLAN 1 on `em0`.
 Later, if the `em0` card is replaced with a card that uses the man:ixgb[4] driver, all references to `em0.1` will not have to change to `ixgb0.1`.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.