Creating a batch file for simple ping command to an ip

Creating a batch file for simple ping command to an ip

May 30, 2009
Open a notepad
Copy below text in notepad


echo off
echo.
cls
color 5e
echo.
echo.
echo.
echo.
echo ********** ISDN **********
echo.
echo.
ping 192.168.1.1 -t -l 4
echo.
echo.
echo.
echo.
pause
COLOR
ECHO ON
EXIT

Replace the ip address which you want to ping

This text file save as .bat
(ex: ping.bat )

RAID 5 overview

May 30, 2009

RAID 5 is a method of spreading volume data across multiple disk drives. The DS6000™ series supports RAID 5 arrays.

RAID 5 increases performance by supporting concurrent accesses to the multiple DDMs within each logical volume. Data protection is provided by parity, which is stored throughout the drives in the array. If a drive fails, the data on that drive can be restored using all the other drives in the array along with the parity bits that were created when the data was stored.

One of the most popular RAID levels, RAID 5 stripes both data and parity information across three or more drives. It is similar to RAID 4 except that it exchanges the dedicated parity drive for a distributed parity algorithm, writing data and parity blocks across all the drives in the array. This removes the "bottleneck" that the dedicated parity drive represents, improving write performance slightly and allowing somewhat better parallelism in a multiple-transaction environment, though the overhead necessary in dealing with the parity continues to bog down writes. Fault tolerance is maintained by ensuring that the parity information for any given block of data is placed on a drive separate from those used to store the data itself. The performance of a RAID 5 array can be "adjusted" by trying different stripe sizes until one is found that is well-matched to the application being used.


This illustration shows how files of different sizes are distributed
between the drives on a four-disk RAID 5 array using a 16 kiB stripe
size. As with the RAID 0 illustration, the red file is 4 kiB in size; the blue
is 20 kiB; the green is 100 kiB; and the magenta is 500 kiB, with each
vertical pixel representing 1 kiB of space. Contrast this diagram to the
one for RAID 4, which is identical except that the data is only on three
drives and the parity (shown in gray) is exclusively on the fourth.drive.

Controller Requirements: Requires a moderately high-end card for hardware RAID; supported by some operating systems for software RAID, but at a substantial performance penalty.

Hard Disk Requirements: Minimum of three standard hard disks; maximum set by controller. Should be of identical size and type.

Array Capacity: (Size of Smallest Drive) * (Number of Drives - 1).

Storage Efficiency: If all drives are the same size, ( (Number of Drives - 1) / Number of Drives).

Fault Tolerance: Good. Can tolerate loss of one drive.

Availability: Good to very good. Hot sparing and automatic rebuild are usually featured on hardware RAID controllers supporting RAID 5 (software RAID 5 will require down-time).

Degradation and Rebuilding: Due to distributed parity, degradation can be substantial after a failure and during rebuilding.

Random Read Performance: Very good to excellent; generally better for larger stripe sizes. Can be better than RAID 0 since the data is distributed over one additional drive, and the parity information is not required during normal reads.

Random Write Performance: Only fair, due to parity overhead; this is improved over RAID 3 and RAID 4 due to eliminating the dedicated parity drive, but the overhead is still substantial.

Sequential Read Performance: Good to very good; generally better for smaller stripe sizes.

Sequential Write Performance: Fair to good.

Cost: Moderate, but often less than that of RAID 3 or RAID 4 due to its greater popularity, and especially if software RAID is used.

Special Considerations: Due to the amount of parity calculating required, software RAID 5 can seriously slow down a system. Performance will depend to some extent upon the stripe size chosen.

Recommended Uses: RAID 5 is seen by many as the ideal combination of good performance, good fault tolerance and high capacity and storage efficiency. It is best suited for transaction processing and is often used for "general purpose" service, as well as for relational database applications, enterprise resource planning and other business systems. For write-intensive applications, RAID 1 or RAID 1+0 are probably better choices (albeit higher in terms of hardware cost), as the performance of RAID 5 will begin to substantially decrease in a write-heavy environment.

RAID 10 overview

RAID 10 overview

May 29, 2009

RAID 10 provides high availability by combining features of RAID 0 and RAID 1. The DS6000™ series supports RAID 10 arrays.

RAID 0 increases performance by striping volume data across multiple disk drives. RAID 1 provides disk mirroring which duplicates data between two disk drives. By combining the features of RAID 0 and RAID 1, RAID 10 provides a second optimization for fault tolerance.

RAID 10 implementation provides data mirroring from one DDM to another DDM. RAID 10 stripes data across half of the disk drives in the RAID 10 configuration. The other half of the array mirrors the first set of disk drives. Access to data is preserved if one disk in each mirrored pair remains available. In some cases, RAID 10 offers faster data reads and writes than RAID 5 because it does not need to manage parity. However, with half of the DDMs in the group used for data and the other half used to mirror that data, RAID 10 disk groups have less capacity than RAID 5 disk groups

