Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDP10-KA MAC Address conflict #2153

Closed
oilcan-productions opened this issue Feb 23, 2023 · 30 comments
Closed

PDP10-KA MAC Address conflict #2153

oilcan-productions opened this issue Feb 23, 2023 · 30 comments

Comments

@oilcan-productions
Copy link
Contributor

I just rebuilt from scratch and used KA instead of KLH.
Everything seems to work but when running

sudo ./start tv11 tvcon

I get the following error when the network comes up


%SIM-INFO: IMP DHCP disabled

/home/pi/its/out/pdp10-ka/run-43> at imp tap:tap0

%SIM-INFO: Eth: opened OS device tap0

Thu Feb 23 10:24:15 2023

Sockets: _eth_write(tap):  error 5 - Input/output error

%SIM-ERROR: IMP: Eth: Error Transmitting packet: Input/output error

You may need to run as root.

Thu Feb 23 10:24:16 2023

Sockets: _eth_write(tap):  error 5 - Input/output error

%SIM-ERROR: IMP: Eth: Error Transmitting packet: Input/output error

You may need to run as root.

%SIM-INFO: Eth: closed tap0

%SIM-ERROR: IMP: MAC Address Conflict on LAN for address E2:6C:84:1D:34:F6

I changed the MAC address in '~/its/out/pdp10-ka/run' to make sure it does not interfere with any of the other SIMH instances on my network but no change.

Not sure what to check next.
I can access the system locally just fine

@larsbrinkhoff
Copy link
Member

Getting SIMH to do networking can be tricky. There's no ready made recipe for how to make this work. I have all but given up myself. @rcornwell or @eswenson1, do you have any advice here?

@eswenson1
Copy link
Member

eswenson1 commented Feb 23, 2023

I have managed to get pdp10-ka (and pdp10-kl) to do both chaosnet and internet networking.

Here is my script for a working pdp10-ka system:

set console wru=034
set cpu its
set cpu 1024k
set cpu idle
set cpu mpx
set rpa dis
set rpb dis
set tua dis
set fha dis
set dpb dis
set lpt dis
set cr dis
set dc disable
set dtc dis
set dk dis
set pd enabled
set pd on
set dpy disabled
set dk disabled
set stk enabled
set tk enabled
at -u tk 10000 speed=300
set dpk enabled
at -u dpk 10002 speed=4800
at -u dpk line=11,10019 speed=4800
at -u dpk line=15,10020 speed=4800
set mty enabled
at -u mty 10003 speed=50000
at -u mty line=9,10008 speed=9600
at -u mty line=8,10007 speed=9600
at -u mty line=7,10009;notelnet speed=50000
at -u mty line=6,10005 speed=9600
set ten11 enabled
at ten11 10011
set auxcpu enabled
at auxcpu 10006
at ptr ./dskdmp.rim
at dpa0 ./rp03.2
at dpa1 ./rp03.3
at dpa2 ./rp03.0
at dpa3 ./rp03.1
set mta mpx=7
set mta type=b
set dt mpx=6
set imp enabled
set imp host=10.0.2.4
set imp ip=172.16.0.4/24
set imp gw=172.16.0.2
at imp nat:gateway=172.16.0.2,network=172.16.0.0/24,tcp=2023:172.16.0.4:23,tcp=2021:172.16.0.4:21
set imp mpx=4
set dpa noheaders
set wcnsls enabled joystick
set ocnsls enabled
set imx enabled mpx=3
set imx channel=2;unit0;axis0;negate
set imx channel=3;unit0;axis1
set imx channel=10;unit0;axis3;negate
set imx channel=5;unit1;axis0;negate
set imx channel=6;unit1;axis1
set imx channel=30;unit1;axis3;negate
set imx channel=70;unit2;axis0
set imx channel=71;unit2;axis1;negate
set imx channel=73;unit2;axis3
set imx channel=77;unit3;axis0
set imx channel=76;unit3;axis1;negate
set imx channel=74;unit3;axis3
set ch enabled
set ch node=5464
set ch peer=localhost:42044
at ch 44042
b ptr

@eswenson1
Copy link
Member

