Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Aug 2023 14:50:23 +0300
From:      Odhiambo Washington <odhiambo@gmail.com>
To:        "Patrick M. Hausen" <hausen@punkt.de>
Cc:        freebsd-virtualization@freebsd.org
Subject:   Re: bhyve VM not getting as much upload bandwidth as the host
Message-ID:  <CAAdA2WMp=pDOH0RjPq1q2mNTQmGOhrMA4g8Tkn=%2B9HCWJs3oRw@mail.gmail.com>
In-Reply-To: <6012E30F-056B-4E80-9FC8-1A937BBDC29D@punkt.de>
References:  <CAAdA2WN6FTT=Bn-p3EEGDk_-8=g_PoFicUb%2Be-ybcpKxjY5bwQ@mail.gmail.com> <096b2d73-b28c-bd6b-a6d3-2a3c3dbaea7e@h4ck.io> <CAAdA2WM8Qrro-md-Rg%2BXfj5BxNrP_A8chD6TGrxQD2G14oC86g@mail.gmail.com> <38587cf9-29a7-1246-3b64-a3cf35933717@quip.cz> <96160FBF-4E48-48E3-B26C-026CEB5B03C2@punkt.de> <CAAdA2WO0mNK0mSz--=XBNLK4q=d1Ubh%2B0bh5HbUVMbbSA1gbOQ@mail.gmail.com> <6012E30F-056B-4E80-9FC8-1A937BBDC29D@punkt.de>

next in thread | previous in thread | raw e-mail | index | archive | help
--0000000000000ddcd80602e0ad93
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Mon, Aug 14, 2023 at 2:40=E2=80=AFPM Patrick M. Hausen <hausen@punkt.de>=
 wrote:

> Hi all,
>
> this:
>
> > Am 14.08.2023 um 13:32 schrieb Odhiambo Washington <odhiambo@gmail.com>=
:
> > em1 is NOT a bridge member. It's the host's interface that is connected
> to the Internet.
>
> and this:
>
> > ifconfig_em1bridge=3D"addm em1 addm tap0 addm tap1 addm tap2 addm tap3 =
up"
> > [...]
> > Of course, because em1 is a bridge member, no?
>
>
> contradict each other. em1 seems indeed to be the physical member
> interface of your
> bridge.


You are right. I got confused there.


> In that case you must move the IP address from em1 to em1bridge.
>

I don't quite agree with that. em1 is the host's interface - the one that
connects to the router.



> Like so:
>
> ifconfig_em1=3D"-tso -lro -txcsum -rxcsum up"
> cloned_interfaces=3D"bridge0 tap0 tap1 tap2 tap3"
> ifconfig_bridge0_name=3D"em1bridge"
> ifconfig_em1bridge=3D"addm em1 addm tap0 addm tap1 addm tap2 addm tap3 up=
"
> ifconfig_em1bridge_alias0=3D"inet w.x.y.z netmask 255.255.255.0"
>
> Again: a bridge member interface must not have an IP address. Which
> directly leads to
> your last question:
>

My host has two NICs, em0 and em1.
em0 isn't in use at all.
em1 is the main interface to the Internet, with a public IP.
Making the change you suggest will simply make the server not connect to
the Internet. em1 has the public IP that I use to connect to the host from
where I am.
The host is in a Data Centre.
I hope this clarifies it :)


> >  One last question for today (although I should just go and RTFM): Do I
> really need several tap devices? Can't I just have all my VMs on tap0? Ea=
ch
> with it's own IP in that range?
>
> You do need one tap interface per VM but these are just "virtual ethernet
> cables" plugged into
> a "virtual switch" (em1bridge). So they need not and *must* not  have an
> IP address configured
> on the host side. Just create them and add them to the bridge.
>
> All IP configuration is done in the VM guest and should match the network
> connected to em1, of course.
>

So my configuration is right actually. I am giving IPs to the tapX devices
and using NAT to let the VMs access the Internet. Why?
Because my host has a single IP address assigned by my ISP. I don't have
any other addresses other than private ones.


