From owner-freebsd-virtualization@freebsd.org Wed Feb 15 07:03:24 2017 Return-Path: Delivered-To: freebsd-virtualization@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 7E22BCDF108 for ; Wed, 15 Feb 2017 07:03:24 +0000 (UTC) (envelope-from stephen.stuart@gmail.com) Received: from mail-qt0-x235.google.com (mail-qt0-x235.google.com [IPv6:2607:f8b0:400d:c0d::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 34ED3EB7 for ; Wed, 15 Feb 2017 07:03:24 +0000 (UTC) (envelope-from stephen.stuart@gmail.com) Received: by mail-qt0-x235.google.com with SMTP id v23so130261694qtb.0 for ; Tue, 14 Feb 2017 23:03:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=W/APGrcsMQr09mhitJrDJKVpQNH9GO/t2ny+l9gmMHs=; b=lze/ADoDeUnLqU1JmF2faEngZ213tjc9tNJbCBZNnNEokYau5SZC4Qx/DLHWrh7scG IWPae7e/3QZr8EIzYEvnqHkObWIRZqpXQ41ivWW6VGxomV3O7YnYwNbSXElyQT5a93Jk pmTo2w9l45cYAk4azgwG7TCh0xltuCVId0uO/wQ/N5jN2uvJzPDrBplx+RIzZIJZZsC+ 0rk/qN/bHIOtVA4JMnpkdgwYduea1IdoE5mrcgW/esT8VquofbrF5av6naz3xDGZ5X2s bgQID8kqT/u5UQIzgq5/hhFUiF2izA1pLpWSXkgr8wWtjlZEZKHgE8ReDDHToNnQeNKh cmkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=W/APGrcsMQr09mhitJrDJKVpQNH9GO/t2ny+l9gmMHs=; b=pgoA+mvM6l+MukxsVcU8ZR9PVEw8Amf7WV7H/HMPqW70wqAwacY26b0Woom/OqHgG9 tXMpD2US+AZzif4SSU31oyV+0ijWLTmFMbA/GdTlaUDhmLwQds3shRUVZKql/4Nyhl9I t4qkguDLrALVk+pESwOn2uwfJu3sEl1LdWIh5XDx0X//+lTnuNnvO4mYAzli7NdJiiD3 P6G9mli9/ogQt5dqL5ZpsxsHAXX8CPbbw4TONFgKIXMtJMSYY9Y8I13sRl6wFpQqRR02 Wq2lBudMiD8vcGouqgxYFzftke8RqifJ8kzLFsw21wJgc/gfB70Lj6NUj0g+ec4w7+QJ AeDw== X-Gm-Message-State: AMke39lt88+u7Led8DFohRCzkozaplJ+VTa0jer/ygdVeju+/j9IaMO5DfLgyQx+YlTLEjkjBl1uMwLjwnVgVw== X-Received: by 10.237.42.108 with SMTP id k41mr29447248qtf.81.1487142203305; Tue, 14 Feb 2017 23:03:23 -0800 (PST) MIME-Version: 1.0 Received: by 10.237.60.146 with HTTP; Tue, 14 Feb 2017 23:03:22 -0800 (PST) Received: by 10.237.60.146 with HTTP; Tue, 14 Feb 2017 23:03:22 -0800 (PST) In-Reply-To: References: <20170213120938.hr3zu7flnm33v3zn@scotland.uxdom.org> <58A1A8A3.3030603@quip.cz> <8700dd14-cf15-20b9-38a6-e4181e4928ee@dann.ro> <20170214115708.pcw2poookycue3kk@scotland.uxdom.org> <58A2F845.5090603@quip.cz> <20170214132649.h3xwbcfrtjxk74si@scotland.uxdom.org> <20170214134158.vmczv6pramkscxhd@scotland.uxdom.org> From: Stephen Stuart Date: Tue, 14 Feb 2017 23:03:22 -0800 Message-ID: Subject: Re: tap interfaces disappears after bhyve guests shutdowns To: "C. L. Martinez" Cc: freebsd-virtualization@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.23 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: Wed, 15 Feb 2017 07:03:24 -0000 On Feb 14, 2017 05:42, "C. L. Martinez" wrote: On Tue, Feb 14, 2017 at 01:26:49PM +0000, C. L. Martinez wrote: > On Tue, Feb 14, 2017 at 01:29:57PM +0100, Miroslav Lachman wrote: > > C. L. Martinez wrote on 2017/02/14 12:57: > > > On Mon, Feb 13, 2017 at 02:02:48PM +0100, Daniel Niculescu wrote: > > > > > > > > Thanks Daniel. I have tried what you say, but ping doesn't works between host and guest. If I put an ip to the bridge works ok, but not when I assign an ip to tap interface. > > > > > > Any idea why?? > > > > Are you using IPs from the same subnet on host and in a guests? What IP did > > you assign to tap / bridge? > > > > Miroslav Lachman > > Yes. For host: 172.22.55.1/24 and for guest 172.22.55.29/24. When I assign IP 172.22.55.1 to the bridge on host side, host and guest can communicate. But when I assign 172.22.55.1 to a tap interface on the host and create a bridge with host's tap interface and guest's tap interface, there is no comms between them ... And I don't understand why ... > > > -- > Greetings, > C. L. Martinez Ok, I think I have found the problem (but not the solution :( ) ... prodif: flags=3D8843 metric 0 mtu 1= 500 ether 02:bc:f9:66:98:01 nd6 options=3D9 groups: bridge id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200 root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0 member: tap11 flags=3D143 ifmaxaddr 0 port 7 priority 128 path cost 2000000 member: tap10 flags=3D143 ifmaxaddr 0 port 6 priority 128 path cost 2000000 pubif: flags=3D8843 metric 0 mtu 15= 00 ether 02:bc:f9:66:98:02 nd6 options=3D9 groups: bridge id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200 root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0 member: tap21 flags=3D143 ifmaxaddr 0 port 9 priority 128 path cost 2000000 member: tap20 flags=3D143 ifmaxaddr 0 port 8 priority 128 path cost 2000000 tap10: flags=3D8943 metric = 0 mtu 1500 options=3D80000 ether 00:bd:1d:15:f7:0a nd6 options=3D29 media: Ethernet autoselect status: active groups: tap Opened by PID 79946 tap11: flags=3D8943 metric = 0 mtu 1500 options=3D80000 ether 00:bd:24:15:f7:0b inet 172.22.55.1 netmask 0xffffffe0 broadcast 172.22.55.31 nd6 options=3D29 media: Ethernet autoselect status: no carrier groups: tap tap20: flags=3D8943 metric = 0 mtu 1500 options=3D80000 ether 00:bd:2b:15:f7:14 nd6 options=3D29 media: Ethernet autoselect status: active groups: tap Opened by PID 79946 tap21: flags=3D8943 metric = 0 mtu 1500 options=3D80000 ether 00:bd:31:15:f7:15 inet 172.30.77.1 netmask 0xfffffff8 broadcast 172.30.77.7 nd6 options=3D29 media: Ethernet autoselect status: no carrier groups: tap .. As you can see with tap21 and tap11 (tap interfaces assigned to host) status is: no carrier ... =C2=BF=C2=BF=C2=BF=C2=BF=C2=BF???? Why?? Both are= assigned to bridges ... Those tap interfaces have no carrier because they have not been opened by a guest VM and paired with a vtnet interface. A tap interface is how the vtnet interface inside the guest VM shows up on the host side. No guest VM, no tap. If you want the host to be able to exchange IP packets with the guest VM locally, the bridge (on the host) and vtnet interface (in the guest VM) need to be numbered in the same prefix. The tap interfaces don't get IP address assignments, the corresponding vtnet interfaces inside the VMs do. Stephen