From owner-svn-doc-all@freebsd.org Sun Aug 14 16:06:04 2016 Return-Path: Delivered-To: svn-doc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B8D9BB9632; Sun, 14 Aug 2016 16:06:04 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 235881F96; Sun, 14 Aug 2016 16:06:04 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7EG633r080176; Sun, 14 Aug 2016 16:06:03 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7EG63tN080175; Sun, 14 Aug 2016 16:06:03 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201608141606.u7EG63tN080175@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Sun, 14 Aug 2016 16:06:03 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r49279 - head/en_US.ISO8859-1/books/handbook/advanced-networking X-SVN-Group: doc-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire doc trees \(except for " user" , " projects" , and " translations" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Aug 2016 16:06:04 -0000 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 (CARP) in &os;. + + + How to configure multiple VLANs on + &os;. + Before reading this chapter, you should: @@ -5201,4 +5206,56 @@ ifconfig_carp1="vhid 2 + + + 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. +