From owner-freebsd-virtualization@freebsd.org Mon Mar 25 12:31:00 2019 Return-Path: Delivered-To: freebsd-virtualization@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 52E53155F504 for ; Mon, 25 Mar 2019 12:31:00 +0000 (UTC) (envelope-from Mathias.Picker@virtual-earth.de) Received: from www94.your-server.de (www94.your-server.de [IPv6:2a01:4f8:d0a:27ae::2]) (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 641E468523 for ; Mon, 25 Mar 2019 12:30:56 +0000 (UTC) (envelope-from Mathias.Picker@virtual-earth.de) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtual-earth.de; s=default_1811; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=r2lk6t2njHdMcrel9aSr9VKb089dxOyiRXXofWJKRQo=; b=OtVQUhqq4AuGp/66cXNMM/+vQm +nhnDsUh30Tqj2U2WSXroQ1YixWpCWrBZtf3GQRFnogrdH4SnXpMFw20iO630LVDYCooZJw0k0/rr 5wo/uudRKhFi8Xpav+hZmNyE2w0TWKRKTdNSNsAT/ba+m6Zhs7RUpDkzb58tg7NLp7XeeftDRlYRP Kht3J9wabtKQgs+ERTnZtf8GBNfYvJ8qzZ5uyuDPXWwxnQ7x6UiA9gfOFKDICDo3ZiBdptLmHepsJ rU0TL/3UGJurtJbtY5ET56byoMUhXGcQcsxmqqx3EqrYRADDpUX/n+QHRv8DNNMQS15upI0i4FVwg TSJyIwSA==; Received: from [88.198.220.132] (helo=sslproxy03.your-server.de) by www94.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1h8OkZ-000491-2q for freebsd-virtualization@freebsd.org; Mon, 25 Mar 2019 13:30:47 +0100 Received: from [95.118.66.125] (helo=marcopolo.virtual-earth.de) by sslproxy03.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1h8OkY-0005vh-Os for freebsd-virtualization@freebsd.org; Mon, 25 Mar 2019 13:30:46 +0100 User-agent: mu4e 1.0; emacs 26.1 From: Mathias Picker To: "freebsd-virtualization\@freebsd.org" Subject: vm-bhyve, routing a subnet behind the main ip, is this a good / "correct" solution? Date: Mon, 25 Mar 2019 13:30:46 +0100 Message-ID: <86sgvbdtl5.fsf@virtual-earth.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Authenticated-Sender: Mathias.Picker@virtual-earth.de X-Virus-Scanned: Clear (ClamAV 0.100.2/25399/Mon Mar 25 08:46:48 2019) X-Rspamd-Queue-Id: 641E468523 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=virtual-earth.de header.s=default_1811 header.b=OtVQUhqq; dmarc=pass (policy=none) header.from=virtual-earth.de; spf=softfail (mx1.freebsd.org: 2a01:4f8:d0a:27ae::2 is neither permitted nor denied by domain of Mathias.Picker@virtual-earth.de) smtp.mailfrom=Mathias.Picker@virtual-earth.de X-Spamd-Result: default: False [-3.54 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[virtual-earth.de:+]; DMARC_POLICY_ALLOW(0.00)[virtual-earth.de,none]; MX_GOOD(-0.01)[mail.virtual-earth.de]; DMARC_POLICY_ALLOW_WITH_FAILURES(-0.50)[]; NEURAL_HAM_SHORT(-0.90)[-0.896,0]; RECEIVED_SPAMHAUS_PBL(0.00)[125.66.118.95.zen.spamhaus.org : 127.0.0.10]; IP_SCORE(-0.83)[ipnet: 2a01:4f8::/29(-2.12), asn: 24940(-2.03), country: DE(-0.01)]; SUBJECT_ENDS_QUESTION(1.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; MID_RHS_MATCH_FROM(0.00)[]; HAS_X_AS(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[virtual-earth.de:s=default_1811]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; RCPT_COUNT_ONE(0.00)[1]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2019 12:31:00 -0000 Hi all, this is the first time I tried to use bhyve. This is 12.0-RELEASEp3 and vm-bhyve 1.2.3. My hosting provider hetzner.de is giving out subnets which are=20 routed through the main ip of the server, so if my main IP is xxx.xxx.xxx.63 the subnet yyy.yyy.yyy.224/28=20 is routed as if it was "behind" the main ip xxx.xxx.xxx.xxx. I first didn't know that and tried the solution mentioned in the=20 vm-bhyve wiki, usiing a bridge and adding the network card (em0)=20 to it, which didn't work. Since I never used byhve I wasn't to sure where the error was, but=20 after asking Hetzners support and getting info about their setup I=20 guessed it was the bridge. So I just removed the interface from the bridge and added the=20 subnet to it. This seems to work, even without adding a static route, netstat -r=20 gives yyy.yyy.yyy.224/28 link#3 U vm-public after a reboot (vm-public is the name of the bridge), and now the=20 bhyve VMs have network connection. I'm still a bit puzzled if using a "bridge" this way is a good=20 configuration. And why do I not need a gateway address? Yeah, my IP knowledge is=20 a bit thin ;) Thanks for any comments, Mathias --=20 Mathias Picker=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 Gesch=C3=A4ftsf=C3=BChrer Mathias.Picker@virtual-earth.de virtual earth Gesellschaft f=C3=BCr Wissens re/pr=C3=A4 sentation mbH http://www.virtual-earth.de/ HRB126870 support@virtual-earth.de Westendstr. 142 089 / 1250 3943=20=20=20=20=20=20=20=20=20=20=20=20