0% found this document useful (0 votes)
48 views9 pages

Lab1 (CNS301)

Computer neworks basic labs

Uploaded by

qazimahrukh169
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)
48 views9 pages

Lab1 (CNS301)

Computer neworks basic labs

Uploaded by

qazimahrukh169
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/ 9

UIT UNIVERSITY

Department of Computer Science


Course Code: CNS 301
Course Title: COMPUTER NETWORKS
FALL 2024

Lab 01
Objective:

This practical performance exposes the students to some of the diagnostic commands that are
utilized to diagnose/troubleshoot the problems.

Student Information

Student Name

Student ID

Date
Assessment

Marks Obtained

Remarks

Signature
Lab 01: TCP/IP Utilities

UIT UNIVERSITY
Department of Computer Science
CNS301 – Computer Networks

Lab 01

Instructions

• Come to the lab in time. Students who are late more than 20 minutes, will not be allowed to attend the lab.
• Students have to perform the examples and exercises by themselves.
• Lab work must be submitted on the same day it is performed.

1. Objective

This practical performance exposes the students to some of the diagnostic commands that are utilized to
diagnose/troubleshoot the problems.

2. Labs Descriptions
1. Tracert : It is a utility that can be used to determine the route and hop count to a destination
n. Example of tracert is shown below:

Page 2 of 9
Lab 01: TCP/IP Utilities

Figure 1: Tracert command being used to depict the hops required to reach the destination

Figure 2: Tracert command used with IP address instead of domain name

2. PING:
PING stands for “Packet Internet Groper” and it is a diagnostic tool that is used to check
whether a host is reachable or not. Target can be either a name or IP address.

Syntax:
Ping www.uit.edu
Ping ip address (you can mention ip address instead of domain name)
Ping ip address or Domain name –n number of packets you want to sent
Ping –a ip address.(will first resolve ip to its domain name)

Figure 3: PING using domain name

Page 3 of 9
Lab 01: TCP/IP Utilities

Figure 4: PING using IP Address

Figure 5: PING using IP Address and specifying number of packets.

Figure 6: PING using a variant -a will yield domain name associated with IP and rest is same as above.

3. ARP
ARP is “Address Resolution Protocol”. It is used to resolve IP address to MAC address.

arp –a (will show a list of relevant IP addresses and their corresponding MAC addresses)

Figure 7: arp with -a variant can show IP and Corresponding MAC address

4. NETSTAT
This command gives you information about transport protocols (TCP and UDP) and their present
state like close or listening etc.
Netstat –a Shows the status of port along with the devices local address and the address with which
communication is being done.

Netstat -e will yield Ethernet statistics that is number of bytes sent and received

Page 4 of 9
Lab 01: TCP/IP Utilities

Netstat -r To see routing table information and interface detail use following command

Figure 8: netstat with -a variant can show IP and Corresponding MAC address

Figure 9: Depicting the different status of ports

Page 5 of 9
Lab 01: TCP/IP Utilities

Figure 10: Showing Ethernet statistics that is number of bytes sent and received

Figure 11: To see routing table information and interface detail use following command

5. Nslookup
Nslookup utility is used to test and troubleshoot domain name servers. Nslookup has two
modes. Interactive mode enables you to query name servers for information about hosts and
domains, or to print a list of hosts in a domain. Non- interactive mode prints only the name
and requested details for one host or domain. Non-interative mode is useful for a single query.

To enter the interactive mode of Nslookup, type nslookup without any arguments at a command
prompt, or use only a hypen as the first argument and specify a domain name server in the
second. The default DNS name server will be used if you don't enter anything for the second
argument.

Page 6 of 9
Lab 01: TCP/IP Utilities

Figure 12: nslookup command being used.

To use non-interactive mode, in the first argument, enter the name or IP address of the computer
you want to look up. In the second argument, enter the name or IP address of a domain name
server. The default DNS name server will be used if you don't enter anything for the second
argument.

Figure 13: nslookup being used with domain name

6. Ftp
Transfers files to and from a computer running a File Transfer Protocol (FTP) server service
such as Internet Information Services. Ftp can be used interactively or in batch mode by
processing ASCII text files. Syntax ftp [-v] [-d] [-i] [-n] [-g] [-s:FileName] [-a] [-
w:WindowSize] [-A] [Host]

Parameters

Page 7 of 9
Lab 01: TCP/IP Utilities

-v : Suppresses the display of FTP server responses.

-d : Enables debugging, displaying all commands passed between the FTP client and FTP
server.

-i : Disables interactive prompting during multiple file transfers.

-n : Suppresses the ability to log on automatically when the initial connection is made.

-g : Disables file name globbing. Glob permits the use of the asterisk (*) and question mark
(?) as wildcard characters in local file and path names.

-s: FileName : Specifies a text file that contains ftp commands. These commands run
automatically after ftp starts. This parameter allows no spaces. Use this parameter instead of
redirection (<).

-a : Specifies that any local interface can be used when binding the FTP data connection.

-w: WindowSize : Specifies the size of the transfer buffer. The default window size is 4096
bytes.

-A : Logs onto the FTP server as anonymous.

Host : Specifies the computer name, IP address, or IPv6 address of the FTP server to which to
connect. The host name or address, if specified, must be the last parameter on the line.

/? : Displays help at the command prompt.

FTP sub commands

Put Copies a file on your local host to the foreign host.

Get Display the name of the current working directory

Block Sets the data transfer mode to block mode

Open Opens a connection to a foreign host.

Page 8 of 9
Lab 01: TCP/IP Utilities

Pwd Displays the name of the active working directory on the


foreign host.

Bye Leaves the FTP command environment


Table1: FTP commands

Lab tasks

Task 01: Explore the syntax “ipconfig” and “winipcfg”. Note down your observations?

Task 02: Answer following questions

1) State the size of MAC address both in Bytes and Bits

2) Differentiate between IP and MAC address

3) What is a gateway

4) What is the purpose of loop-back address?

5) PING stands for

6) What is the difference between ipconfig and ipconfig/all commands?

7) Explore Nbtstat and finger command and explain its purpose.

Task 03: execute the tasks mentioned in the manual and observe the output

Page 9 of 9

You might also like