Running Previous 2.0 w/ NS3.3 - trying to get networking up

Started by blakespot, April 20, 2018, 06:12:35 pm

Previous topic - Next topic

blakespot

Wait, I don't need to explicitly run SLiRP under Windows right? It's rolled into Previous, ya? Is that my problem?
:::My NeXTs:
- NeXTstation Turbo Color w/ 21" NeXT CRT (NS3.3)
- HP 712/100 "Gecko" (NS3.3)
http://bytecellar.com

eagle

Quote from: "blakespot"I just couldn't find Previous 2.x on macOS. Do you happen to know where it can be had, precompiled? Thanks.

Hey Blake - it is available on my Previous site - http://previous.unixdude.net/download.html
My NeXTs:
NeXT Computer prototype (68030-25 x2, 68040-25)
Two NeXTstations (68040-25)
All mono

blakespot

Quote from: "eagle"
Quote from: "blakespot"I just couldn't find Previous 2.x on macOS. Do you happen to know where it can be had, precompiled? Thanks.

Hey Blake - it is available on my Previous site - http://previous.unixdude.net/download.html

Thank you! And networking works for me under OS X. Not sure why Windows 10 setup didn't work as far as networking.


Logging into Level 29 BBS on an original NeXT computer (...emulated via Previous 2.0) by Blake Patterson, on Flickr

Cheers.
:::My NeXTs:
- NeXTstation Turbo Color w/ 21" NeXT CRT (NS3.3)
- HP 712/100 "Gecko" (NS3.3)
http://bytecellar.com

eagle

I generally use NFS or an ISO disk image to transfer files. A while ago, some NFS activity would cause Previous to crash but I have not tried it lately.
My NeXTs:
NeXT Computer prototype (68030-25 x2, 68040-25)
Two NeXTstations (68040-25)
All mono

paolo.bertolo

Exactly the same situation, but this time with Previous 2.1 + NS3.3 on MacOS (tried on two different machines with different OS). Checked all I could, apparently everything is fine, consistent with what the real NeXT machines are reading (bar for the addresses, of course), but still no way to get networking up and running.

paolo.bertolo

Tried to run the whole thing all over again, but networking still does not fully work. E.g. if I ping www.apple.com, the address is resolved but all packets are lost.

multi

Quote from: "paolo.bertolo"Tried to run the whole thing all over again, but networking still does not fully work. E.g. if I ping www.apple.com, the address is resolved but all packets are lost.


what's your gateway address? do a netstat -rn and look for a 'default' or a '0.0.0.0' (sorry, dont have a NS/OS box handy to tell you exactly what to look for). Or just post the whole output here.

The gateway would need to be local (same network).

paolo.bertolo

The Previous stuff (NeXTComputer - NeXTStep 3.3)

previous: 1# netstat -rn
Routing tables
Destination      Gateway            Flags     Refs  Use     Interface
127.0.0.1        127.0.0.1          UH          2     282     lo0
default            10.0.2.2            UG          0        0      en0
10.2.2             10.0.2.15          U            4     755     en0
previous: 2#



The real thing (NeXTComputer - NeXTStep 3.3)

nextcomputer:6# netstat -rn
Routing tables
Destination        Gateway             Flags     Refs     Use  Interface
127.0.0.1          127.0.0.1            UH          2      300   lo0
default              192.168.88.1       UG          0        4    en0
192.168.88       192.168.88.55      U           4     1207  en0
nextcomputer:7#

dylanmcnamee

My host setup: macOS Catalina, SLiRP networking over the thin interface. Guest is a NeXTStation Color Turbo.

I'm trying to get networking going with Previous and NS3.3, and like the most recent poster in this thread, have got name service working (can lookup hosts), but can't ping or otherwise access them.  Also can't ping machines on my local network. So the guest is somewhat configured, but something is missing.

EDIT: I fired up OmniWeb, and pointed it at a web page served in my local network, and it worked (!). This suggests that Previous hosts some kind of user-level proxy, but I'm a bit puzzled how I'm supposed to contact the guest from the host.

How does SLiRP work from the host-perspective? Is it running a NAT, or some other level? When I run ifconfig on my host machine, I don't see any new interfaces, so I'm not sure how I can / should test the networking setup from the host inward.

rumbeard

Quote from: dylanmcnamee on November 10, 2019, 10:44:04 pmMy host setup: macOS Catalina, SLiRP networking over the thin interface. Guest is a NeXTStation Color Turbo.

I'm trying to get networking going with Previous and NS3.3, and like the most recent poster in this thread, have got name service working (can lookup hosts), but can't ping or otherwise access them.  Also can't ping machines on my local network. So the guest is somewhat configured, but something is missing.

EDIT: I fired up OmniWeb, and pointed it at a web page served in my local network, and it worked (!). This suggests that Previous hosts some kind of user-level proxy, but I'm a bit puzzled how I'm supposed to contact the guest from the host.

How does SLiRP work from the host-perspective? Is it running a NAT, or some other level? When I run ifconfig on my host machine, I don't see any new interfaces, so I'm not sure how I can / should test the networking setup from the host inward.

You have to re-compile Previous after editing one file.  I confirmed you can use this for telnet and SSH and everything I tried.

Quote from: rumbeard on February 22, 2019, 05:36:35 amSo I have this working according to instructions and I can even telnet back to the host on 42323.  My question is... do I have to rebuild from source to use the other 5 re-direct slots?

Ideally I'd swap out 42323 with 42322 for SSH, port 80, 443, 25, and maybe one other.

I can't seem to figure out even from a glance at the source where the slirp.conf stuff is.
Quote from: neozeed on February 24, 2019, 06:40:53 amhttps://sourceforge.net/p/previous/code/HEAD/tree/trunk/src/enet_slirp.c

It's in enet_slirp_start

void enet_slirp_start(Uint8 *mac) {
    struct in_addr guest_addr;
   
    if (!slirp_inited) {
        Log_Printf(LOG_WARN, "Initializing SLIRP");
        slirp_inited=1;
        slirp_init();
        inet_aton("10.0.2.15", &guest_addr);
        slirp_redir(0, 42323, guest_addr, 23);
    }
    if (slirp_inited && !slirp_started) {
        Log_Printf(LOG_WARN, "Starting SLIRP");
        slirp_started=1;
        slirpq = QueueCreate();
        slirp_mutex=SDL_CreateMutex();
        tick_func_handle=SDL_CreateThread(tick_func,"SLiRPTickThread", (void *)NULL);
    }
}

Specifically this line:

slirp_redir(0, 42323, guest_addr, 23);

rumbeard

I can provide a patched binary if you get stuck.  I think it's 80, 443, 22, and I forget what other two.

dylanmcnamee

November 17, 2019, 10:23:33 pm #26 Last Edit: November 27, 2019, 05:39:51 am by dylanmcnamee
I made a tweaked version that forwards the telnet, ftp, ssh and http ports, it built just fine, and now I'm happily bi-directionally networking.

I added these lines to my enet_slirp.c:

        slirp_redir(0, 40220, guest_addr, 20); // ftp data
        slirp_redir(0, 40221, guest_addr, 21); // ftp control
        slirp_redir(0, 40222, guest_addr, 22); // ssh
        slirp_redir(0, 40223, guest_addr, 23); // telnet
        slirp_redir(0, 40233, guest_addr, 1023); // nfs ?
        slirp_redir(0, 40280, guest_addr, 80); // http


And on my host machine, I can both telnet and ftp to the guest with these commands:


% ncftp -u <my username> -P 40221 localhost
- and -
% telnet localhost 40223