Exp 2
Exp 2
The tracert command prints the path. If all routers on the path are functional, this
command prints the full path. If a router is down on the path, this command prints the
path up to the last operational router.
tracert www.google.co.in
The following image shows the output of this command.
The following table lists some important options of the tracert command.
Option Description
-d Do not resolve the IP addresses of intermediate routers to their names.
-h Specifies the maximum number of hops (routers) to search on the path. The default is 30 hops.
-w Specifies the amount of time in milliseconds to wait for a reply message from the router. If not
received within the time-out, an asterisk (*) is displayed. The default time-out is 4000 (4
seconds).
Ping
The ping command is used to test connectivity between two hosts. It sends ICMP echo
request messages to the destination. The destination host replies with ICMP reply
messages. If the ping command gets a reply from the destination host, it displays the
reply along with round-trip times.
If you specify the hostname as an argument, the ping command uses the configured DNS
client service to automatically translate the hostname into the IP address.
Ipconfig
This command displays all current TCP/IP network configuration values and refreshes
Dynamic Host Configuration Protocol (DHCP) and Domain Name System (DNS)
settings. This command is mainly used to view the IP addresses on the computers that
are configured to obtain their IP address automatically.
Used without Displays the IP address, subnet mask, and default gateway for all adapters.
parameters
/all Displays the full TCP/IP configuration for all adapters.
/renew [Adapter] Renews DHCP configuration for all adapters (if an adapter is not specified) or for a
specific adapter if the Adapter parameter is included.
/release Sends a DHCPRELEASE message to the DHCP server to release the current DHCP
[Adapter] configuration and discard the IP address configuration for either all adapters (if an
adapter is not specified) or for a specific adapter if the Adapter parameter is included.
/flushdns Flushes and resets the contents of the DNS client resolver cache.
Arp
To send IP packets, a computer needs two addresses. These addresses are the MAC
address and the IP address. A MAC address is the physical or hardware address of the
NIC. An IP address is the logical or software address of NIC. If a computer knows the
IP address of the destination computer but it does not know the MAC address of the
destination computer, it uses the ARP protocol to know the MAC address of the
destination computer.
The ARP protocol broadcasts a given IP address over a local network. The
corresponding host responds to the broadcast with its MAC address. To avoid
repetition, ARP stores the answer in a table known as ARP table. ARP maintains a
separate ARP table for each NIC.
To view the ARP table, you can use the following command.
arp
By default, this command displays the ARP table of the active NIC. If multiple NICs are
installed on the computer, you can use the -a option with this command. If the -a
option is used, the ARP command displays all ARP tables.
The following image shows the output of the arp command when used with the -
a option.
To display the ARP cache entry for a specific IP address, specify the IP address with
the -N option. For example, the following command displays the ARP cache table for
the interface that is assigned the IP address 192.168.42.171.
Arp -a -N 192.168.42.171
The following image shows the output of the above command.
getmac Command
Another very simple command that shows the MAC address of your
network interfaces
Nbtstat
The nbtstat command removes and corrects preloaded entries using a number of
case-sensitive switches. The nbtstat - a <name>** command performs a NetBIOS
adapter status command on the computer name specified by < name> . The adapter
status command returns the local NetBIOS name table for that computer as well as
the MAC address of the adapter card. The nbtstat -A < IP address > command
performs the same function using a target IP address rather than a name.
The nbtstat - c option shows the contents of the NetBIOS name cache, which
contains NetBIOS name-to-IP address mappings.
nbtstat -n displays the names that have been registered locally on the system by
NetBIOS applications such as the server and redirector.
The nbtstat -r command displays the count of all NetBIOS names resolved by
broadcast and by querying a WINS server. The nbtstat -R command purges the
name cache and reloads all #PRE entries from the LMHOSTS file. #PRE entries are the
LMHOSTS name entries that are preloaded into the cache.
O/P:
C:\>nbtstat -S
Nslookup
Using Nslookup
type:
nslookup www.steves-internet-guide.com
at a command prompt.
for an interactive lookup:
Hostname Command
A very simple command that displays the host name of your machine. This
is much quicker than going to the control panel>system route.
NETDIAG
/debug Specifies even more verbose output. With this parameter, NetDiag takes a few
minutes to complete.
/d: DomainName Finds a domain controller in the specified domain.
/fix Fixes minor problems.
/DcAccountEnum Enumerates domain controller computer accounts.
/test: TestName Runs only the listed test(s). TCP/IP must be bound to one or more adapters
before running any of the tests. Nonskippable tests are still run.
• Browser - Redirector and Browser test. Lists the protocols bound to the
Browser service and the redirector.
• DNS - DNS test. Tests the availability of the configured DNS servers and
verifies the current client's DNS registrations.
• IPX - IPX test. Lists statistics for the IPX protocol installed on the
computer.
• Netware - Netware test. Queries the nearest Netware server for current
login information.
• Route - Routing table test. Lists static routes and whether they are
persistent.
• WAN - Wide Area Network (WAN) configuration test. Lists settings and
status on each COM port currently in use.
• WINS - Windows Internet Name Service (WINS) service test. Tests the
availability of the configured WINS server and the validity of the client
registrations.
/skip: TestName Skips the test specified by TestName. Nonskippable tests will still run.
Input :
C:\Users\Mahesh>pathping www.google.com
Output:
Tracing route to www.google.com [2404:6800:4007:828::2004]
over a maximum of 30 hops:
0 DESKTOP-2REB81Q [2409:4070:4d9a:ec33:1cfc:90ee:79b5:d4bf]
1 2409:4070:4d9a:ec33::82
2 * * *
Computing statistics for 25 seconds...
Source to Here This Node/Link
Hop RTT Lost/Sent = Pct Lost/Sent = Pct Address
0 DESKTOP-2REB81Q [2409:4070:4d9a:ec33:1cfc:90ee:79b5:d4bf]
0/ 100 = 0% |
1 13ms 0/ 100 = 0% 0/ 100 = 0% 2409:4070:4d9a:ec33::82
Trace complete.
telnet
To use telnet, follow the steps below:
1. First, find out the ip address of the server/main computer. For this you
need to access the server and use the ipconfig command in MS-DOS.
See this link for more details about this command.
2. Select the Windows key and the R key.
3. In the Run box type CMD.
4. Select OK.
5. Type Telnet <IP Address> 13531
o Note: Do not include the <> when entering the IP Address.
6. If you see a blank cursor then the connection is fine. You can close the
command prompt window.
7. If you receive the message that 'telnet' is not recognized as an internal
or external command, operable program, or batch file, you will want to
enable Telnet.
o To enable Telnet, follow these steps:
o Select Start > Control Panel > then Programs and
Features (or Programs)
o Select Turn Windows Features on or off
o heck the box for both Telnet Client and Telnet Server
o Select OK.
o Verify that you can now Telnet the port.
Example:
If the server's ip address is 192.168.0.100, then:
FTP
To connect to and use FTP from a command line
interface, like MS-DOS or the Linux shell, click a link
below for instructions.
Connect using FTP
To connect to another computer using FTP at the MS-DOS prompt,
command line, or Linux shell, type FTP, and press Enter. Once in FTP,
use the open command to connect to the FTP server, as shown in the
following example.
open ftp.example.com
get myfile.htm
send myfile.htm
FTP commands
Depending on the version of FTP and the operating system, each of
the following commands may or may not work. Typing -help or
a ? lists the commands available to you. Below is a general
description of FTP commands available in the Windows command line
FTP command.
Command Information
Cd Changes directory.