Disabling USB storage on a Windows platform

Disabling USB storage on a Windows platform

May 29, 2009
Windows Disabling USB storage on a Windows platform is only a little more complicated:

1. From Explorer's folder options, ensure that hidden files and folders are displayed, file extensions are not hidden, and simple file sharing is disabled.
2. Open up the properties for %systemroot%\Inf\Usbtror.inf (%systemroot% would normally be C:\Windows).
3. Select the Security tab and make sure that all options for all users are set to deny. This must include administrators and SYSTEM.
4. Repeat the above for %systemroot%\Inf\Usbstor.pnf.
5. If USB storage devices have been used on this machine previously, open up the registry editor; otherwise, ignore steps 6 and 7.
6. Browse to the registry location HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\UsbStor.
7. Open up the registry key Start and change the data value to 4.
Close the registry editor.

That’s it! If simple file sharing was enabled previously, don’t forget to re-enable it.
Using NSlookup.exe Command Help From Microsoft

Using NSlookup.exe Command Help From Microsoft

May 21, 2009
Nslookup.exe is a command-line administrative tool for testing and troubleshooting DNS servers. This tool is installed along with the TCP/IP protocol through Control Panel. This article includes several tips for using Nslookup.exe.

To use Nslookup.exe, please note the following:
  • The TCP/IP protocol must be installed on the computer running Nslookup.exe
  • At least one DNS server must be specified when you run the IPCONFIG /ALL command from a command prompt.
  • Nslookup will always devolve the name from the current context. If you fail to fully qualify a name query (that is, use trailing dot), the query will be appended to the current context. For example, the current DNS settings are att.com and a query is performed on www.microsoft.com; the first query will go out as www.microsoft.com.att.com because of the query being unqualified. This behavior may be inconsistent with other vendor's versions of Nslookup, and this article is presented to clarify the behavior of Microsoft Windows NT Nslookup.exe
  • If you have implemented the use of the search list in the Domain Suffix Search Order defined on the DNS tab of the Microsoft TCP/IP Properties page, devolution will not occur. The query will be appended to the domain suffixes specified in the list. To avoid using the search list, always use a Fully Qualified Domain Name (that is, add the trailing dot to the name).

Nslookup.exe can be run in two modes: interactive and noninteractive. Noninteractive mode is useful when only a single piece of data needs to be returned. The syntax for noninteractive mode is:

   nslookup [-option] [hostname] [server]

To start Nslookup.exe in interactive mode, simply type "nslookup" at the command prompt:

   C:\> nslookup
Default Server: nameserver1.domain.com
Address: 10.0.0.1
>

Typing "help" or "?" at the command prompt will generate a list of available commands. Anything typed at the command prompt that is not recognized as a valid command is assumed to be a host name and an attempt is made to resolve it using the default server. To interrupt interactive commands, press CTRL+C. To exit interactive mode and return to the command prompt, type exit at the command prompt.

The following is the help output and contains the complete list of options:

Commands:   (identifiers are shown in uppercase, [] means optional)

NAME - print info about the host/domain NAME using default
server
NAME1 NAME2 - as above, but use NAME2 as server
help or ? - print info on common commands
set OPTION - set an option

all - print options, current server and host
[no]debug - print debugging information
[no]d2 - print exhaustive debugging information
[no]defname - append domain name to each query
[no]recurse - ask for recursive answer to query
[no]search - use domain search list
[no]vc - always use a virtual circuit
domain=NAME - set default domain name to NAME
srchlist=N1[/N2/.../N6] - set domain to N1 and search list to N1, N2,
and so on
root=NAME - set root server to NAME
retry=X - set number of retries to X
timeout=X - set initial time-out interval to X seconds
type=X - set query type (for example, A, ANY, CNAME, MX,
NS, PTR, SOA, SRV)
querytype=X - same as type
class=X - set query class (for example, IN (Internet), ANY)
[no]msxfr - use MS fast zone transfer
ixfrver=X - current version to use in IXFR transfer request

server NAME - set default server to NAME, using current default server
lserver NAME - set default server to NAME, using initial server
finger [USER] - finger the optional NAME at the current default host
root - set current default server to the root
ls [opt] DOMAIN [> FILE] - list addresses in DOMAIN (optional: output to
FILE)

-a - list canonical names and aliases
-d - list all records
-t TYPE - list records of the given type (for example, A, CNAME,
MX, NS, PTR, and so on)

view FILE - sort an 'ls' output file and view it with pg
exit - exit the program

A number of different options can be set in Nslookup.exe by running the set command at the command prompt. A complete listing of these options is obtained by typing set all. See above, under the set command for a printout of the available options.


Looking up Different Data Types

