Wednesday, January 5, 2011

Weak current College】 【Windows networking commands (2).

<br> 12. at the DOS prompt set static IP <br> A. setting a static IP <br> CMD <br> netsh <br> netsh> int <br> interface> ip <br> Interfaceip> setadd "local .links "staticIP address maskgateway <br> B. view IP settings <br> interfaceip> showaddress <br> Arp <br> Display and modify the" address resolution protocol (ARP) "item in the cache. The ARP cache contains one or more .tables that are used to store the IP address and its parsed Ethernet or token ring physical address. Computer installation of each Ethernet or token ring network adapter has its own separate table. If used without parameters, the arp command displays the help information. <br .> <br> Syntax <br> arp [-a [InetAddr] [-NIfaceAddr] [-g [InetAddr] [-NIfaceAddr] [-dInetAddr [IfaceAddr] [-sInetAddrEtherAddr [IfaceAddr] <br> <br> Parameters <br .>-a [InetAddr] [-NIfaceAddr] <br> Show all interface's current ARP cache table. To display the specified IP address in the ARP cache entries, use the parameters with InetAddr arp-a, where InetAddr represents the specified IP address. .To display the ARP cache for a specified interface, use the-NIfaceAddr parameter where IfaceAddr representative assigned to the IP address of the specified interface. The-N parameter is case-sensitive. <br>-g [InetAddr] [-NIfaceAddr] < .br> Same with-a. <br>-dInetAddr [IfaceAddr] <br> Deletes the specified IP address entry, where InetAddr represents IP address. For the specified interface, to delete an item in the table, use the IfaceAddr parameter where IfaceAddr .representative assigned to the IP address of the interface. To delete all entries, use the asterisk wildcard character instead of InetAddr. <br>-sInetAddrEtherAddr [IfaceAddr] <br> Add to the ARP cache can be resolved to an IP address InetAddr EtherAddr physical .address of the static items. To specify the interface table to add a static ARP cache entries, use the IfaceAddr parameter where IfaceAddr representative assigned to the IP address of the interface. <br> /? <br> At the command prompt displays help. .<br> Comments <br> InetAddr and IfaceAddr IP address use dotted decimal notation. <br> The physical address EtherAddr consists of six bytes, these bytes in hexadecimal notation and separated by hyphens (for example, 00-AA-00-4F- .2A-9C). <br> Through the-s parameter to add the item belongs to static items, they are not the ARP cache timeout. If you terminate the TCP / IP Protocol on startup, these items will be deleted. To create a .permanent static ARP cache entries, in batch files by using the appropriate arp command and pass the "Task Scheduler" at startup, run the batch file. <br> Only when the Internet Protocol (TCP / IP) Protocol in the network connection is installed .as a network adapter property of the component, the command is available. <br> Example <br> To display the ARP cache on all interfaces, type: <br> <br> arp-a <br> <br> For the assigned .IP address 10.0.0.99 interface, to display the ARP cache table, type: <br> <br> arp-a-N10.0.0.99 <br> <br> To add the IP address 10.0.0.80 00-AA-00 .-4F-2A-9C parsing into the physical address of the static ARP cache entry, type: <br> <br> arp-s10.0.0.8000-AA-00-4F-2A-9C <br> <br> At .<br> Plan within a specified time and date on your computer, run the command and program. At commands work only in the "program" service run time. If used without parameters, at lists scheduled commands. <br> <br> Syntax .<br> at [\ \ \ \ ComputerName] [{[ID] [/ delete] | / delete [/ yes]}] <br> <br> at [\ \ \ \ ComputerName] hours: minutes [/ interactive] .[{/ everyate [,...]| / nextate [,...]}] command] <br> <br> Parameters <br> \ \ \ \ computername <br> Specifies the remote computer. If you omit this .parameter, the at schedule a command on the local computer and the program. <br> ID <br> Specifies the assigned to planned order identification number. <br> / delete <br> Cancel a scheduled command. If you omit the ID, .the computer all planned orders will be canceled. <br> / yes <br> Deleting scheduled events, from any and all inquiries answered "Yes". <br> hours: minutes <br> Specifies the command to run. The time is 24 .-hour clock (that is, from 00: 00 [Midnight] through 23: 59) Hours: minutes format. <br> / interactive <br> When you run the command for the logged-on user, allows command as the user interacts .with the desktop. <br> / every: <br> In each week or month of the specified date (for example, every Thursday, or monthly on the third day) runs the command command. <br> date <br> Specifies the .run command. You can specify a week on a day or several days (ie, type M, T, W, Th, F, S, Su) or one which orange stack estate armed fu AZ: blink??? KR 1 to 31 .). Use a comma to separate multiple date entries. If you omit the date, at the current day of the month. <br> / next: <br> In the next specifies the date (for example, next Thursday) at the dawn .of run command. <br> command <br> Specifies that you want to run Windows command, program (. exe or. com file), or batch program (. bat or. cmd file). When the command requires the path as an .argument, use an absolute path, starting from the drive letter of the entire path. If the command on a remote computer, specify the server and share name of universal naming agreement (UNC) notation, rather than a remote drive letter. <br> ./? <br> At the command prompt displays help. <br> Comments <br> Schtasks is a superset of the more powerful command line planning tool, it contains at the command line tool in all functions. For all the command line to schedule .a task that can be used to replace at schtasks. More information about schtasks, see the "related topics". <br> <br> Use at <br> Use the at command, you must be a member of the local Administrators group. .<br> <br> Load Cmd.exe <br> Before running the command does not automatically load At Cmd.exe (command interpreter). If you do not run the executable file (. exe), you use the command must begin with .the method specifically loading Cmd.exe: <br> <br> cmd / cdir> c: \ \ test.out. .<br> <br> View scheduled commands <br> When not used with command line options, at the scheduled task will appear in a format similar to the following table: <br> <br> StatusIDDayTimeCommandLine <br> OK1EachF4: 30PMnetsendgroupleadsstatusdue <br .> OK2EachM12: 00AMchkstor> check.file <br> OK3EachF11: 59PMbackup2.bat <br> Contains the identifier (ID) <br> When used in a command prompt with the identification number (ID) of the at command, a single task information .is displayed in a format similar to the following: <br> <br> TaskID: 1 <br> <br> Status: OK <br> <br> Schedule: EachF <br> <br> TimeofDay: 4:30 PM <br .> <br> Command: netsendgroupleadsstatusdue when plan with at commands (especially with command line options command), you want to type without command-line options at to check the command syntax is entered correctly. If displayed in the "command line" column information .is incorrect, delete the command and retype it. If you are not correct, you can retype the command so that it rarely bring some command line options. <br> <br> View results <br> Use at the command of planned run as .background processes. The results will not display on your computer. To redirect output to a file, use a redirection symbol (>. If you redirect output to a file, either on the command line or in a batch file, you will need to .use at the redirection symbols by using the escape character. For example, to redirect output to Output.text file, you would type: <br> <br> at14: 45c: \ \ test.bat ^> c: \ \ output .. txt <br> <br> Execution of the order of the current directory to the systemroot folder. <br> <br> Change the system time <br> In use at schedule a command to run after that if you change the computer's system .time by typing without command-line options at allows the at Scheduler with the revised system time synchronized. <br> <br> Storage command <br> Scheduled commands are stored in the registry. So, if you restart the "program" service, .you do not lose scheduled tasks. <br> <br> Connect to network drive <br> Requiring access to the network of a scheduled job, please do not use a redirected drive. "The program" service may not be able to access the .redirected drive, or, in the scheduled task run time if other users are logged on, the redirected drive may not appear. Therefore, for a scheduled job, use a UNC path. For example: <br> <br> at1: 00pmmy_backup \ .\ \ \ server \ \ share <br> <br> Please do not use the following syntax (where x:? represents a connection made by the user): <br> <br> at1: 00pmmy_backupx: <br> <br> .If you plan a use drive letters at command to connect to the shared directory, you should include an at command to enable the completion of the drive and the drive is disconnected. If you cannot disconnect from the drive, At a command prompt, the assigned .drive letter is unavailable. <br> <br> Example <br> To show Marketing server has a list of commands, type: <br> <br> at \ \ \ \ marketing <br> To understand the server identification number 3 on .the Corp's command, type: <br> <br> at \ \ \ \ corp3 <br> To schedule at 8: 00 am run on the Corp server, a network share and the list is redirected to the Maintenance of the Corp.txt .file server (located in the shared directory Reports), type: <br> <br> at \ \ \ \ corp08: 00cmd / c "netsharereports = d: \ \ marketing \ \ reports>> \ \ \ \ maintenance \ \ .reports \ \ corp.txt "<br> For every five days after midnight the Marketing server hard drive backup to a tape drive, first create a named Archive.cmd batch program (which contains the backup command), and then schedule the batch program .to run, and type: <br> <br> at \ \ \ \ marketing00: 00/every: 5,10,15,20,25,30 archive <br> To cancel the current server planned all command, use the following method .to clear the at schedule information: <br> <br> at / delete <br> If the command to run is not an executable (. exe) file, use the following methods before you use this command in cmd / c to load Cmd .. exe: <br> <br> cmd / cdir> c: \ \ test.out. <br> Rsh <br> Running the RSH service run commands on a remote computer. WindowsXP or Windows2000 not providing RSH service. Windows2000ServerResourceKit provides the .named Rshsvc.exe RSH service. Used without parameters, the rsh displays help. <br> <br> Syntax <br> rsh [Host] [-lUserName] [-n] [Command] <br> <br> Parameters <br .> Host <br> Specifies the remote computer to run the command. <br>-lUserName <br> Specifies the remote computer using the user name. When omitted, the currently logged on user name. <br>-n <br> The .input of rsh to be redirected to the NULL device. This prevents local computer command results are displayed. <br> Command <br> Specifies the command to run. <br> /? <br> At the command prompt displays help. <br .> Comments <br> Standards * for <br> Rsh command on standard input to the remote command, standard output of the remote command to its standard output, and standard error of the remote command to its standard error replication. Rsh normally terminates when the .remote command to terminate. <br> <br> Using redirection symbols <br> In order to enable the redirection to occur on the remote computer, to quotation redirection symbols (for example ">>"). If you do not use .quotation marks, redirection occurs on the local computer. For example, the following command to the remote file RemoteFile "attach" to the local file "LocalFile": <br> <br> rshothercomputercatremotefile>> localfile <br> <br> The .following command to the remote file Remotefile to the remote file otherremotefile: <br> <br> rshothercomputercatremotefile ">>" otherremotefile <br> <br> Using rsh <br> When using the logged-on to a domain and runs the .WindowsXPProfessional-based computer, the domain's primary domain controller must be available to verify the user name or the rsh command failed. <br> <br> The. rhosts file <br> The. rhosts file usually licenses UNIX system for network access.. .rhosts file lists can access the remote computer's machine name and the associated login. In a properly configured. rhosts file on the remote computer that run rcp, rexec, or rsh commands that you do not need to provide remote computer login and password information. < .br> <br> The. rhosts file is a text file, the file with one entry for each behavior. Entries from the local computer name, local name, and the entry of all comments. Each entry is separated by a tab or space, .and comments begin with a symbol (#). For example: <br> <br> host7 # Thiscomputerisinroom31A <br> <br>. Rhosts file must be on a remote computer, the user's home directory. The remote computer's specific implementation of the .. rhosts file, see the remote system's documentation. <br> <br> Only when the Internet Protocol (TCP / IP) Protocol in the network connection is installed as a network adapter property of the component, the command is available. <br> .Example <br> To name admin1 in executing on a remote computer vax1 telcon command, type: <br> <br> rshvax1-ladmin1telcon <br> <br>> Tftp <br> To run the trivial file transfer protocol (TFTP) service .or daemon for remote computers (especially computers running UNIX) to transfer files to or from running the trivial file transfer protocol (TFTP) service or daemon for remote computers (especially computers running UNIX) to transfer files. <br> <br> Syntax < .br> tftp [-i] [Host] [{get | put}] [Source] [Destination] <br> <br> Parameters <br>-i <br> Specifies binary image transfer mode (also known as octal mode) .. In binary image mode, the file to a byte are transmitted as a unit. In the transmission of binary files use this mode. If you omit the-I, the files will be transferred in ASCII mode. This is the default transfer mode. .This mode will end of line (EOL) characters to be converted to the appropriate format on the specified computer. Transmit text files use this mode. If file transfer is successful, the data transfer rates. <br> Host <br> Specify a local .or remote computer. <br> put <br> The local computer's Destination file transfer to the remote computer's Source file. Because the TFTP protocol does not support user authentication, the user must be logged on to the remote computer at the same file on the .remote computer must be writable. <br> get <br> The remote computer to a local Destination file transfer of Source files on your computer. <br> Source <br> Specifies the files to be transferred. <br> Destination <br> .Specifies the file to the location. If you omit Destination, will assume that it has the same name as the Source. <br> /? <br> At the command prompt displays help. <br> Comments <br> Use the get parameters .<br> If the local computer's file FileTwo delivered to a file on a remote computer, specify put FileOne. If the remote file FileTwo on the computer to a file on a remote computer, specify get FileOne. <br> <br> WindowsXP or .Windows2000 does not provide a general purpose TFTP server. Windows2000-supplied TFTP Server service only for WindowsXP and Windows2000 client computers with remote boot capabilities. <br> Only when the Internet Protocol (TCP / IP) Protocol in the network connection is installed as a .network adapter property of the component, the command is available. <br> Example <br> From the local computer will file Users.txt transfer to the remote computer vax1 Users19.txt on, type: <br> <br> tftpvax1putusers.txtusers19 .. txt <br> Nbtstat <br> Displays the local computer and remote computers over TCP / IP (NetBT) protocol statistics, NetBIOS NetBIOS name table and the NetBIOS name cache. Nbtstat can refresh the NetBIOS name cache and registered the name service WindowsInternet ( .WINS) name. Used without parameters, the nbtstat displays help. <br> <br> Syntax <br> nbtstat [-aRemoteName] [-AIPAddress] [-c] [-n] [-r] [-R] [- .RR] [-s] [-S] [Interval] <br> <br> Parameters <br>-aremotename <br> Display the remote computer's NetBIOS name table, where RemoteName is the remote computer's NetBIOS computer name. NetBIOS name table is .run on this computer application uses the NetBIOS name of the list. <br>-AIPAddress <br> Display the remote computer's NetBIOS name table, the name of the remote computer's IP address specifying (separated by a decimal point). <br> - .c <br> Displays the NetBIOS name cache contents, the NetBIOS name table and its resolution of individual addresses. <br>-n <br> Displays the local computer's NetBIOS name table. Registered in the name of the State indicates that it is through .radio or WINS server registration. <br>-r <br> Displays the NetBIOS name resolution statistics. When configured to use WINS for WindowsXP computer, this parameter will return through broadcasting and WINS name resolution and registration number. <br>-R < .br> Clear the contents of the NetBIOS name cache and reload the Lmhosts file with # PRE marked items. <br>-RR <br> New release and refresh local WINS registered the NetBIOS name. <br>-s <br> Displays NetBIOS .client and server sessions, and attempt to target IP addresses into names. <br>-S <br> Displays NetBIOS client and server sessions, only through IP address lists the remote computer. <br> Interval <br> Redisplays selected statistics, you .can break between each display Interval in the specified number of seconds. Press CTRL + c to stop redisplaying statistics. If omitted, netstat will only show the current configuration information. <br> /? <br> At the command prompt displays help. < .br> Comments <br> Nbtstat command-line parameters are case-sensitive. <b> </ b> R> the following table lists the columns generated by Nbtstat. Title description <br> Input the number of bytes received. <br> .Output the number of bytes sent. <br> In / Out the connection from the computer (outbound) or other computers on your local computer (inbound). <br> Lift name table cache entries in memory before being cleared. <br> LocalName .local NetBIOS name and connection. <br> RemoteHost and remote computer name or IP address. <br> ≪ 03> into hexadecimal NetBIOS name of the last byte. Each NetBIOS name length is 16 characters. Since the last byte often has special significance .because of the same name (only the last byte) may appear on a single computer several times. For example, in the ASCII text <20> is a space. <br> Type the name of the type. Name can be a single .name or group name. <br> Status on a remote computer that is running NetBIOS service (the "registered"), or on the same computer name has been registered for the same service (the "conflict"). <br> StateNetBIOS State .of the connection. <br> <br> The following table lists the possible NetBIOS connection status. Status description <br> Connected session has been established. <br> The endpoint associated with the connection has been created and associated with the IP address. .<br> Just answer the endpoints on the inner connection available. <br> Idle the end point is open single cannot receive the connection. <br> Connecting to the session is in the connecting phase. At this stage in the parsing of selected target .by name to IP address mapping. <br> Accept an inbound session is currently being accepted and will be connected shortly. <br> Reconnecting session will attempt to reconnect (if the first connection failed). <br> Outbound session is in the connecting .phase. This phase is to create a TCP connection. <br> Inbound connections inbound sessions in the session. <br> Is disconnected from the session is disconnected. <br> Interrupted connection to the local computer has been disconnected and is awaiting confirmation from .the remote system. <br> <br> Only when the Internet Protocol (TCP / IP) Protocol in the network connection is installed as a network adapter property of the component, the command is available. <br> Example <br> To display .the NetBIOS computer name for the remote computer of CORP07 NetBIOS name table, type: <br> <br> nbtstat-aCORP07 <br> <br> To display the assigned IP address 10.0.0.99, the remote computer's NetBIOS name table, type: .<br> <br> nbtstat-A10.0.0.99 <br> <br> To display the local computer's NetBIOS name table, type: <br> <br> nbtstat-n <br> <br> To display the NetBIOS name .cache on the local computer, type: <br> <br> nbtstat-c <br> <br> To clear the NetBIOS name cache and reload the local Lmhosts file with tag # PRE project, type: <br> <br> nbtstat .-R <br> <br> To free registered by the WINS server's NetBIOS name and re-registration, type: <br> <br> nbtstat-RR <br> <br> To every 5 seconds to display the IP address of the .NetBIOS session statistics, type: <br> <br> nbtstat-S5 <br> <br> Netstat <br> Displays active TCP connections, ports on the computer is listening, Ethernet statistics, the IP routing table, IPv4 statistics (for the .IP, ICMP, TCP and UDP protocols), and IPv6 statistics (for the IPv6, ICMPv6, TCP over IPv6, and UDP over IPv6 protocols). When used without parameters, netstat displays active TCP connections. <br> <br> Syntax < .br> netstat [-a] [-e] [-n] [-o] [-pProtocol] [-r] [-s] [Interval] <br> <br> Parameters <br>-a <br> Displays .all active TCP connections and the computer listening on TCP and UDP ports. <br>-e <br> Displays Ethernet statistics, such as the number of bytes transmitted and received, the number of packets. This parameter can be used in conjunction with- .s. <br>-n <br> Displays active TCP connections, however, only in digital form of address and port number, but does not attempt to determine the name. <br>-o <br> Displays active TCP connections and includes .each connection process ID (PID). You can in Windows Task Manager's "processes" tab to find applications that are based on the PID. This parameter can be-a,-n and-p. <br>-pProtocol <br> Displays .the Protocol specified by the agreement. In this case, the Protocol can be tcp, tcpv6, udp, or udpv6. If this parameter is used in conjunction with the-s displays per-protocol statistics, the Protocol can be tcp, udp, icmp ., ip, tcpv6, ipv6, icmpv6, or udpv6. <br>-s <br> Display statistics by Protocol. By default, displays the TCP, UDP, ICMP and IP protocol statistics. If you install WindowsXP of the IPv6 protocol is displayed .on the about IPv6TCP, UDP, IPv6, ICMPv6, and statistical information about the IPv6 protocol. You can use the-p parameter specifies the set of protocols. <br>-r <br> Display the contents of the IP routing table. The .parameters and routeprint command equivalent. <br> Interval <br> Every Interval seconds replay once selected information. Press CTRL + c to stop redisplaying statistics. If omitted, netstat will print only the selected information at a time. <br> /? < .br> At the command prompt displays help. <br> Comments <br> And the order of the parameter must be used with a hyphen (-) instead of to short a slash (/) as a prefix. <br> Netstat provides the .following statistics: <br> Proto <br> The name of the Protocol (TCP or UDP). <br> <br> <br>.

No comments:

Post a Comment