China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-25 01:26
中国DOS联盟论坛 » DOS媒体世界 & 网络技术 (多媒体室) » Networking methods under MS-DOS View 4,697 Replies 9
Original Poster Posted 2009-09-17 19:18 ·  中国 上海 电信
高级用户
★★★
中國DOS聯盟常任參議员
Credits 686
Posts 318
Joined 2005-11-04 13:00
20-year member
UID 77577
Gender Male
Status Offline
I used to be very unclear about accessing networks under DOS, and I just happened to do it myself again. Sharing my own method. If there are mistakes, I sincerely ask for corrections.

First install Ms Network Client 3.0 (hereafter referred to as MsClient)
Run setup.exe to install MsClient, choose your network card. If your network card is not in the list, just pick any one. Set the computer name, add the TCP/IP protocol, and set the IP, network card, and related information.

Turn off hidden files and show all files, and you will see autoexec.bat and config.sys on drive c:.
Put these two files into the IMG image you made,
Then in the default directory c:\net find the procotol.ini and system.ini files
Because my network card is nForce4, and it's not in the list, I just picked 3Com EtherLink

procotol.ini file:


version=0x3110
netcard=ms$elnk,1,MS$ELNK,1 ; network card NDIS driver
transport=ms$nwlink,MS$NWLINK ; Nwlink IPX/spx protocol
transport=ms$ndishlp,MS$NDISHLP ; NDIS helper driver
transport=ms$netbeui,MS$NETBEUI ; NetBeUI protocol
transport=tcpip,TCPIP ; TCP/IP protocol
lana0=ms$elnk,1,ms$nwlink
lana1=ms$elnk,1,ms$ndishlp
lana2=ms$elnk,1,ms$netbeui
lana3=ms$elnk,1,tcpip


NBSessions=6
SubNetMask0=255 0 0 0 ; subnet mask
IPAddress0=192 168 0 20 ; IP address
Gateway=192 168 0 1 ; gateway
DisableDHCP=1 ; disable DHCP address assignment, 0 means enabled
DriverName=TCPIP$
BINDINGS=MS$ELNK
LANABASE=2



FRAME=ETHERNET_802.2
DriverName=nwlink$
BINDINGS=MS$ELNK



DriverName=PROTMAN$ ; this section is required. Loads protman.dos
PRIORITY=MS$NDISHLP

; network card identifier, this value can be anything, but the BINDINGS values in the sections above must match it
DriverName=ELNK$ ; network card name.
INTERRUPT=3
IOADDRESS=0x300
DMACHANNEL=none
DMAMODE=burst
MAXTRANSMITS=12



DriverName=ndishlp$
BINDINGS=MS$ELNK



DriverName=netbeui$
SESSIONS=10
NCBS=12
BINDINGS=MS$ELNK
LANABASE=1



system.ini file


sizworkbuf=1498
filesharing=no ; file sharing, set to yes to enable sharing
printsharing=no ; printer sharing, same as above
autologon=yes ; auto logon
computername=GO ; computer name
lanroot=C:\NET
username=GO
workgroup=WORKGROUP
reconnect=yes
dospophotkey=N ; set popup hotkey
lmlogon=0
logondomain= ; logon domain
preferredredir=full ; for networks without a domain, set to basic, can save more than 80KB conventional memory
autostart=full ; this value corresponds to the one above
maxconnections=8


netcard=elnk.dos
transport=ndishlp.sys,*netbeui,tcpdrv.dos,nemm.dos
devdir=C:\NET ; root directory of the drivers
LoadRMDrivers=yes ; don't know

; didn't find any use for it
TimerCriticalSection=5000
UniqueDosPSP=TRUE
PSPIncrement=2


Then the autoexec.bat and config.sys parts

config.sys
DEVICE=HIMEM.SYS /TESTMEM:OFF /Q
DEVICEHIGH=UMBPCI.SYS
device=C:\NET\ifshlp.sys ; this is required
FILES=20
LASTDRIVE=Z

autoexec.bat contents

SET PATH=C:\NET
C:\NET\net initialize ; initialize the protocol.ini and system.ini file configuration
C:\NET\nwlink
C:\NET\netbind.com
C:\NET\umb.com
C:\NET\tcptsr.exe
C:\NET\tinyrfc.exe
C:\NET\nmtsr.exe
C:\NET\emsbfr.exe

