qemu-system-sparc(32) limited to single network adaptor

Asked by David P

Version
QEMU emulator version 2.10.1(Debian 1:2.10+dfsg-0ubuntu3.1)

I have tried every possible combination and it is impossible to configure more than a single network adaptor even on machine types that should support more than 1 such as the SS600MP.

trying to specify more than a single -net nic,model=lance
will give the following error
Warning: hub port hub0port1 has no peer
Warning: vlan 0 is not connected to host network
Warning: netdev hub0port1 has no peer
Warning: requested NIC (anonymous, model lance) was not created (not supported by this machine?)

one of the many command lines was
sudo qemu-system-sparc -name 'EMS' -bios ss600mp.bin -M SS-600MP -m 1024 -drive file=8.4GB.disk,if=scsi,index=0,media=disk -k en-us -show-cursor -boot order=dcan,once=c -boot c -net nic,model=lance -net nic,model=lance -smp 2,cores=2 -cpu "TI SuperSparc 60"

I have tried I think every possible combination and always the same result
If I drop the -smp and -cpu lines and just use -M SS-5 with a SS-5.bin bios OR with openbios-sparc32 it is exactly the same

I can get a machine to boot properly into GUI running Solaris 2.5.1 but I cannot get more than a single network adaptor.

Also it is worth noting that encouragements to use -device and -netdev syntax instead of the -net nic and -net tap or bridge don't work as they error out before starting the emulation. I suspect this is an issue with the SPARC-32 implementation which probably hasn't been updated to the newer -device and -netdev syntax.

Also doing a qemu-system-sparc -net nic,model=help lists only "lance" as an option. the other ne2k_pci doesn't work on the 32 bit version and the sunhme doesn't seem to be listed.

Can someone confirm either if this is a limitation with sparc32 or if is it a bug?

Many thanks

David

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu qemu Edit question
Assignee:
No assignee Edit question
Solved by:
David P
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Could make a subinterface on the NIC as a workaround.

Revision history for this message
David P (dpnsw) said :
#2

I think I have done that. I have le0 and le0:1 but my problem is on the Linux host side I need traffic from le0:1 to go out a different physical port than that from le0. I have le0 at the moment bridged to eth0 and le0:1 should link to eth1. Not sure how to make this happen.
should i be using iptable, libvirt, or something else?

Revision history for this message
tom cruse (tomcruse412) said :
#3

Hey David,

I understand you're having trouble configuring multiple network adapters in QEMU emulator version 2.10.1. Despite trying various combinations, you're unable to set up more than one network adapter, even on machine types like SS600MP that should support it.

When attempting to specify more than a single -net nic,model=lance, you encounter warnings and an error indicating that the requested NIC was not created or not supported by the machine. You've also tried different command line options, including using different BIOS versions, but the issue persists.

Furthermore, suggestions to use -device and -netdev syntax instead of -net nic and -net tap or bridge result in errors before starting the emulation, possibly due to limitations or lack of updates in the SPARC-32 implementation.

You're seeking confirmation on whether this limitation is specific to SPARC32 or if it's a bug.

Unfortunately, I don't have firsthand experience with this specific issue, but it's possible that the limitation exists within the SPARC-32 implementation of QEMU. You could consider reaching out to the QEMU community or forums to gather more information or seek assistance from individuals with expertise in SPARC-32 emulation.

Best of luck in resolving the issue, and I hope you find the answers you're looking for! also check :https://highnetworthpersonalities.com/

Revision history for this message
David P (dpnsw) said (last edit ):
#4

Reminded of this post today by @tom cruse so maybe time for an update.

I'm going to call this an answer.

1) Yes 32 bit SPARC implementation is limited to a single NIC
2) You can get around it using multihoming le0, le0:1.... le0:x if you have control over the host. Thank you @actionparsnip
3) On the host, iptables (layer3) and particularly ebtables (layer 2) allows you to work magic by moving all le0 traffic to one virtual nic and le0:1 to another...etc. OR pretty much anything else you need to do.

Netfilter is probably a better choice now if you are starting from scratch but unfortunately there are more iptables tutorials than nftables (nft command) .

Links
Netfilter Cheatsheet
https://drive.google.com/drive/folders/18Al9uAGBH8YSaBJMlVnXdUEJZT_IXnWR

YouTube Tutorial
https://www.youtube.com/watch?v=7riJkp5q1-M

Netfilter hooks diagram
https://wiki.nftables.org/wiki-nftables/index.php/Netfilter_hooks

Have fun :-)

Revision history for this message
lengschder (lengschder) said :
#5

@David

Can you provide a Step-By-Step Manual?

I have exactly the Same problem. My Solaris 7 System needs 4 Network interfaces with specific names.

How can i add the multihoming interfaces?

Revision history for this message
David P (dpnsw) said :
#6

Hi @lengschder,

I looked up the notes on this and can provide the following:

Qemu initialisation
qemu-system-sparc -name 'MyQEMUMachine' -M SS-5 -m 256 -hda 8.4GB.disk4 -net nic,model=lance,macaddr=08:00:20:b5:09:67 -net tap,ifname=tap4,script=no,downscript=no -k en-us -display gtk

GUEST Networking
manual (ie doesn't survive reboot)
    ifconfig le0:1 inet 160.7.230.125 netmask 255.255.255.0
Perpetual
    echo "160.7.230.125 netmask 255.255.255.0" > /etc/hostname.le0:1
    echo "160.7.230.125 netmask 255.255.255.0" > /etc/netmasks

I don't know the answer to your question about having a specific interface name inside Solaris. I will take a wild guess at it though.

Find the device file for the ethernet and make a hardlink (man ln) to it with the correct name and in the correct location. Make sure ownership and permissions are correct.

HOST Networking
Nmcli command
- Ensure that all devices are active/connected (ethernet ports, taps, bridges)
- Various ways to check: nmcli dev status, nmcli con show, nmcli -p dev

(H22RNGVEM01)-(root)-(492)[/]
-> nmcli -p dev
=====================
  Status of devices
=====================
DEVICE TYPE STATE CONNECTION
--------------------------------------------------------------
em1 ethernet connected eth0
br1 bridge connected br1
br2 bridge connected br2
em2 ethernet connected eth1
tap1 tun connected tap1
tap2 tun connected tap2
tap3 tun connected tap3
tap4 tun connected tap4
br3 bridge connected br3
br4 bridge connected br4
lo loopback unmanaged --

Managing Devices
Skip this step if all devices and interfaces are active and connected

- If devices are available but disconnected or inactive bring them up by running below as root:

# ifup p1p1
# ifup tap1

- If a bridge or tap is missing create them using the following commands:

# nmcli connection add type bridge ifname br2 con-name br2
$ nmcli connection add type tun ifname tap2 con-name tap2 mode tap owner `id -u` ip4 0.0.0.0/24
# brctl addif br2 tap2
# brctl addif br2 p1p1

Brctl show command

(H22RNGVEM01)-(root)-(494)[/]
      -> brctl show
bridge name bridge id STP enabled interfaces
br1 8000.362a9554f1e9 yes em2
                                                           tap1
br2 8000.a2aaacb0225c yes tap2
br3 8000.d63e5825cffc yes tap3
br4 8000.a630a9da882e yes tap4