To look up different data types within the domain name space, use the set type or set q[uerytype] command at the command prompt. For example, to query for the mail exchanger data, type the following:
   C:\> nslookup
Default Server: ns1.domain.com
Address: 10.0.0.1

> set q=mx
> mailhost
Server: ns1.domain.com
Address: 10.0.0.1

mailhost.domain.com MX preference = 0, mail exchanger =
mailhost.domain.com
mailhost.domain.com internet address = 10.0.0.5
>

The first time a query is made for a remote name, the answer is authoritative, but subsequent queries are nonauthoritative. The first time a remote host is queried, the local DNS server contacts the DNS server that is authoritative for that domain. The local DNS server will then cache that information, so that subsequent queries are answered nonauthoritatively out of the local server's cache.



Querying Directly from Another Name Server

To query another name server directly, use the server or lserver commands to switch to that name server. The lserver command uses the local server to get the address of the server to switch to, while the server command uses the current default server to get the address.

Example:
   C:\> nslookup

Default Server: nameserver1.domain.com
Address: 10.0.0.1

> server 10.0.0.2

Default Server: nameserver2.domain.com
Address: 10.0.0.2
>

Using Nslookup.exe to Transfer Entire Zone

Nslookup can be used to transfer an entire zone by using the ls command. This is useful to see all the hosts within a remote domain. The syntax for the ls command is:

   ls [- a | d | t type] domain [> filename]

Using ls with no arguments will return a list of all address and name server data. The -a switch will return alias and canonical names, -d will return all data, and -t will filter by type.

Example:

   >ls domain.com
[nameserver1.domain.com]
nameserver1.domain.com. NS server = ns1.domain.com
nameserver2.domain.com NS server = ns2.domain.com
nameserver1 A 10.0.0.1
nameserver2 A 10.0.0.2

>

Zone transfers can be blocked at the DNS server so that only authorized addresses or networks can perform this function. The following error will be returned if zone security has been set:
*** Can't list domain example.com.: Query refused

