DOS can be used for a wide range of tasks far beyond the requirements of this class. You will be able to manage well if you master only a small subset of DOS commands and functions. These relate almost exclusively to file and directory management and are introduced in this handout.
This tip sheet assumes that you have learned how to turn on the PCs as they are configured in room 230 and that you have familiarized yourself with their keyboards (no small task in itself). It also assumes that you understand the meaning of the concept of a file and the elements of a file specification (drive, filename, and extension). The microcomputers you will be using are equipped with two floppy disk drives. The A-drive is the 3.5" (1.44MB) drive and the B-drive is the 5.25" (360KB) drive. The microcomputers also contain a C-drive, a hard disk drive of 130MB or 200MB capacity.
You will quickly find that the best way to learn how to use a computer is through experimentation. That is, once you have learned a command, try some variations until they don't work, then start over. Often there are five or six ways for you to accomplish a particular task. Usually, I will introduce you to only one, leaving it up to you to discover the rest. Don't hesitate to consult the DOS Reference Manual; copies can be found on the bookcase in room 230. Finally, don't be unduly disturbed by error messages. With computers, one of the best ways to learn is by making mistakes.
Most of the common DOS commands you need to use for this class (copy, rename, delete) are available to you in Windows through the Filemanager icon. And, since you can move back and forth between DOS and Windows, it doesn't matter which option you employ. Some commands are faster in invoke in Windows, some in DOS. If you haven't worked with Windows previously, go to the Windows tutorials in the help area.
A lot of times, I hear people asking questions like, how to find out the IP of a friend? Or how to find out your own IP? How do I know, which ports are open on my system? How do I make sure whether my system is infected with a Trojan or not?
Well, for all above questions (and more) there is one simple answer: The Netstat command.
Microsoft has this weird tendency of hiding or making sure that such useful utilities are not easily accessible to the users. However, they fail to understand that putting a utility in the Windows directory and not listing it anywhere does not make it hidden.
The Netstat command is accessible through the command line prompt. Simply launch MSDOS and:
NOTE: Normally, well, almost always, DOS opens by default in the Windows directory, however, for those of you whose default DOS directory is not Windows, the above would prove helpful.
Anyway, before we move on, we need to understand what exactly the Netstat command is used for.This command is by default used to get information on the open connections on your system (ports, protocols being used etc), incoming and outgoing data and also the ports of remote systems to which we are connected. Netstat gets all this networking information by reading the kernel routing tables in the memory.
According to the RFC on Internet Tool Catalog, Netstat is defined as:
Netstat is a program that accesses network related data structures within the kernel, then provides an ASCII format at the terminal. Netstat can provide reports on the routing table, TCP connections, TCP and UDP "listens", and protocol memory management.
Anyway, now that we know what Netstat is all about, we are in a position to start using it. Once, you have launched MSDOS, you can read the MSDOS help on Netstat by giving the following command:
Displays protocol statistics and current TCP/IP network connections.
NETSTAT [-a] [-e] [-n] [-s] [-p proto] [-r] [interval]
Ping is an extremely popular diagnosis tool, which is commonly used to determine whether a remote host is alive, or not. This manual explores this popular TCP/IP diagnosis utility in detail.
The word ‘ping’ is actually taken from a scientific operation carried out to locate objects using sonar. That is exactly what ‘ping’ does in networks, finding or determining whether a particular host is alive or not.
Whenever one cannot make a connection to a particular port of a remote system, then ‘ping’ is the starting point to determine whether the remote system that is being tried to open a connection with is connected to the Internet or not, or in other words whether it is alive or not. Similarly, when you use ‘ping’ and determine that a remote system is not alive, then it would mean that you cannot make a connection to it.
So, basically ‘ping’ is used to determine whether a remote host is alive or not or whether it is connected to the Internet or not.
Although the implications of the results of ‘ping’ can best be described as the above, they do not always hold true. Nowadays, with the increased usage of firewalls, router access lists and other access controls, it doesn’t always mean that if you cannot ‘ping’ a particular host, then you cannot telnet to a particular port on it.
What ping does is that it sends an ICMP ‘echo request’ message to a host, expecting an ICMP ‘echo reply’ to be returned. An ICMP ‘echo request’ message would have a type value of 8 and a code value of 0. On the other hand, an ICMP ‘echo reply’ message would have a type value of 0 and a code value of 0.
Wherever a host receives an ICMP echo request message, then its kernel knows that it has to reply to this request message with an ICMP echo reply message. So in other words we can also call an echo message a ‘ping request’ message and an echo reply message as the ‘Ping reply’ message.
CPing is a freeware MFC class to implement ping functionality. You can download the header files, the Documentation and help files from here: Click Here To Download
Other than above, Important DOS commands are as below :
Please let me know your views for above tutorial :