From owner-freebsd-net@freebsd.org Fri Apr 10 12:07:04 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0FF892BC6B9 for ; Fri, 10 Apr 2020 12:07:04 +0000 (UTC) (envelope-from paul@prt.org) Received: from smtp1.mail.clearhost.co.uk (smtp1.mail.clearhost.co.uk [IPv6:2001:1420::25:101]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.mail.clearhost.co.uk", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48zGw65JNNz3ygQ for ; Fri, 10 Apr 2020 12:07:02 +0000 (UTC) (envelope-from paul@prt.org) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=prt.org; s=dkim1; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version: Date:Message-ID:From:References:To:Subject:Sender:Reply-To:Cc: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=WYTSdR5QXNX0I2Tl9EyD+5OnwkbTTLSQT5cnBondNYc=; b=m8+V3/MTzYhcg8PTXLFGYWEeC1 ZbRgTLzkPwsFK3KB40gff4DgGhjxMAtc7gEgBMKmqzI8JQamXvziK+Ql8Y8A8wYH8kIA8INWJAXRR eQMbqRaJR9eQ9a2R3v27UA7JVAlweeTJBU6leB671Sr1XilXp5qzCqABwmlK+nSLO+UI=; Received: from [2001:1420:a:104:3a60:77ff:fec5:7509] (port=51621) by smtp1.mail.clearhost.co.uk with esmtpsa (TLSv1:ECDHE-RSA-AES128-SHA:128) (Exim 4.92) (envelope-from ) id 1jMsQv-0006BL-3l for freebsd-net@freebsd.org; Fri, 10 Apr 2020 12:06:53 +0000 Subject: Re: Netgraph VLANs on Hyper-V To: freebsd-net@freebsd.org References: From: Paul Thornton Message-ID: <9bef042b-3697-325f-a98b-07f3c6a768f5@prt.org> Date: Fri, 10 Apr 2020 13:09:00 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-ClearHost-AuthUser: paul@prt.org X-ClearHost-AuthDomain: prt.org X-Rspamd-Queue-Id: 48zGw65JNNz3ygQ X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=prt.org header.s=dkim1 header.b=m8+V3/MT; dmarc=none; spf=pass (mx1.freebsd.org: domain of paul@prt.org designates 2001:1420::25:101 as permitted sender) smtp.mailfrom=paul@prt.org X-Spamd-Result: default: False [-2.43 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[prt.org:s=dkim1]; NEURAL_HAM_MEDIUM(-0.92)[-0.917,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+a:smtp.mail.clearhost.co.uk]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[prt.org]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; DKIM_TRACE(0.00)[prt.org:+]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; IP_SCORE(-0.01)[country: GB(-0.07)]; ASN(0.00)[asn:8676, ipnet:2001:1420::/32, country:GB]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2020 12:07:04 -0000 Hi, I have recently been testing with jails, vnet and netgraph on ESXi - so not Hyper-V - but to make this work I needed to: ngctl msg vmx0: setpromisc 1 ngctl msg vmx0: setautosrc 0 outside of the jail when setting up netgraph (where vmx0 is the "real" NIC that the ng_vlans are part of). and then I had to set the mac address for the ngeth interface that was set to be put into the jail ifconfig ngeth0 ether 02:00:01:02:03:04 Once done, and the jail started, ngeth0 worked as expected. In ESXi, the portgroup that vmx0 is connected to allowed spoofing and promiscuous mode. Paul. On 10/04/2020 08:07, Reshad Patuck wrote: > Hi, > > I am trying to use ng_vlan on Hyper-V to deploy vnet jails. > The "Enable MAC address Spoofing" setting on the Hyper-V host is enabled. > However when I try to use ng_vlan I am not able to reach the jail. > If I change this to if_vlan instead everything works fine. > > Is there something that creating a VLAN using ifconfig does that ng_vlan > does not. > The same setup works well on VMware ESXi, Xen and KVM. > > I am not sure if this is relevant to my issue but the hn1 devices sysrc's > changes when I use different vlan methods: > > no vlan: > dev.hn.1.rxfilter: 9 > dev.hn.1.hwassist: 17 > > if_vlan: > dev.hn.1.rxfilter: 20 > dev.hn.1.hwassist: 17 > > ng_vlan: > dev.hn.1.rxfilter: 9 > dev.hn.1.hwassist: 0 > > All the other sysrc's either stay the same or seem to be counters. > I can provide you with scripts to setup vlans and jails with both if_vlan > and ng_vlan if that helps. > > Any help understanding what these sysrc's do, or on how I could get ng_vlan > to work would be very appreciated. > > Best, > > Reshad > _______________________________________________ > freebsd-net@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" -- Paul Thornton