svn commit: r51813 - head/en_US.ISO8859-1/books/handbook/advanced-networking
Sevan Janiyan
sevan at FreeBSD.org
Sun Jun 10 18:31:36 UTC 2018
Author: sevan
Date: Sun Jun 10 18:31:35 2018
New Revision: 51813
URL: https://svnweb.freebsd.org/changeset/doc/51813
Log:
Cover using symbolic names for interfaces in VLAN article.
PR: 228231
Submitted by: Brian Haug <haug.bsd6114 AT yahoo dot com>
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D15586
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 Jun 10 16:07:15 2018 (r51812)
+++ head/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.xml Sun Jun 10 18:31:35 2018 (r51813)
@@ -5225,8 +5225,9 @@ ifconfig_carp1="vhid <replaceable>2</replaceable> advs
</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
+ a network into many different subnetworks, also referred
+ to as segmenting. Each segment will have its
+ own broadcast domain and be isolated from other
<acronym>VLANs</acronym>.</para>
<para>On &os;, <acronym>VLANs</acronym> must be supported by the
@@ -5239,7 +5240,7 @@ ifconfig_carp1="vhid <replaceable>2</replaceable> advs
<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
+ <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>
@@ -5266,5 +5267,38 @@ ifconfig_<replaceable>em0</replaceable>_<replaceable>5
<literal>vlans_<replaceable>em0</replaceable></literal>
field and adding an additional line configuring the network on
that <acronym>VLAN</acronym> tag's interface.</para>
+
+ <para>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
+ <literal>em0</literal>. Later, if the <literal>em0</literal>
+ card is replaced with a card that uses the &man.ixgb.4; driver,
+ all references to <literal>em0.1</literal> will not have to
+ change to <literal>ixgb0.1</literal>.</para>
+
+ <para>To configure <acronym>VLAN</acronym>
+ <systemitem>5</systemitem>, on the
+ <acronym>NIC</acronym> <literal>em0</literal>, assign the
+ interface name <literal>cameras</literal>, and assign the
+ interface an IP address of <systemitem
+ class="ipaddress"><replaceable>192.168.20.20</replaceable></systemitem>
+ with a <systemitem class="netmask">24</systemitem>-bit prefix,
+ use this command:</para>
+
+ <screen>&prompt.root; <userinput>ifconfig <replaceable>em0.5</replaceable> create vlan <replaceable>5</replaceable> vlandev <replaceable>em0</replaceable> name <replaceable>cameras</replaceable> inet <replaceable>192.168.20.20/24</replaceable></userinput></screen>
+
+ <para>For an interface named <literal>video</literal>, use the
+ following:</para>
+
+ <screen>&prompt.root; <userinput>ifconfig <replaceable>video.5</replaceable> create vlan <replaceable>5</replaceable> vlandev <replaceable>video</replaceable> name <replaceable>cameras inet 192.168.20.20/24</replaceable></userinput></screen>
+
+ <para>To apply the changes at boot time, add the following lines to
+ <filename>/etc/rc.conf</filename>:</para>
+
+ <programlisting>vlans_<replaceable>video</replaceable>="<replaceable>camera</replaceable>"
+create_args_<replaceable>camera</replaceable>="vlan <replaceable>5</replaceable>"
+ifconfig_<replaceable>camera</replaceable>="inet <replaceable>192.168.20.20/24</replaceable>"</programlisting>
+
</sect1>
</chapter>
More information about the svn-doc-all
mailing list