Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
MinixNotes
Edit
PageHistory
Diff
Info
LikePages
Notes relating to the [Minix] Operating System. !!! 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] 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> When installing Minix, tell it to install the ne2k networking driver. You can change the IP address of your Minix install with: <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> !!! Setting up IP Addresses manually. (Mostly from http://www.minixtips.com/2006/06/minix-with-static-ip-address.html) Unless you have a dhcpd serving addresses out on your tun device, you probably want to do something like this to stop you having to set up the IP address each time you load minix: Add the following to /etc/rc.net <verbatim> ifconfig -I /dev/ip0 -n 255.255.255.0 -h 192.168.1.2 add_route -g 192.168.1.1 </verbatim> Add DNS by adding: <verbatim> your.name.server %nameserver </verbatim> to /etc/hosts
One page links to
MinixNotes
:
Minix