Experiment No 1
Experiment No 1
1
Aim: Understanding Basic networking Commands
Lab Outcome: ITL401.1 (Execute and evaluate network administration commands and
demonstrate their use in different network scenarios.)
A network consists of several computers connected together. The network can be as simple
as a few computers connected in your home or office, or as complicated as a large university
network or even the entire Internet. When your computer is part of a network, you have
access to those systems either directly or through services like mail and the web. Networking
is the practice of linking computing devices together with hardware and software that
supports data communications across these devices.
There are a variety of networking programs that you can use. Some are handy for performing
diagnostics to see if everything is working properly. Others (like mail readers and web
browsers) are useful for getting your work done and staying in contact with other people.
When there is the need of transferring the data between one area to another area, there is
some on demand quires are form that quires called as networking commands through that two
or more computer connected together.
By using these quires, there is exchange in data very easily. In computer networks, networked
computing devices pass data to each other along data connections.
ARP:
What is ARP?
Address Resolution Protocol (ARP) is a protocol for mapping an Internet Protocol address
(IP address) to a physical machine address that is recognized in the local network. For
example, in IP Version 4, the most common level of IP in use today, an address is 32 bits
long. In an Ethernet local area network, however, addresses for attached devices are 48 bits
long. (The physical machine address is also known as a Media Access Control or MAC
address.) A table, usually called the ARP cache, is used to maintain a correlation between
each MAC address and its corresponding IP address. ARP provides the protocol rules for
making this correlation and providing address conversion in both directions.
How ARP Works
When an incoming packet destined for a host machine on a particular local area network
arrives at a gateway, the gateway asks the ARP program to find a physical host or MAC
address that matches the IP address. The ARP program looks in the ARP cache and, if it finds
the address, provides it so that the packet can be converted to the right packet length and
format and sent to the machine. If no entry is found for the IP address, ARP broadcasts a
request packet in a special format to all the machines on the LAN to see if one machine
knows that it has that IP address associated with it. A machine that recognizes the IP address
as its own returns a reply so indicating. ARP updates the ARP cache for future reference and
then sends the packet to the MAC address that replied.
Since protocol details differ for each type of local area network, there are separate ARP
Requests for Comments (RFC) for Ethernet, ATM, Fiber Distributed-Data Interface, HIPPI,
and other protocols.
There is a Reverse ARP (RARP) for host machines that don't know their IP address. RARP
enables them to request their IP address from the gateway's ARP cache.
WHY IS ARP NECESSARY?
Basically, ARP is a function of the IP layer of the TCP/IP protocol stack. It is necessary to
translate a host’s software address (IP address) to a hardware address (MAC address).
Typically, a host uses ARP to determine the hardware address of another host. Your system
maintains a table that maps IP addresses to MAC addresses of different systems and routers
on your network.
It works similar to a host table, except that you or your network administrator generally does
not maintain the ARP table. The ARP protocol creates entries as needed. If your system
doesn’t already contain the hardware address of the destination host, it will broadcast to every
host on the network requesting this address. When the destination host hears the request it
will reply back with its hardware address, which will then be stored in your systems ARP
table. Entries can be manually made to this table in the event the destination host doesn’t
support ARP.
There is also another protocol within the IP layer, called RARP (Reverse ARP), which
translates a MAC Address into an IP address. Diskless workstations would generally use this.
RARP
What is RARP?
RARP (Reverse Address Resolution Protocol) is a protocol by which a physical machine in a
local area network can request to learn its IP address from a gateway server's Address
Resolution Protocol (ARP) table or cache. A network administrator creates a table in a local
area network's gateway router that maps the physical machine (or Media Access Control -
MAC address) addresses to corresponding Internet Protocol addresses. When a new machine
is set up, its RARP client program requests from the RARP server on the router to be sent its
IP address. Assuming that an entry has been set up in the router table, the RARP server will
return the IP address to the machine which can store it for future use.
PING:
PING is used to check for a response from another computer on the network. It can tell you a
great deal of information about the status of the network and the computers you are
communicating with. It sends packets of information to the user-defined source. If the
packets are received, the destination device sends packets back.
● Ping your computer (by address, not host name) to determine that TCP/IP is functioning.
(Pinging your computer does not verify that your network adapter is functioning.)
TRACERT
The tracert command is a Command Prompt command that's 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.
Traceroute is a command which can show you the path a packet of information takes from
your computer to one you specify. It will list all the routers it passes through until it reaches
its destination, or fails to and is discarded. In addition to this, it will tell you how long each
'hop' from router to router takes.
IPCONFIG
ipconfig is a command line utility available on all versions of Microsoft Windows starting
with Windows NT. ipconfig is designed to be run from the Windows command prompt. This
utility allows you to get the IP address information of a Windows computer. It also allows
some control over active TCP/IP connections. ipconfig is an alternative to the older 'winipcfg'
utility.
IPCONFIG USAGE
From the command prompt, type 'ipconfig' to run the utility with default options. The output
of the default command contains the IP address, network mask and gateway for all physical
and virtual network adapters.
'ipconfig' supports several command line options as described below. The command
"ipconfig /?" displays the set of available options.
IPCONFIG /ALL
This option displays the same IP addressing information for each adapter as the default
option. Additionally, it displays DNS and WINS settings for each adapter.
IPCONFIG /RELEASE
This option terminates any active TCP/IP connections on all network adapters and releases
those IP addresses for use by other applications. 'ipconfig /release" can be used with specific
Windows connection names. In this case, the command will affect only the specified
connections and not all. The command accepts either full connection names or wildcard
names. Examples:
IPCONFIG /RENEW
This option re-establishes TCP/IP connections on all network adapters. As with the release
option, ipconfig /renew takes an optional connection name specifier.
Both /renew and /release options only work on clients configured for dynamic (DHCP)
addressing.
Note: The remaining options below are only available on Windows 2000 and newer versions
of Windows.
IPCONFIG /SHOWCLASSID, IPCONFIG /SETCLASSID
These options manage DHCP class identifiers. DHCP classes can be defined by
administrators on a DHCP server to apply different network settings to different types of
clients. This is an advanced feature of DHCP typically used in business networks, not home
networks.
These options access a local DNS cache that Windows maintains. The /displaying option
prints the contents of the cache, and the /flush dns option erases the contents.
This DNS cache contains a list of remote server names and the IP addresses (if any) they
correspond to. Entries in this cache come from DNS lookups that happen when attempting to
visit Web sites, named FTP servers, and other remote hosts. Windows uses this cache to
improve the performance of Internet Explorer and other Web-based applications.
In home networking, these DNS options are sometimes useful for advanced troubleshooting.
If the information in your DNS cache becomes corrupted or outdated, you could face
difficulty accessing certain sites on the Internet. Consider these two scenarios:
● The IP address of a Web site, email server or other server changes (rare occurrence).
The name and address of this site normally stay in your cache for 24 hours after your
last visit. You may need to clear your cache to access the server sooner.
● A Web site or other server was offline when you last visited it (hopefully a rare
occurrence) but since has come back online. The cache will normally keep a record
that the server is offline for 5 minutes after your last visit. You may need to clear your
cache to access the server sooner.
IPCONFIG /REGISTERDNS
Similar to the above options, this option updates DNS settings on the Windows computer.
Instead of merely accessing the local DNS cache, however, this option initiates
communication with both the DNS server (and the DHCP server) to re-register with them.
This option is useful in troubleshooting problems involving connection with the Internet
service provider, such as failure to obtain a dynamic IP address or failure to connect to the
ISP DNS server.
Like the /release and /renew options, /register dns optionally takes the name(s) of specific
adapters to update. If no name parameter is specified, /register dns updates all adapters.
TELNET:
The telnet commands allow you to communicate with a remote computer that is using the
Telnet protocol. You can run telnet without parameters in order to enter the telnet context,
indicated by the Telnet prompt (telnet>). From the Telnet prompt, use the following
commands to manage a computer running Telnet Client.
The telnet commands allow you to remotely manage a computer running Telnet Server.
These commands are run from the command prompt. Used without parameters, telnet
commands display local server settings.
NETSTAT
The netstat command is a Command Prompt command used to display very detailed
information about how your computer is communicating with other computers or network
devices.
Specifically, the netstat command can show details about individual network connections,
overall and protocol-specific networking statistics, and much more, all of which could help
troubleshoot certain kinds of networking issues.
Conclusion: Thus we have successfully studied Networking Commands