On Thu, 15 Apr 2021 at 14:22, <c...@etri.re.kr> wrote: > I tried qemu networking but it doesn’t work and I can’t figure out what is > wrong. > > I first tried “-netdev user,id=n1 -device e1000,netdev=n1” as network > option,(I added e1000 driver in the linux kernel build too.). > > By `ip link show` I can see there is the ‘eth0’ interface. So I gave commands > below > > > > ifconfig eth0 129.254.32.55 netmask 255.255.255.0 up > > route add default gw 129.254.32.1
Where are you getting these IP addresses from ? The usual thing with user mode networking is to run a dhcp client inside the guest and let that deal with it (there is a fake DHCP server provided by QEMU that the guest will see on the usermode network). You should get an address in the 10.0.2.x range. https://qemu-project.gitlab.io/qemu/system/net.html#using-the-user-mode-network-stack thanks -- PMM