Usage of common commands on Windows network

  
        

The network tools under Windows are commonly used ping, ipconfig, nslookup, netstat, tracert, FTP, telnet, nbtstat, route. Let's take a look at their usage: The name of the detection tool Ping Ping originates from the pulse emitted by the submarine sonar when it detects the target. The pulse will be reflected back when it encounters the target, which also properly reveals the function of the Ping. If you are late in the process of browsing a web page, the user can test whether the host can be reached by issuing a tentative IP detection packet (equivalent to a sonar pulse) to the host. At the same time, Ping returns a wealth of information, so users can learn about the speed of the host from the local host and the IP address of the host. Format: Ping Destination Address [Parameter 1] [Parameter 2] [Parameter 3] The destination address is the address of the detected host, which can be either a domain name or an IP address. Parameters: -t: Continue to ping until the user terminates. -a: Resolve the host address. -n value: The number of probe packets sent. The default value is 4. -l value: Send buffer size. -f: Sets the disable split packet flag. -I value: The packet lifetime, which determines the distance the IP packet travels on the network. -v: The type of service. Example: ping www.baidu.com NetStat tool NetStat Function: Display protocol statistics and current TCP/IP network connection, users can get very detailed statistics. Format: Netstat [Parameter 1] [Parameter 2] [Parameter 3] Parameters: -a: Display all network connections and listening ports. -e: Display Ethernet statistics. -n: Displays the address and port in numeric format. -p: Displays the connection of the specified TCP or UDP protocol. -r: Displays the routing table. -s: Displays statistics for each protocol. The protocol can be TCP, UDP, or IP. Interval: Displays statistics repeatedly according to the specified interval (interval). Example: As an exercise, you can enter the command: Netstat -r
Traceroute (Trace Route) Function: View the route from the local host to the target host. This is a good tool for understanding the principles and working processes of the network. By showing every host address and round trip time from the local host to the target host, you can understand how a packet is transmitted over the network to the target. The host can analyze which part of the network the blocking occurs. In the IP packet, there is a field TTL (Time To Live) that determines the distance that the packet can be transmitted over the network. When the packet is sent, the initial value is usually preset. Whenever the packet encounters a host (after a route), the value of the field is decremented by one, and then sent to the next adjacent host until its value is zero, and the transmission is stopped. If the destination reaches the destination within the range of the TTL value, The transmission is successful, otherwise it must be resent. This prevents a packet from being transmitted over the network without restriction, causing network congestion. The TraceRT tool sends the probe packet to obtain the address and round trip time of each host that passes. Format: TraceRT [Parameter 1] [Parameter 2] Target Host Parameters: -d: The target host address is not resolved. -h: Specifies the maximum number of routes to track, that is, the maximum number of hosts passed. -j: Specifies a loose source routing table. -w: Specifies the timeout for each response in milliseconds. Example: tracert -j bbs.winos.cn TCP/IP configuration program IPconfig Function: TCP/IP configuration program of DOS interface, you can view and change TCP/IP configuration parameters. The default IP address, subnet mask, and default gateway are displayed in the default mode. Format: IPconfig [parameter] Parameters: ipconfig /All: Display all details, including host name, node type, DNS server, NetBIOS range identifier, enable IP routing, enable WINS proxy, NetBiOS resolve to use DNS, adapter address, IP address , network mask, default gateway, DHCP server, master WINS server, auxiliary WINS server, access to lease, etc. Ipconfig /release: DHCP client manually releases the IP address; Ipconfig /renew: DHCP client manually refreshes the request to the server; Ipconfig /flushdns: clears the local DNS cache contents; Ipconfig /displaydns: displays the local DNS contents; Ipconfig /registerdns:DNS client The terminal manually registers with the server; Ipconfig /showclassid: displays the DHCP class information of the network adapter; Ipconfig /setclassid: sets the DHCP class of the network adapter. Example: ipconfig /all network routing table setup program Route function: View, add, delete, modify routing table entries. Format: Route [-f] [command [destination] [MASK netmask] [gateway] [METRIC metric] Parameters: -f: Clear the routing table of all gateway entries. If this parameter is used in combination with other commands, clear the routing table. The priority is greater than other commands. Command: print: print a route add: add a route delete: delete a route change: modify an existing route destination: specify the target host. Mask netmask: Specifies the subnet mask of the route entry after mask. If not specified, the default is 255.255.255.255. Gateway: Specifies the gateway instance: route print NSLOOKUP is a very useful command to connect to the DNS server in NT, 2000, query domain name information Example: nslookup bbs.winos.com File Transfer Tool FTP Function: Use FTP protocol to transfer files on the network. FTP is a file transfer tool similar to Unix programs. Users familiar with Unix can find similarities between these commands and Unix commands. Example: FTP download.anqn.com

The Telnet protocol is a member of the TCP/IP protocol suite and is the standard protocol and main method for Internet remote login services. It provides users with the ability to do remote host work on a local computer. Use the telnet program on the end user's computer and use it to connect to the server. End users can enter commands in the telnet program, which will run on the server as if they were entered directly on the server's console. The server can be controlled locally. To start a telnet session, you must enter your username and password to log in to the server. Telnet is a common example of remote control of the Web server: use telnet to connect to the mail server telnet pop.163.com 110 (I originally wanted to connect to the gmail server, but the name and password requirements are encrypted after the trouble) Nbtstat Displays TCP/IP-based NetBIOS (NetBT) protocol statistics, NetBIOS name tables for local and remote computers, and NetBIOS name cache. Nbtstat can refresh the NetBiOS name cache and the name registered with Windows Internet Name Service (WINS). Use nbtstat with no arguments to display help. Syntax nbtstat [-a RemoteName] [-A IPAddress] [-c] [-n] [-r] [-R] [-RR] [-s] [-S] [Interval] Parameters -a remotename: Display Remote The NetBIOS name table for your computer, where RemoteName is the NetBIOS computer name of the remote computer. The NetBIOS name table is a list of NetBiOS names that correspond to the applications running on that computer. -A IPAddress: Displays the NetBiOS name table for the remote computer whose name is specified by the IP address of the remote computer (separated by the decimal point). -c: Displays the NetBIOS name cache contents, the NetBiOS name table, and their resolved addresses. -n: Displays the NetBiOS name table for the local computer. The status of Registered indicates whether the name is registered via broadcast or WINS server. -r: Displays NetBiOS name resolution statistics. On computers that are configured to use WINS and run the Windows XP or Windows Server 2003 operating system, this parameter returns the name number that has been resolved and registered through broadcast and WINS. -R: Clears the contents of the NetBiOS name cache and reloads the project with the #PRE flag from the Lmhosts file. -RR: Releases and refreshes the NetBiOS name of the local machine registered with the WINS server. -s: Displays the NetBiOS client and server session and attempts to convert the destination IP address to a name. -S: Displays NetBiOS client and server sessions, listing remote computers only by IP address. Interval: Redisplays the selected statistics and interrupts the number of seconds specified in the Interval between each display. Press Ctrl+C to stop redisplaying the statistics. If this parameter is omitted, netstat will only display the current configuration information once. Example: nbtstat -n is commonly used, and the other is netsh, etc. is relatively advanced, not detailed here. These commands are actually very practical commands. In some cases, they can make up for each other's defects. Oh, more exciting, look forward to your discovery!

Copyright © Windows knowledge All Rights Reserved