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
[-- Attachment #1 --] On Mon, Aug 14, 2023 at 2:40 PM 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="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="-tso -lro -txcsum -rxcsum up" > cloned_interfaces="bridge0 tap0 tap1 tap2 tap3" > ifconfig_bridge0_name="em1bridge" > ifconfig_em1bridge="addm em1 addm tap0 addm tap1 addm tap2 addm tap3 up" > ifconfig_em1bridge_alias0="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? Each > 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. -- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-) [How to ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html] [-- Attachment #2 --] <div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Aug 14, 2023 at 2:40 PM Patrick M. Hausen <<a href="mailto:hausen@punkt.de">hausen@punkt.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi all,<br> <br> this:<br> <br> > Am 14.08.2023 um 13:32 schrieb Odhiambo Washington <<a href="mailto:odhiambo@gmail.com" target="_blank">odhiambo@gmail.com</a>>:<br> > em1 is NOT a bridge member. It's the host's interface that is connected to the Internet.<br> <br> and this:<br> <br> > ifconfig_em1bridge="addm em1 addm tap0 addm tap1 addm tap2 addm tap3 up"<br> > [...]<br> > 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 there.</div><div> </div><blockquote class="gmail_quote" style="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></blockquote><div><br></div><div>I don't quite agree with that. em1 is the host's interface - the one that connects to the router.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> Like so:<br> <br> ifconfig_em1="-tso -lro -txcsum -rxcsum up"<br> cloned_interfaces="bridge0 tap0 tap1 tap2 tap3"<br> ifconfig_bridge0_name="em1bridge"<br> ifconfig_em1bridge="addm em1 addm tap0 addm tap1 addm tap2 addm tap3 up"<br> ifconfig_em1bridge_alias0="inet w.x.y.z netmask 255.255.255.0"<br> <br> Again: a bridge member interface must not have an IP address. Which directly leads to<br> your last question:<br></blockquote><div><br></div><div>My host has two NICs, em0 and em1.</div><div>em0 isn't in use at all.</div><div>em1 is the main interface to the Internet, with a public IP.</div><div>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.</div><div>The host is in a Data Centre.</div><div>I hope this clarifies it :)</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> > 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? Each with it's own IP in that range?<br> <br> You do need one tap interface per VM but these are just "virtual ethernet cables" plugged into<br> a "virtual switch" (em1bridge). So they need not and *must* not 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 connected to em1, of course.<br></blockquote><div><br></div><div>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?</div><div>Because my host has a single IP address assigned by my ISP. I don't have any other addresses other than private ones.</div></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div dir="ltr"><div>Best regards,<br>Odhiambo WASHINGTON,<br>Nairobi,KE<br>+254 7 3200 0004/+254 7 2274 3223<br>"<span style="font-size:12.8px">Oh, the cruft.</span><span style="font-size:12.8px">", </span><span style="font-size:12.8px">egrep -v '^$|^.*#' </span><span style="background-color:rgb(34,34,34);color:rgb(238,238,238);font-family:"Lucida Console",Consolas,"Courier New",monospace;font-size:13.6px">¯\_(ツ)_/¯</span><span style="font-size:12.8px"> :-)</span></div><div><span style="font-size:12.8px">[How to ask smart questions: </span><span style="font-size:12.8px"><a href="http://www.catb.org/~esr/faqs/smart-questions.html" target="_blank">http://www.catb.org/~esr/faqs/smart-questions.html</a>]</span></div></div></div></div></div>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAAdA2WMp=pDOH0RjPq1q2mNTQmGOhrMA4g8Tkn=%2B9HCWJs3oRw>