For additional information, see the following article or articles in the Microsoft Knowledge Base:
193837 (http://support.microsoft.com/kb/193837/EN-US/ ) Windows NT 4.0 DNS Server Default Zone Security Settings
Back to the top

Troubleshooting Nslookup.exe

Default Server Timed Out

When starting the Nslookup.exe utility, the following errors may occur:
*** Can't find server name for address w.x.y.z: Timed out

NOTE: w.x.y.z is the first DNS server listed in the DNS Service Search Order list.

*** Can't find server name for address 127.0.0.1: Timed out

The first error indicates that the DNS server cannot be reached or the service is not running on that computer. To correct this problem, either start the DNS service on that server or check for possible connectivity problems.

The second error indicates that no servers have been defined in the DNS Service Search Order list. To correct this problem, add the IP address of a valid DNS server to this list.

For additional information, see the following article or articles in the Microsoft Knowledge Base:
172060 (http://support.microsoft.com/kb/172060/EN-US/ ) NSLOOKUP: Can't Find Server Name for Address 127.0.0.1

Can't Find Server Name when Starting Nslookup.exe

When starting the Nslookup.exe utility, the following error may occur:

*** Can't find server name for address w.x.y.z: Non-existent domain


This error occurs when there is no PTR record for the name server's IP address. When Nslookup.exe starts, it does a reverse lookup to get the name of the default server. If no PTR data exists, this error message is returned. To correct make sure that a reverse lookup zone exists and contains PTR records for the name servers.

For additional information, see the following article or articles in the Microsoft Knowledge Base:
172953 (http://support.microsoft.com/kb/172953/EN-US/ ) How to Install and Configure Microsoft DNS Server

Nslookup on Child Domain Fails

When querying or doing a zone transfer on a child domain, Nslookup may return the following errors:

*** ns.domain.com can't find child.domain.com.: Non-existent domain
*** Can't list domain child.domain.com.: Non-existent domain


In DNS Manager, a new domain can be added under the primary zone, thus creating a child domain. Creating a child domain this way does not create a separate db file for the domain, thus querying that domain or running a zone transfer on it will produce the above errors. Running a zone transfer on the parent domain will list data for both the parent and child domains. To work around this problem, create a new primary zone on the DNS server for the child domain.


APPLIES TO
  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows NT Server 4.0 Standard Editio
NSLOOKUP Commnad Brief Info

NSLOOKUP Commnad Brief Info

May 21, 2009
Syntax:
nslookup

nslookup host-to-find

nslookup server

interactive mode:

nslookup -server

nslookup [-options] [host-to-find ]

Options:

host [server ]
Look up information for host using the current default server or using server,
if specified. If host is an Internet address and the query type is A or PTR ,
the name of the host is returned. If host is a name and does not have a trailing
period, the default domain name is appended to the name. (This behavior depends
on the state of the set options domain , srchlist , defname , and search.

To look up a host not in the current domain, append a period to the name.

server domain
lserver domain
Change the default server to domain ; lserver uses the initial server to look up
information about domain while server uses the current default server.
If an authoritative answer can't be found, the names of servers that might have
the answer are returned.
root
Change the default server to the server for the root of the domain name space.
Currently, the host ns.internic.net is used. (This command is a synonym for
`lserver ns.internic.net' The name of the root server can be changed with
the `set root ' command.

finger [name ] [> filename ]
finger [name ] [>> filename ]
Connects with the finger server on the current host. The current host is
defined when a previous lookup for a host was successful and returned address
information (see the `set querytype=A ' command). The name is optional. > and
>> can be used to redirect output in the usual manner.

ls [option ] domain [> filename ]
ls [option ] domain [>> filename ]
List the information available for domain , optionally creating or appending
to filename The default output contains host names and their Internet addresses.
Option can be one of the following:

-t querytype list all records of the specified type (see querytype below).
-a list aliases of hosts in the domain; synonym for `-t CNAME '
-d list all records for the domain; synonym for `-t ANY'
-h list CPU and operating system information for the domain; synonym for `-t HINFO'
-s list well-known services of hosts in the domain; synonym for `-t WKS'

When output is directed to a file, hash marks are printed for every 50 records
received from the server.

view filename
Sort and lists the output of previous ls command(s) with more(1).

set keyword [= value ]
This command is used to change state information that affects the lookups.
run man nslookup for a full list of valid keywords.

set all Print the current value of the frequently-used options
to set Information about the current default server and host is also printed.

help
? Print a brief summary of commands.

exit Exit the program.

Nslookup has two modes: interactive and non-interactive.

Interactive mode allows the user to query name servers for information about various hosts and domains or to print a list of hosts in a domain.

Non-interactive mode is used to print just the name and requested information for a host or domain.

The options listed under the `set ' command can be specified in the .nslookuprc file in the user's home directory (listed one per line). Options can also be specified on the command line if they precede the arguments and are prefixed with a hyphen.

Help for Batch file configuration

Help for Batch file configuration

May 21, 2009
  • On this page you'll find a shorthand list of common tasks in batch files, and the command(s) that can be used to perform those tasks.

    Notes: Many, if not most, of the commands listed here require Windows 2000 and later, some require Windows XP or later, some require Active Directory.
    Read more detailed information by following the links provided.
    Depending on the Windows version, some commands (e.g. SETX and NETSVC) may require installation of a Resource Kit.

    Task Available command(s) or variable(s)
    Add/remove computer to/from domain NETDOM (1)
    Counters FOR /L or SET /A counter += 1
    Delays PING
    Current date DATE /T or %Date% or DEBUG
    Current directory CD or %CD%
    Current drive %CD:~0,2%
    Current time TIME /T or %Time% or DEBUG
    Directory of current batch file %~dp0
    Drive of current batch file %~d0
    Environment, permanent changes SETX (2)
    Firewall configuration NETSH
    Harddisk & volume management DISKPART, FDISK, FORMAT, CONVERT, MOUNTVOL, VOL, CHKDSK, CHKNTFS, DEFRAG
    Hardware inventory WMIC
    IP address (local) PING %ComputerName%, NSLOOKUP %ComputerName% or IPCONFIG /ALL
    IP address (remote) PING, NSLOOKUP or WMIC
    IP address (WAN) to file WGET -O output_filename -q http://www.whatismyip.com/automation/n09230945.asp (3)
    IP address (WAN) to screen WGET -q -O- http://www.whatismyip.com/automation/n09230945.asp (3)
    Logoff Multiple commands available
    Open a file, folder or web page START
    Permissions CACLS, XCACLS (2), MMC & SECEDIT, SUBINACL (3) or SETACL (3)
    Popup dialogs NET Send %ComputerName%
    Print text NOTEPAD /P
    Print anything ASSOC, FTYPE & REGEDIT or REG
    Printer management RUNDLL32 PRINTUI.DLL,PrintUIEntry
    Process management Multiple commands available
    Prompt for user input SET /P & more
    Read text files FOR /F or occasionaly <>
    Reboot Multiple commands available
    Registry REGEDIT or REG
    Service management NET Stop, NET Start, SC or NETSVC (2)
    Shutdown Multiple commands available
    Unicode to ASCII conversion TYPE
    User/group management NET, DSADD, DSGET, DSMOD, DSMOVE, DSQUERY & DSRM (1) or CSVDE & LDIFDE (1)
    Write text files Redirected ECHO

    Notes: (1) Requires Windows XP with Windows Server 2003 Administration Tools Pack, or Windows Server 2003 or later.
    (2) Resource Kit tool
    (3) Third party tool