Changeset View
Changeset View
Standalone View
Standalone View
en_US.ISO8859-1/books/handbook/advanced-networking/chapter.xml
Show First 20 Lines • Show All 5,219 Lines • ▼ Show 20 Lines | <sect1 xml:id="network-vlan"> | ||||
<indexterm> | <indexterm> | ||||
<primary><acronym>VLANs</acronym></primary> | <primary><acronym>VLANs</acronym></primary> | ||||
</indexterm> | </indexterm> | ||||
<indexterm> | <indexterm> | ||||
<primary>Virtual LANs</primary> | <primary>Virtual LANs</primary> | ||||
</indexterm> | </indexterm> | ||||
<para><acronym>VLANs</acronym> are a way of virtually dividing up | <para><acronym>VLANs</acronym> are a way of virtually dividing up | ||||
a network into many different subnetworks. Each will have its | a network into many different subnetworks, also referred | ||||
own broadcast domain and be isolated from the rest of the | to as segmenting. Each segment will have its | ||||
own broadcast domain and be isolated from other | |||||
<acronym>VLANs</acronym>.</para> | <acronym>VLANs</acronym>.</para> | ||||
<para>On &os;, <acronym>VLANs</acronym> must be supported by the | <para>On &os;, <acronym>VLANs</acronym> must be supported by the | ||||
network card driver. To see which drivers support vlans, refer | network card driver. To see which drivers support vlans, refer | ||||
to the &man.vlan.4; manual page.</para> | to the &man.vlan.4; manual page.</para> | ||||
<para>When configuring a <acronym>VLAN</acronym>, a couple pieces | <para>When configuring a <acronym>VLAN</acronym>, a couple pieces | ||||
of information must be known. First, which network interface? | of information must be known. First, which network interface? | ||||
Second, what is the <acronym>VLAN</acronym> tag?</para> | Second, what is the <acronym>VLAN</acronym> tag?</para> | ||||
<para>To configure <acronym>VLANs</acronym> at run time, with a | <para>To configure <acronym>VLANs</acronym> at run time, with a | ||||
<acronym>NIC</acronym> of <literal>em0</literal> and 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> | 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> | <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> | <note> | ||||
<para>See how the interface name includes the | <para>See how the interface name includes the | ||||
<acronym>NIC</acronym> driver name and the | <acronym>NIC</acronym> driver name and the | ||||
<acronym>VLAN</acronym> tag, separated by a period? This is a | <acronym>VLAN</acronym> tag, separated by a period? This is a | ||||
Show All 10 Lines | present on a machine.</para> | ||||
<programlisting>vlans_<replaceable>em0</replaceable>="<replaceable>5</replaceable>" | <programlisting>vlans_<replaceable>em0</replaceable>="<replaceable>5</replaceable>" | ||||
ifconfig_<replaceable>em0</replaceable>_<replaceable>5</replaceable>="inet 192.168.20.20/24"</programlisting> | ifconfig_<replaceable>em0</replaceable>_<replaceable>5</replaceable>="inet 192.168.20.20/24"</programlisting> | ||||
<para>Additional <acronym>VLANs</acronym> may be added, by simply | <para>Additional <acronym>VLANs</acronym> may be added, by simply | ||||
adding the tag to the | adding the tag to the | ||||
<literal>vlans_<replaceable>em0</replaceable></literal> | <literal>vlans_<replaceable>em0</replaceable></literal> | ||||
field and adding an additional line configuring the network on | field and adding an additional line configuring the network on | ||||
that <acronym>VLAN</acronym> tag's interface.</para> | 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, you | |||||
might want to run security cameras over VLAN 1 on | |||||
bcr: This line needs to be connected to the sentence above (after the sentence stop) and reflowed… | |||||
<literal>em0</literal>. | |||||
Later, if you replace the <literal>em0</literal> card with a | |||||
Done Inline ActionsSame here. bcr: Same here. | |||||
card that uses the &man.ixgb.4; driver you will not have to | |||||
change references to <literal>em0.1</literal> to | |||||
<literal>ixgb0.1</literal>.</para> | |||||
<para>To configure <acronym>VLAN</acronym> | |||||
Not Done Inline ActionsDon't use "I" in the handbook. Make it third-person, like this: For example, interfaces for video and audio can be named to associate ... bcr: Don't use "I" in the handbook. Make it third-person, like this:
For example, interfaces for… | |||||
<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 | |||||
Done Inline ActionsThis needs to be wrapped in <replaceable>s as the address is not static. bcr: This needs to be wrapped in <replaceable>s as the address is not static. | |||||
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> | |||||
Done Inline Actionss/interfaces/interface/ This sentence could be a bit shorter to simply say: For an interface named <literal>video</literal> use the following: bcr: s/interfaces/interface/
This sentence could be a bit shorter to simply say: For an interface… | |||||
<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> | |||||
Done Inline Actionss/confguration/configuration/ I'd write the sentence as follows: To apply the changes at boot time, add ... bcr: s/confguration/configuration/
I'd write the sentence as follows: To apply the changes at boot… | |||||
</sect1> | </sect1> | ||||
</chapter> | </chapter> |
This line needs to be connected to the sentence above (after the sentence stop) and reflowed properly.