# Apollo Domain/OS stuff
## Misc Domain/OS networking notes
Setting up networking:
```
lcnode -- list nodes
netsvc -- list network status
netsvc -n -- detach from network
netsvc -a -- allow all network access; setting this will make local operations like `lcnode` fail for some reason but it still works
/sys/net/netman -- diskless boot server
/sys/net/diskless_list -- list of nodes allowed
```
Edit `/etc/rc.user` and enable all the daemons.
Touch `/etc/daemons/rtsvc`
Edit `/etc/rc` and enable rtsvc: `-dev ETH802.3_AT -noroute`
Run `netsvc -a`
## SCSI devices
Accessed as `wN:0` where N is the SCSI ID. e.g. a disk at ID 6 is `w6:0`. If the SCSI emulation is correct, `invol` will properly read geometry from the drive.
## Setting up Domain networking to MAME
Assuming linux MAME host.
In MAME, there's a `src/osd/taputil.sh`. Where `username` is your username (i.e. `vladimir`), `EMUADDR` is the emulator IP address you're going to use, and `HOSTADDR` is the IP of the local interface. Run:
```
sudo ./src/osd/sdl/taputil.sh -c username EMUADDR HOSTADDR
```
This will create `tap-mess-UID-0` (where UID is `id -u $username`), e.g. `tap-mess-1000-0`. It will also enable ip_forward and proxy_arp:
```
echo 1 > /proc/sys/net/ipv4/ip_forward
echo 1 > /proc/sys/net/ipv4/conf/all/proxy_arp
```
_I'm not sure you want this._ You need this if you want to set up IP networking inside your MAME host. But for Domain networking, you need the raw packets, not ip_forward. So, as root:
```
echo 0 > /proc/sys/net/ipv4/ip_forward
echo 0 > /proc/sys/net/ipv4/conf/all/proxy_arp
```
(The script is very simple, you can also just run the `ip tuntap` command manually to create the interface.)
Then, install `socat`, and in a separate terminal, run:
```
socat -s INTERFACE:tap-mess-1000-0 INTERFACE:YourRealEthInterface
```
`socat` mirrors packets from one to the other and vice versa. `INTERFACE` is not a placeholder; `YourRealEthInterface` is, e.g. `eth1`. I found everything works much better if you plug in a second ethernet interface that's dedicated to this so that you don't have the world going through this. (Modern ethernet will sense crossover, so you should be able to just plug a cable direct from this interface to the AUI transciever, no hub/switch.)
You can then run `wireshark` on either `tap-mess-1000-0` or `YourRealEthInterface`, and should see identical packets on both. When doing a `DI E` (or `N`) on the real machine, watching in Wireshark you should see a packet go from `ApolloCo_aa:bb:cc` (with your node ID) to I think a Domain broadcast address, with protocol `0x8019`. If you do `DI N 12345`, the packet will go to `ApolloCo_01:23:45`.
In both cases, on the emulator, `netman` needs to be configured to serve for your node ID in `/sys/net/diskless_list`. You'll also need `netsvc -a` set, even though doing that makes `lcnode` on the emulator claim things were denied from local node for some reason.
# Notes / Links
Installation/netbooting guide. Instructions on how to install across network.
http://www.bitsavers.org/pdf/apollo/008860-A03_Installing_DOMAIN_Software_Mar92.pdf