Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # ---
- # decnet-bridge-tap-vde-setup.sh
- # ---
- # Bridge, VDE and Tun/Tap Network Device Setup Script to run emulators.
- # Makes the DECnet/AppleTalk NIC available to emulators.
- #
- # Basically does this:
- #
- # -------
- # |Network|
- # |Adapter|
- # |enp0s3 |
- # -------
- # | ---------
- # ----------|bridge `|
- # |br-dnet `|
- # ---------`
- # | --------
- # |--------|dnettap0| <--> For use by TBD emulator
- # | --------
- # |
- # | ----------
- # --------|VDE Switch| (Virtual Distributed Ethernet switch)
- # ----------
- # |
- # | -------------
- # |-|vde-dnet-tap0| <--> Available to more TBD emulators
- # | -------------
- # |
- # | -------------
- # |-|vde-dnet-tap1| <--> DEC AlphaServer ES40 emulator
- # | -------------
- # |
- # | -------------
- # |-|vde-dnet-tap2| <--> Basilink II Mac-IIci emulator
- # | -------------
- # |
- # | -------------
- # |-|vde-dnet-tap3| <--> PDP-10 TOPS-20 (TWENEX) KLH10 emulator
- # | -------------
- # |
- # | -------------
- # |-|vde-dnet-tap4| <--> Available to more TBD emulators
- # | -------------
- # |
- # | -------------
- # |-|vde-dnet-tap5| <--> DECnet/Python
- # | -------------
- #
- # More details:
- # http://supratim-sanyal.blogspot.com/2018/10/bionic-beaver-on-zarchitecture-my.html
- # http://tuklusan.decsystem.org
- #
- # Licensed under "THE BEER-WARE LICENSE" (Revision 42):
- # Supratim Sanyal <https://goo.gl/FqzyBW> wrote this file. As long as
- # you retain this notice you can do whatever you want with this stuff.
- # If we meet some day, and you think this stuff is worth it, you can buy
- # me a beer in return.
- # ---
- DEVICE="enp0s8"
- # ----
- # No more changes should be required from here
- # ----
- ip tuntap add dnettap0 mode tap user localuser # TAP interface for use by emulators
- ip link set dnettap0 arp off
- # ---
- # Also create a VDE switch with TAP plugs for use by simuators
- # ---
- #
- vde_switch -t vde-dnet-tap0 -s /tmp/vde-dnet.ctl -m 666 --mgmt /tmp/vde-dnet.mgmt --mgmtmode 666 --daemon --fstp # spare plug
- ip link set vde-dnet-tap0 arp off
- vde_plug2tap -s /tmp/vde-dnet.ctl -m 666 -d vde-dnet-tap1 # AlphaServer ES40
- #ip link set vde-dnet-tap1 address AA:00:04:00:1B:XX arp off
- ip link set vde-dnet-tap1 arp off
- vde_plug2tap -s /tmp/vde-dnet.ctl -m 666 -d vde-dnet-tap2 # Basilink II MacOS 7
- ip link set vde-dnet-tap2 address AA:00:04:00:1B:7C arp off # MACOS7 DECnet Address is 31.27
- vde_plug2tap -s /tmp/vde-dnet.ctl -m 666 -d vde-dnet-tap3 # TWENEX: TOPS-20 DECnet Address is 31.29 and IP Address is 192.168.217.3
- ip link set vde-dnet-tap3 address AA:00:04:00:1D:7C arp off # Access by IP is NOT the goal; putting it on DECnet is. Assigning the gateway IP 192.168.217.3 to this tap results in all sorts of VDE Decnet issues across this and other hosts
- # (MACOS9 on Moksha has IP 192.168.217.2, a DECnet VDE plug on Moksha
- vde_plug2tap -s /tmp/vde-dnet.ctl -m 666 -d vde-dnet-tap4 # Unused, avaiable
- #ip link set vde-dnet-tap4 address AA:00:04:00:25:XX arp off
- vde_plug2tap -s /tmp/vde-dnet.ctl -m 666 -d vde-dnet-tap5 # DECnet/Python
- ip link set vde-dnet-tap5 address AA:00:04:00:FD:7F arp off # DECnet Address: 31.1021
- # Create a Bridge
- ip link add name br-dnet type bridge
- ip link set br-dnet arp off
- brctl stp br-dnet on
- # Bridge the NIC $DEVICE, the TAP device and VDE Switch TAP0 plug
- ip link set $DEVICE master br-dnet
- ip link set dnettap0 master br-dnet
- ip link set vde-dnet-tap0 master br-dnet
- # Bring everything back up
- ip link set $DEVICE arp off
- ip link set dev br-dnet up
- ip link set dev dnettap0 up
- ip link set vde-dnet-tap0 up
- ip link set vde-dnet-tap1 up
- ip link set vde-dnet-tap2 up
- ip link set vde-dnet-tap3 up
- ip link set vde-dnet-tap4 up
- ip link set vde-dnet-tap5 up
- brctl show
- # --
- # We can now attach simulators
- # --
Advertisement