EXPERIMENT NO.
AIM: Use basic networking commands in Linux (ping, tracert, nslookup, netstat, ARP, RARP, ip,
ifconfig, dig, route )
1. Ifconfig
Ifconfig (interface configuration) command is used to configure the kernel-resident network
interfaces. It is used at the boot time to set up the interfaces as necessary. Also, this command is used
to assign the IP address and netmask to an interface or to enable or disable a given interface.
2. NSLOOKUP
Nslookup (stands for “Name Server Lookup”) is a useful command for getting information
from DNS server. It is a network administration 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.
3. Ping
PING (Packet Internet Groper) command is used to check the network connectivity
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 time is recorded which is called latencyPing 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
operating system has this ping pre-installed.
4. TRACEROUTE
traceroute command in Linux prints the route that a packet takes to reach the host. This
command is useful when you want to know about the route and about all the hops that a packet
takes. Below image depicts how traceroute command is used to reach the Google(172.217.26.206)
host from the local machine and it also prints detail about all the hops that it visits in between.
5. Netstat
Netstat command displays various network related information such as network connections,
routing tables, interface statistics, masquerade connections, multicast memberships etc.,
6. ARP
arp command manipulates the System’s ARP cache. It also allows a complete dump of
the ARP cache. ARP stands for Address Resolution Protocol. The primary function of this
protocol is to resolve the IP address of a system to its mac address, and hence it works between
level 2(Data link layer) and level 3(Network layer).
7. IP
IP stands for Internet Protocol. This command is used to show or manipulate routing, devices,
and tunnels. It can perform several other tasks like configuring and modifying the default and
static routing, setting up tunnel over IP, listing IP addresses and property information,
modifying the status of the interface, assigning, deleting and setting up IP addresses and
routes.
8. Dig
dig command stands for Domain Information Groper. It is used for retrieving information
about DNS name servers. It is basically used by network administrators. It is used for
verifying and troubleshooting DNS problems and to perform DNS lookups. Dig command
replaces older tools such as nslookup and the host.
CONCLUSION: Hence, in this experiment, we have successfully studied some important networking
command and also implemented them in Linux