[En-Nut-Discussion] NutOS Unix emulation status?

Alain M. alainm at pobox.com
Fri Nov 14 02:19:00 CET 2008


I use this script in rc.local and it creates 3 taps to run either dosemu 
or qemu

# these should be available somewhere...
DOS_USER=alain
SYS_IP=10.0.0.50
SYS_GW=10.0.0.1

# First remove everything, som are for the case of re-runing the script
ifconfig eth0 down
ifconfig br0 down
brctl delbr br0
brctl delbr br0_rename
tunctl -d tap0
tunctl -d tap1
tunctl -d tap2

# allow connections
# echo 1 > /proc/sys/net/ipv4/ip_forward

# This looks like a bug in tuntap...
chmod 666 /dev/net/tun

# Create the Bridge
brctl addbr br0
# Re-conect eth0 to Bridge
ifconfig eth0 0.0.0.0 promisc up
brctl addif br0 eth0
# Now the IP belongs to the Bridge
ifconfig br0 $SYS_IP netmask 255.255.255.0 up
# create 3 devices tap0 tap1 tap2
tunctl -u $DOS_USER -t tap0
tunctl -u $DOS_USER -t tap1
tunctl -u $DOS_USER -t tap2
# Ativate each one
ifconfig tap0 0.0.0.0 promisc up
ifconfig tap1 0.0.0.0 promisc up
ifconfig tap2 0.0.0.0 promisc up
# conect with the Bridge
brctl addif br0 tap0
brctl addif br0 tap1
brctl addif br0 tap2

# device for VMware
brctl addif br0 vmnet1

# Re-create route to the Gateway
route add -net 0.0.0.0 gw $SYS_GW

# Show bridge and routes (slow the first time)
brctl show
route -n




More information about the En-Nut-Discussion mailing list