Re: KVM networking.
Sthu Deus (firstname.lastname@example.org on 2011-11-11 23:41 +0700):
> I have included more options to network script:
> /usr/bin/kvm -localtime -m 256 -no-reboot -boot c -hda da
> -net nic -net tap,ifname=$(sudo /usr/sbin/tunctl -b -u $(whoami);
> sudo /sbin/ifconfig tap0 192.168.1.1 up; sudo /sbin/route add -host
> 192.168.1.1 dev tap0),script=no,downscript=no
You're adding a host route, whereas you need a network route. Try:
$ sudo ip route add 192.168.1.0/24 via 192.168.1.1
Or, with the older tools (a bit rusty):
$ sudo route add 192.168.1.0 netmask 255.255.255.0 gw 192.168.1.1 dev
I think this setup might need additional configuration on the outside,
because you need to add the same subnet route on your Internet
modem/router. I don't think qemu gives you NAT for free...