Home> Common Problem> body text

What are the 9 commonly used network commands?

coldplay.xixi
Release: 2023-01-13 00:31:18
Original
12024 people have browsed it

9 commonly used network commands: 1. ping command; 2. ipconfig command; 3. arp command; 4. traceroute command; 5. nslookup command; 6. route command; 7. nbtstat command; 8. netstat command; 9. net command.

What are the 9 commonly used network commands?

#The operating environment of this article: Windows 7 system, Dell G3 computer.

9 commonly used network commands:

1. Ping command

Ping is a utility program that is used frequently. Mainly used to determine network connectivity. This is useful for determining whether the network is connected correctly and the condition of the network connection. Simply put, ping is a test program. If ping runs correctly, it can generally eliminate faults in the network access layer, network card, Modem input and output lines, cables and routers, thereby narrowing the scope of the problem.

2. ipconfig command

The ipconfig utility can be used to display the current TCP/IP configuration settings. This information is generally used to verify whether manually configured TCP/IP settings are correct.

Furthermore, if the computer and the local area network use the Dynamic Host Configuration Protocol DHCP, you can use the ipconfig command to know whether your computer has successfully leased an IP address. If it has already been leased, you can learn about its current status. What address is obtained, including network configuration information such as IP address, subnet mask, and default gateway.

3. arp command (Address Translation Protocol)

ARP is an important protocol in the TCP/IP protocol suite and is used to determine the physical address of the network card corresponding to the IP address. .

Using the arp command, you can view the current contents of the ARP cache of the local computer or another computer. In addition, you can use the arp command to manually set a static network card physical address/IP address pair. This method can be used to perform local static configuration for common hosts such as the default gateway and local server, which helps reduce the amount of information on the network.

According to the default settings, the items in the ARP cache are dynamic. Whenever data is sent to the specified location and the current item does not exist in the cache at this time, ARP will automatically add the item.

4. Traceroute command

Master the skill of using the traceroute command to measure routing conditions, which is used to display the path that data packets take to reach the destination host.

The basic usage of the traceroute command is to type "tracert host_name" or "tracert ip_address" after the command prompt, where tracert is the name of traceroute on the Windows operating system.

5. Route command

Most hosts generally reside on a network segment that is only connected to one router. Since there is only one router, there is no problem of choosing which router to use to send data packets to the remote computer. The IP address of the router can be used as the default gateway for all computers on the network segment.

However, when there are two or more routers on the network, users do not necessarily want to rely only on the default gateway. You may actually want some remote IP addresses to be passed through a specific router, and other remote IP addresses to be passed through another router. In this case, users need corresponding routing information, which is stored in routing tables. Each host and each router is equipped with its own unique routing table. Most routers use specialized routing protocols to exchange and dynamically update routing tables between routers. However, in some cases, entries must be manually added to the routing tables on routers and hosts.

6. nslookup command

The function of the nslookup command is to query the IP address of any machine and its corresponding domain name. It usually requires a name server to serve the domain name. If the user has set up a domain name server, you can use this command to view the domain names corresponding to the IP addresses of different hosts.

7. nbtstat command

Use the nbtstat command to view some information about the network configuration on the computer. You can also use this command to find out some private information on other people's computers. If you want to check the network information on your computer, you can run nbtstat -n, and you can get your workgroup, computer name, network card address, etc.; if you want to check the status of other computers on the network, just run nbtstat -a *.* .*.*, replacing the *.*.*.* here with the IP address will return some information on that host.

8. Netstat command

Learn to use the netstat command to understand the current status of the network.

The netstat command can display active TCP connections, ports the computer is listening on, Ethernet statistics, IP routing tables, IPv4 statistics (for IP, ICMP, TCP, and UDP protocols) and IPv6 statistics (for IPv6, ICMPv6, TCP over IPv6, and UDP protocols). If used without parameters, netstat displays active TCP connections.

9. Net command

Understand the functions of Net service and learn to use Net service commands to solve related network problems.

Type net help command on the command line to get syntax help for the net command on the command line. For example, to get help about the net accounts command, type "net help accounts".

All net commands can use the /y and /n command line options. For example, the net stop server command is used to prompt the user to confirm stopping all dependent server services. net stop server/y means to confirm stopping and shutting down the server services.

Related video recommendations:PHP programming from entry to proficiency

The above is the detailed content of What are the 9 commonly used network commands?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!