qemu-discuss
[Top][All Lists]
Advanced

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

[Qemu-discuss] How to communicate with qemu network interface?


From: Robert Schilling
Subject: [Qemu-discuss] How to communicate with qemu network interface?
Date: Sun, 06 Jan 2013 15:41:55 +0100

I wrote a network driver for NE2000 for my OS. I use qemu for emulating. I 
create a tap device using the scripts /etc/qemu-ifup and /qemu/if-down. Here is 
my call to qemu:

sudo qemu-system-i386 -d int,cpu_reset -m 8M -cpu qemu32 -hda SWEB-flat.vmdk 
-debugcon /dev/stdout -net nic,model=ne2k_pci,vlan=0 -net tap,vlan=0,ifname=tap0


This generates me a tap device and a bridge. This is the output of ifconfig:

eth0      Link encap:Ethernet  HWaddr 00:0c:29:78:2b:72  
          inet addr:192.168.31.167  Bcast:192.168.31.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fe78:2b72/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:9820 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5948 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:3764099 (3.7 MB)  TX bytes:835663 (835.6 KB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:7860 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7860 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:875760 (875.7 KB)  TX bytes:875760 (875.7 KB)

tap0      Link encap:Ethernet  HWaddr 76:d0:54:51:d6:19  
          inet addr:192.168.31.240  Bcast:192.168.31.255  Mask:255.255.255.0
          inet6 addr: fe80::74d0:54ff:fe51:d619/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:60 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500 
          RX bytes:0 (0.0 B)  TX bytes:10420 (10.4 KB)

virbr0    Link encap:Ethernet  HWaddr 76:d0:54:51:d6:19  
          inet addr:192.168.31.5  Bcast:192.168.31.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:58 errors:0 dropped:0 overruns:0 frame:0
          TX packets:759 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:3668 (3.6 KB)  TX bytes:43185 (43.1 KB)


How do I communicate from my host system to the qemu guest system? My OS only 
receives packets from 192.168.31.240, the tap device. I proofed this with 
wireshark. I receive all packets when listening to the tap device.

If I do a ping to 192.168.31.10 (this is the IP configured in my guest OS) an 
ARP request is generated but this is not passed to qemu.

How do I do that?

Thanks
Regards robert



reply via email to

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