Department of Computer Science HITEC University, Taxila
BS Computer Science Program (Batch 2021…..)
Lab report:-02
CS-306: DCCN
Name:
Muhammad Hamza
Muhammad khan ahmed
Hassan sajjad khan
Registration No:
21-cs-068
21-cs-023
21-cs-003
Instructor: Fatima rauf
1. Simulate & Explain the output of following commands:
a) NS Lookup
explanation:-
The nslookup command is used to query DNS (Domain Name System) servers to get
domain name or IP address information. It can be used to troubleshoot DNS-related issues,
find the IP address of a domain, or resolve domain names to IP addresses. The nslookup
command is used to query DNS (Domain Name System) servers to get domain name or IP
address information. It can be used to troubleshoot DNS-related issues, find the IP address
of a domain, or resolve domain names to IP addresses.
Output:-
b) NETSTAT
explanation:-
The netstat command in a command prompt (or terminal) displays network connections,
routing tables, interface statistics, masquerade connections, and multicast memberships.
It's available on most operating systems including Windows, macOS, and Linux.
When you run netstat without any options, it typically displays a list of active network
connections. With various options, you can get more detailed information about network
interfaces, routing tables, and more.
Output:-
c) Route
explanation:-
The route command in a command prompt (or terminal) is used to view and manipulate
the IP routing table in an operating system. The routing table is a set of rules that
determines where network traffic is directed.When you run the route command without
any options, it typically displays the current routing table, showing the destination network
or host, the gateway to use for that destination, the netmask, and other information such as
the interface through which the traffic will be routed.
output:-
d) tracert
explanation:-
The tracert command (short for "traceroute") is used in a command prompt (or terminal) to
trace the route that packets take from your computer to a destination IP address or domain
name. It shows the IP addresses of the routers (or "hops") that the packets pass through on
their way to the destination.When you run tracert followed by a destination IP address or
domain name, the command sends a series of packets to the destination with increasing
Time-To-Live (TTL) values. Each router along the path decrements the TTL value, and
when it reaches zero, the router sends back an ICMP Time Exceeded message. This allows
tracert to determine the route taken by the packets.
output:-
e) Loopback address (12.0.0.1)
explanation:-
The loopback address 127.0.0.1 is used to establish an IP connection to the same machine
or computer used by the end-user. It's often used for testing and troubleshooting network
configurations. When a program or service on a computer sends packets to the loopback
address, the packets are routed back to the same machine without going out to the
network. This allows testing of network-related functionality without the need for an
actual network connection.
output:-
f) netsh
explanation:-
The netsh command is a command-line scripting utility that allows you to display or modify
the network configuration of a computer that is currently running. It's available in Windows
operating systems.
netsh can be used for a variety of network-related tasks, such as configuring interfaces,
routing, and Windows Firewall. It's a versatile tool that can be used to manage various
aspects of network settings.
Here are a few examples of how you can use
output:-
conclusion:-
In conclusion, the command line offers powerful tools for managing and troubleshooting
network configurations. Commands such as nslookup, netstat, route, tracert, and netsh provide
valuable insights into network connectivity, routing, and configuration. These commands are
essential for network administrators and users seeking to diagnose and resolve network-related
issues. Understanding how to use these commands can greatly enhance your ability to manage
and troubleshoot networks effectively.