Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

CSE1004 - Lab (G1+TG1 Slot) Assignment - 1: Submitted By: Submitted To: Abhishek Kandel (19BCE2629) Dr. Santhi H

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 13

CSE1004 – Lab (G1+TG1 slot) Assignment – 1

Submitted by: Submitted to:

Abhishek Kandel (19BCE2629) Dr. Santhi H

Activity-1

Execute the following commands with ANY FIVE additional options:

1. ifconfig 2. ping 3. tracert 4. netstat 5. nslookup

Upload the document with the following.

 Name of the Command

 Option used

 Option Description

 Screen shot of output

 Your own interpretations of the obtained results for each option

1. ifconfig :
The utility is a command-line interface tool and is also used in the system startup
scripts of many operating systems. It has features for configuring, controlling, and querying
TCP/IP network interface parameters.

Name of the command: ifconfig

Option used:

a. ifconfig enp0s3
b. ifconfig lo
c. ifconfig –s
d. ifconfig -a
e. ifconfig –v
Option description and its interpretation:

a.ifconfig enp0s3: Using interface name (enp0s3) as an argument with “ifconfig” command will
display details of specific network interface.

b.ifconfig lo: lo is the loopback interface. This is a special network interface that the system uses
to communicate with itself.

c. ifconfig –s: Display a short list in a format identical to the command "netstat -i".

d. ifconfig –a: It displays information of all active or inactive network interfaces on server.

e.ifconfig –v: Verbose mode; display additional information for certain error conditions.

Snapshots:
2. ping :

On a computer network, a ping tool is built into most operating systems that works in
much the same way. You issue the ping command along with a specific URL or IP address. Your
computer sends several packets of information out to that device, and then waits for a response.
When it gets the response, the ping tool shows you how long each packet took to make the round
trip—or tells you there was no reply.

• Name of command: ping


• Options used:
a. ping -V
b. ping -v
c. ping -c
d. ping -w
e. ping –s

• Option description and interpretation :

a. ping -V: Display the current version of ping program using -V option.
b. ping –v: www.instagram.com:Set type of service (Setting has been deprecated) ping-v

c. ping -c 6 www.facebook.com: Send N packets specified with -c option and then


stop. This way the ping command can exit automatically instead of pressing CTRL+C
to exit.

d. ping -w 5 www.google.com: Ping -w option specifies the deadline to terminate the


ping output. This specifies the total number of seconds the ping command should send
packets to the remote host. The following example will ping for 5 seconds. i.e ping
command will exit after 5 seconds irrespective of how many packets are sent or received.

e. ping -s : 1000 192.168.198.130: In the above example, when we set the packet size to
1000, it displays ‘1028 bytes’ in the output.

Snapshots:
3.tracert TRACERT (Trace Route), a command-line utility that can be used to trace the path
that an Internet Protocol (IP) packet takes to its destination.In computing, tracert and tracert are
computer network diagnostic commands for displaying possible routes (paths) and measuring
transit delays of packets across an Internet Protocol (IP) network.
• Name of command: tracert
• Options used:
a. tracert -d
b. tracert -h maximum_hops
c. tracert w timeout
d. tracert -4
e. tracert

• Options description and its interpretation:


a. tracert -d www.triyoh.edu.np : Specifies to not resolve addresses to host
names.Prevents tracert from attempting to resolve the IP addresses of intermediate
routers to their names. This can speed up the display of tracert results.
b. tracert -h 5 www.hotmail.com: Specifies the maximum number of hops in the path
to search for the target (destination). The default is 30 hops.
c. tracert -w 5 www.yahoo.com: Waits the number of milliseconds specified by timeout
for each reply. Specifies the amount of time in milliseconds to wait for the ICMP time
Exceeded or echo Reply message corresponding to a given echo Request message to be
received. If not received within the time-out, an asterisk (*) is displayed. The default
time-out is 4000 (4 seconds).
d. tracert -4 www.vit.ac.in: Specifies that tracert.exe can use only IPv4 for this trace.
e. tracert www.hotstar.com: Used to show several details about the path that a packet
takes from the computer or device you're on to whatever destination you specify. In the
above example, the tracert command is used to show the path from the networked
computer on which the tracert command is being executed by a network device, in this
case, a route on a local network, that's assigned www.hotstar.com.
Snapshots:
4.netstat:
In computing, netstat (network statistics) is a command-line network utility that
displays network connections for Transmission Control Protocol (both incoming and
outgoing), routing tables, and a number of network interface (network interface
controlleror software-defined network interface) and network protocol statistics

• Name of command: netstat



• Option used:

a. netstat -a:
b. netstat -ltpe:
c. netstat -rn:
d. netstat -i:
e. netstat -g:

• Options used and its interpretation :

b. netstat -a : The first and most simple command is to list out all the current connections.
Simply run the netstat command with the a option.The above command shows all the
connections from different protocols like tcp,udp, and unix sockets.However this is not quite
useful. Administrators often want to pick out specific connections based on protocols or port
numbers for example.

c. netstat -ltpe: The above example lists out Listening connections of Tcp type with
Process information and Extended information.
The extended information contains the username and inode of the process. This is a useful
command for network administrators. If you use the n option with the e option, the uid would be
listed and not the username.

c. netstat -rn : The kernel routing information can be printed with the r option. It is the same
output as given by the route command. We also use the n option to disable the hostname
lookup.

d. netstat -i: Displays network interfaces and their statistics.The netstat command can also print
out the information about the network interfaces. The "-i" option does the task.

e. netstat -g: Displays multicast group membership information for both IPv4 and IPv6 (may
only be available on newer operating systems)
snapshots:
5.nslookup

By checking the NS records, you can see which is the authoritative server for a
specific domain.nslookup (name server lookup) is a tool used to perform DNS lookups in Linux.
It is used to display DNS details, such as the IP address of a particular computer, the MX records
for a domain or the NS servers of a domain.

• Name of command: nslookup


• Name of options used:
a. nslookup -type=any
b. nslookup -type=mx
c. nslookup -type=a
d. nslookup -type=txt
e. nslookup -type=ns

Description of options and its interpretations :


a. nslookup -type=any www.gmail.com: We can also view all the available DNS records
using -type=any option.

b. nslookup -type=mx www.facebook.com: Here we are checking the MX records of the


mail servers. You can see if all the mail servers are working well.MX (Mail Exchange)
record maps a domain name to a list of mail exchange servers for that domain. The MX
record tells that all the mails sent to “facebook.com” should be routed to the Mail server in
that domain.
c. nslookup -type=a www.twitter.com: We can also view all the available DNS records for
a particular record using -type=a option.

d. nslookup -type=txt www.youtube.com: Lookup for an txt record TXT records are useful
for multiple types of records like DKIM, SPF, etc. You can find all TXT records
configured for .
e. nslookup -type=ns www.google.com: By checking the NS records, you can see
which is the authoritative server for a specific domain.

Snapshots:
1.Network based on basic topology:
2.Network based on Hub:
3.Network based on Switch:
4.Network based on Switch and Router:

THANK YOU!!!!

You might also like