[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: KVM networking.

Sthu Deus (sthu.deus@gmail.com 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 up; sudo /sbin/route add -host
> dev tap0),script=no,downscript=no

You're adding a host route, whereas you need a network route. Try:
$ sudo ip route add via

Or, with the older tools (a bit rusty):
$ sudo route add netmask gw 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...


Reply to: