Networking discussion

Discussion of development and patch submission.
therock247uk
Posts: 29
Joined: Fri 25 Apr, 2014 2:55 pm

Re: Networking discussion

Post by therock247uk »

Got this working on my windows 10 host on a wlan...

http://i.imgur.com/bTZbnOQ.png
startmenu
Posts: 104
Joined: Sat 29 Nov, 2014 7:39 am

Re: Networking discussion

Post by startmenu »

got it working on Linux (under Wine) using the same disk image... OK, I'll check my Windows 7...
Thank you, Neozeed.
neozeed
Posts: 176
Joined: Tue 08 Jul, 2014 4:41 am
Location: Hong Kong SAR
Contact:

Re: Networking discussion

Post by neozeed »

Image

I have Windows 95, with IE 3.0 along with Comic Chat, and the Mail/News reader. I've downloaded Comic Chat, and news pretty quickly and everything is working on 95. The networking seems fine to me. Do you have a local web server or something to telnet to?
neozeed
Posts: 176
Joined: Tue 08 Jul, 2014 4:41 am
Location: Hong Kong SAR
Contact:

Re: Networking discussion

Post by neozeed »

Oh I just noticed something, On reboots it'll stop working. It runs best from a 'clean start'... I think when the 'vlan' code gets kicked I need to force slirp to stop/start, even though the pcap code didn't disconnect/reconnect... Use DHCP, if the stack has issues you'll get a DHCP failure so you'll know to shut down, exit PCem, start it again, and it should work.
neozeed
Posts: 176
Joined: Tue 08 Jul, 2014 4:41 am
Location: Hong Kong SAR
Contact:

Re: Networking discussion

Post by neozeed »

therock247uk wrote:Got this working on my windows 10 host on a wlan...

http://i.imgur.com/bTZbnOQ.png
Glad to hear!!
User avatar
ppgrainbow
Posts: 479
Joined: Thu 04 Sep, 2014 7:03 am
Contact:

Re: Networking discussion

Post by ppgrainbow »

neozeed wrote:Oh I just noticed something, On reboots it'll stop working. It runs best from a 'clean start'... I think when the 'vlan' code gets kicked I need to force slirp to stop/start, even though the pcap code didn't disconnect/reconnect... Use DHCP, if the stack has issues you'll get a DHCP failure so you'll know to shut down, exit PCem, start it again, and it should work.
I'm wondering if this will be an issue if an IP address is set to static. I used an static IP address and I believe that networking will still work after reboot. I could be wrong though. :)
User avatar
ppgrainbow
Posts: 479
Joined: Thu 04 Sep, 2014 7:03 am
Contact:

Re: Networking discussion

Post by ppgrainbow »

neozeed wrote:
ppgrainbow wrote:
Neozeed, I have one question. Does your SLiRP build support the WLAN environment? Just curious to ask.
You can *ONLY* ping 10.0.2.2

It works in WLAN setups, I am writing this on a MacBook Air, and running it through wine... Although I test on my Windows machine when I'm in the office, but that is a whole other story.

so 10.0.2.3 is the DNS that will be intercepted and it calls the DNS servers that your laptop is configured with. If you want to use a different DNS server you could, but some older OSes have issues with modern DNS servers (8.8.8.8 being one of the ones that wont work with old stuff)... And I didn't want to go down there. You can try 4.2.2.2 and 4.2.2.4, although I'm on the other side of the planet from those, and I dont feel like the latency.

SO yeah, 10.0.2.15 is the VM's ip address, 10.0.2.2 is the gateway, and 10.0.2.3 is DNS.
Thank you for the clarification! I really appreciate your effort of getting networking working properly. :)
User avatar
leilei
Posts: 1039
Joined: Fri 25 Apr, 2014 4:47 pm

Re: Networking discussion

Post by leilei »

My testing was done on Win98SE. I had to manually install a NE2000 (no PnP detection), let it configure itself, and then manually configure it after (IRQ 10, address 300). Left it at DHCP. 2 soft reboots followed by one hard reboot were had and it was working.
User avatar
ppgrainbow
Posts: 479
Joined: Thu 04 Sep, 2014 7:03 am
Contact:

Re: Networking discussion

Post by ppgrainbow »

leilei wrote:My testing was done on Win98SE. I had to manually install a NE2000 (no PnP detection), let it configure itself, and then manually configure it after (IRQ 10, address 300). Left it at DHCP. 2 soft reboots followed by one hard reboot were had and it was working.
That's really awesome to see that you finally got networking usable on Windows 98 SE! :D

I can't wait to try it out on PCem machines running Windows 95 and Windows NT 3.51 soon.
therock247uk
Posts: 29
Joined: Fri 25 Apr, 2014 2:55 pm

Re: Networking discussion

Post by therock247uk »

Networking is running great in nt 4 and 98se here.
amadama
Posts: 57
Joined: Mon 25 Aug, 2014 9:47 pm

Re: Networking discussion

Post by amadama »

How do I get inbound connection to a PCEM machine?
I have two PCEM machines on two separate PCs. How can one talk to the other say over a NETBIOS/CIFS share?
Also, can I do IPX using this SLIRP method?
User avatar
ppgrainbow
Posts: 479
Joined: Thu 04 Sep, 2014 7:03 am
Contact:

Re: Networking discussion

Post by ppgrainbow »

therock247uk wrote:Networking is running great in nt 4 and 98se here.
That's great to hear that.:D

I can't wait to install Internet Explorer 5 (16-bit) on PCem soon.
neozeed
Posts: 176
Joined: Tue 08 Jul, 2014 4:41 am
Location: Hong Kong SAR
Contact:

Re: Networking discussion

Post by neozeed »

amadama wrote:How do I get inbound connection to a PCEM machine?
I have two PCEM machines on two separate PCs. How can one talk to the other say over a NETBIOS/CIFS share?
Also, can I do IPX using this SLIRP method?

Inbound connections are an api call, so I'd need to tackle the win32 UI to setup some redirects. SLiRP isn't really meant for something complicated like CIFS. And IPX won't work with SLiRP as it is TCP/IP only. I wan't to re-add pcap support for things like IPX, DecNet, AppleTalk etc but it requires a WIRED (i.e. not wireless) connection. It's a limitation of the vast majority of wifi chips that won't allow forged packets to be received.

For DOSBox there is an IPX relay thing that lets people play games up and over the internet, I'd love to incorporate that as I see that as a viable scenario, much like how the DecNet fans have their HecNET.

There is all kinds of things that can be hacked on, but for this moment in time I'm focusing on SLiRP, with the intention of re-adding pcap. The current pcap code needs a little TLC, that I want to merge in from my Cockatrice III work, since I use this to talk to an NT machine via AppleTalk, and log into my Exchange server with outlook.

One big limitation of pcap is that the host machine cannot communicate with the emulated VM, which I know many people will stumble into thinking it's a bug, but again it's more so how it works, much like how it won't work on WiFi. TunTap is another way around this, but this will require the user to setup a bridge which I think is beyond most users, as it is quite tedious, but for those who want it, of course it's great to have for those scenarios where they want it.

So yes, this is me rambling, the TL;DR is that SLiRP is IP only, and redirection works best for single port things like a port 80 redirect for a web server, 22/23 for telnet or ssh, but something like CIFS/SMB is too complicated to work right as it *NEEDS* port 135 which the host machine will be using.
neozeed
Posts: 176
Joined: Tue 08 Jul, 2014 4:41 am
Location: Hong Kong SAR
Contact:

Re: Networking discussion

Post by neozeed »

leilei wrote:My testing was done on Win98SE. I had to manually install a NE2000 (no PnP detection), let it configure itself, and then manually configure it after (IRQ 10, address 300). Left it at DHCP. 2 soft reboots followed by one hard reboot were had and it was working.
Maybe it's the machine type? I don't know. I'm using the AMI486 with the Pentium Overdrive, as it POSTs the quickest... And it lets me switch between the dynamic and static cores the quickest.
amadama
Posts: 57
Joined: Mon 25 Aug, 2014 9:47 pm

Re: Networking discussion

Post by amadama »

@neozeed, thanks for the explanation. Saved me a lot of hair pulling trying to figure out why things weren't working when they weren't supposed to be working.
Are you saying that at some point it will be possible to select between SLIRP and PCAP for networking? I think the wireless issues and bridging are ok, having a full NIC and not just a NAT like SLIRP does is the way to go.
Thanks for your efforts (and SA1988, Battler, obviously Tom!)
User avatar
leilei
Posts: 1039
Joined: Fri 25 Apr, 2014 4:47 pm

Re: Networking discussion

Post by leilei »

neozeed wrote:
leilei wrote:My testing was done on Win98SE. I had to manually install a NE2000 (no PnP detection), let it configure itself, and then manually configure it after (IRQ 10, address 300). Left it at DHCP. 2 soft reboots followed by one hard reboot were had and it was working.
Maybe it's the machine type? I don't know. I'm using the AMI486 with the Pentium Overdrive, as it POSTs the quickest... And it lets me switch between the dynamic and static cores the quickest.
As in the screenshot in the previous page, it's an Award 430VX w/ Pentium 100MHz., Dynarec.


Haven't tried any online gaming yet, one appropriate game would be Subspace Continuum, if that still works in Win9x...
neozeed
Posts: 176
Joined: Tue 08 Jul, 2014 4:41 am
Location: Hong Kong SAR
Contact:

Re: Networking discussion

Post by neozeed »

amadama wrote:@neozeed, thanks for the explanation. Saved me a lot of hair pulling trying to figure out why things weren't working when they weren't supposed to be working.
Are you saying that at some point it will be possible to select between SLIRP and PCAP for networking? I think the wireless issues and bridging are ok, having a full NIC and not just a NAT like SLIRP does is the way to go.
Thanks for your efforts (and SA1988, Battler, obviously Tom!)
i've been thinking of using something like named pipes, or zeromq to allow a way to build a virtual network between machines... Something like how GNS3 does it, but I want something more.. dynamic.

But yes, I plan on today re-syncing to the latest version in source control and trying to work in the UI stuff as much as possible and re-adding pcap.

No doubt I need to write up some documentation as to what works, what will never work and setup scenarios etc... The cool thing about open source is that we can stand on some pretty tall shoulders, and beg/borrow bits and glue them together... :D
neozeed
Posts: 176
Joined: Tue 08 Jul, 2014 4:41 am
Location: Hong Kong SAR
Contact:

Re: Networking discussion

Post by neozeed »

leilei wrote: Haven't tried any online gaming yet, one appropriate game would be Subspace Continuum, if that still works in Win9x...
Quake works.. Which is no surprise as I've used it with SLiRP & Qemu. I'd be more worried if it didn't!

SLiRP does some old school NAT, from the FreeBSD 3.x days so that is basically what it is dealing with. I'd love to know more about doing some autonat stuff, but as they say another project for another day.
User avatar
leilei
Posts: 1039
Joined: Fri 25 Apr, 2014 4:47 pm

Re: Networking discussion

Post by leilei »

Quake? Lol let's go a little more modern :)
pcemoaserver.jpg
pcemoaserver.jpg (69.1 KiB) Viewed 23887 times
(the shifted image is a SDL bug with the 3dfx ICD; not PCem related)
neozeed
Posts: 176
Joined: Tue 08 Jul, 2014 4:41 am
Location: Hong Kong SAR
Contact:

Re: Networking discussion

Post by neozeed »

leilei wrote:Quake? Lol let's go a little more modern :)
pcemoaserver.jpg
(the shifted image is a SDL bug with the 3dfx ICD; not PCem related)
Too modern for me!

Ive never looked at the q3 code.. although i guess if its not threaded another MS-DOS port could be possible.... when i get bored.
User avatar
leilei
Posts: 1039
Joined: Fri 25 Apr, 2014 4:47 pm

Re: Networking discussion

Post by leilei »

Not threaded, but optional and allegedly broken with r_smp. Game modules are already virtualized so all those mods out there should work in dos - in theory. :D
The worst part would be the necessity to create a software renderer (which no one has done for q3 ever). you'd have to probably scrap up a fork of tinygl (residualvm?) then use it through with a strict vertexlight rendering path for compatibility/performance, otherwise it'd be only good for use with 3dfx hardware. and even then in TinyGL i'm not sure how the game would end up looking.
neozeed
Posts: 176
Joined: Tue 08 Jul, 2014 4:41 am
Location: Hong Kong SAR
Contact:

Re: Networking discussion

Post by neozeed »

Well I phased in pcap, but I broke slirp.

Image

Time to fix that again.

Also I'm a little confused on reading and writing to the config file... and I'd love to store strings, like the ethernet interface name... Right now it's hard coded, but it does work!
User avatar
ppgrainbow
Posts: 479
Joined: Thu 04 Sep, 2014 7:03 am
Contact:

Re: Networking discussion

Post by ppgrainbow »

neozeed wrote:Well I phased in pcap, but I broke slirp.

Image

Time to fix that again.

Also I'm a little confused on reading and writing to the config file... and I'd love to store strings, like the ethernet interface name... Right now it's hard coded, but it does work!
Oh no! I'm wondering if there is a way to use SLiRP or Winpcap as a option without having to break SLiRP and its networking capabilities in the first place, btw?
User avatar
ender
Posts: 51
Joined: Tue 14 Oct, 2014 12:51 pm

Re: Networking discussion

Post by ender »

I'd suggest you store the interface GUID or number, not name, because for some reason Windows 10 doesn't add a number to same-named interfaces any more:

Code: Select all

1. {B1D364E8-1113-4A5C-9F1E-98EFD32EC522} (TAP-Windows Adapter V9)
2. {5E505B7C-D04E-4A74-A739-558A33509291} (VMware Virtual Ethernet Adapter)
3. {6F2E068C-EB95-4887-9887-D2B0CA99A50C} (Intel(R) 82574L Gigabit Network Connection)
4. {B15B41C9-B4BE-4323-B581-0D39D82078F1} (TAP-Windows Adapter V9)
5. {482A4D7D-73D0-4764-A877-365ECB7247E2} (VMware Virtual Ethernet Adapter)
6. {42159F16-615F-4F33-936F-121A84D60E21} (Oracle)
7. {BF540878-2DF5-46C2-B86C-1E46C5146A93} (Intel(R) 82574L Gigabit Network Connection)
(look at interfaces 3 and 7)
neozeed
Posts: 176
Joined: Tue 08 Jul, 2014 4:41 am
Location: Hong Kong SAR
Contact:

Re: Networking discussion

Post by neozeed »

ppgrainbow wrote: Oh no! I'm wondering if there is a way to use SLiRP or Winpcap as a option without having to break SLiRP and its networking capabilities in the first place, btw?
Dont worry ill get it sorted out today. And push something to test!
therock247uk
Posts: 29
Joined: Fri 25 Apr, 2014 2:55 pm

Re: Networking discussion

Post by therock247uk »

Let me know when ready id like to test it out.
User avatar
ppgrainbow
Posts: 479
Joined: Thu 04 Sep, 2014 7:03 am
Contact:

Re: Networking discussion

Post by ppgrainbow »

neozeed wrote:
ppgrainbow wrote: Oh no! I'm wondering if there is a way to use SLiRP or Winpcap as a option without having to break SLiRP and its networking capabilities in the first place, btw?
Dont worry ill get it sorted out today. And push something to test!
Thank you so much for telling me! With the option to use SLiRP or Winpcap, it will made PCem testers very happy! :D
neozeed
Posts: 176
Joined: Tue 08 Jul, 2014 4:41 am
Location: Hong Kong SAR
Contact:

Re: Networking discussion

Post by neozeed »

ppgrainbow wrote:
neozeed wrote:
ppgrainbow wrote: Oh no! I'm wondering if there is a way to use SLiRP or Winpcap as a option without having to break SLiRP and its networking capabilities in the first place, btw?
Dont worry ill get it sorted out today. And push something to test!
Thank you so much for telling me! With the option to use SLiRP or Winpcap, it will made PCem testers very happy! :D
It was a missing brace. lol oh well at least it was a simple fix.

Now I can switch between pcap and slirp.

As soon as I figure out why device_get_config_int("slirp"); doesn't seem to actually work, and device_get_config_string to work, we will be in business so to speak!
neozeed
Posts: 176
Joined: Tue 08 Jul, 2014 4:41 am
Location: Hong Kong SAR
Contact:

Re: Networking discussion

Post by neozeed »

therock247uk wrote:Let me know when ready id like to test it out.
I will post details once it's in some kind of shape like the pcap stuff that I think users can tackle. It's all hard coded now, but after re-compiling I can switch between slirp & pcap by changing a 1 to a 0 so the guts are in place.
therock247uk
Posts: 29
Joined: Fri 25 Apr, 2014 2:55 pm

Re: Networking discussion

Post by therock247uk »

Nice one.
Post Reply