fragglet / ipxbox

Standalone DOSbox IPX-over-UDP server
GNU General Public License v2.0
69 stars 6 forks source link

One-way communication only when using IPX network bridge #5

Closed zerkerX closed 3 years ago

zerkerX commented 4 years ago

Hello. This is a great little project, so I was trying it to communicate between DOSBox and a native DOS PC using DOOM as a test application.

It seems when I have it running this way, DOSBox is able receive from the DOS session, but DOS is unable to receive from the DOSBox session. It seems something is slightly off about the packets that ipxbox produces.

I am running ipxbox on Debian 10 (Buster). I performed a Wireshark capture on a third machine (on the same network switch) to ensure output from both are being routed, which is attached. Addresses starting with BC are from the physical DOS PC, while addresses starting with 02 are from the Linux PC running ipxbox.

DoomIPX.pcapng.gz

fragglet commented 4 years ago

Hello and thanks for the feedback,

I took a look at the packet dump and I'm pretty certain it's caused by a mismatch in IPX framing schemes. The Ethernet frames from your DOS computer look like this:

10:48:09.571998 IPX 00000000.bc:f6:85:03:e9:c4.869b > 00000000.ff:ff:ff:ff:ff:ff.869b: ipx-#869b 16
        0x0000:  ffff ffff ffff bcf6 8503 e9c4 002e ffff
                                                    ^^^^ start of IPX frame
        0x0010:  002e 0000 0000 0000 ffff ffff ffff 869b
        0x0020:  0000 0000 bcf6 8503 e9c4 869b ffff ffff
        0x0030:  0000 0000 0100 0200 0000 0000

This is 802.3 raw framing. However the Ethernet frames sent by your ipxbox server look like this:

10:48:10.496844 IPX 00000000.02:b1:a4:06:eb:27.0002 > 00000000.02:ff:ff:ff:00:00.0002: ipx-#2 0
        0x0000:  02ff ffff 0000 02b1 a406 eb27 0021 e0e0
                                                    ^^^^ 802.2 SAP=IPX
        0x0010:  03ff ff00 1e00 0000 0000 0002 ffff ff00
                   ^^^^^ start of IPX frame
        0x0020:  0000 0200 0000 0002 b1a4 06eb 2700 0200
        0x0030:  0000 0000 0000 0000 0000 0000

This looks like a 802.2/LLC frame and is the default that ipxbox uses. It's also the default that Novell ipxodi uses.

I'm assuming you're probably using pdipx on your DOS machine, which defaults to 802.3 raw framing. The easiest solution for you is to run ipxbox with -ethernet_framing 802.3raw.

fragglet commented 4 years ago

One other thing - since you're experimenting with this stuff, I have another project you might also want to try out. It's still a bit buggy but I've been able to run real games over it:

https://github.com/fragglet/dali

If you'd like to give this a try and let me know how it works for you I'll be very grateful.

zerkerX commented 4 years ago

Thanks for the quick response. That was indeed the problem; I guess this is one of the gotchas with IPX that I wasn't aware of.

However, I actually am using ipxodi. Here is the relevant part of my autoexec.bat, with logging:

LH C:\DRIVERS\NETWORK\DOSODI\LSL.COM > c:\1lsl.log
LH C:\DRIVERS\NETWORK\DOSODI\DLKFET.COM > c:\2dlkfet.log
LH C:\DRIVERS\NETWORK\IPXODI.COM > c:\3ipxodi.log

The first two of those came from my D-Link DFE-530TX driver CD. I forget where I downloaded the exact version of ipxodi I'm using.

And the output of said logs (combined):

LSL.COM
-------
Novell Link Support Layer for DOS ODI  v2.20 (960401)
(c) Copyright 1990 - 1996, by Novell, Inc. All rights reserved.

MAX STACKS 8
MAX BOARDS 4
BUFFERS 30 1514
The configuration file used was "C:\DRIVERS\NETWORK\DOSODI\NET.CFG".
Max Boards 4, Max Stacks 8
Buffers 30, Buffer size 1514 bytes, Memory pool 0 bytes.

DLKFET.COM
----------
D-Link PCI Fast Ethernet Adapter Driver                     
v4.29 (2005/07/25) 

D-Link PCI Fast Ethernet Adapter                            
IRQ 9, Port 1400, Node Address BCF68503E9C4 L
Max Frame 1514 bytes, Line Speed 100 Mbps, Bus ID 4, Full-Duplex
Board 1, Frame ETHERNET_802.3, LSB Mode

IPXODI.COM
----------
NetWare IPX/SPX Protocol  v3.00 BETA 5 (940812)
(C) Copyright 1990-1994 Novell, Inc.  All Rights Reserved.

Bound to logical board 1 (DLKFET  ) : Protocol ID 0

Going by the logged messages, the D-Link driver might be controlling the framing that gets used? I dunno. Either way, you may want to add some information about this option to the HOWTO.

I'll see about testing out dali sometime this week.

fragglet commented 4 years ago

ETHERNET_802.3 concurs with my previous comment, yes.

When I find the time I'll try to add this to the HOWTO.

zerkerX commented 4 years ago

Okay, I gave Dali a bit of testing. Everything I tried basically worked, though Rise of the Triad was a little bit unstable when the Dali machine was server. It also might have been running at a lower frame rate, but I might also be imagining it. Doom, Duke Nukem 3D and Transport Tycoon Deluxe had no problems at all. Of course, all three of those have other means to get network play nowadays :)

fragglet commented 4 years ago

Great to hear - thanks!

In case it's of interest, there's a Discord for retro DOS multiplayer that you might want to join: https://discord.gg/eNBDV53 - you'll find me and several others hanging out there.