I think the only significant lines, above, are the "set imp" and "at imp" lines (for internet) and the "set ch" and "at ch" lines (for chaosnet).

@oilcan-productions
Copy link
Contributor Author

Thanks I will give this a try

@oilcan-productions
Copy link
Contributor Author

@eswenson1 I assume the 172.xxx.xxx.xxx addresses match your home network and 172.16.0.4 is the IP address of an ethernet adapter on the host, correct?
Also mpx=4 is the interrupt of the adapter in ITS. Is that always 4?

@eswenson1
Copy link
Member

No. That 172.16.0.4 address is purely internal to the SIMH/imp stack. I don't really understand how this works, but I think the 172.16.0.4/24 defines a virtual network, of which the 172.16.0.2 ip acts as the gateway, and where 172.16.0.4 is the IP of the endpoint that is bound to the guest os (e.g. ITS). @rcornwell is the expert here and perhaps he can weigh in and explain how this works. He can also answer your mpx question. This is all black magic to me -- I used values he gave me at one point.

@oilcan-productions
Copy link
Contributor Author

Ah OK that makes more sense now.

@eswenson1
Copy link
Member

Nice thing about this config is that it doesn’t really matter what your ITS IP address is configured as. Note I’m napping local ports 2021 and 2023. I run all three of KA, KL, and KS on this host, and I use different local port numbers (eg 3021, 3023, 4041, 4043) for the KL and KS systems.

@rcornwell
Copy link
Member

@oilcan-productions You should have no problems setting the MAC address to whatever you want.

set imp enabled
set imp mac=e2:6c:84:1d:34:a3
set imp DHCP
set imp host=10.3.0.6
set imp mpx=4 ; Only on PDP10-KA.
at imp tap:tap0

Address in the ITS is set to 10.3.0.6. This will use your local DHCP to set up an address. "set imp IP=#/mask" will set the IP address that you connect to ITS from the outside. "set imp GW=#" will set the gateway ITS talks to. @eswenson1 uses a different form to connect since he uses a WiFi connection. He uses the NAT format. With this you connect to your host at given ports.

@eswenson1
Copy link
Member

Thanks, @rcornwell.

@rcornwell
Copy link
Member

@eswenson1 Here is sort of a diagram of how networking for IMP works.

