0% found this document useful (0 votes)
11 views18 pages

CNLab 1

The document outlines basic networking commands used for configuring, monitoring, and diagnosing network connectivity on a computer system. It lists various commands such as 'hostname', 'ping', 'traceroute', and 'curl', along with their functions and usage. Understanding these commands is essential for effective network management and troubleshooting.

Uploaded by

abcdmunshi2
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)
11 views18 pages

CNLab 1

The document outlines basic networking commands used for configuring, monitoring, and diagnosing network connectivity on a computer system. It lists various commands such as 'hostname', 'ping', 'traceroute', and 'curl', along with their functions and usage. Understanding these commands is essential for effective network management and troubleshooting.

Uploaded by

abcdmunshi2
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/ 18

Name: Munshi Abdul

Razzaq
Roll no.: 231070032
Batch: A

CN Lab Experiment
1
Aim: To study Basic Networking Commands Theory:

Networking commands are a set of command-line utilities (programs) that allow


users and administrators to interact with, configure, monitor, and diagnose
network connectivity and services on a computer system.

Program:

Network configuration commands:


1.​ hostname:
2.​ Ip addr show:
3.​ Iwconfg:

4.​ Ifconfig:

5.​ Netplan:

6.​ Ifquery:
7.​ Ifup: and 8. ifdown

Needs to have ifupdown installed and configured


9.​Dhclient:

10.​Arp:
This is the address resolution protocol table, it shows the MAC address for
the respective IP address

11.​Arp -a:

This shows the arp hashtable


12.​Arp -d:
Deletes all arp hash values, but it will relearn it very quickly, so it is
relatively safe to do so.

This is a single address

13.​Arp -s:
This helps in adding a new address MAC mapping into arp
As seen here the .200 subnet got added

14.​Netstat:
This shows the network statistics, and active connections
-antp means to show all connections of TCP with their process IDs

-r prints the kernels routing table

15.​Ping:
This is used to check the connectivity between computer and the address
given

16.​Route:
This is used to configure the kernels routing tables, using route flush will
remove all the routing information from the kernels table.

Eg is route add default gw 192.168.1.1

But this will change the default gateway to the given IP and is not persistent
so its a risky command on personal systems

As seen here, the first route show provides the eth0 proto kernel values,
while the second one shows both the non-proto (new addition) and the
proto kernel values, meaning that the route command worked

17.​Traceroute:

This is used to trace the path taken by the computer to reach specified
website
18.​Telnet:

This is used to connect to other ip addresses using the SSH

19.​Mail:

can be used to mail to others:

20.​Nslookup
This is used to perform DNS lookups to resolve hostnames, IP addresses,
mappings or any other DNS record
This is what it shows

21.​Host

This is used to resolve hostnames and IP addresses

It gives information about the host and their IP and SMTP

22.​Dig

This is a very powerful command for query information


It provides the Meta data, query info and time for the specific hostname.

23.​Whois:
Provides full information about domain ownership from WHOIS servers

24.​Finger:

Displays user information from a remote system, this is a largely obsolete


system whose port 79 gets blocked by ISPs for security reasons, hence no
valuable information can be obtained from it
25.​Hping

This is a command used for assembling and analysing TCP/IP packets

It has various flags that help determine whether the packet was accepted,
declined, or filtered as spam, etc

26.​Mtr:

Sends packets and also shows the ping for each hop

27.​Speedtest-cli
A CLI for testing upload and download speeds

28.​Tcpdump:

This command shows packet traffic on specific ports for any non-encrypted
domains

29.​Curl:

Transfer data to or from server using various protocols


30.​Wget:

This is a command used to download files from the internet.

Here, since the file was not available on the website, it gave a 404 error.

Conclusion:
These commands help navigating the networking environment of a device
and help configure the various functionalities that a device provides for
communication thru the internet. Knowing such commands can help in
monitoring and troubleshooting problems that are hard to discern.

You might also like