Here is one I got from SIttichai Palingsong who did the
tap module.
NOTE: The address you assign for TAP address should be private
address between the host and the guest (IE, do not use your network
that your host''s interface is on).
If you are trying to do bridging, the method is completely different.
I''ll post a setuid wrapper to create the tun and the sudo script to
do the bridging. The bridge is setup differently in the fact that
you typically don''t assign an address to the bridge interface. You
typically are going to let the bridge interface get a DHCP address
from your network (assuming that it isn''t a WIFI interface).
HTH
Ben
---- Tim <linux_geek at comcast.net> wrote: > I don''t have a /etc/qemu-ifup script. Am I suppose to create that
manually?
#!/bin/ksh
# /etc/qemu-if: QEMU''s TUN network setup script for Solaris
# $1 = tun0, tun1, ...
if [ -z "$1" ]
then
echo "Usage: $0 interface"
exit 1
fi
DEV=${1%%[0-9]}
PPA=${1##*[a-z]}
NETMASK="255.255.255.0"
case "$OS" in
s10)
HOST_IP="192.168.1.25$PPA"
GUEST_IP="192.168.1.1$PPA"
;;
winxp)
HOST_IP="192.168.2.250"
GUEST_IP="192.168.2.10"
;;
win2k3)
HOST_IP="192.168.3.250"
GUEST_IP="192.168.3.10"
;;
*)
HOST_IP="192.168.1.25$PPA"
GUEST_IP="192.168.1.1$PPA"
;;
esac
set -x
/sbin/ifconfig $1 $HOST_IP destination $GUEST_IP netmask $NETMASK up
exit $?