diff options
author | hubertf <hubertf@pkgsrc.org> | 2005-10-01 04:12:32 +0000 |
---|---|---|
committer | hubertf <hubertf@pkgsrc.org> | 2005-10-01 04:12:32 +0000 |
commit | 668f0614d6bfa445e30c683b5ace13cffad26bcc (patch) | |
tree | ee939fe18b35a9a8eca911aaa8a9a28e2ea91b71 /emulators/qemu/files | |
parent | b43a7d7d545d1e148a21a96581599f8066e89c82 (diff) | |
download | pkgsrc-668f0614d6bfa445e30c683b5ace13cffad26bcc.tar.gz |
Install example procedure that shows how to setup and network
several qemu nodes with the host's local ethernet using tap(4).
Diffstat (limited to 'emulators/qemu/files')
-rw-r--r-- | emulators/qemu/files/Makefile.multinode-NetBSD | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/emulators/qemu/files/Makefile.multinode-NetBSD b/emulators/qemu/files/Makefile.multinode-NetBSD new file mode 100644 index 00000000000..54dafd9d315 --- /dev/null +++ b/emulators/qemu/files/Makefile.multinode-NetBSD @@ -0,0 +1,59 @@ +# $Id: Makefile.multinode-NetBSD,v 1.1 2005/10/01 04:12:32 hubertf Exp $ +# Source: http://mail-index.netbsd.org/netbsd-help/2005/03/25/0005.html +# +# Starts up two qemu instances and networks bridges them to the local +# ethernet (ETHER_IF}. Works best with NetBSD configured to use serial +# consoles in DISK[12] +# +# Usage: +# sudo make netbsd1 +# sudo make netbsd2 +# +# - Hubert Feyrer <hubert@feyrer.de> +# + +#NETBSD_NOGFX= +NETBSD_NOGFX= -nographic + +ETHER_IF= tlp0 +QEMU_RAM= 20 +DISK1= harddisk.netbsd1 +DISK2= harddisk.netbsd2 + + +all: netbsd1 netbsd2 + +netbsd1: bridge + ifconfig tap1 create up || echo tap1: already there + brconfig bridge0 add tap1 up || echo tap1: already on bridge0 + brconfig bridge0 -learn tap1 # real hub mode, step 1b + brconfig bridge0 flush # real hub more, step 2 + qemu \ + -m ${QEMU_RAM} \ + ${NETBSD_NOGFX} \ + -boot c \ + -tun-fd 3 3<>/dev/tap1 \ + -macaddr de:ad:be:ef:00:01 \ + ${DISK1} + brconfig bridge0 delete tap1 + ifconfig tap1 destroy + +netbsd2: bridge + ifconfig tap2 create up || echo tap2: already there + brconfig bridge0 add tap2 up || echo tap2: already on bridge0 + brconfig bridge0 -learn tap2 # real hub mode, step 1c + brconfig bridge0 flush # real hub mode, step 2 + qemu \ + -m ${QEMU_RAM} \ + ${NETBSD_NOGFX} \ + -boot c \ + -tun-fd 3 3<>/dev/tap2 \ + -macaddr de:ad:be:ef:00:02 \ + ${DISK2} + brconfig bridge0 delete tap2 + ifconfig tap2 destroy + +bridge: + ifconfig bridge0 create || echo bridge0: already there + brconfig bridge0 add ${ETHER_IF} || echo bridge0: ${ETHER_IF} already there + brconfig bridge0 -learn ${ETHER_IF} # real hub mode, step 1a |