Network engineer must know the Network Classic command

Source: Internet
Author: User
Tags command line comments config naming convention time and date net send nslookup schtasks

Network Classic command line

1. The most basic, most commonly used, testing of the physical network

Ping 192.168.0.8-t, parameter-T is waiting for the user to interrupt the test

2. View DNS, IP, Mac, etc.

A.win98:winipcfg

b.win2000 above: Ipconfig/all

C.nslookup: See DNS in Hebei

C:>nslookup

Default Server:ns.hesjptt.net.cn

address:202.99.160.68

>server 202.99.41.2 changed DNS to 41.2

> pop.pcpop.com

Server:ns.hesjptt.net.cn

address:202.99.160.68

Non-authoritative Answer:

Name:pop.pcpop.com

address:202.99.160.212

3. Network Messenger (often asked ~)

NET send computer name/ip|* (broadcast) transfer content, note that you cannot cross the network segment

net stop Messenger stop Messenger service, also can be in the panel-service modification

Net start Messenger Service

4. Probe each other's computer name, the group, domain and current username (how the hunt works)

Ping-a ip-t, showing only NetBIOS names

Nbtstat-a 192.168.10.146 is more complete.

5.netstat-a shows all the ports that your computer is currently opening

Netstat-s-E More detailed display of your network data, including TCP, UDP, ICMP and IP statistics, etc.

6. Probe ARP binding (dynamic and Static) list, show all connected to my computer, display each other's IP and MAC address

Arp-a

7. On the proxy server side

Bundle IP and MAC address, solve the local area network embezzlement ip!:

Arp-s 192.168.10.59 00-50-ff-6c-08-75

To unbind the IP of the NIC from the MAC address:

ARP-D Network card IP

8. Hide your computer from your network neighbors (let people see you!)

NET config Server/hidden:yes

NET config Server/hidden:no is open

9. Several net commands

A. Displays the current workgroup server List net view, which displays a list of computers on the current domain or network when you use this command without options.

For example, if you look at the shared resources on this IP, you can

C:>net View 192.168.10.8

Shared resources in the 192.168.10.8

Resource Share name Type purpose note

--------------------------------------

Web Service Disk

Command completed successfully.

B. Viewing user account list net user on a computer

C. View network link net use

For example: NET use z:192.168.10.8movie maps this IP movie shared directory to a local z disk

D. Record link net session

For example:

C:>net session

Computer User name client type open idle time

-------------------------------------------------------------------------------

192.168.10.110 ROME Windows 2000 2195 0 00:03:12

192.168.10.51 ROME Windows 2000 2195 0 00:00:39

Command completed successfully.

10. Routing Trace Command

A.tracert pop.pcpop.com

B.pathping pop.pcpop.com, in addition to displaying routing, also provides 325S analysis to calculate% of lost packages

11. Several commands for shared security

A. View your machine's shared resources net share

B. Manual deletion of the share (you can make a bat file, boot from the run, the sharing has been deleted!)

NET share C/d

NET share d$/d

NET share ipc$/d

NET share admin$/d

Note that there are spaces after the $.

C. Add a share:

C:net Share Mymovie=e:downloadsmovie/users:1

Mymovie shared successfully.

Also limit the number of linked users to 1 people.

12. Set static IP at DOS line

A. Setting up static IP

Cmd

Netsh

Netsh>int

Interface>ip

Interface ip>set Add "local link" static IP address mask Gateway

B. View IP Settings

Interface Ip>show Address

13, ARP Order detailed

Displays and modifies items in the Address Resolution Protocol (ARP) cache. The ARP cache contains one or more tables that are used to store IP addresses and their resolved Ethernet or Token ring physical addresses. Each Ethernet or Token Ring network adapter installed on the computer has its own separate table. If used without parameters, the ARP command displays help information.

Grammar

ARP [a [inetaddr] [-N ifaceaddr]] [g [InetAddr] [-N IfaceAddr]] [-D InetAddr [IfaceAddr]] [-S inetaddr etheraddr [ifacea DDR]]

Parameters