ITS (10.3.0.6) -> tap (##.##.##.##/##)

The stack translates all ##.##.##.## to 10.3.0.6 and translates all ITS traffic to ##.##.##.##

For NAT connection you have.
ITS(10.3.0.6) -> SimH/Slirp (176.16.0.4) -> Slirp Gw (176.16.0.2)-> localhost.

This maps the ports into localhost ports. Note you have to define gateway=172.16.0.2,network=172.16.0.0/24 since ITS does not appear to like talking to 10.0.0.2 addresses that are the default Slirp gateway/network.

@oilcan-productions
Copy link
Contributor Author

Thanks @rcornwell, if I set it up like above I get this again

%SIM-INFO: Eth: opened OS device tap0

Thu Feb 23 14:28:05 2023

Sockets: _eth_write(tap):  error 5 - Input/output error

%SIM-ERROR: IMP: Eth: Error Transmitting packet: Input/output error

You may need to run as root.

Thu Feb 23 14:28:06 2023

Sockets: _eth_write(tap):  error 5 - Input/output error

%SIM-ERROR: IMP: Eth: Error Transmitting packet: Input/output error

You may need to run as root.

%SIM-INFO: Eth: closed tap0

%SIM-ERROR: IMP: MAC Address Conflict on LAN for address E2:6C:84:1D:34:A3

I am launching as root 'sudo ./start vt52'

@rcornwell
Copy link
Member

You can set the ownership of the tap device to yourself and don't need to use root. However I wonder if your tap bridge is set up correctly, it does not appear that you are actually connecting to anything.

@oilcan-productions
Copy link
Contributor Author

I used the steps here https://github.com/simh/simh/blob/master/0readme_ethernet.txt to setup the tap device. Should I use something else?

Mike

@oilcan-productions
Copy link
Contributor Author

I redid the steps and now I have the tap setup and the error is gone. Now I need to figure out how to connect from remote.

@larsbrinkhoff
Copy link
Member

@oilcan-productions, if you got everything working, could you please write it up and post a pull request? It would be so nice to have a clear step by step guide for this.

@oilcan-productions
Copy link
Contributor Author

@larsbrinkhoff sure I will re-open this for now because I need a few more bits of info to write it up.

@oilcan-productions
Copy link
Contributor Author

@rcornwell I see the SIMH adapter got an IP address from DHCP, 192.168.0.85.

When I try to FTP to that address I see this message but the connection is stuck. Client says 'Connectred to 192.168.0,85' and hangs indefinitely.

TOP LEVEL INTERRUPT 200 DETACHED JOB # 22, USR:___022 TCP    10:27:57

Telnet works though.
I checked if port 21 would be in use elsewhere and it is not. Anything specific I need to do to get FTP to work?

Mike

@rcornwell
Copy link
Member

First of all make sure you are using FTP and not SFTP. You can also try telneting to port 21 to make sure that the FTP daemon is working. @larsbrinkhoff Any idea on making sure FTPD is running correctly?

@oilcan-productions
Copy link
Contributor Author

One last question. I have no idea how to see which IP address the SIMH adapter is getting I had to log into my router and search for the MAC address. What is the best way to look it up?

@oilcan-productions
Copy link
Contributor Author

First of all make sure you are using FTP and not SFTP. You can also try telneting to port 21 to make sure that the FTP daemon is working. @larsbrinkhoff Any idea on making sure FTPD is running correctly?

Yeah I am using FTP and it shows connected but nothing else happens. So I assume it gets to SIMH but the port is not forwarded.

@oilcan-productions
Copy link
Contributor Author

Created PR #2155 let me know if you want me to change anything

@rcornwell
Copy link
Member

The command "show imp" will show the DHCP address that the imp is set to. You can also in your router assign the MAC address to a fixed IP address, this is what I do.

PDP10 IMP device does not map ports per say. What it does is IP address translation. It translates all packets from ITS into the address of the NIC, and all inbound packets to the same IP address to ITS. It takes care of handling ARP requests and management of DHCP if you want. Not it is possible to configure ITS to a local address and totally disable the address translation functions. The IMP device also modifies packets for FTP Data by translating the address and tracking sequestering and other functions.

@larsbrinkhoff
Copy link
Member

larsbrinkhoff commented Feb 24, 2023

@rcornwell, first of all, check that DEVICE; TCP SYN025 is there and is the FTP server (FTPS), or a link to it. But the build script makes sure it is, so it should be.

Second... there isn't much of a second step. It's difficult to debug this from ITS, since the servers are usually started by ATSIGN TCP. Like you said, try telnetting directly to port 21 and type FTP commands manually.

@oilcan-productions
Copy link
Contributor Author

@larsbrinkhoff yes DEVICE; TCP SYN025 is there
L TCP SYN025 SYSBIN FTPS BIN
I did telnet into port 21, it connects just like FTP does and I can type commands but do not get anything back

@rcornwell
Copy link
Member

@larsbrinkhoff I tried a build and FTP does not appear to start.

@eswenson1
Copy link
Member

@rcornwell What do you mean? FTP doesn't "start" until you connect to port 21 (025). There is a TCP handler for port 025 that "starts" the FTPS (ftp server) when a connection comes in over that port.

@rcornwell
Copy link
Member

rcornwell commented Feb 25, 2023

I did some more testing and under current build FTP does not start when I try to externally connect to FTP. The process does start, however nothing happens. Commit 4b8dfa2 works. Commit de1bd31 does not work. I tried my version of pdp10-ka and the one in tools. On the older build it works, on newer it just hangs.

Looking at PEEK while FTPing in I notice that on broken one FTP stays at 0025SYN, while on working version it goes to 013F10 TCP 000013.

@larsbrinkhoff
Copy link
Member

I opened a new issue about the FTPS problem: #2158

@oilcan-productions
Copy link
Contributor Author

Closing this one and tracking the FTPS problem in #2158

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants