[prev in list] [next in list] [prev in thread] [next in thread] 

List:       qemu-discuss
Subject:    Bridged network on macOS host (10.14.6 Mojave)
From:       Karim El Chenawi <chenawi () gmail ! com>
Date:       2019-10-28 21:13:30
Message-ID: C93945DE-C708-4585-9066-6793F6A88D1F () gmail ! com
[Download RAW message or body]

Hi,

Has anyone managed to get bridged networking to work under Mojave? I'm using \
tuntap_20150118 from http://tuntaposx.sourceforge.net \
<http://tuntaposx.sourceforge.net/> and qemu 4.1.0 from brew.

I have tried creating the bridge with:

ifconfig bridge1 create
ifconfig bridge1 addm en0 # en0 is my ethernet adapter on my mac mini connected to my \
local network ifconfig bridge1 up

I also tried creating the bridge through network preferences and added en0 to it.

I start Qemu with:

qemu-system-x86_64 -accel hvf -cpu host -m 512 -hda alpine.qcow2 -device \
e1000,netdev=network0 -netdev \
tap,id=network0,script=./scripts/tap-up,downscript=./scripts/tap-down

where

tap-up script is:
#!/bin/sh
#
TAPDEV="$1"
BRIDGEDEV="bridge1"
#
ifconfig $BRIDGEDEV addm $TAPDEV

tap-down is:
#!/bin/sh
#
TAPDEV="$1"
BRIDGEDEV="bridge1"
#
ifconfig $BRIDGEDEV deletem $TAPDEV

If I tcpdump on the tap interface I can see DHCP requests from the VM but no replies. \
If I tcpdump on the bridge interface I can see the DHCP requests and replies from the \
DHCP server (running on the same network on a FW). I don't see any checksum errors or \
anything else weird, but traffic on the tap interface only flows one way, from the \
VM.

I asked the folks over at https://www.emaculation.com <https://www.emaculation.com/> \
and they get bridging working with qemu-system-ppc but not with qemu-system-x86_64.

What am I doing wrong here? I can see in the forum that others have gotten bridged \
network to function, but with older versions of macOS. Do I need to do anything \
differently under Mojave?

Regards


