diff options
author | Chris Moerz <freebsd@ny-central.org> | 2024-02-23 14:00:06 +0000 |
---|---|---|
committer | Joseph Mingrone <jrm@FreeBSD.org> | 2024-02-23 14:25:09 +0000 |
commit | c7ccb4f4e882d073f066b0ff10c61d1fa924972c (patch) | |
tree | 22ccb6f30410cdf27bb1c1d246b6fa8e0435c003 | |
parent | a3cf419982d690bea85346403905bed6a5b95e0b (diff) |
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
-rw-r--r-- | documentation/content/en/books/handbook/advanced-networking/_index.adoc | 22 |
1 files changed, 22 insertions, 0 deletions
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`. |