Experiment No.1 Aim: Fundamentals of Computer Network.: 1.ifconfig Command
Experiment No.1 Aim: Fundamentals of Computer Network.: 1.ifconfig Command
Experiment No.1 Aim: Fundamentals of Computer Network.: 1.ifconfig Command
EXPERIMENT NO.1
Aim: Fundamentals of Computer Network.
• Understanding the basic networking commands i.e. ifconfig ,ip,
traceroute, tracepath, ping, netstat, ss, dig, nslookup, route, host, arp,
hostname, curl or wget, mtr, whois, tcpdump.
Requirements: PC, NS 2 so@ware.
Objec;ve:
• A@er compleBon of this experiment you will be able to be familiar with
various types of computer networking commands.
2.traceroute command
Tracer out command in Linux prints the route that a packet takes to reach
thehost. This command is useful when you want to know about the route and
all the hops that a packet takes.
Syntax:
traceroute host_address
3.tracepath command
The tracepath command in Linux allows to trace the path to the desBnaBon
path determining MTU along this path using UDP port or any other ports that
will not require any superuser permissions.
Syntax:
tracepath host_address
Shubham Saroj A-08
4.ping command
PING (Packet Internet Groper) command is used to check the network
connecBvity between host and server/host. This command takes as input the IP
address or the URL and sends a data packet to the specified address with the
message “PING” and get a response from the server/host this Bme is recorded
which is called latency. Fast ping low latency means faster connecBon. Ping
uses ICMP(Internet Control Message Protocol) to send an ICMP echo
message to the specified host if that host is available then it sends ICMP reply
message. Ping is generally measured in millisecond every modern operaBng
system has this ping pre-installed.
Syntax:
ping IP address/host_name:
Example:
ping google.com
Shubham Saroj A-08
5.Netstat Command:
In compuBng, netstat is a command-line network uBlity that displays network
connecBons for Transmission Control Protocol, rouBng tables, and a number of
network interface and network protocol staBsBcs.
Stands for: Network staBsBcs
FuncBon: Print network connecBons, rouBng tables, interface staBsBcs,
masquerade connecBons, and mulBcast memberships
Syntax:
netstat [address_family_opBons] [--tcp|-t] [--udp|-u] [--raw|-w] [--listening|-l]
[--all|-a] [--numeric|-n] [--numeric-hosts][--numeric-ports][--numeric-ports] [--
symbolic|-N] [--extend|-e[--extend|-e]] [--Bmers|-o] [--program|-p] [--
verbose|-v] [--conBnuous|-c] [delay]
Example:
netstat
Shubham Saroj A-08
Shubham Saroj A-08
6.ss command
Linux ss command is the replacement for netstat command. It is regarded as a
much faster and more informaBve command than netstat.
The faster response of ss is possible as it fetches all the informaBon from within
the kernel userspace. This command gives informaBon about all TCP, UDP, and
UNIX socket connecBons.
You can use -t, -u, -x in the command respecBvely to show TCP/UDP or UNIX
sockets. You can combine each of these with "a" to show the connected and
listening sockets.
Syntax:
ss
Shubham Saroj A-08
Shubham Saroj A-08
7.dig command
Linux dig command stands for Domain InformaBon Groper. This command is
used in DNS lookup to query the DNS name server. It is also used to
troubleshoot DNS related issues.
It is mainly used to verify DNS mappings, MX Records, host addresses, and all
other DNS records for a be_er understanding of the DNS topography.
Syntax:
dig IP address/host_name/path
8.nslookup command
nslookup (stands for “Name Server Lookup”) is a useful command for ge`ng
informaBon from DNS server. It is a network administraBon tool for querying
the Domain Name System (DNS) to obtain domain name or IP address mapping
or any other specific DNS record. It is also used to troubleshoot DNS related
problems.
Syntax:
Shubham Saroj A-08
9.route command
Linux route command displays and manipulates the rouBng table exisBng for
your system. A router is basically used to find the best way to send the packets
across to a desBnaBon.
Syntax:
route
Shubham Saroj A-08
We can combine the host command with -t, and get DNS resource records like
SOA, NS, A, PTR, CNAME, MX, SRV.
Syntax:
host IP address/host_address
Syntax:
arp
Shubham Saroj A-08
Syntax:
wget <fileLink>
Shubham Saroj A-08
Shubham Saroj A-08
19. ip command
The ip command is a powerful tool for configuring network interfaces that any
Linux system administrator should know. It is used to bring interfaces up or
down, assign and remove addresses and routes, manage ARP cache, and much
more.
This is the latest and updated version of ifconfig command.
Syntax:
ip [ OPTIONS ] OBJECT { COMMAND | help }
Example:
To display a list of all network interfaces and the associated ip address type the
following command:
ip addr show
Shubham Saroj A-08
Command:
Ip -4 addr
Command:
Ip -6 addr
Shubham Saroj A-08
Conclusion:
Thus we have studied the use of different basic networking commands.
Lab Outcome:
Execute and evaluate network administraBon commands and demonstrate
their use in different network scenarios.