I'm trying to network a couple of qemu vm together and to the outside
world.  After much pain and gnashing of teeth I found a setup that works
temporarily.  I start both vm's with a command similar to this:
vde_switch -hub -tap /dev/tap0
chmod -R 666 /var/run/vde.ctl
vdeqemu -vga cirrus -localtime -hda linux-boot-0.img -hdb linux-boot-1.img \
-hdc linux-data-0.img -hdd linux-data-1.img -m 392 -boot c -kernel-kqemu

ipfw divert and natd are present.

ifconfig looks like this:

midco# ifconfig
xl0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 00:04:76:d2:50:25
        media: Ethernet 10baseT/UTP (10baseT/UTP <half-duplex>)
        status: active
mtu 1500
        ether 00:04:4b:04:01:28
        inet netmask 0xfffffe00 broadcast
        media: Ethernet autoselect (100baseTX <full-duplex,flag0,flag1>)
        status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
        inet6 ::1 prefixlen 128
        inet netmask 0xff000000
bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu
        ether e6:56:26:6d:f8:f8
        inet netmask 0xffffff00 broadcast
        id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
        maxage 20 holdcnt 6 proto rstp maxaddr 100 timeout 1200
        root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
        member: nfe0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
                ifmaxaddr 0 port 2 priority 128 path cost 200000

ipfw show:
midco# ipfw show
65535 1483037 1334261656 allow ip from any to any

once I add tap0 to bridge0 I have only a few minutes to access my external
network.  Once it goes down, I am unable to revive via normal methods eg
/etc/rc.d/netif restart && /etc/rc.d/routed restart.  Anything going to
external network timeouts, but tap/vm stuff is great.  Even destroying
vm's/bridge/tap and bringing everything up doesn't restore networking, I
have to reboot.  netstat -nr looks the same before and after.
midco# netstat -nr
Routing tables

Destination        Gateway            Flags    Refs      Use  Netif Expire
default         UGS         0   591581   nfe0          UH          0       24    lo0     link#4             UC          0        0 bridge    link#2             UC          0        0   nfe0       00:13:5f:05:e3:d9  UHLW        2        0   nfe0   1198

Destination                       Gateway                       Flags
Netif Expire
::1                               ::1                           UHL
fe80::%lo0/64                     fe80::1%lo0                   U
fe80::1%lo0                       link#3                        UHL
ff01:3::/32                       fe80::1%lo0                   UC
ff02::%lo0/32                     fe80::1%lo0                   UC

/var/log/messages only had arp stuff relating to bridge which I suppressed.


PS bring up qemu networking in multicast mode to achieve this hangs my cable

Adam Vande More
freebsd-questions@freebsd.org mailing list
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to