qemu-discuss
[Top][All Lists]
Advanced

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

[Qemu-discuss] Networking with Qemu


From: Willy Lambert
Subject: [Qemu-discuss] Networking with Qemu
Date: Thu, 20 Dec 2012 02:04:26 +0100

Hi all,

I'm "new" with qemu and I'm stucked with networking. I am trying to
emulate an embedded system on my dev server. So I have :
_ my internet box as a router
_ my dev server
_ a qemu instance on my dev server

What I'm trying to do is to give internet access to my qemu instance.
To do so I'm following :
http://en.wikibooks.org/wiki/QEMU/Networking
http://wiki.qemu.org/Features/HelperNetworking

So I created a bridge br0 between with eth1 card of my dev server and
my tap0 interface connected to qemu. I can do everything between the
dev server and the qemu instance, and I can do everything between my
dev server and my router. But unfortunately I can't do anything
between qemu and the router.

Is is possible to have such a communication between my qemu instance
and the router ? did I missed something ? (like some routing from
tqemu to the router ?). I'm really not at ease with networking.

Here are the command I use to settup the bridge before launching qemu :
ifconfig eth1 down
ifconfig eth1 0.0.0.0promisc up
brctl addbr br0
brctl addif br0 eth1
dhclient br0

The options I use to launch qemu for the networking part are :
-net tap,helper=/usr/local/libexec/qemu-bridge-helper,id=tap0  -net
nic,model=ne2k_pci


Following some commands to the state of my dev server (everything
should be ok elsewhere), after having set up the bridge, and launched
qemu :

-----------------------------------------------------------------------------------------------------------------


address@hidden(10.0):/home/ard# brctl show
bridge name     bridge id               STP enabled     interfaces
br0             8000.080027661dcb       no              eth1
                                                        tap0

-----------------------------------------------------------------------------------------------------------------

address@hidden(10.0):/home/ard# ifconfig
br0       Link encap:Ethernet  HWaddr 08:00:27:66:1d:cb
          inet addr:192.168.1.61  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:449 errors:0 dropped:0 overruns:0 frame:0
          TX packets:35 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:100695 (98.3 KiB)  TX bytes:7874 (7.6 KiB)

eth1      Link encap:Ethernet  HWaddr 08:00:27:66:1d:cb
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:841 errors:0 dropped:0 overruns:0 frame:0
          TX packets:116 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:242444 (236.7 KiB)  TX bytes:11345 (11.0 KiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:140 errors:0 dropped:0 overruns:0 frame:0
          TX packets:140 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:13836 (13.5 KiB)  TX bytes:13836 (13.5 KiB)

tap0      Link encap:Ethernet  HWaddr 3e:f8:87:e0:43:7a
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:9 errors:0 dropped:0 overruns:0 frame:0
          TX packets:332 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:692 (692.0 B)  TX bytes:77271 (75.4 KiB)

-----------------------------------------------------------------------------------------------------------------

address@hidden(10.0):/home/ard# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     *               255.255.255.0   U     0      0        0 br0
default         neufbox         0.0.0.0         UG    0      0        0 br0



reply via email to

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