Ping will not work with user networking without some tinkering. User networking provides a DHCP server, and by default the Qemu guest receives the IP address 10.0.2.15 from that server, with dns 10.0.2.3 and router 10.0.2.2
If you need full access to the host network, there are several option for user networking:
from:
https://wiki.qemu.org/Documentation/Net ... ng_options
The -netdev user parameter has some more useful options:
The DHCP address and name for the guest can be set with -netdev user,id=n0,host=addr,hostname=name
You can specify the guest-visible virtual DNS server address with -netdev user,id=n0,dns=addr
QEMU can simulate a TFTP server with -netdev user,id=n0,tftp=xxx,bootfile=yyy
To share files between your guest and host, you can use -netdev user,id=n0,smb=dir,smbserver=addr
To forward host ports to your guest, use -netdev user,id=n0,hostfwd=hostip:hostport-guestip:guestport
If that can't solve your issue, you could try the tap networking option. See the same documentation.
and here:
https://qemu.weilnetz.de/doc/qemu-doc.h ... rk-options
Best,
Cat_7