Вы находитесь на странице: 1из 14

Ex. No.

1 STUDY OF NETWORKING COMMANDS

AIM:
To study the basic networking commands on Windows and Linux
platforms.
SOFTWARE REQUIRED:
Windows and Linux OS
LIST OF COMMANDS:
Windows:-
(i) Ipconfig
(ii) Ping
(iii) Tracert
(iv) Netstat
(v) Pathping
(vi) ARP
THEORY:
WINDOWS:
(i) Ipconfig:
ipconfig is a command which can be issued to the command prompt to
display the network settings currently assigned to any or all network adapters in
the machine. This command can be utilized to verify a network connection as
well as to verify the network settings.
Syntax:
ipconfig [/allcompartments] [/all] [/renew [<Adapter>]] [/release [<Adapter>]]
[/renew6[<Adapter>]] [/release6 [<Adapter>]] [/flushdns] [/displaydns]
[/registerdns] [/showclassid<Adapter>] [/setclassid<Adapter> [<ClassID>]]

(ii) Ping:
The ping command is used to test the ability of the source computer to reach a
specified destination computer.
Ipconfig command:

Figure 1.1 ipconfig


Ping command:

Figure 1.2 ping


Tracert command:

Figure 1.3 tracert


Syntax:
ping [/t] [/a] [/n <Count>] [/l <Size>] [/f] [/I <TTL>] [/v <TOS>] [/r <Count>]
[/s <Count>] [{/j <Hostlist> | /k <Hostlist>}] [/w <timeout>] [/R] [/S <Srcaddr>]

(iii) Tracert:
The tracert command is used to show several details about the path that a
packet takes from the computer to the destination specified.
Syntax:
tracert [/d] [/h <MaximumHops>] [/j <Hostlist>] [/w <timeout>] [/R] [/S
<Srcaddr>] [/4][/6] <TargetName>

(iv) Netstat:
netstat(network statistics) displays network connections for the
Transmission Control Protocol ,routing tables, and a number of network interface
and network protocol statistics.
Syntax:
netstat [-a] [-e] [-n] [-o] [-p <Protocol>] [-r] [-s] [<Interval>]

(v) ARP:
The ARP command allows to display and modify the Address Resolution
Protocol (ARP) cache. Each time a computer’s TCP/IP stack uses ARP to
determine the Media Access Control (MAC) address for an IP address, it records
the mapping in the ARP cache so that future ARP lookups go faster.
Syntax:
arp [/a [<Inetaddr>] [/n <ifaceaddr>]] [/g [<Inetaddr>] [-n <ifaceaddr>]] [/d
<Inetaddr> [<ifaceaddr>]] [/s <Inetaddr><Etheraddr> [<ifaceaddr>]]

(vi) Pathping:
Pathping sends multiple echo Request messages to each router between a
source and destination over a period of time and then computes results based on
the packets returned from each router.
Netstat command:

Figure 1.4 netstat


ARP Command:

Figure 1.5 arp


Pathping Command:

Figure 1.6 pathping


Syntax:
pathping [/n] [/h] [/g <Hostlist>] [/p <Period>] [/q <NumQueries> [/w
<timeout>] [/i<IPaddress>] [/4 <IPv4>] [/6 <IPv6>][<TargetName>]

LIST OF COMMANDS IN LINUX:


Ifconfig
Ping
Ip
Traceroute
Tracepath
Netstat
Dig
Nslookup
Route
Host
Arp
Iwconfig
Hostname
Curl

(i) Ifconfig:
ifconfig(interface configurator) command is used to initialise an interface, assign
IP address to it and enable or disable it on demand. With this command the IP
address and Hardware/ MAC address can be viewed.
Syntax:
ifconfig[interface]
Ping command:

Figure 1.7 ping


Ifconfig command:

Figure 1.8 ifconfig


IP command:

Figure 1.9 ip
(ii) Ping
PING (Packet Internet Groper) command is used to check the network
connectivity between host and server/host. Ping uses ICMP to send an ICMP echo
message to the specified host if that host is available then it sends ICMP reply
message.
Syntax
ping [options]destination

(iii) Ip
The ip command is used to assign an address to network interface and / or
configure network interface parametres on linux OS.
Syntax
Ip [OPTIONS]OBJECT{COMMAND|help}

(iv) 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 bout all the
hops that a packet takes.
syntax
traceroute [OPTIONS] host_address [pathlength]

(v) Tracepath
Tracepath command in linux is used to trace path to destination discovering MTU
along its path. It uses UDP port or some random path. It is similar to traceroute,
but it does not require superuser privilages and has no fancy options.
syntax
tracepath [-n] [-b] [-l pktlen] [-m max_hops] [-p port] destination
Traceroute command:

Figure 1.10 traceroute


Tracepath command:

Figure 1.11 tracepath


Netstat command:

Figure 1.12 netstat


(vi) Netstat
Netstat command displays various network related information such as network
connections, routing tables, interface statistics, masquerade connections etc.
syntax
netstat [-a] [-at] [au] [-l] [-lt] [-lu] [-lx] [-s] [-st] [-su] [-pt]

(vii) Dig
Dig(Domain Information Groper) query DNS related information like a record,
cname, mxrecord etc. This command is used to solve DNS related queries.
syntax
$ dig www.google.com

(viii) Nslookup
nslookup command is used to find out DNS related query or testing and
troubleshooting DNS server
syntax
nslookup [option]

(ix) Route
The route command is used to display or modify the routing table. To add a
gateway use -n.
Syntax
route [-n] [add default]

(x) Host
This command is used to obtain network address information about a remote
system connected to your network. This information usually consists of systems
IP address, domain name address and sometimes mail server also
Syntax $host www.google.com
Dig command:

Figure 1.13 dig


Nslookup command:

Figure 1.14 nslookup


Route command:

Figure 1.16 route


(xi) ARP
Arp command manipulates the systems arp cache. It also allows a complete dump
of the ARP cache. The primary function of this protocol is to resolve the IP
address of a system to its mac address, and hence it works bet. Datalinbk and
network layer.
syntax
arp [-v] [-i if] [-H type] -a [hostname]

(xii) Iwconfig
It is used to set the parameters of the network interface that are particular to the
wireless operation like SSID, frequency etc. iwconfig may also be used to display
the parameters, and the wireless statistics which are extracted from /proc/net.
Syntax
iwconfig [INTERFACE] [OPTIONS]

(xiii) Hostname
The command is used to see the hostname of your computer. You can change
hostname permanently in etc/sysconfig/network. After changing the hostname
you need to reboot the computer.
syntax
hostname –[option] [file]

(xiv) Curl
curl is a command line tool to transfer data to or from a server, using any of the
supported protocols (HTTP, FTP, IMAP, POP3, SFTP, SMTP, TELNET). This
tool is preferred for automation, since it is designed to work without user
interaction, curl can transfer multiple file at once.
syntax
curl [options] [URL ..]
Host command:

Figure 1.17 host -c


ARP command:

Figure 1.18 arp


Iwconfig command:

Figure 1.19 iwconfig


Hostname command:

Figure 1.20 hostname


Curl command:

Figure 1.21 curl


RESULT:
The basic networking commands on windows and linux are studied.

Вам также может понравиться