[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-discuss] Getting tap networking working

From: Vlad Yasevich
Subject: Re: [Qemu-discuss] Getting tap networking working
Date: Tue, 03 Jun 2014 21:20:25 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

On 06/03/2014 03:47 PM, Dale R. Worley wrote:
> I'm trying to get 'tap' networking working, but it seems that there's
> something I'm overlooking.  However, I've followed all the advice I've
> been able to track down on the Web.
> On the host:
>       brctl addbr br0
>       ifconfig br0 up
>       /usr/sbin/openvpn --mktun --dev tap1 --user worley
>       brctl addif br0 tap1
>       ifconfig tap1 promisc up
>       /usr/sbin/openvpn --mktun --dev tap2 --user worley
>       brctl addif br0 tap2
>       ifconfig tap2 promisc up
>       systemctl stop firewalld
>       # Run two VMs.
>       qemu-system-i386 -m 1G -machine accel=kvm -enable-kvm \
>               -drive file=linux.system.disk1,media=disk,index=0,snapshot=on \
>               -hdb linux.second.disk1 \
>               -device e1000,id=eth \
>               -net tap,id=eth,ifname=tap1,script=no,downscript=no &
>       qemu-system-i386 -m 1G -machine accel=kvm -enable-kvm \
>               -drive file=linux.system.disk1,media=disk,index=0,snapshot=on \
>               -hdb linux.second.disk2 \
>               -device e1000,id=eth \
>               -net tap,id=eth,ifname=tap2,script=no,downscript=no &
> In VM 1:
>       ifconfig ens3 up
> In VM 2:
>       ifconfig ens3 up
> But when I try to telnet from one VM to the other, I get
>       telnet: connect to address No route to host
> Does anyone have any suggestions for what I've overlooked?

The problem is that openvpn creates a tun type device which is a
layer 3 (IP) device, not an layer 2 (ethernet) device.  As such,
I am really surprised you could even bridge the two.  That should
have been rejected, as bridge requires ethernet type devices.

You can create tap devices with
 ip tuntap add dev tap1 mode tap user worley

and then bridge them just like you did above.  That will allow things
to work.

> Thanks,
> Dale

reply via email to

[Prev in Thread] Current Thread [Next in Thread]