network bridge does not work

Bug #1791680 reported by Jan Marti
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Undecided
Unassigned

Bug Description

hi there

the network bridge does not seem to work described as here: https://en.wikibooks.org/wiki/QEMU/Networking

When i add that parameters in a 192.168.80.x subnet, my emulated raspbian ARM gets the IP 10.0.2.15.... While all other computers get 192.168.80.x

The command i use is:

qemu-system-arm.exe -M versatilepb -cpu arm1176 -hda 2018-09-03_stretch_inkl_phalcon.img -kernel kernel-qemu-4.4.34-jessie -m 192 -append "root=/dev/sda2 panic=1 rootfstype=ext4 rw" -no-reboot -net nic -net user -device e1000,mac=52:54:00:12:34:56 &

Does not build up a network bridge to 192.168.80.x...

The host system i use is win10 x64 v1803

Best regards,
Jan

Revision history for this message
Jan Marti (wsertz3a) wrote :

J:\Tools\qemu>qemu-system-arm.exe -M versatilepb -cpu arm1176 -hda 2018-09-03_stretch_inkl_phalcon.img -kernel kernel-qe
mu-4.4.34-jessie -m 192 -append "root=/dev/sda2 panic=1 rootfstype=ext4 rw" -no-reboot -net nic -net user -device e1000,
mac=52:54:00:12:34:56
WARNING: Image format was not specified for '2018-09-03_stretch_inkl_phalcon.img' and probing guessed raw.
         Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.

         Specify the 'raw' format explicitly to remove the restrictions.
dsound: Could not initialize DirectSoundCapture
dsound: Reason: No sound driver is available for use, or the given GUID is not a valid DirectSound device ID
qemu-system-arm.exe: warning: nic e1000.0 has no peer

Revision history for this message
Jan Marti (wsertz3a) wrote :

10.0.2.15 is neither a ip in our dhcp range nor an apipa address - strange

Revision history for this message
Jan Marti (wsertz3a) wrote :

but google is pingable, so i have internet.

must be nat, right??

Revision history for this message
Jan Marti (wsertz3a) wrote :

Yes, looks like nat - 10.10.2.15 is not pingable from 192.168.80.x but vice versa...

but wqhat they write here is not nat: "If no network options are specified, QEMU will default to emulating a single Intel e1000 PCI card with a user-mode network stack that bridges to the host's network. The following three command lines are equivalent:"

And i think my params are right?

... -net nic -net user -device e1000,mac=52:54:00:12:34:56 &

Revision history for this message
Thomas Huth (th-huth) wrote :

That comment about e1000 is only true for qemu-system-i386. For ARM machines, there are other default NICs. You should also not mix "-net" and "-device", see https://www.qemu.org/2018/05/31/nic-parameter/ for some details. And concerning NAT, yes the "user" backend is using NAT, see https://wiki.qemu.org/Documentation/Networking#User_Networking_.28SLIRP.29 for details about that.

Changed in qemu:
status: New → Invalid
Revision history for this message
Jan Marti (wsertz3a) wrote :

OK thx.

"The -device option can only be used for pluggable NICs. Boards (e.g. embedded boards) which feature an on-board NIC cannot be configured with -device yet, so -net nic,netdev=<id> must be used here instead."

Revision history for this message
Jan Marti (wsertz3a) wrote :

when i only use "-net nic", i get an apipa address

Revision history for this message
Jan Marti (wsertz3a) wrote :

what do i need for netdev id? n1 as described in your links does not work. messsage: "netdev 'n1' not found"

Revision history for this message
Jan Marti (wsertz3a) wrote :

currently, only one nic adapter is enabled on my win10 host: the ethernet controller.

the other 2, 1x internal wlan and 1x usb wlan is disabled..

Revision history for this message
Jan Marti (wsertz3a) wrote :

"That comment about e1000 is only true for qemu-system-i386. For ARM machines, there are other default NICs."

but why im able to ping google with that config??

Revision history for this message
Jan Marti (wsertz3a) wrote :

"-nic tap,model=e1000"

-> "Device 'tap' colud not be found

Revision history for this message
Jan Marti (wsertz3a) wrote :

incompatible with windows, right? so i need a linux machine with ethx??

Revision history for this message
Jan Marti (wsertz3a) wrote :
Revision history for this message
Jan Marti (wsertz3a) wrote :

problem solved! :-)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers