ref: ee9eb42552c618ded3fe1579a705c8067819074a
parent: 515d3ce63282eedec59ed74c03a1781a27a40a9d
author: stanley lieber <stanley.lieber@gmail.com>
date: Tue Dec 6 16:00:20 EST 2016
fqa3.ms: add 3.3.1.4.4 - Linux TAP; misc. cleanup
--- a/fqa3.ms
+++ b/fqa3.ms
@@ -2425,6 +2425,13 @@
.CW tun(4)
.ihtml a
+See also:
+.ihtml a <a href="http://brycv.com/blog/2013/notes-on-openbsd-in-qemu-on-openbsd/">
+.I
+Notes on OpenBSD in QEMU on OpenBSD
+.R
+.ihtml a
+
.html - <a name="3.3.1.4.3" />
.ihtml h5 <h5>
.SH
@@ -2445,6 +2452,52 @@
Now you should be able to run qemu on that interface:
.P1
qemu.exe -net nic -net tap,ifname="tap-qemu" ...
+.P2
+
+.html - <a name="3.3.1.4.4" />
+.ihtml h5 <h5>
+.SH
+3.3.1.4.4 - Linux TAP
+.R
+.ihtml h5
+
+.I
+Contributed by joe9:
+.R
+
+on the host:
+.P1
+sudo ip tuntap add dev tap0 mode tap user joe
+sudo ip address add 10.0.0.1/24 dev tap0
+.P2
+start qemu using (do not need sudo for qemu):
+.P1
+SDL_VIDEO_X11_DGAMOUSE=0 qemu-system-x86_64 \\
+ -cpu host -enable-kvm -m 1024 \\
+ -netdev tap,id=eth,ifname=tap0,script=no,downscript=no \\
+ -device e1000,netdev=eth,mac=52:54:00:00:EE:03 \\
+ -device virtio-scsi-pci,id=scsi -drive \\
+ if=none,id=vd0,file=9front.qcow2.img -device scsi-hd,drive=vd0 \\
+ -usb -usbdevice tablet -sdl -ctrl-grab # post install booting
+.P2
+on 9front:
+add the below line to
+.CW /lib/ndb/local
+.P1
+sys=cirno ether=52540000EE03 ip=10.0.0.2 ipmask=255.255.255.0 ipgw=10.0.0.1
+ dns=10.0.0.1
+ dom=cirno.9front
+.P2
+run:
+.CW
+ip/ipconfig -N
+.R
+
+Now, "ping 10.0.0.2" from linux host and "ip/ping 10.0.0.1" from qemu 9front should work.
+
+check the communication between the vm and the linux host using (on the linux host):
+.P1
+sudo tcpdump -nS -vv -i tap0
.P2
.html - <a name="3.3.1.5" />