Nella seguente guida si farà riferimento a FreeDOS, un sistema operativo opensource 100% compatibile con MS-DOS.
Come hardware è stata utilizzata la macchina virtuale VirtualBox.
Potrà capitare che un programma di installazione vi chieda di caricare un floppy con i driver della scheda di rete. Nel caso create un immagine, montatela, copiateci i file necessari, smontatela. Così sarà poi possibile utilizzarla con Virtualbox.
$ mkfs.msdos -C floppyDOS.img 1440 $ sudo mount -o loop myfloppy.img /media/floppy/ $ sudo cp "file da copiare" /media/floppy
Lo stesso trucco può essere sfruttato per creare una ISO da montare come CD-ROM
$ mkisofs -o cdrom.iso [path]/directory_con_i_file_da_copiare/
Esistono almeno 3 modi per collegare un sistema DOS in rete:
- Applicazioni TCP/IP: basate sui Packet driver, permettono di configurare servizi come ftp, http, telnet, ssh o NFS in stile "UNIX".
- Microsoft / SMB workgroup: utilizza driver NDIS, permette di aggiungere un PC DOS ad una rete di macchine Windows (o SAMBA).
- Novell NetWare: utilizza driver ODI ed il protocollo TCP-IP, sviluppato per collegare fra loro sistemi DOS e NetWare.
Scaricate il pacchetto, scompattatelo ed eseguitelo. Affinché sia caricato in automatico ad ogni riavvio si consiglia di aggiungere la seguente riga all'AUTOEXEC.BAT
LH PCNTPK INT=0x60
Scaricate e scompattate mTCP
mTCP utilizza un file di configurazione per assegnare un IP alla macchina
Nel mio caso il file era eth.cfg e si trovava nella directory c:\mtcp\.
Anche questo comando può essere aggiunto all'AUTOEXEC.BAT
Un esempio di file di configurazione:
--- ETH.CFG --- PACKETINT 0x60 IPADDR 192.168.1.50 NETMASK 255.255.255.0 GATEWAY 192.168.1.1 NAMESERVER 192.168.1.1 MTU 1500
Se avete un server DHCP sulla vostra rete e non volete usare un IP statico è possibile usare una configurazione di questo tipo:
--- ETH.CFG --- PACKETINT 0x60 HOSTNAME lucados
dopodiché eseguire C:\MTCP\DHCP.EXE
mTCP fornisce le seguenti applicazioni:
- dhcp.exe -- DHCP client
- dnstest.exe -- DNS resolver
- ftp.exe -- FTP client
- ftpsrv.exe -- FTP server
- htget.exe -- programma per scaricare file dal web
- httpserv -- HTTP server
- ircjr.exe -- IRC client
- nc.exe -- Netcat utility
- ping.exe -- Ping utility
- pkttool -- packet sniffer and diagnostic tool per packet drivers
- telnet.exe -- Telnet client
- sntp.exe -- NTP (Network Time Protocol) client
FreeDOS boot disk MS-Client e MS-Server, USB/CDROM/NTFS/LPD
Nonostante la cosa più semplice per condividere file tra DOS e Windows sia utilizzare ftp (magari con l'mTCP), in rete si trovano numerose guide che trattano la condivisione attraverso i tool ufficiali di Microsoft.
NB: il TCP/IP del Network Client 3.0 richiede 230 KByte dei famosi 640K di memoria convenzionale DOS, attivandolo è molto probabile veder crashare il proprio sistema nel giro di poche decine di minuti. SMB (a differenza del TCP/IP) è un protocollo che negli anni ha subito aggiornamenti e modifiche, in pratica esistono molti "dialetti" di che non è detto siano sempre completamente intellegibili.
- Aggiornamenti NETSHAR.EXE,
Create una directory per eseguirvi i file DSK3-1.EXE e DSK3-2.EXE, una volta scompattati lanciate il setup.exe.
Copiate in una directory temporanea anche il file WG1049.EXE, eseguitelo e spostatene il contenuto in C:\NET (precedentemente creata dal setup.exe del DSK3), si tratta di un aggiornamento.
Spostate in C:\NET anche il file NETSHAR.EXE.
- FreeDOS utilizza il file configurazione
CONFIG.SYSdell'MS DOS, per cui dovremo inserirci manualmente la seguente riga
- Per inizializzare la rete all'avvio modificare il file
AUTOEXEC.BATaggiungendo le seguenti righe:
LH C:\NET\NET.EXE INITIALIZE C:\NET\NETBIND.COM LH C:\NET\UMB.COM LH C:\NET\TCPTSR.EXE LH C:\NET\TINYRFC.EXE LH C:\NET\NMTSR.EXE C:\NET\EMSBFR.EXE
- Se si usa un IP dinamico si può saltare questo passaggio:
- Configurazione di un IP statico:
- Aggiornare il file
C:\NET\PROTOCOL.INIcon l'indirizzo di rete statico:
- Aggiornare il file
[TCPIP] ... DefaultGateway0=0 0 0 0 SubNetMask0=255 0 0 0 IPAddress0=0 0 0 0 DisableDHCP=1 ...
Gli indirizzi IP usano lo spazio come separatore, al posto del punto
- Per vedere la lista dei computer connessi in rete digitare:
> net view
- Per montare una directory condivisa:
> net use X: \\SERVER\SHARENAME
Per utilizzare i tool NetWare su DOS virtualizzato tramite Virtualbox occorrerà scaricare i driver ODI per la scheda di rete PCnet-FAST III: PCNTNW.COM
Altre programmi potenzialmente utili se usando hardware reale non doveste trovare il driver ODI per la vostra scheda di rete:
DIS_PKT9.DOS Trasforma i driver NDIS in packet driver.
ODIPKT.COM Trasforma i driver ODI driver in packet driver.
FreeDOS boot disk Client 16-bit IPX, pkt driver, USB/CDROM/VC/LFN/, LPD Print Server, Ping
* Versione DOS/Win3X a 16-bit, IPX
Create una nuova directory (es. NOVFILES), copiateci i file scaricati e spacchettateli al suo interno. Se usate hardware reale sarà possibile scompattare gli archivi autoestraenti direttamente su floppy nel seguente modo:
C:\NOVFILES> VLMKT1 A: C:\NOVFILES> VLMKT2 A: C:\NOVFILES> VLMKT3 A: C:\NOVFILES> VLMKT4 A: C:\NOVFILES> VLMKT5 A: C:\NOVFILES> TCP16 A:
FreeDOS boot disk Client 32 Ethernet, IP/IPX, CDROM/VC, USB support, TinyHost
* Versione DOS/Win3X a 32-bit, IP/IPX
Si tratta di un programma che permette la realizzazione di una rete peer-to-peer capace di gestire fino a 25 computer, utilizza i driver ODI e garantisce un sopporto completo alle reti Novell Netware. ATTENZIONE: Si possono riscontrare problemi con driver recenti che richiedono versioni più vecchioe di LSL.COM (Link Support Layer).
Configurazione di Netware Lite
NetWare Lite is a peer-to-peer network that enables users to share printers and disk drives. To have a better understanding of NetWare Lite itself, many users need to learn some new network concepts and terminology. This document is designed to help make this learning process easier.
LOADING THE NETWORK
NetWare Lite is a DOS based network. In other words, it relies on DOS to communicate with your computer hardware and software (as opposed to NetWare 2.x and 3.x that do not use DOS to perform these functions). NetWare Lite is made up of several terminate-and-stay resident programs (TSRs) that load themselves into memory. These programs can be divided into two general categories--those that deal with the network board and those that make up NetWare Lite.
LSL <DOS ODI Driver> (Example: TRXNET.COM) IPXODI A
SHARE (DOS Program) SERVER CLIENT
These programs are normally executed from a batch file called STARTNET.BAT.
When NetWare Lite is installed, a file called STARTNET.BAT is created. STARTNET.BAT loads the network software into memory by running certain programs one at a time. If a machine is setup to be both a server and a client, STARTNET.BAT will look like the following:
LSL <DOS ODI Driver> (Example: NE2000) IPXODI A SHARE SERVER CLIENT
Note: All of these files, with the exception of SERVER.EXE, can be loaded into upper memory.
These files can be run from a batch file or from the command line. Some people even add these commands into their AUTOEXEC.BAT. This will work; however, Novell recommends that you use a separate batch file (such as STARTNET.BAT) to run these programs. When the network programs are loaded from a separate batch file, problems are easier to troubleshoot. STARTNET can be called from your AUTOEXEC.BAT by inserting the following command into your AUTOEXEC.BAT file (usually near or at the end):
LSL, the DOS ODI driver, and IPXODI are programs that enable the computer to interface with the network board.
Note: When you load IPXODI, you will do so with an A parameter (IPXODI A). This parameter causes the program to load itself without some of the overhead that is unnecessary for NetWare Lite to run, thus saving memory.
SHARE.EXE is a program that enables file sharing. Consequently, it must be loaded on servers (because they are likely to have files that other clients are trying to access concurrently).
SERVER.EXE must be loaded on each machine that has network resources (such as printers and disk drives) that need to be shared with other clients.
CLIENT.EXE must be loaded on each machine that will need to access network resources.
If a user wants to use COMPUTER-1 to print to a printer on COMPUTER-2, then COMPUTER-1 must have CLIENT.EXE loaded; and COMPUTER-2 must have SERVER.EXE loaded.
Likewise, if a user at COMPUTER-1 wants to access the hard disk located on COMPUTER-2, then COMPUTER-1 must have CLIENT.EXE loaded; and COMPUTER-2 must have SERVER.EXE loaded.
If a computer needs to have access to its own printer and SERVER.EXE has been loaded, then the computer will need to load CLIENT and capture a port because the printer has become a network printer.
USERS AND LOGGING IN
The supervisor can log in to the network by typing:
NET LOGIN SUPERVISOR
NetWare Lite allows network administrators to place limits on network access through passwords and directory access rights. The supervisor must create users so that individuals will be recognized by the network--then those users will be able to log in when they need network access.
Users can be added to the network by doing the following procedure:
1. Load the network (as explained above). 2. Type NET LOGIN SUPERVISOR 3. If requested, enter a password. 4. Type NET 5. Select "Supervise the Network." 6. Select "Users." 7. Press <Insert>. 8. Enter <username>. 9. Enter any information in about the user. For example, you can issue the user a password or give him supervisor privileges.
Now, a user can log in when desired from any machine.
Network resources are peripherals--usually printers, disk drives, and CD-ROMs--that are made available to all users on the network. Local printers become network printers, and disk drives and CD-ROMs become network directories.
Novell suggest network directories and printers be given descriptive names.
Good names for network directories might be BORLANDC, WORDPERFECT, GAMES, GIFS, or PUBLIC.
Good names for network printers might be LASERJET-II, EPSON-DOT, or APPLE-LAS.
Names that might not be good are CDRIVE, PRINTER1, and PRINTER2. These names provide no indication of what applications or what kinds of printers are being made available.
Notice that during installation, NetWare Lite creates a CDRIVE network directory for you. When you become familiar with the product, this resource ought to be given a more descriptive name.
The first type of network resource that a NetWare Lite administrator can create is a network directory. These directories need to be created so that individuals can gain access to other users' hard drives. Network directories also give the network administrator power to regulate network access. Users can only access network directories that the network administrator gives them access to.
Create a network directory by doing the following steps:
1. Load the network (as explained above). 2. Type NET LOGIN SUPERVISOR 3. Enter a password if requested. 4. Type NET 5. Select "Supervise the Network." 6. Select "Network Directories." 7. Press <Insert>. 8. Select the server where the actual directory resides. 9. Type <directory name> (example: WP). 10. Type in the actual directory path (example: C:\WP51).
Assign rights by doing the following:
In the same Network Directories screen, you can change "default access rights" and "users with nondefault rights." Refer to the NetWare Lite manual for instructions on how to do this.
A user cannot access another user's machine unless he maps a drive letter to a network directory that has been set up. The following section explains mapping:
Each computer recognizes a certain number of disk drives. Normally, a machine will have two floppy drives (A: and B:) and one hard drive (C:). NetWare Lite communicates to DOS and your machine that there are more drives on your machine than these three. Mapping a drive letter takes unused DOS drive letters and assigns them to network directories so that users are able to access the directories. This can be done both through the NET utility (by typing NET) and through the NET MAP command.
To map a drive letter using the NET utility, do the following:
1) Type NET at the command line. 2) Select "Map drive letters." 3) Select the drive letter you wish to map (such as G:). 4) Select the network directory to which you wish to map.
To map a drive letter to a network directory from the command line, enter the following:
NET MAP <drive letter> <network directory>
After setting up a WORDPERFECT network directory, a user might enter the following command:
NET MAP G: WORDPERFECT
If the network directory WORDPERFECT is physically located on SERVER-1 in C:\WP51, then whenever the user goes to G: (assuming G: has been mapped to WORDPERFECT), he will see the contents of C:\WP51 on SERVER-3. The user will not be able to access any other directories (other than subdirectories underneath C:\WP51) using G:.
If SERVER-1 has the following directory structure and a user has mapped G: to C:\WP51, then that user will be able to access both the \USERS and the \DATA subdirectories. However, he will not be able to access the \BORLANDC directory.
C:\ |--WP51 | |--USERS | |--DATA | |--BORLANDC
The LASTDRIVE= command in your CONFIG.SYS reserves extra DOS drive letters for NetWare Lite's use. For example, if you included the statement "LASTDRIVE=M" in your CONFIG.SYS and you had the above configuration (A:, B:, and C:), then you would have ten drive letters available for mapping (D: through M:).
The setup process is similar for network printers. Network printers can be created by doing the following steps:
1. Load the network (as explained above). 2. Type NET LOGIN SUPERVISOR 3. Enter a password if requested. 4. Type NET 5. Select "Supervise the network." 6. Select "Network printers." 7. Press <Insert>. 8. Select the server where the printer is actually connected. 9. Type <printer name>. 10. Select one of the "Available server ports." Make sure your printer is attached to the port that you select. 11. Press <Esc> to use the default settings (such as setup strings or CPS), or change as desired.
Now, to print to this printer, the user only needs to capture one of the personal ports to the network printer. The user could do this by issuing the following command:
NET CAPTURE LPTX <network printer>
Example: NET CAPTURE LPT1 LASER-JET
Ports LPT1, LPT2, and LPT3 can be used to capture while any port (parallel or serial) can be used to physically attach a printer.
Note: There is a difference between a "captured" port and the port to which a printer is attached. A printer can be physically attached to any port (parallel or serial). This port is entered when a network printer is created so that NetWare Lite interprets where to send print jobs that are directed to that printer. After those printers are established, ports LPT1, LPT2, and LPT3 are freed so that they can be used to capture network printers. That means that a user could have a printer physically attached to LPT1 and could capture LPT2 to that printer. He could then capture LPT1 to a printer located on someone else's machine if desired.
EXAMPLE NETWORK SETUP
The following is a comprehensive example that will take the reader through the setup of an imaginary network. This example will involve three machines: KENDALL-386, DAVE-286, and JOEL-486.
KENDALL-386 is set up as a client only. DAVE-286 is set up as server only, and JOEL-486 is set up as a client/server. Because DAVE-286 is a server only, it will be unable use any network resources. Likewise, KENDALL-386, because it is set up as a client only, will not be able to allow others to use its drives or printers.
VERIFY NETWORK CONNECTIONS
"Verify network connections" should be run once after you have initially set up the network to ensure that you do not have any hardware or driver problems. It should also be run any time you think you might have a connection problem. See Fax Document 1200451 or KB 1200451 in the NSE Pro or on Support Connection Web Site (support.novell.com) for more details. Follow this procedure to "Verify network connections":
1. Load the network (as explained above). 2. Insert PROGRAM DISKETTE into a disk drive. 3. Type INSTALL 4. Select "Verify network connections." 5. Enter the name of each machine. 6. "Verify network connections" should be running on all machines. 7. Each screen should look something like the following (all machines that are running "Verify network connections" should show up):
JOEL-486 00001B1E6082 KENDALL-386 00002C3I4983 DAVE-286 00008B9N4440
Let "Verify network connections" run for about five minutes to make sure that none of the machines disappear or flicker on and off.
If "Verify network connections" fails, then you know that you either have a hardware problem or a driver problem. Please refer to Fax Document 1200451 or KB 1200451 in the NSE Pro or on Support Connection Web Site (support.novell.com) for possible solutions.
Next, log in to the network to setup users. Follow the instructions above for setting up users. In the example, seven users have been set up:
Joel Kendall Dave Rebecca Kevin Steve Chad
Joel, Kendall, and Dave were given supervisor privileges, which means that they can perform the same functions as the supervisor.
If a server allows "Remote management," then users can change the server configuration from remote stations (clients). KENDALL-386 and JOEL-486 were set up so that they could not be remotely managed. DAVE-286 was set up so that it could be remotely managed by issuing the following commands:
1. Type NET at the DOS prompt. 2. Select "Supervise the network." 3. Select "Server configuration." 4. Select <server name>. 5. Arrow down to "Allow remote management," and select "Yes" or "No." 6. The change will take effect when the server has been rebooted.
SETTING UP NETWORK RESOURCES
Next, set up network printers and network directories. JOEL-486 has a printer attached to COM1. It is a HP Laserjet III called HPIII. DAVE-286 has a dot matrix printer attached to its LPT1 port called OKIDATA.
Any time someone on the network wants to print to one of these printers, they need to capture a port.
Remove all the CDRIVE directories that NetWare Lite created, and create the following four network directories:
WP51 DBASE COMMON DATA
WP51 is physically located on JOEL-486. Because JOEL-486 is set up as a server/client, the user who is using JOEL-486 can use the machine even though other user might be accessing WordPerfect from this machine.
DBASE is physically located on DAVE-286. Because DAVE-286 is set up as a server only, employees using DAVE-286 cannot access network resources; although, they will still be able to access their local drives (but not local printers).
COMMON and DATA are both located on DAVE-286.
KENDALL-386 cannot contain network directories because it is set up as a client only.
The following is an example of the files used to fine tune NetWare Lite followed by a list of configuration tips for each file:
CONFIG.SYS AUTOEXEC.BAT STARTNET.BAT LOG.BAT <NAME.BAT> NET.CFG
The server keeps track of all files that are open. As more workstations (clients) attempt to access a server, more files will be opened. The number of files that can be opened needs to be increased on any server that will be allowing clients to access files. Enter the following command somewhere in the CONFIG.SYS, or increase it if it is already there:
At the end of AUTOEXEC.BAT, the following command has been included so that the network will automatically be loaded when the computer is booted:
The STARTNET.BAT file will be different on each machine depending on its configuration. The following is an example of the one machine set up. All lines that do not have a specific designation are included in all three versions of STARTNET.BAT. Other lines are only included in the STARTNET.BAT files for the designated machines:
lsl ne2000 ipxodi a share (on DAVE-286 and JOEL-486) ** server (on DAVE-286 and JOEL-486) client (on KENDALL-386 and JOEL-486)
- See Fax Document 1200393 or KB 1200393 in the NSE Pro or on Support Connection Web Site (support.novell.com) for information on configuring SHARE.EXE.
Create a batch file for each user that logs each user into the network. (For example: Rebecca logs in using a batch file called BEC.BAT.) An individual batch file might contain the following commands:
net login rebecca net map d: wp51 net map e: dbase net map f: common net map g: data net capture lpt1 HPIII net capture lpt2 OKIDATA
Make a directory on each machine where all of these batch files exist called \NETBATCH and include this directory in the path of each machine. Now, whenever Rebecca wants to log in to the network, she can go to any machine that has client loaded and type BEC, and she will be logged into the network. Remember, this only works because the BEC.BAT batch file was copied over to the \NETBATCH directory of each machine.
This NET.CFG file was created by NetWare Lite at installation. It contains information specific to the network board on each machine. See Fax Document 1200451 or KB 1200451 in the NSE Pro or on Support Connection Web Site (support.novell.com) for more information on the NET.CFG file.