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:


Add this to your bochsrc(5)?:

ne2k: ioaddr=0x240, irq=9, mac=fe:fd:00:00:00:01, ethmod=tuntap, ethdev=/dev/net/tun, script=/path/to/tunconfig

When installing Minix, tell it to install the ne2k networking driver.

You can change the IP address of your Minix install with:

ifconfig -I /dev/ip -h

And everything should just work


Load qemu like this:

$ qemu -boot c -hda c.img -net nic,model=ne2k_pci -net tap,ifname=tap0,script=/path/to/tunconfig

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




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:

# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
# echo "1" >/proc/sys/net/ipv4/ip_forward


This shell script looks something like:

/sbin/ifconfig ${1##/*/}

Setting up IP Addresses manually.

(Mostly from

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/

ifconfig -I /dev/ip0 -n -h
add_route -g

Add DNS by adding: %nameserver

to /etc/hosts