-A [inetaddr] [-N ifaceaddr]

Displays the current ARP cache table for all interfaces. To display the ARP cache entry for the specified IP address, use the arp-a with the InetAddr parameter, where the INETADDR represents the specified IP address. To display the ARP cache table for the specified interface, use the-n ifaceaddr parameter, where the IFACEADDR represents the IP address assigned to the specified interface. The-n argument is case-sensitive.

-G [InetAddr] [-N ifaceaddr]

Same as-a.

-D InetAddr [IfaceAddr]

Deletes the specified IP address entry, where the INETADDR represents the IP address. For the specified interface, to delete an item in the table, use the IfaceAddr parameter, where the IFACEADDR represents the IP address assigned to the interface. To remove all items, use the asterisk (*) wildcard character instead of InetAddr.

-S InetAddr etheraddr [IfaceAddr]

Adds a static entry to the ARP cache that resolves IP address inetaddr to physical address etheraddr. To add a static ARP cache entry to the table for the specified interface, use the IFACEADDR parameter, where the IFACEADDR represents the IP address assigned to the interface.

/?

Display Help at the command prompt.

Comments

The IP addresses of InetAddr and ifaceaddr are represented by decimal notation with dots.

The physical address etheraddr consists of six bytes, which are represented in hexadecimal notation and separated by hyphens (for example, 00-aa-00-4f-2a-9c).

Items added through the-s parameter are static items and they do not timeout in the ARP cache. If the TCP/IP protocol is terminated and then started, the items are deleted. To create a permanent static ARP cache entry, use the appropriate ARP command in the batch file and run the batch file at startup by using the scheduled task program.

This command is available only if the Internet Protocol (TCP/IP) protocol is installed as a component of network adapter properties in a network connection.

Example

To display an ARP cache table for all interfaces, type:

Arp-a

For an interface with an assigned IP address of 10.0.0.99, to display its ARP cache table, type:

ARP-A-N 10.0.0.99

To add a static ARP cache entry that resolves an IP address 10.0.0.80 to a physical address 00-aa-00-4f-2a-9c, you can type:

Arp-s 10.0.0.80 00-aa-00-4f-2a-9c

At

Plan to run commands and programs on your computer at the specified time and date. The AT command can only be used when the schedule service runs. If used without parameters, at lists the scheduled commands.

Grammar

at [ComputerName] [{[ID] [/delete]|/delete [/yes]}]

at [[ComputerName] hours:minutes [/interactive] [{/every:date[,...]| /next:date[,...]}] Command

Parameters

ComputerName

Specifies the remote computer. If this argument is omitted, the at schedule commands and programs on the local computer.

Id

Specifies the identification code assigned to the scheduled command.

/delete

Cancels the scheduled command. If an ID is omitted, all scheduled commands on the computer are canceled.

/yes

When you delete a scheduled event, all queries from the system are answered yes.

Hours:minutes

Specifies the time that the command runs. The time is represented by a 24-hour (that is, hours from 00:00 [midnight] to 23:59): the minute format.

/interactive

Allows command to interact with the user's desktop for the user who is logged on when the command is run.

/every:

Runs the command command on a specified day of the week or month (for example, every Thursday, or the third day of the month).

Date

Specifies the date on which the command was run. You can specify a day or days of the week (that is, type M, T, W, Th, F, S, Su), or a day or days in one months (that is, type a number from 1 to 31). Separate multiple date items with commas. If date is omitted, at uses the current day of the month.

/next:

Runs the command when the next specified date (for example, next Thursday) arrives.

Command

Specifies the Windows command, program (. exe or. com file) or batch program (. bat or. cmd file) to run. When the command requires a path as an argument, use an absolute path, which is the entire path starting with the drive letter. If the command is on a remote computer, specify the Universal naming convention (UNC) symbol for the server and share name, not the remote drive letter.

/?

Display Help at the command prompt.

Comments

Schtasks is a more powerful superset of command-line scheduling tool that contains all the features in the AT Command line tool. For all command-line scheduling tasks, you can use schtasks instead of at.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.