Re: KVM networking.



Sthu Deus (sthu.deus@xxxxxxxxx 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
tap0


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...

Regards,
Arno


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx
Archive: http://lists.debian.org/20111112145818.63559a3a@xxxxxxxxxxxxxxxxxxxxxxx



Relevant Pages

  • what are the iproute2 rules and routes startup scripts
    ... How do I configure iproute2 rules and route tables to automatically start ... or to be run when the network script is run ... but where do I put the config settings for the rules ...
    (Fedora)
  • Re: problems after rebuild of 5.5 stable
    ... The default operation in mergemaster is to do nothing, ... My next step is to start from scratch Unfortuntely, even with ipfw set to open, I am still getting no route to host when I try and ping my gateway. ... Now I can cvsup to a production 'Release' version of FreeBSD, ... To unsubscribe, send any mail to ...
    (freebsd-questions)
  • Re: how to encrypt/decrypt remote folder ?
    ... If enough people consider a problem such, it is easy to route around.. ... There's more noise about top posting, HTLM posting, bad hidden email ... a newbie shouldn't ask newbie questions, but read what a smart question ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: problems after rebuild of 5.5 stable
    ... My next step is to start from scratch Unfortuntely, even with ipfw set to open, I am still getting no route to host when I try and ping my gateway. ... I tried trying ifup sis0 but I discovered ifup is no longer around. ... To unsubscribe, send any mail to ...
    (freebsd-questions)
  • Re: [opensuse] Re: domain and email forwarding
    ... The standard edition is FREE. ... The route shows that the message comes from one ... To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx ... For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx ...
    (SuSE)