C:\NET\net start ; start networking

First try it in VMware 6, this network card driver needs to be changed. The network card drivers can be found in MaxDOS, including the protocol.ini file,
Personally I feel that as long as TCP/IP protocol is used, it can handle programs for both LAN and the Internet.
Remove unnecessary protocols,



version=0x3110
netcard=vmware,1,VMWARE,1
transport=tcpip,TCPIP
lana0=vmware,1,tcpip


NBSessions=6
SubNetMask0=255 0 0 0
IPAddress0=0 0 0 0
DisableDHCP=0
DriverName=TCPIP$
BINDINGS=vmware
LANABASE=0


DriverName=PROTMAN$
PRIORITY=MS$NDISHLP

; this section was copied over from MaxDOS.
DriverName=PCNTND$
MaxMultiCasts=10
TxBuffers=4
RxBuffers=4

system.ini part,


netcard=pcnet.dos
transport=tcpdrv.dos,nemm.dos
devdir=C:\NET
LoadRMDrivers=yes
all other sections unchanged.

For the soft network card on an nForce system, two driver files are needed to make it work.
Same as VMware, keep only the TCP/IP protocol.


version=0x3110
netcard=ms$amdnet,1,MS$AMDNET,1
transport=tcpip,TCPIP
lana0=ms$amdnet,1,tcpip


NBSessions=6
DefaultGateway0=192 168 0 4
SubNetMask0=255 255 0 0
IPAddress0=192 168 3 29
DisableDHCP=1
DriverName=TCPIP$
BINDINGS=MS$AMDNET
LANABASE=0


DriverName=PROTMAN$
PRIORITY=MS$NDISHLP

; note this section, it corresponds to dis_pkt.dos below
drivername=PKTDRV$
bindings=MS$AMDNet
intvec=0x60
chainvec=0x66



DriverName=UNDIS$
MaxMultiCasts=10
TxBuffers=4
RxBuffers=4


system.ini part,


netcard=nfv1.dos,ndis.dos ; there are two drivers. NDIS.dos seems to be Intel's.
transport=tcpdrv.dos,nemm.dos,dis_pkt.dos
devdir=C:\NET
LoadRMDrivers=yes

That's all. If some protocol part is not loaded, that part can be removed, and the corresponding parts in autoexec.bat can also be removed.

There are generally two kinds of DOS drivers, one is packet, the other is ndis. Most DOS programs use packet drivers, but newer drivers are all ndis, so when using some software with networking functions you may get the prompt
:packet driver not found
NO PACKET DRIVER FOUND

You can add a section to protocol.ini, and add dis_pkt.dos in system.ini
This changes ndis into a packet driver.

The wattcp.cfg file is also very important. I first came across this file in ghost.
The format is as follows:
my_ip=192.168.0.20 or IP=192.168.0.20 (ghost uses this line)
netmask=255.255.0.0 ; subnet mask
gateway=192.168.0.1 ; gateway
nameserver=202.96.209.5 (change it to the corresponding DNS)

For example, after ssh2dos.exe starts, it will look for this wattcp.cfg file in the LANROOT directory. If it cannot find this file, it will use dhcp...bootp.. and so on to obtain its own IP. If it still cannot find it, it will prompt failure.


DOS access to Windows shares
net use Z: \\server\share ;map a network share

net share a=C:\soft ;set up sharing
net share a=c:\soft /full ;set up sharing with read/write permission

Before setting up sharing under DOS, you need to start the server service first
net start server
And in system.ini you need to set filesharing=yes
You also need to replace the net version. Download >> original post: http://www.cn-dos.net/forum/viewthread.php?tid=16792&fpage=1

About converting ndis into a packet driver: http://www.cn-dos.net/forum/viewthread.php?tid=33390&fpage=1

After installing MsClient, there will be dozens of files in the c:\net directory.
That is enough to ensure the network works normally, and some files can be trimmed down.

File list:
ifshlp
PROTMAN.DOS、dis_pkt.dos、tcpdrv.dos、nemm.dos、ndishlp.sys、protman.exe、protocol.ini、system.ini

lmhosts、hosts、services、protocol、networks
net.exe、net.msg、neth.msg

nwlink、netbind.com、umb.com 、tcptsr.exe、tinyrfc.exe、nmtsr.exe、emsbfr.exe