--=20
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254 7 3200 0004/+254 7 2274 3223
"Oh, the cruft.", egrep -v '^$|^.*#' =C2=AF\_(=E3=83=84)_/=C2=AF :-)
[How to ask smart questions:
http://www.catb.org/~esr/faqs/smart-questions.html]

--0000000000000ddcd80602e0ad93
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">=
<div dir=3D"ltr" class=3D"gmail_attr">On Mon, Aug 14, 2023 at 2:40=E2=80=AF=
PM Patrick M. Hausen &lt;<a href=3D"mailto:hausen@punkt.de">hausen@punkt.de=
</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:=
0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">=
Hi all,<br>
<br>
this:<br>
<br>
&gt; Am 14.08.2023 um 13:32 schrieb Odhiambo Washington &lt;<a href=3D"mail=
to:odhiambo@gmail.com" target=3D"_blank">odhiambo@gmail.com</a>&gt;:<br>
&gt; em1 is NOT a bridge member. It&#39;s the host&#39;s interface that is =
connected to the Internet.<br>
<br>
and this:<br>
<br>
&gt; ifconfig_em1bridge=3D&quot;addm em1 addm tap0 addm tap1 addm tap2 addm=
 tap3 up&quot;<br>
&gt; [...]<br>
&gt; Of course, because em1 is a bridge member, no?<br>
<br>
<br>
contradict each other. em1 seems indeed to be the physical member interface=
 of your<br>
bridge. </blockquote><div><br></div><div>You are right. I got confused ther=
e.</div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:=
0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">=
In that case you must move the IP address from em1 to em1bridge.<br></block=
quote><div><br></div><div>I don&#39;t quite agree with that. em1 is the hos=
t&#39;s interface - the one that connects to the router.</div><div><br></di=
v><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0p=
x 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Like so:<br>
<br>
ifconfig_em1=3D&quot;-tso -lro -txcsum -rxcsum up&quot;<br>
cloned_interfaces=3D&quot;bridge0 tap0 tap1 tap2 tap3&quot;<br>
ifconfig_bridge0_name=3D&quot;em1bridge&quot;<br>
ifconfig_em1bridge=3D&quot;addm em1 addm tap0 addm tap1 addm tap2 addm tap3=
 up&quot;<br>
ifconfig_em1bridge_alias0=3D&quot;inet w.x.y.z netmask 255.255.255.0&quot;<=
br>
<br>
Again: a bridge member interface must not have an IP address. Which directl=
y leads to<br>
your last question:<br></blockquote><div><br></div><div>My host has two NIC=
s, em0 and em1.</div><div>em0 isn&#39;t in use at all.</div><div>em1 is the=
 main interface to the Internet, with a public IP.</div><div>Making the cha=
nge you suggest will simply make the server not connect to the Internet. em=
1 has the public IP that I use to connect to the host from where I am.</div=
><div>The host is in a Data Centre.</div><div>I hope this clarifies it :)</=
div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0px =
0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
&gt;=C2=A0 One last question for today (although I should just go and RTFM)=
: Do I really need several tap devices? Can&#39;t I just have all my VMs on=
 tap0? Each with it&#39;s own IP in that range?<br>
<br>
You do need one tap interface per VM but these are just &quot;virtual ether=
net cables&quot; plugged into<br>
a &quot;virtual switch&quot; (em1bridge). So they need not and *must* not=
=C2=A0 have an IP address configured<br>
on the host side. Just create them and add them to the bridge.<br>
<br>
All IP configuration is done in the VM guest and should match the network c=
onnected to em1, of course.<br></blockquote><div><br></div><div>So my confi=
guration is right actually. I am giving IPs to the tapX devices and using N=
AT to let the VMs access the Internet. Why?</div><div>Because my host has a=
 single=C2=A0IP address assigned by my ISP. I don&#39;t have any other addr=
esses other than private ones.</div></div><br clear=3D"all"><div><br></div>=
<span class=3D"gmail_signature_prefix">-- </span><br><div dir=3D"ltr" class=
=3D"gmail_signature"><div dir=3D"ltr"><div dir=3D"ltr"><div>Best regards,<b=
r>Odhiambo WASHINGTON,<br>Nairobi,KE<br>+254 7 3200 0004/+254 7 2274 3223<b=
r>&quot;<span style=3D"font-size:12.8px">Oh, the cruft.</span><span style=
=3D"font-size:12.8px">&quot;,=C2=A0</span><span style=3D"font-size:12.8px">=
egrep -v &#39;^$|^.*#&#39;=C2=A0</span><span style=3D"background-color:rgb(=
34,34,34);color:rgb(238,238,238);font-family:&quot;Lucida Console&quot;,Con=
solas,&quot;Courier New&quot;,monospace;font-size:13.6px">=C2=AF\_(=E3=83=
=84)_/=C2=AF</span><span style=3D"font-size:12.8px">=C2=A0:-)</span></div><=
div><span style=3D"font-size:12.8px">[How to ask smart questions:=C2=A0</sp=
an><span style=3D"font-size:12.8px"><a href=3D"http://www.catb.org/~esr/faq=
s/smart-questions.html" target=3D"_blank">http://www.catb.org/~esr/faqs/sma=
rt-questions.html</a>]</span></div></div></div></div></div>

--0000000000000ddcd80602e0ad93--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAAdA2WMp=pDOH0RjPq1q2mNTQmGOhrMA4g8Tkn=%2B9HCWJs3oRw>