通常上网有两种方式,一种是拨号上网,即通过调制解调器,另一种是通过网卡。对于 ISDN,ADSL等,方法类似于用普通的网卡上网。因此,上网的方法也分为两类。先说用网卡上网,通常网卡驱动程序盘中带有个叫Packet driver的驱动程序,通常在驱动磁盘的PKTDRV文件夹中,它就是DOS下连接Internet的最关键的网络接口驱动程序,大多数DOS下的 Internet程序都需要有它就可以实现上网的功能了(如果在网卡驱动程序盘中没有找到Packet驱动程序的话,可以在http: //www.crynwr.com/上查找)。例如,如果您的网卡是NE2000的,就可用驱动磁盘的PKTDRV文件夹中的NE2000.COM来驱动 网卡,只需在命令行上输入NE2000就可以了。不过,有些网卡的Packet驱动程序需要输入安装的IO地址,通常为0x60(即十进制的98),即执 行NE2000 0x60命令进行驱动程序的安装。如果不输入地址的话,一般网卡就按照默认值安装在0x60或0x62上。若您使用的是拨号上网的话,有两种方法,一种是 使用调制解调器的Packet驱动程序,另一种是使用浏览器时使用其自带的拨号器。对于前者,可以使用一个叫作LSPPP的程序(可以在本站的“驱动程 序”中下载),它的功能十分强大,命令行参数也比较多,可以用LSPPP /?命令查看。通常需要指定的参数有:调制解调器所在的端口号、要拨的电话号码、用户名以及密码等,比如假定调制解调器在COM4上,要拨的号码是 163,则可在DOS命令行下输入LSPPP /n:4 /d:163 /U:user /P:pwd来实现上网(一定要注意大小写和各参数之间的空格)。一旦网卡的Packet驱动程序或LSPPP运行成功,DOS系统实际上就已经连在了 Internet上,这时,各种DOS下的Internet软件就可以直接访问网络了(当然,要真正完成Internet的功能,还需网络程序自带的 TCP/IP协议)。 如果您在加载了网卡或调制解调器的Packet驱动程序后想断开Internet的连接的话,既可以用反安装Packet驱动程序的方法,如执行NE2000 -U命令,也可使用通用的Packet驱动终止程序TERMIN(可在本站的“网络工具”中下载),比如如果Packet驱动程序的安装地址是0x60,使用TERMIN 0x60就可以了。 如果您想使用浏览器自带的拨号器而不是调制解调器的Packet驱动程序进行上网的话,可以看下面Arachne的使用。
大家知道,要浏览网页时需要一个网络浏览器。DOS下最好的图形方式的浏览器是Arachne,功能十分强大,可在本站中下载。使用它进行拨号上网需要一 个支持DOS的调制解调器(包括硬件的调制解制解调器或带有DOS驱动程序的软件调制解调器,也可以在Win9x的DOS窗口中使用),选择设置屏幕中的 “使用Modem上网”后,Arachne会对调制解调器每个可能所在的端口进行检测,只要成功检测到一个就可以使用了。然后输入正确的电话号码,用户名 及密码,就可以进行拨号了。当然,如果已经使用了上面介绍的LSPPP实现调制解调器的Packet驱动程序的加载后,就不必再进行Arachne的拨号 了。这时,设置Arachne的方法就和设置Arachne使用网卡的Packet上网的方法一样了。如果是通过网卡上网的话则需要先运行上面提到的此网 卡的Packet驱动程序,注意必须安装在地址0x60上,否则Arachne无法识别。在Arachne中的设置屏幕中选择“使用网卡上网”,并选择 DHCP自动配置,只要网络正常的话,就可以查看网页了。为了加快速度,可在运行Arachne浏览器之前加载DOS下的磁盘缓冲程序 SMARTDRV.EXE。关于Arachne浏览器的具体使用方法,可见“DOS文章”栏目。
当然,DOS下真正使用Internet还有许多种方法,如使用调制解调器或网卡的Packet驱动程序后,用WATTCP程序(如WGET,Lynx) 等都可以实现网上资料的读取,比如在DOS命令行下用WGET
www.yahoo.com命令就可以将Yahoo网站的首页下载下来,WGET甚至还支持断点续传功能。要想使用电子邮件,用Barebones E-mail等程序就可以轻易实现收发电子邮件(需知道邮箱的POP3及SMTP服务器地址)。对于FTP和Telnet等等操作,也可以使用相应的程序 来达到,如Wattcp您正在看的DOS教程是:DOS下联网的方法。 FTP等,具体可在本站的“网络工具”中看到。DOS下有关网络的程序很多,这里就不再详述了。
There are usually two ways to access the Internet. One is dial-up access, which is through a modem, and the other is through a network card. For ISDN, ADSL, etc., the method is similar to using an ordinary network card to access the Internet. Therefore, the methods of accessing the Internet are also divided into two categories. Let's first talk about accessing the Internet with a network card. Usually, the network card driver disk has a driver program called Packet driver, which is usually in the PKTDRV folder of the driver disk. It is the most critical network interface driver for connecting to the Internet under DOS. Most Internet programs under DOS need it to realize the function of accessing the Internet (if the Packet driver program is not found in the network card driver disk, you can search on http://www.crynwr.com/). For example, if your network card is NE2000, you can use NE2000.COM in the PKTDRV folder of the driver disk to drive the network card. Just enter NE2000 on the command line. However, the Packet driver program of some network cards needs to enter the installed IO address, which is usually 0x60 (that is, 98 in decimal), that is, execute the command NE2000 0x60 to install the driver program. If the address is not entered, generally the network card is installed on 0x60 or 0x62 according to the default value. If you use dial-up access, there are two methods. One is to use the Packet driver program of the modem, and the other is to use the built-in dialer when using the browser. For the former, you can use a program called LSPPP (which can be downloaded in the "Driver Programs" of this site). Its function is very powerful, and there are relatively many command line parameters. You can use the command LSPPP /? to view. Usually, the parameters that need to be specified are: the port number where the modem is located, the phone number to dial, the username, and the password, etc. For example, assuming that the modem is on COM4 and the number to dial is 163, you can enter LSPPP /n:4 /d:163 /U:user /P:pwd on the DOS command line to access the Internet (be sure to pay attention to the case and the spaces between each parameter). Once the Packet driver program of the network card or LSPPP runs successfully, the DOS system is actually connected to the Internet. At this time, various Internet software under DOS can directly access the network (of course, to truly complete the functions of the Internet, the TCP/IP protocol built into the network program is also needed). If you want to disconnect the Internet connection after loading the Packet driver program of the network card or modem, you can either use the method of uninstalling the Packet driver program, such as executing the command NE2000 -U, or use the universal Packet driver termination program TERMIN (which can be downloaded in the "Network Tools" of this site). For example, if the installation address of the Packet driver program is 0x60, using TERMIN 0x60 can do it. If you want to use the built-in dialer of the browser instead of the Packet driver program of the modem to access the Internet, you can look at the use of Arachne below.
As we all know, a web browser is needed to browse web pages. The best graphical browser under DOS is Arachne, which is very powerful and can be downloaded in this site. To use it for dial-up access, a modem supporting DOS is needed (including a hardware modem or a software modem with a DOS driver, and it can also be used in the DOS window of Win9x). After selecting "Access the Internet using Modem" in the settings screen, Arachne will detect each possible port where the modem is located, and as long as it successfully detects one, it can be used. Then enter the correct phone number, username, and password, and you can dial. Of course, if you have already used the above-mentioned LSPPP to load the Packet driver program of the modem, you don't need to dial in Arachne anymore. At this time, the method of setting Arachne is the same as the method of setting Arachne to use the Packet access of the network card. If accessing the Internet through the network card, you need to first run the above-mentioned Packet driver program of this network card. Note that it must be installed on the address 0x60, otherwise Arachne cannot recognize it. In the settings screen in Arachne, select "Access the Internet using network card" and select DHCP automatic configuration. As long as the network is normal, you can view web pages. To speed up, you can load the disk buffer program SMARTDRV.EXE under DOS before running the Arachne browser. For the specific use method of the Arachne browser, you can see the "DOS Articles" column.
Of course, there are many other methods to really use the Internet under DOS. For example, after using the Packet driver program of the modem or network card, you can use programs such as WATTCP (such as WGET, Lynx) to realize the reading of online materials. For example, you can use the command WGET
www.yahoo.com on the DOS command line to download the homepage of the Yahoo website. WGET even supports the breakpoint continuation function. To use email, you can easily realize sending and receiving emails with programs such as Barebones E-mail (you need to know the POP3 and SMTP server addresses of the mailbox). For operations such as FTP and Telnet, you can also use corresponding programs to achieve, such as Wattcp and FTP, which can be specifically seen in the "Network Tools" of this site. There are many network-related programs under DOS, and it will not be described in detail here.