[Attachment #3 (unknown)]

<html><head><meta http-equiv="Content-Type" content="text/html; \
charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: \
space; line-break: after-white-space;" class=""><div class=""><span \
style="font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 13px; \
background-color: rgb(255, 255, 255);" class="">Hi,</span></div><span \
style="font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 13px; \
background-color: rgb(255, 255, 255);" class=""><div class=""><span \
style="font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 13px; \
background-color: rgb(255, 255, 255);" class=""><br class=""></span></div>Has anyone \
managed to get bridged networking to work under Mojave? I'm using tuntap_20150118 \
from&nbsp;</span><a class="postlink" href="http://tuntaposx.sourceforge.net/" \
style="margin: 0px; padding: 0px; color: rgb(0, 87, 132); text-decoration: none; \
font-family: Verdana, Helvetica, Arial, sans-serif; font-size: \
13px;">http://tuntaposx.sourceforge.net</a><span style="font-family: Verdana, \
Helvetica, Arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255);" \
class="">&nbsp;and qemu 4.1.0 from brew.</span><div class=""><span \
style="font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 13px; \
background-color: rgb(255, 255, 255);" class=""><br class=""></span></div><div \
class=""><span style="font-family: Verdana, Helvetica, Arial, sans-serif; font-size: \
13px; background-color: rgb(255, 255, 255);" class="">I have tried creating the \
bridge with:</span></div><div class=""><span style="font-family: Verdana, Helvetica, \
Arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255);" \
class=""><br class=""></span></div><div class=""><span style="font-family: Verdana, \
Helvetica, Arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255);" \
class="">ifconfig bridge1 create</span><br style="margin: 0px; padding: 0px; \
font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 13px;" class=""><span \
style="font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 13px; \
background-color: rgb(255, 255, 255);" class="">ifconfig bridge1 addm en0 \
#&nbsp;</span><span style="font-family: Verdana, Helvetica, Arial, sans-serif; \
font-size: 13px; background-color: rgb(255, 255, 255);" class="">en0 is my ethernet \
adapter on my mac mini connected to my local network</span></div><div class=""><span \
style="font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 13px; \
background-color: rgb(255, 255, 255);" class="">ifconfig bridge1 up</span></div><div \
class=""><font face="Verdana" size="2" class=""><br class=""></font></div><div \
class=""><font face="Verdana" size="2" class="">I also tried creating the bridge \
through&nbsp;network preferences and added en0 to it.</font></div><div class=""><font \
face="Verdana" size="2" class=""><br class=""></font></div><div class=""><span \
style="font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 13px; \
background-color: rgb(255, 255, 255);" class="">I start Qemu with:</span><br \
style="margin: 0px; padding: 0px; font-family: Verdana, Helvetica, Arial, sans-serif; \
font-size: 13px;" class=""><br style="margin: 0px; padding: 0px; font-family: \
Verdana, Helvetica, Arial, sans-serif; font-size: 13px;" class=""><span \
style="font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 13px; \
background-color: rgb(255, 255, 255);" class="">qemu-system-x86_64 -accel hvf -cpu \
host -m 512 -hda alpine.qcow2 -device e1000,netdev=network0 -netdev \
tap,id=network0,script=./scripts/tap-up,downscript=./scripts/tap-down</span></div><div \
class=""><span style="font-family: Verdana, Helvetica, Arial, sans-serif; font-size: \
13px; background-color: rgb(255, 255, 255);" class=""><br class=""></span></div><div \
class=""><span style="font-family: Verdana, Helvetica, Arial, sans-serif; font-size: \
13px; background-color: rgb(255, 255, 255);" class="">where</span></div><div \
class=""><span style="font-family: Verdana, Helvetica, Arial, sans-serif; font-size: \
13px; background-color: rgb(255, 255, 255);" class=""><br class=""></span></div><div \
class=""><span style="background-color: rgb(255, 255, 255);" class=""><font \
face="Verdana, Helvetica, Arial, sans-serif" size="2" class="">tap-up script is:<br \
class="">#!/bin/sh<br class="">#<br class="">TAPDEV="$1"<br \
class="">BRIDGEDEV="bridge1"<br class="">#<br class="">ifconfig $BRIDGEDEV addm \
$TAPDEV<br class=""><br class="">tap-down is:<br class="">#!/bin/sh<br class="">#<br \
class="">TAPDEV="$1"<br class="">BRIDGEDEV="bridge1"<br class="">#<br \
class="">ifconfig $BRIDGEDEV deletem $TAPDEV</font><br class=""></span></div><div \
class=""><span style="background-color: rgb(255, 255, 255);" class=""><font \
face="Verdana, Helvetica, Arial, sans-serif" size="2" class=""><br \
class=""></font></span></div><div class=""><span style="font-family: Verdana, \
Helvetica, Arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255);" \
class="">If I tcpdump on the tap interface I can see DHCP requests from the VM but no \
replies. If I tcpdump on the bridge interface I can see the DHCP \
requests&nbsp;</span><strong style="margin: 0px; padding: 0px; font-family: Verdana, \
Helvetica, Arial, sans-serif; font-size: 13px;" class="">and</strong><span \
style="font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 13px; \
background-color: rgb(255, 255, 255);" class="">&nbsp;replies from the DHCP server \
(running on the same network on a FW). I don't see any checksum errors or anything \
else weird, but traffic on the tap interface only flows one way, <b class="">from</b> \
the VM.</span></div><div class=""><span style="font-family: Verdana, Helvetica, \
Arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255);" \
class=""><br class=""></span></div><div class=""><span style="font-family: Verdana, \
Helvetica, Arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255);" \
class="">I asked the folks over at&nbsp;</span><font face="Verdana, Helvetica, Arial, \
sans-serif" size="2" class=""><a href="https://www.emaculation.com" \
class="">https://www.emaculation.com</a>&nbsp;and they get bridging working \
with&nbsp;qemu-system-ppc but not with&nbsp;</font><span style="font-family: Verdana, \
Helvetica, Arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255);" \
class="">qemu-system-x86_64.</span></div><div class=""><span style="font-family: \
Verdana, Helvetica, Arial, sans-serif; font-size: 13px; background-color: rgb(255, \
255, 255);" class=""><br class=""></span></div><div class=""><span \
style="font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 13px; \
background-color: rgb(255, 255, 255);" class="">What am I doing wrong here? I can see \
in the forum that others have gotten bridged network to function, but with older \
versions of macOS. Do I need to do anything differently under \
Mojave?</span></div><div class=""><span style="font-family: Verdana, Helvetica, \
Arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255);" \
class=""><br class=""></span></div><div class=""><span style="font-family: Verdana, \
Helvetica, Arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255);" \
class="">Regards</span></div><div class=""><span style="font-family: Verdana, \
Helvetica, Arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255);" \
class=""><br class=""></span></div></body></html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic