FreeBSD Bugzilla – Attachment 193375 Details for
Bug 228231
Fill in more details for VLANs in advanced networking chapter
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
Suggested changes
named-vlans-update.diff.txt (text/plain), 3.18 KB, created by
Brian Haug
on 2018-05-14 03:24:56 UTC
(
hide
)
Description:
Suggested changes
Filename:
MIME Type:
Creator:
Brian Haug
Created:
2018-05-14 03:24:56 UTC
Size:
3.18 KB
patch
obsolete
>Index: chapter.xml >=================================================================== >--- chapter.xml (revision 51647) >+++ chapter.xml (working copy) >@@ -5237,7 +5237,7 @@ > > <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> >@@ -5264,5 +5264,44 @@ > <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, you might want to run security cameras over VLAN 1 >+ on em0. >+ Later if you replace the em0 card with a card that uses the ixgb >+ driver you will not have to change references to em0.1 to >+ ixgb0.1. Assigning symbolic names to interfaces can also be >+ useful to help clarify which port is associated with built in >+ ethernet interfaces. >+ For example, I named interfaces video and audio to associate the >+ ports located next to the video and audio connectors. >+ Assigning symbolic names to interfaces can also ease managing a >+ firewall configuration.</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">192.168.20.20</systemitem>, with a >+ <systemitem class="netmask">24</systemitem>-bit >+ subnet mask 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>To do almost the same thing, but use an interfaces that has >+ been named <literal>video</literal> use this command:</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 do the last confguration 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>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 228231
: 193375