From 020029ea5bac1aa1266db45c56d28c2b163788a0 Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Sun, 14 Aug 2016 16:06:03 +0000 Subject: [PATCH] Add a section on how to configure VLANs. --- .../handbook/advanced-networking/chapter.xml | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.xml b/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.xml index f9b312009b..b455c61708 100644 --- a/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.xml +++ b/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.xml @@ -50,6 +50,11 @@ Address Redundancy Protocol (CARP) in &os;. + + + How to configure multiple VLANs on + &os;. + Before reading this chapter, you should: @@ -5201,4 +5206,56 @@ ifconfig_carp1="vhid 2 advskew 100 + + + VLANs + + + + VLANs + + + Virtual LANs + + + VLANs 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 + VLANs. + + On &os;, VLANs must be supported by the network + card driver. To see which drivers support vlans, refer to the + &man.vlan.4; manual page. + + When configuring a VLAN, a couple pieces of + information must be known. First, which network interface? Second, + what is the VLAN tag? + + To configure VLANs at run time, with a + NIC of em0 and a + VLAN tag of 5. The command + would look like this: + + &prompt.root; ifconfig em0.5 create vlan 5 vlandev em0 inet 192.168.20.20/24 + + + 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. + + + To configure VLANs at boot time, + /etc/rc.conf must be updated. To duplicate the + configuration above, the following will need to be added: + + vlans_em0="5" +vlans_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. +