svn commit: r49279 - head/en_US.ISO8859-1/books/handbook/advanced-networking
Brad Davis
brd at FreeBSD.org
Sun Aug 14 16:06:04 UTC 2016
Author: brd
Date: Sun Aug 14 16:06:03 2016
New Revision: 49279
URL: https://svnweb.freebsd.org/changeset/doc/49279
Log:
Add a section on how to configure VLANs.
Modified:
head/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.xml
Modified: head/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.xml
==============================================================================
--- head/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.xml Sun Aug 14 12:46:58 2016 (r49278)
+++ head/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.xml Sun Aug 14 16:06:03 2016 (r49279)
@@ -50,6 +50,11 @@
Address Redundancy Protocol (<acronym>CARP</acronym>) in
&os;.</para>
</listitem>
+
+ <listitem>
+ <para>How to configure multiple <acronym>VLANs</acronym> on
+ &os;.</para>
+ </listitem>
</itemizedlist>
<para>Before reading this chapter, you should:</para>
@@ -5201,4 +5206,56 @@ ifconfig_carp1="vhid <replaceable>2</rep
enabled.</para>
</sect2>
</sect1>
+ <sect1 xml:id="network-vlan">
+ <info>
+ <title>VLANs</title>
+ </info>
+
+ <indexterm>
+ <primary><acronym>VLANs</acronym></primary>
+ </indexterm>
+ <indexterm>
+ <primary>Virtual LANs</primary>
+ </indexterm>
+
+ <para><acronym>VLANs</acronym> are a way of virtually dividing up a
+ network into many different subnetworks. Each will have its own
+ broadcast domain and be isolated from the rest of the
+ <acronym>VLANs</acronym>.</para>
+
+ <para>On &os;, <acronym>VLANs</acronym> must be supported by the network
+ card driver. To see which drivers support vlans, refer to the
+ &man.vlan.4; manual page.</para>
+
+ <para>When configuring a <acronym>VLAN</acronym>, a couple pieces of
+ information must be known. First, which network interface? Second,
+ what is the <acronym>VLAN</acronym> tag?</para>
+
+ <para>To configure <acronym>VLANs</acronym> at run time, with a
+ <acronym>NIC</acronym> of <literal>em0</literal> and a
+ <acronym>VLAN</acronym> tag of <systemitem>5</systemitem>. The command
+ would look like this:</para>
+
+ <screen>&prompt.root; <userinput>ifconfig <replaceable>em0.5</replaceable> create vlan <replaceable>5</replaceable> vlandev <replaceable>em0</replaceable> inet 192.168.20.20/24</userinput></screen>
+
+ <note>
+ <para>See how the interface name includes the <acronym>NIC</acronym>
+ driver name and the <acronym>VLAN</acronym> tag, separated by a
+ period? This is a best practice to make maintaining the
+ <acronym>VLAN</acronym> configuration easy when many
+ <acronym>VLANs</acronym> are present on a machine.</para>
+ </note>
+
+ <para>To configure <acronym>VLANs</acronym> at boot time,
+ <filename>/etc/rc.conf</filename> must be updated. To duplicate the
+ configuration above, the following will need to be added:</para>
+
+ <programlisting>vlans_<replaceable>em0</replaceable>="<replaceable>5</replaceable>"
+vlans_<replaceable>em0</replaceable>_<replaceable>5</replaceable>="inet 192.168.20.20/24"</programlisting>
+
+ <para>Additional <acronym>VLANs</acronym> may be added, by simply adding
+ the tag to the <literal>vlans_<replaceable>em0</replaceable></literal>
+ field and adding an additional line configuring the network on that
+ <acronym>VLAN</acronym> tag's interface.</para>
+ </sect1>
</chapter>
More information about the svn-doc-head
mailing list