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 ]
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 ]