That's all, I also wrote some notes in the attachment. They're rather messy.

This is using ftp under VMware to connect to ftp.microsoft.com

[ Last edited by Jneny on 2009-10-13 at 12:14 ]
Attachments
ftp.PNG
关于MaxDOS.rar (148.74 KiB, Downloads: 190)
. 繽紛色彩閃出的美麗是因為它沒有分開每種色彩...>/

我的百度空间: BEYOND超越 为什么用DOS
Floor 2 Posted 2009-09-18 22:48 ·  中国 广东 揭阳 电信
高级用户
★★
Credits 774
Posts 293
Joined 2003-04-16 00:00
23-year member
UID 1579
Gender Male
From 湖北仙桃
Status Offline
Bump for the OP, what you wrote is very detailed.
Might as well just use this software instead:
下载
09年7月7日 更新
感谢网友 囧HQY 提供空间
Floor 3 Posted 2009-09-19 09:17 ·  中国 上海 电信
高级用户
★★★
中國DOS聯盟常任參議员
Credits 686
Posts 318
Joined 2005-11-04 13:00
20-year member
UID 77577
Gender Male
Status Offline
I've seen the package made by the poster above, but I still haven't figured out where to set DNS,
When I connect to FTP under DOS, I always ping in WINdows first to get the IP and then connect.
Also, with net use z: \\server\share
this can connect to the server, but using ping server seems to say host not found.
Very strange. PING can only directly PING the target IP.
. 繽紛色彩閃出的美麗是因為它沒有分開每種色彩...>/

我的百度空间: BEYOND超越 为什么用DOS
Floor 4 Posted 2009-10-02 10:10 ·  中国 上海 电信
新手上路
Credits 17
Posts 9
Joined 2009-10-01 21:35
16-year member
UID 152515
Gender Male
Status Offline
The OP's method is fine as theoretical study, but it's still far from practical use. One disk can only be used for one kind of network card. Floppies made with scripts by foreigners can automatically recognize different network card drivers on a single floppy, and by setting the lmhosts file they can even clone across subnets. The foreign site is www.netbootdisk.com ,requirements for making it: vfd (virtual floppy), winimage, and windows xp. First create a DOS system floppy in xp, then run the batch file MakeDisk.bat, and you can create a network floppy. If you want to see the finished result, download hiren boot cd, burn it to a CD, boot the machine from the CD, and choose next-other tools-universal tcp/ip disk
Floor 5 Posted 2009-10-03 05:58 ·  中国 青海 西宁 城西区 电信
新手上路
Credits 2
Posts 1
Joined 2009-10-02 02:11
16-year member
UID 152522
Gender Male
Status Offline
As a newbie, I can't understand it...
Floor 6 Posted 2009-10-03 14:07 ·  中国 广东 揭阳 电信
高级用户
★★
Credits 774
Posts 293
Joined 2003-04-16 00:00
23-year member
UID 1579
Gender Male
From 湖北仙桃
Status Offline
My software can also edit the lmhosts file. Why not use this?
www.netbootdisk.com supports too few network cards.


[ Last edited by xugaohui on 2009-10-3 at 14:08 ]
下载
09年7月7日 更新
感谢网友 囧HQY 提供空间
Floor 7 Posted 2009-10-06 14:58 ·  中国 河南 开封 联通
新手上路
Credits 10
Posts 4
Joined 2009-10-06 01:03
16-year member
UID 152666
Gender Male
Status Offline
Collecting this to study....
Floor 8 Posted 2010-02-06 22:23 ·  中国 台湾 中华电信(HiNet)数据中心
新手上路
Credits 21
Posts 10
Joined 2010-02-04 19:33
16-year member
UID 160116
Gender Male
Status Offline
I've been researching it myself for a long time and still haven't succeeded, I'll try the OP's method
Floor 9 Posted 2010-04-14 19:10 ·  中国 北京 电信
初级用户
★★
Credits 90
Posts 57
Joined 2010-04-12 13:29
16-year member
UID 164386
Gender Male
Status Offline
Thanks for sharing
Floor 10 Posted 2010-04-29 15:42 ·  中国 江苏 南京 电信
初级用户
Credits 22
Posts 10
Joined 2010-04-08 15:30
16-year member
UID 164074
Gender Male
Status Offline
I roughly understand it, but is it suitable for using networking on a boot disk?
Forum Jump: