Connect Multiple SIMH Network Instances on one Computer

From Computer History Wiki
Jump to: navigation, search

It is a known problem that you can run multiple instances of SIMH simulators on one computer, but cannot connect the network interfaces of those simulators directly.

You can either use multiple computers connected by a LAN to solve this, or do a special network setup.

Unfortunately I can only show you how to do this on Debian Linux, with other Linux distributions it's probably similar. Windows: I don't know, sorry!

You may have to install some packages beforehand one time only (depending on your Debian configuration):

sudo apt install uml-utilities bridge-utils tcpdump 

Run the following shell script as root:


# Create four virtual tap network interfaces
tunctl -t tap0
tunctl -t tap1
tunctl -t tap2
tunctl -t tap3

# Create a virtual bridge
brctl addbr br0
brctl setfd br0 0

# Connect the four virtual interfaces to the virtual bridge
brctl addif br0 tap0
brctl addif br0 tap1
brctl addif br0 tap2
brctl addif br0 tap3

# Do a minimal configuration for the virtual interfaces
ifconfig tap0
ifconfig tap1
ifconfig tap2
ifconfig tap3

# Activate the virtual bridge
ip link set br0 up

# Activate the virtual interfaces
ifconfig tap0 up
ifconfig tap1 up
ifconfig tap2 up
ifconfig tap3 up
# Show virtual bridge configuration
brctl show

# Show interfaces
ip link  

The settings will not survive a reboot.

This setup connects the four virtual interfaces tap0, tap1, tap2, and tap3 among themselves, but neither to the local computer nor to any other connected computers.

You can watch the network traffic on any of the virtual interfaces with the following command (just replace the interface name):

tcpdump -i tap0

You must be root to do this or prepend the command with sudo.

Use this SIMH command to attach to e.g. virtual interface tap0, e.g.:

attach xq tap:tap0

See the SIMH 0readme_ethernet.txt for more info on the same topic.