1) how to view the port opened on the local machine:
Run the netstat-An command to view details! Next, stat has some English letters. Let me briefly explain what these English letters represent ~
Listen: listens for connection requests from remote TCP ports
SYN-SENT: wait for a matched connection request after sending a connection request again
SYN-RECEIVED: Wait for the other party to confirm the connection request after receiving and sending a connection request
Established: indicates an opened connection.
Fin-wait-1: waiting for confirmation of the remote TCP connection interruption request or previous connection interruption request
Fin-wait-2: Waiting for connection interruption requests from remote TCP
Close-Wait: Waiting for connection interruption requests from Local Users
Closing: waiting for confirmation of remote TCP connection interruption
LAST-ACK: waiting for confirmation of the original connection interruption request sent to remote TCP
Time-Wait: Wait for enough time to confirm that the remote TCP receives the connection interruption request.
Closed: No connection status
××××××××××××××××××××××××××××××××××××××××××× ×××××
2) how to obtain the host name of an IP address?
Use the Ping-A ip command to view details! Next, the "ip" following the pinging In the first line is the host name of the other party!
In the same way, Ping machine_name to obtain the IP address of the other party.
To obtain the IP address of a website, Ping www.xxx.com.
For example, if you want to know the Sohu IP address, you can ping www.sohu.com to view it ~
By the way, if the returned value is "reply from *. *": TTL expired in transit, it means that TTL expires during transmission.
What does it mean? Let me explain it!
There are two reasons for this problem: 1) the TTL value is too small! The TTL value is less than the number of routers that pass through the host. 2) There are too many routers. The number of routers passing through is greater than the TTL value!
Oh, actually, these two points mean one thing! It's just different!
××××××××××××××××××××××××××××××××××××××××××× ×××××
3) how to view the IP address of the Local Machine?
You can use ipconfig to view it!
You can also enter winipcfg in the Start menu in windows, and you can also see your own IP address.
If the ipconfig command is followed by a parameter/all, you can get more detailed information, such as DNS and gateway ......
××××××××××××××××××××××××××××××××××××××××××× ×××××
4) when using the net command, I encountered some error codes. How can I view the corresponding error information?
Run the net helpmsg erorr_code command to view the information.
For example, the error code is 88.
The command "net helpmsg 88" is displayed in Chinese!
××××××××××××××××××××××××××××××××××××××××××× ×××××
5) What command should I use Telnet to connect to the other host and obtain some system information?
The SET command can well complete the tasks for collecting information you need!
Method: Enter set in cmd. (After telnet to the host, set the host directly ~ Then you can obtain more information about nnnnn)
Here, computername: Well, are you still using it? Host Name!
OS = windows_nt: OS type ~
Path = C:/perl/bin/:( location of the interpreter of Perl !)
Systemdrive = C: OS drive!
Username = coldcrysky user currently logging on to the machine
......
××××××××××××××××××××××××××××××××××××××××××× ×××××
6) What is the command for tracking a vro?
Tracert format: tracert IP
The list of all routers going through is displayed in the middle! If these routers are exposed and then outside the firewall, you can also see the IP address of the route ~ Haha (another question is involved here: Why should I put the route behind the firewall? There are two main reasons: 1) Protect the router! Because more and more attacks and intrusions have begun to target routers ~ It is very dangerous to directly expose the route! It's not good to be dos ~ Oh, so put it in the firewall; 2) reduce the burden on the router! If all the filtering functions are on the vro, the burden on the vro is too high !)
Of course, using pathping can achieve the same effect! The format is the same as that of tracert!
××××××××××××××××××××××××××××××××××××××××××× ×××××
Tips for using ping commands
Ping is a frequently used utility used to determine whether a local host can exchange (send and receive) data packets with another host. Based on the returned information, we can infer whether the TCP/IP parameter is set correctly and whether the operation is normal. Note that successfully performing one or two exchanges with another host does not indicate that the TCP/IP configuration is correct, we must exchange data between a large number of local hosts and remote hosts to ensure the correctness of TCP/IP.
To put it simply, Ping is a test program. If Ping runs correctly, we can basically eliminate faults in the network access layer, Nic, modem input/output lines, cables, and routers, this reduces the scope of the problem. However, Ping can also be used as a DDoS (Denial of Service Attack) tool by someone with ulterior motives to customize the size and endless high-speed transmission of the datagram, for example, many large websites are paralyzed by hackers who use hundreds of computers that can access the Internet at high speed to send a large number of ping data packets.
According to the default settings, the ping command on Windows sends four ICMP (inter-network control packet protocol) Send back requests, each 32 bytes of data, if everything is normal, we should be able to receive four replies. Ping can display the time between sending a return request and returning a return response in milliseconds. If the response time is short, the datagram does not have to pass through too many routers or network connections. Ping can also display the TTL value. We can use the TTL value to estimate how many routers the data packet has passed: the start value of the TTL at the source location (that is, a 2th percentile value that is slightly greater than the returned TTL)-the TTL value returned. For example, if the returned TTL value is 119, the initial TTL value of the outbound data packet from the source address is 128, and the source point to the target location must pass 9 vro network segments (128-119 ); if the returned TTL value is 246, the start value of TTL is 256, and the source and target locations must pass through nine vro network segments.
1. Typical order of network faults detected by Ping
Under normal circumstances, when we use the ping command to find the problem or check the network running status, we need to use many ping commands. If all of them are running correctly, we can believe that the basic connectivity and configuration parameters are correct. If some ping commands fail, it can also specify where to locate the problem. The following describes a typical detection sequence and possible faults:
· Ping 127.0.0.1
The Ping Command is sent to the IP address software of the local computer, which never exits. If this is not done, it indicates that the installation or running of TCP/IP has some basic problems.
· Ping the local IP Address
This command is sent to the IP address configured by our computer. Our computer should always respond to this ping command. If it does not exist, it indicates that there is a problem with the local configuration or installation. When this problem occurs, the LAN user must disconnect the network cable and then resend the command. If this command is correct after the network cable is disconnected, it indicates that the same IP address may be configured on the other computer.
· Ping other IP addresses in the LAN
This command should leave our computer, go through the nic and network cable to other computers, and then return. If you receive a response, the NIC and carrier in the local network are running correctly. However, if you receive 0 replies, it indicates the subnet mask (code that separates the network part of the IP address from the host part during subnet division) incorrect or the NIC configuration is incorrect or the cable system is faulty.
· Ping the gateway IP Address
If the command is correct, it indicates that the Gateway Router in the LAN is running and can respond.
· Ping a remote IP Address
If you receive four responses, the default gateway is successfully used. A dial-up Internet user can successfully access the internet (but it is not ruled out that the ISP's DNS may be faulty ).
· Ping localhost
Localhost is a reserved network name for the system. It is an alias of 127.0.0.1. Every computer that is too computer can convert the name to this address. If this is not done, the host file (/Windows/host) is faulty.
· Ping www.xxx.com (for example, www.yesky.com)
Ping www.xxx.com for this domain name. If the DNS server fails, the IP address of the DNS server is incorrectly configured or the DNS server is faulty (for dial-up Internet users, some ISPs do not need to set DNS servers ). By the way, we can also use this command to convert domain names to IP addresses.
If all the ping commands listed above can run properly, we can basically rest assured that the local and remote communication functions of our computers can be implemented. However, the success of these commands does not mean that all our network configurations are normal. For example, some subnet mask errors may not be detected using these methods.
2. Ping Command Parameters
· Ping IP CT
Run the ping command on the IP address until the IP address is interrupted by Ctrl + C.
· Ping IP-l 3000
The Data Length in the ping command is 3000 bytes instead of the default 32 bytes.
· Ping IP CN
Run the ping command for a specified number of times.