On Thursday 26 March 2009 11:30:29 James Simmons wrote: > Hi! > > I hope this is the proper mailing list. If not please tell me > where do I post my question. I have been attempting to create a setup > with a host debian (Lenny) system and currently two centos guest. I have > managed to get everything working except network communications between > my two guest. I can event login into the proper guest from my host. If > you need tcpdumps and/or arp results I can provide them. Thank you. > > Here is my network configuration script. > > --------------------------------------------------------------------------- >---- #!/bin/sh > > count=4 > > case "$1" in > start) > brctl addbr br0 > ifconfig br0 192.168.1.1 netmask 255.255.255.0 up > for i in `seq 0 $count` > do > j=$(($i+100)); > tunctl -b -u uja -t tap$i > brctl addif br0 tap$i > ifconfig tap$i up 0.0.0.0 promisc > #route add -host 192.168.1.$j gw 192.168.1.1 dev > br0 > done > > #route add -net 192.168.1.0 netmask 255.255.255.0 gw > 192.168.1.1 > dev br0 > iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE > ;; > stop) > killall kvm > iptables --flush > iptables --table nat --flush > iptables --delete-chain > iptables --table nat --delete-chain > > route del -net 192.168.1.0 netmask 255.255.255.0 dev br0 > for i in `seq 0 $count` > do > ifconfig tap$i down > brctl delif br0 tap$i > tunctl -d tap$i > done > ifconfig br0 down > brctl delbr br0 > ;; > *) > echo "Usage: $0 start|stop" >&2 > exit 3 > ;; > esac > --------------------------------------------------------------------------- >-- > > This is the commands I use to start my kvm instants. > > macaddr=$(/sbin/ifconfig tap0 | grep HWaddr | awk -F ' ' '{print $5}') > kvm -name mds -no-acpi -hda $HOME/work/image1.img -net nic,macaddr=$macaddr > -net tap,ifname=tap0,script=no,downscript=no & This means you'll have 2 devices on your network with the same mac. The tap device and the guest. > > macaddr=$(/sbin/ifconfig tap1 | grep HWaddr | awk -F ' ' '{print $5}') > kvm -name oss -no-acpi -hda $HOME/work/image2.img -net nic,macaddr=$macaddr > -net tap,ifname=tap1,script=no,downscript=no & > > > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html