Practical Cmd Tutorial 1 (type ping in cmd prompt )

What it is?

The ping command is a Command Prompt
command used to test the ability of the source
computer to reach a specified destination
computer. The ping command is usually used as a
simple way verify that a computer can
communicate over the network with another
computer or network device.
The ping command
operates by
sending Internet
Control Message
Protocol (ICMP)
Echo Request
messages to the
computer and
waiting for a response. How many of those
responses are returned, and how long it takes for
them to return, are the two major pieces of
information that the ping command provides.
Ping Command Syntax
ping [-t ] [ -a ] [ -n count ] [-l size ] [ -f ] [ -i TTL] [ -v
TOS ] [-r count ] [-s count ] [ -w timeout] [-R ] [ -S
srcaddr ] [ -4] [ -6] target [/? ]
-t = Using this option will ping the target until you
force it to stop using Ctrl-C .
-a = This ping command option will resolve, if
possible, the hostname of an IP address target.
-n count = This option sets the number of ICMP
Echo Request messages to send. If you execute
the ping command without this option, four
requests will be sent.
-l size = Use this option to set the size, in bytes,
of the echo request packet from 32 to 65,527. The
ping command will send a 32 byte echo request if
you don’t use the -l option.
-f = Use this ping command option to prevent
ICMP Echo Requests from being fragmented by
routers between you and the target. The -f option
is most often used to troubleshoot Path Maximum
Transmission Unit (PMTU) issues.
-i TTL = This option sets the Time to Live (TTL)
value, the maximum of which is 255.
-v TOS = This option allows you to set a Type of
Service (TOS) value. Beginning in Windows 7, this
option no longer functions but still exists for
compatibility reasons.
-r count = Use this ping command option to
specify the number of hops between the your
computer and the target computer or device that
you’d like to be recorded and displayed. The
maximum value for count is 9 so use the tracert
command instead if you’re interested in viewing all
hops between two devices.
-s count = Use this option to report the time, in
Internet Timestamp format, that each echo
request is received and echo reply is sent. The
maximum value for count is 4 meaning that only
the first four hops can be time stamped.
-w timeout = Specifying a timeout value when
executing the ping command adjusts the amount
of time, in milliseconds, that ping waits for each
reply. If you don’t use the -w option, the default
timeout value is used which is 4000, or 4 seconds.
-R = This option tells the ping command to trace
the round trip path.
-S srcaddr = Use this option to specify the source
-4 = This forces the ping command to use IPv4
only but is only necessary if target is a hostname
and not an IP address.
-6 = This forces the ping command to use IPv6
only but as with the -4 option, is only necessary
when pinging a hostname.
target = This is the destination you wish to ping,
either an IP address or a hostname.
/? = Use the help switch with the ping command
to show detailed help about the command’s
several options.
Note: The -f , -v , -r , -s , -j , and -k options work
when pinging IPv4 addresses only. The -R and -S
options only work with IPv6.
Other less commonly used switches for the ping
command exist including [-j host-list ] and [ -k
host-list ]. Execute ping /? from the Command
Prompt for more information on these two options.
Tip: Save all that ping command output to a file
using a redirection operator . See How To Redirect
Command Output to a File for instructions or see
my Command Prompt Tricks list for more tips.
Ping Command Examples
ping -n 5 -l 1500
In this example, the ping command is used to ping
the hostname . The -n option
tells the ping command to send 5 ICMP Echo
Requests instead of the default of 4 and the -l
option sets the packet size for each request to
1500 bytes instead of the default of 32 bytes. The
result displayed in the Command Prompt window
will look something like this:
Pinging [74.125.
Reply from bytes
Reply from bytes
Reply from bytes
Reply from bytes
Reply from bytes
Ping statistics for 74.125.224.
    Packets: Sent = 5, Received
Approximate round trip times in
    Minimum = 65ms, Maximum = 7
The 0% loss reported under Ping statistics for tells me that each ICMP Echo
Request message sent to was
returned. This means that, as far as my network
connection goes, I can communicate with Google’s
website just fine.
In the above example, I’m pinging , also
called the IPv4 localhost IP address or IPv4
loopback IP address, without options.
Using the ping command to ping is an
excellent way to test that Windows’ network
features are working properly but it says nothing
about your own network hardware or your
connection to any other computer or device. The
IPv6 version of this test would be ping ::1 .
ping -a
In this example I’m asking the ping command to
find the hostname assigned to the
IP address but otherwise ping it as normal.
Pinging J3RTY22 []
Reply from bytes=
Reply from bytes=
Reply from bytes=
Reply from bytes=
Ping statistics for
    Packets: Sent = 4, Received
Approximate round trip times in
    Minimum = 0ms, Maximum = 1m
As you can see, the ping command resolved the IP
address I entered, , as the hostname
J3RTY22 and then executed the remainder of the
ping with default settings.
ping -t -6 SERVER
In this example, I force the ping command to use
IPv6 with the -6 option and continue to ping
SERVER indefinitely with the -t option.
Pinging SERVER [fe80::fd1a:3327
Reply from fe80::fd1a:3327:2937
Reply from fe80::fd1a:3327:2937
Reply from fe80::fd1a:3327:2937
Reply from fe80::fd1a:3327:2937
Reply from fe80::fd1a:3327:2937
Reply from fe80::fd1a:3327:2937
Reply from fe80::fd1a:3327:2937
Ping statistics for fe80::fd1a:
    Packets: Sent = 7, Received
Approximate round trip times in
    Minimum = 0ms, Maximum = 1m
I interrupted the ping manually with Ctrl-C after
seven replies. Also, as you can see, the -6 option
produced IPv6 addresses.
Tip: The number after the % in the replies
generated in this ping command example is the
IPv6 Zone ID, which most often indicates the
network interface used. You can generate a table
of Zone IDs matched with your network interface
names by executing netsh interface ipv6 show
interface . The IPv6 Zone ID is the number in the
Idx column.
Ping Command Availability
The ping command is available from within the
Command Prompt in Windows 8, Windows 7,
Windows Vista , and Windows XP operating
systems . The ping command is also available in
older versions of Windows like Windows 98 and 95.


Why LAN security is important?



Nowadays many organizations use LANs for data processing and data communication needs. LAN logically and physically extend data, processing and communications facilities across the organization.
Security services that protect the data, processing and communication facilities must also be distributed throughout the LAN. For example, sending sensitive files that are protected with stringent access controls on one system and LAN to another system that has no access control protection, defeats the efforts made on the first system. User must ensure that their data and the LAN itself are protected or not.
Electronic mail (email),  a major application provided by most LANs, replaces inter-office and even inter-organizational mail that is written on paper and placed in an envelope. This envelope provides some confidentiality between the sender and receiver by these process there was a assurances (guarantee) that the message was not altered. Using electronic mail does not provide these assurances.
When you send electronic mail on simple transfer unprotected LANs than mail messages can be captured and read or perhaps even altered (means they can change your message form or structure). For some LANs, there can be no assurance(guarantee)  that the message actually was sent from the named sender. Fortunately tools such as encryption, digital signature  and message authentication codes helps solve these problems and can help provide some assurance .

Encryption-: Digital signature-:     Message Authentication-:

Encryption is the conversion of data into a form , called a ciphertext , that cannot be easily understood by unauthorized people . Decryption is the process of converting encrypted data back into its original form, so it can be understood. For more details on Encryption and ciphertext click on it.

Digital signature is an electronic signature that can be used to authenticate the identity of the sender of a message or the signer of the documents and possibly to ensure the original content of the message or documents that has been sent is unchanged. For more details on digital signature click on it and depth of digital signature .
Message Authentication is a short piece of code (often MAC) is a short piece of information used to authenticate a message and to provide integrity and authenticity assurances on the message integrity assurances detect accidental and intentional message changes, while authenticity assurances affirm the message’ origin . For more detail on Message Authentication click on it.

What is Local Area Network (LAN) ?


Local Area Network(LAN)-:
A LAN is a high-speed data network that covers a relatively small geographic area.  It connects workstations, personal computers, printers, server, and other devices. LAN gives computer user many advantages, including shared access to devices and applications, file exchange between connected users, and communications between users via electronic mail and other applicatons.
In LAN network group of computers share a common workload. Network computers means that the people using them can share files easily send each other messages and share each other’s printers. Nowadays most organizations have a local area network. LANs can be as small as just one shared office or as large as a whole city.
Although single LANs are geographically limited (to a department or office building, for example), separate LANs can be connected to form larger networks. LANs can be configured utilizing a client –server architecture which make use of –distributed intelligence by splitting the processing of an application between two distinct component: a – front-end client and a –back—end server.
The client component, itself a complete, stand-alone personal computers, offers the user its full range of power and features for running applications. The server component which can be another personal computer, minicomputers and mainframe in a time-shared environment: data management, information sharing among client, and sophisticated network administration and security features.