0% found this document useful (0 votes)
513 views5 pages

Experiment 5 - Basic Networking Commands in Msdos

This document discusses basic networking commands in MSDOS, including commands to check TCP/IP settings (ipconfig), test connectivity (ping), trace routes (tracert), view network connections (netstat), manage routing tables (route), resolve addresses (arp), and renew IP configurations (ipconfig /renew). Exercises are provided to familiarize the user with using these commands.

Uploaded by

M Zahid
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
513 views5 pages

Experiment 5 - Basic Networking Commands in Msdos

This document discusses basic networking commands in MSDOS, including commands to check TCP/IP settings (ipconfig), test connectivity (ping), trace routes (tracert), view network connections (netstat), manage routing tables (route), resolve addresses (arp), and renew IP configurations (ipconfig /renew). Exercises are provided to familiarize the user with using these commands.

Uploaded by

M Zahid
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

EXPERIMENT 5 - BASIC NETWORKING COMMANDS IN MSDOS

Objective
• Study the IP configuration and packet tracing using MSDOS.
Time Required : 3 hrs
Programming Language : NIL
Software Required : NIL
Hardware Required :
• Computer with administrative rights

Check the TCP/IP Settings with the IPCONFIG Utility


Use the ipconfig.exe command to see your TCP/IP settings on one screen. Click on Start -> Command
Prompt. Enter ipconfig /all command to see all TCP/IP related settings for your workstation.
Fill in the blanks below using the results of the IPCONFIG command from each workstation:

Check the network connection with the Ping Utility


Use the Ping Command to check for basic TCP/IP connectivity. Click on Start-> Command Prompt. Enter
the Ping command followed by the IP address of the other workstation (Example - ping 192.168.230.1 or
192.168.230.2).

Network related commands


To know and learn about various network related commands [ping, tracert, netstat, at, net, route, arp and few
definitions cum settings.

PING Command
Ping is a basic Internet program that lets you verify that a particular IP address exists and can accept
requests. The verb ping means the act of using the ping utility or command. Ping is used diagnostically to
ensure that a host computer you are trying to reach is actually operating. Various options available in the
ping command:
-t repetitively sends packets.
-n number of echo to be sent
-l sending buffer size [Max: 65500 bytes]
-r count record route for count hops [3rd layer device]

Activity 5.1
In order to send a packet to a host [192.168.230.1] with size of 60000 bytes each. We wish to send the
packets repetitively.
ping -t -l 60000 192.168.230.1

Exercise 5.1: [2]


Test the reach ability towards a PC [192.168.230.4].

16 Experiment 5 – Basic Networking Commands in MSDOS


TRACERT Command
If someone would like to know how he goes from his house to his office he could just tell the list of the
crossroads where he passes. The same way we can ask the data sent over from your computer to the web
server which way does it go, through which devices? We ask it by using the utility called trace route. In
most computers today you can use this tool from the command line: In MS Windows machines it is called
tracert.
Various options available in the tracert command:
-d Don’t resolve addresses to hostnames.
-h maximum_hops Maximum number of hops to search for target
-w time-out wait timeout milliseconds for each reply.

Activity 5.2
To check the trace from your PC to a server
tracert 172.23.16.1

Exercise 5.2: [2]


Find the route from your PC to MIMS Server

PATHPING Command
This command is used as IP trace utility and so it is similar to the tracert command. It has some extra
features compared to tracert command. It also has various options to perform.
-n Don't resolve addresses to hostnames
-h max_hops Max number of hops to search
-p period Wait between pings (milliseconds)
-q num_queries Number of queries per hop
-w timeout Wait timeout for each reply (milliseconds)

NETSTAT Command
This command is used to get information about the open connections on your system
(ports, protocols are being used, etc.), incoming and outgoing data and also the ports of remote systems to
which you are connected.
Various options available in the netstat command:
-a Displays all connections and listening ports.
-e Displays Ethernet statistics. This may be combined with the -s option.
-n Displays addresses and port numbers in numerical form.
-p proto Shows connections for the protocol specified by proto; proto may be TCP or UDP. If used
with the –s option to display per-protocol statistics, proto may be TCP, UDP, or IP.
-r Displays the routing table.
-s Displays per-protocol statistics. By default, statistics are shown for TCP, UDP and IP; the -p
option may be used to specify a subset of the default.
Activity 5.3
To display all connections and listening ports
netstat –a
To find out the statistics on your Ethernet card
netstat –e
To get to know the routing table.
17 Experiment 5 – Basic Networking Commands in MSDOS


netstat -r

Exercise 5.3: [2]


Open a browser connection to http server [www.mcs.edu.pk] and write down the outcome of the command
'netstat -an'.

ROUTE Command
This command manipulates network routing tables. Various options available in the ROUTE command:
-f Clears the routing tables of all gateway entries. If this is used in conjunction with one of the
commands, the tables are cleared prior to running the command.
Command Specifies one of four commands
PRINT Prints a route
ADD Adds a route
DELETE Deletes a route
CHANGE Modifies an existing route
Destination Specifies the host to send command.
MASK If the MASK keyword is present, the next parameter is interpreted as the netmask
parameter.
Netmask If provided specifies a sub-net mask value to be associated with this route entry. If not
specified, if defaults to 255.255.255.255.
Gateway Specifies gateway.

Activity 5.4
To display the routing table.
route PRINT
To add a route a destination
route add <destination> mask <subnetmask> <gateway> metric <number>

Exercise 5.5: [2]


Create a route entry in the routing table for a network 210.20.23.0 with the gateway 172.23.19.250 metric of
5.

18 Experiment 5 – Basic Networking Commands in MSDOS


ARP Command
The address resolution protocol (ARP) is a protocol used by the Internet Protocol (IP), specifically IPv4, to
map IP network addresses to the hardware addresses used by a data link protocol. Various options available
in the ARP command:
-a Displays current ARP entries by interrogating the current protocol data. If inet_addr is specified, the
IP and Physical addresses for only the specified computer are displayed. If more than one network
interface uses ARP, entries for each ARP table are displayed.
-d Deletes the host specified by inet_addr.

Activity 5.5
To display the entries in ARP cache
arp -a
To delete an ARP entry in the cache
arp –d 192.168.50.203

Exercise 5.5: [1]


Remove all the entries in the ARP cache and then generate a PING command to a specific PC
[192.168.50.203]. Then, display all the entries in the ARP cache.

IPCONFIG Command
This command is used to get IP configurations present in your PC.
IPCONFIG /all Display full configuration information.
IPCONFIG /renew [adapter] Renew the IP address for the specified adapter.
IPCONFIG /flushdns Purge the DNS Resolver cache.
IPCONFIG /displaydns Display the contents of the DNS Resolver Cache. ##

Activity 5.6
> ipconfig ... Show information.
> ipconfig /all ... Show detailed information
19 Experiment 5 – Basic Networking Commands in MSDOS


> ipconfig /renew ... renew all adapters

Exercise 5.6: [1]


Get to know about the TCP/IP configuration on your PC using
ipconfig /all

Web Resources
http://www.wikihow.com/Configure-Your-PC-to-a-Local-Area-Network
http://thestarman.pcministry.com/DOS/DOS7NET.htm

Videos Resources
http://www.youtube.com/watch?v=G9ixcE9Bj44
http://www.youtube.com/watch?v=CK_xa_avd44

20 Experiment 5 – Basic Networking Commands in MSDOS

You might also like