From owner-svn-doc-all@freebsd.org Sun Jun 10 18:31:36 2018 Return-Path: Delivered-To: svn-doc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 950A3101041D; Sun, 10 Jun 2018 18:31:36 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49F4D70264; Sun, 10 Jun 2018 18:31:36 +0000 (UTC) (envelope-from sevan@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2B15810819; Sun, 10 Jun 2018 18:31:36 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5AIVaMh076527; Sun, 10 Jun 2018 18:31:36 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5AIVaDK076526; Sun, 10 Jun 2018 18:31:36 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201806101831.w5AIVaDK076526@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Sun, 10 Jun 2018 18:31:36 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r51813 - head/en_US.ISO8859-1/books/handbook/advanced-networking X-SVN-Group: doc-head X-SVN-Commit-Author: sevan X-SVN-Commit-Paths: head/en_US.ISO8859-1/books/handbook/advanced-networking X-SVN-Commit-Revision: 51813 X-SVN-Commit-Repository: doc 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.26 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, 10 Jun 2018 18:31:36 -0000 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 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 2 advs 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 + a network into many different subnetworks, also referred + to as segmenting. Each segment will have its + own broadcast domain and be isolated from other VLANs. On &os;, VLANs must be supported by the @@ -5239,7 +5240,7 @@ ifconfig_carp1="vhid 2 advs To configure VLANs at run time, with a NIC of em0 and a - VLAN tag of 5. The + 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 @@ -5266,5 +5267,38 @@ ifconfig_em0_5 vlans_em0 field and adding an additional line configuring the network on that VLAN tag's interface. + + 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 + em0. Later, if the em0 + card is replaced with a card that uses the &man.ixgb.4; driver, + all references to em0.1 will not have to + change to ixgb0.1. + + To configure VLAN + 5, on the + NIC em0, assign the + interface name cameras, and assign the + interface an IP address of 192.168.20.20 + with a 24-bit prefix, + use this command: + + &prompt.root; ifconfig em0.5 create vlan 5 vlandev em0 name cameras inet 192.168.20.20/24 + + For an interface named video, use the + following: + + &prompt.root; ifconfig video.5 create vlan 5 vlandev video name cameras inet 192.168.20.20/24 + + To apply the changes at boot time, add the following lines to + /etc/rc.conf: + + vlans_video="camera" +create_args_camera="vlan 5" +ifconfig_camera="inet 192.168.20.20/24" +