qemu-discuss
[Top][All Lists]
Advanced

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

Re: [Qemu-discuss] How to use tap for qemu guest network?


From: Shiyao Ma
Subject: Re: [Qemu-discuss] How to use tap for qemu guest network?
Date: Fri, 16 Dec 2016 12:49:33 +0800

Hi Aleksei,

I did the following, 

sudo ip link add dev bridge0 type bridge

sudo ip link set bridge0 up

# after the above commands, when doing a `ip link show', the bridge0 is in state UNKNOWN.



I then run, 
sudo kvm -m 256 eva.qcow2 -curses -vga virtio -device virtio-net,netdev=internet -netdev bridge,br=bridge0,id=internet,helper=/usr/lib/qemu/qemu-bridge-helper

After login into the sytem, I run:
ip link show
I got:
                                address@hidden:/home/introom# ip addr
                                                                1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group defaul
                                                                t
                                                                    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
                                                                    inet 127.0.0.1/8 scope host lo
                                                                       valid_lft forever preferred_lft forever
                                                                    inet6 ::1/128 scope host
                                                                       valid_lft forever preferred_lft forever
                                                                2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP gr
                                                                oup default qlen 1000
                                                                    link/ether 52:54:00:12:34:56 brd ff:ff:ff:ff:ff:ff
                                                                    inet 10.0.2.15/24 brd 10.0.2.255 scope global eth0
                                                                       valid_lft forever preferred_lft forever
                                                                    inet6 fec0::5054:ff:fe12:3456/64 scope site mngtmpaddr dynamic
                                                                       valid_lft 86343sec preferred_lft 14343sec
                                                                    inet6 fe80::5054:ff:fe12:3456/64 scope link
                                                                       valid_lft forever preferred_lft forever



The above is all I got.

What additional step should I do?
For example, to achieve the goal as,  ping between the guest and the host.

Thanks.




On Thu, Dec 15, 2016 at 9:10 PM, Aleksei <address@hidden> wrote:

This works for me (you have to set up the bridge "bridge0" on the host side):

-device virtio-net,netdev=internet \
-netdev bridge,br=bridge0,id=internet,helper=/usr/lib/qemu/qemu-bridge-helper


--Regards, Aleksei



From: Shiyao Ma
Sent: Thursday, December 15, 2016 3:34PM
To: Qemu-discuss
Subject: [Qemu-discuss] How to use tap for qemu guest network?
Hi,

I'd like to use a tap for the network between the host and the guest.

There are some materials on the internet, but none working for me.

Anybody successful setting up the tap based network?

What commands/setup do you use?

Thanks.






--

吾輩は猫である。ホームーページはhttps://introo.me

reply via email to

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