Penguin

Differences between version 2 and previous revision of MinixNotes.

Other diffs: Previous Major Revision, Previous Author, or view the Annotated Edit History

Newer page: version 2 Last edited on Sunday, October 8, 2006 10:13:49 pm by AlastairPorter Revert
Older page: version 1 Last edited on Sunday, October 8, 2006 7:42:59 pm by AlastairPorter Revert
@@ -2,9 +2,9 @@
  
 !!! Setting up networking in Minix using tuntap. 
 For some reason you may want to run Minix on some emulation software and get networking support. Here are some ways you can do it: 
  
-!! Bochs 
+!! [ Bochs]  
 Add this to your bochsrc(5): 
 <verbatim> 
 ne2k: ioaddr=0x240, irq=9, mac=fe:fd:00:00:00:01, ethmod=tuntap, ethdev=/dev/net/tun, script=/path/to/tunconfig 
 </verbatim> 
@@ -15,4 +15,39 @@
 <verbatim> 
 ifconfig -I /dev/ip -h 192.168.1.1 
 </verbatim> 
 And everything should just work 
+  
+!! [Qemu]  
+Load qemu like this:  
+<verbatim>  
+$ qemu -boot c -hda c.img -net nic,model=ne2k_pci -net tap,ifname=tap0,script=/path/to/tunconfig  
+</verbatim>  
+When installing Minix, tell it to install the ne2k networking driver.  
+  
+Qemu seems to provide a different address/IRQ for the ne2k, you need to tell Minix to look in the correct place.  
+Edit the file /usr/etc/rc.local and replace  
+<verbatim>  
+dp8390_arg='DPETH0=240:9'  
+</verbatim>  
+with  
+<verbatim>  
+dp8390_arg='DPETH0=c100:10'  
+</verbatim>  
+  
+You can get the address/IRQ by going to the Qemu console (Ctrl-Alt-2) and typing 'info pci'  
+  
+Apparently it is possible to get networking going without jumping through all these hoops by using the network card option '4' in the Minix setup program. I haven't managed to get that working.  
+  
+!!! External internet  
+After you can ping your tap0 device on your host, you can allow your guest to access the internet:  
+<verbatim>  
+# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE  
+# echo "1" >/proc/sys/net/ipv4/ip_forward  
+</verbatim>  
+  
+!!! tunconfig  
+This shell script looks something like:  
+<verbatim>  
+#!/bin/bash  
+/sbin/ifconfig ${1##/*/} 192.168.1.1  
+</verbatim>