From patchwork Fri Nov 8 22:58:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 889 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director10.mail.ord1d.rsapps.net ([172.27.255.54]) by backend30.mail.ord1d.rsapps.net with LMTP id SH32KjeOxl3yMAAAIUCqbw for ; Sat, 09 Nov 2019 05:00:23 -0500 Received: from proxy14.mail.iad3a.rsapps.net ([172.27.255.54]) by director10.mail.ord1d.rsapps.net with LMTP id 6EOmKDeOxl1lJgAApN4f7A ; Sat, 09 Nov 2019 05:00:23 -0500 Received: from smtp25.gate.iad3a ([172.27.255.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy14.mail.iad3a.rsapps.net with LMTP id 6EuZIzeOxl0AUQAA1+b4IQ ; Sat, 09 Nov 2019 05:00:23 -0500 X-Spam-Threshold: 95 X-Spam-Score: 0 X-Spam-Flag: NO X-Virus-Scanned: OK X-Orig-To: openvpnslackdevel@openvpn.net X-Originating-Ip: [216.105.38.7] Authentication-Results: smtp25.gate.iad3a.rsapps.net; iprev=pass policy.iprev="216.105.38.7"; spf=pass smtp.mailfrom="openvpn-devel-bounces@lists.sourceforge.net" smtp.helo="lists.sourceforge.net"; dkim=fail (signature verification failed) header.d=sourceforge.net; dkim=fail (signature verification failed) header.d=sf.net; dmarc=none (p=nil; dis=none) header.from=unstable.cc X-Suspicious-Flag: YES X-Classification-ID: be948f48-02d7-11ea-8400-52540086a678-1-1 Received: from [216.105.38.7] ([216.105.38.7:35158] helo=lists.sourceforge.net) by smtp25.gate.iad3a.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 26/7B-27388-73E86CD5; Sat, 09 Nov 2019 05:00:23 -0500 Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1iTNWV-0004fI-8L; Sat, 09 Nov 2019 09:59:15 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1iTNWT-0004fA-MI for openvpn-devel@lists.sourceforge.net; Sat, 09 Nov 2019 09:59:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=s8sSxxmzQPllVp/Eo5yyKx3yX7BcgKm0RNwIY2j5b/8=; b=hl7zHhlALQiDk+nD1B9rof+7q/ QBrgOHJDfZKYC6LLge3yPdzRMdI+5zW8RpE0jroRjbqlB8WNmxfrS9d/7W0QHwg6cRP0Koa7hIc8i P9se4c3aF3Sc6eEhzuouQxPxuipaGt12JDnWZogFfG21pTfBiZ3KrV0Y8t6ZKhOG7uHw=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=s8sSxxmzQPllVp/Eo5yyKx3yX7BcgKm0RNwIY2j5b/8=; b=fQDKly7cVwA+lRVcPhIxy7FlnN 51bx2lALpUQj909dRjr/vJdtAafP+989czoOMNR6R2c2SYJva8N+iB1vjQYWLggcq2GFetlOiUUVa LptL+gX5wCjpdxEffK5Hy1XsJQu3taMROBlXdWBog+6mXxR7iEVIXFn9WRsAKHkzVwCY=; Received: from [5.148.176.60] (helo=s2.neomailbox.net) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1iTNWQ-00AwQw-P7 for openvpn-devel@lists.sourceforge.net; Sat, 09 Nov 2019 09:59:13 +0000 From: Antonio Quartulli To: openvpn-devel@lists.sourceforge.net Date: Sat, 9 Nov 2019 10:58:36 +0100 Message-Id: <20191109095836.11190-1-a@unstable.cc> In-Reply-To: <20191108091044.11370-1-a@unstable.cc> References: <20191108091044.11370-1-a@unstable.cc> MIME-Version: 1.0 X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [5.148.176.60 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 RDNS_NONE Delivered to internal network by a host with no rDNS -0.5 AWL AWL: Adjusted score from AWL reputation of From: address X-Headers-End: 1iTNWQ-00AwQw-P7 Subject: [Openvpn-devel] [PATCH v3 8/9] VLAN: add documentation to manpage X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Antonio Quartulli Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox This patch adds documentation for all the VLAN related knobs. Signed-off-by: Fabian Knittel Signed-off-by: Antonio Quartulli Acked-by: Gert Doering --- Changes from v1: - slight rewording of some sentences, as suggested by Arne Changes from v2: - slight rewording of some sentences, as suggested by Gert doc/openvpn.8 | 100 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 99 insertions(+), 1 deletion(-) diff --git a/doc/openvpn.8 b/doc/openvpn.8 index 11daa92a..f58a3ccc 100644 --- a/doc/openvpn.8 +++ b/doc/openvpn.8 @@ -3440,7 +3440,8 @@ without needing to restart the server. The following options are legal in a client\-specific context: -.B \-\-push, \-\-push\-reset, \-\-push\-remove, \-\-iroute, \-\-ifconfig\-push, +.B \-\-push, \-\-push\-reset, \-\-push\-remove, \-\-iroute, +.B \-\-ifconfig\-push, \-\-vlan\-pvid and .B \-\-config. .\"********************************************************* @@ -3908,6 +3909,103 @@ connection is torn down. Not implemented on Windows. .\"********************************************************* +.TP +.B \-\-vlan\-tagging +Server-only option. Turns the OpenVPN server instance into a switch that +understands VLAN\-tagging, based on IEEE 802.1Q. + +The server TAP device and each of the connecting clients is seen as a port of the +switch. All client ports are in untagged mode and the server TAP device is +VLAN-tagged, untagged or accepts both, depending on the +.B \-\-vlan\-accept setting. + +Ethernet frames with a prepended 802.1Q tag are called "tagged". If the VLAN +Identifier (VID) field in such a tag is non-zero, the frame is called +"VLAN\-tagged". If the VID is zero, but the Priority Control Point (PCP) field +is non\-zero, the frame is called "prio\-tagged". If there is no 802.1Q tag, the +frame is "untagged". + +Using the +.B \-\-vlan\-pvid v +option once per client (see \-\-client\-config\-dir), each port can be associated +with a certain VID. Packets +can only be forwarded between ports having the same VID. Therefore, clients +with differing VIDs are completely separated from one\-another, even if +.B \-\-client\-to\-client +is activated. + +The packet filtering takes place in the OpenVPN server. Clients should not +have any VLAN tagging configuration applied. + +The +.B \-\-vlan\-tagging +option is off by default. While turned off, OpenVPN +accepts any Ethernet frame and does not perform any special processing +for VLAN\-tagged packets. + +The option can only be activated in +.B \-\-dev tap mode. + +.\"********************************************************* +.TP +.B \-\-vlan\-accept all | tagged | untagged +Configure the VLAN tagging policy for the server TAP device. The following modes +are available: + +.B tagged +\-\- Admit only VLAN\-tagged frames. +Only VLAN\-tagged packets are accepted, while untagged or priority\-tagged +packets are dropped when entering the server TAP device. + +.br +.B untagged +\-\- Admit only untagged and prio\-tagged frames. +.br +VLAN\-tagged packets are not accepted, while untagged or priority\-tagged +packets entering the server TAP device are tagged with the value configured +for the global +.B \-\-vlan\-pvid +setting. +.br +.B all +(default) \-\- Admit all frames. +.br +All packets are admitted and then treated like untagged or tagged mode +respectively. + +(Note: Some vendors refer to switch ports running in +.B tagged +mode as "trunk ports" and switch ports running in +.B untagged +mode as "access ports".) + +Packets forwarded from clients to the server are VLAN\-tagged +with the originating client's PVID, unless the VID matches the +global \-\-vlan\-pvid, in which case the tag is removed. + +If no PVID is configured for a given client (see \-\-vlan\-pvid) packets +are tagged with 1 by default. +.\"********************************************************* +.TP +.B \-\-vlan\-pvid v +Specifies which VLAN identifier a "port" is associated with. Only valid when +\fB\-\-vlan\-tagging\fR is speficied. + +In the client context, the setting specifies which VLAN ID a client is +associated with. In the global context, the VLAN ID of the server TAP device is set. +The latter only makes sense for +.B \-\-vlan\-accept untagged +and +.B \-\-vlan\-accept all +modes. + +Valid values for +.B v +go from 1 through to 4094. The global value defaults to 1. If no \-\-vlan\-pvid +is specified in the client context, the global value is inherited. + +In some switch implementations, the PVID is also referred to as "Native VLAN". +.\"********************************************************* .SS Client Mode Use client mode when connecting to an OpenVPN server which has