Windows net basic command

Source: Internet
Author: User
Tags windows net

Windows net basic command 1. Tips for using the Ping command 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. 1. When we use the Ping command to locate the problem or check the network running condition, we need to use many Ping commands, if everything runs correctly, we can trust 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 shows a typical detection sequence and possible faults: the ping command 127.0.0.1 is sent to the IP software of the local computer, and the command will never exit the computer. If this is not done, it indicates that the installation or running of TCP/IP has some basic problems. The command ping the IP address of the local machine is sent to the IP address configured on our computer. Our computer should always respond to the Ping command. If not, 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. The command should leave our computer and go through the nic and network cable to other computers before returning. 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. If the command ping the gateway IP address is correct, it indicates that the Gateway Router in the LAN is running and can respond. Ping the remote IP address. If four responses are received, 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 is a reserved network name for the system. It is the alias of 127.0.0.1. Every computer that is too computer should be able to 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.webjx.com) to Ping the www.xxx.com address on this domain name. Generally, if a fault occurs on the DNS server, it indicates that 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 the DNS server ). By the way, we can also use this command to convert domain names to IP addresses. 2. Ping IP-t: the common parameter option of the ping command continuously runs the Ping command on the IP address until the user stops using Ctrl + C. Ping IP-l 3000: specify that the data length in the Ping command is 3000 bytes instead of the default 32 bytes. Ping IP-n to run the Ping command for a specific number of times. Ii. Tips for using the Netstat command Netstat is used to display statistics related to IP, TCP, UDP, and ICMP protocols. It is generally used to test the network connection of each port on the local machine. 1. Some common options of netstat: netstat-s. This option displays statistics for each protocol. If our applications (such as Web browsers) run slowly or cannot display data such as Web pages, we can use this option to view the displayed information. We need to carefully check the rows of statistics, find the keyword of the error, and then determine the problem. Netstat-e this option is used to display statistics about Ethernet. It lists items including the total number of bytes, number of errors, number of delimiters, number of datagram, and number of broadcasts. These statistics include both the number of sent and received data packets. This option can be used to calculate some basic network traffic ). Netstat-r this option displays information about the route table, similar to the information shown later when you use the route print command. In addition to valid routes, valid connections are also displayed. Netstat-a this option displays a list of all valid connection information, including the ESTABLISHED connections (ESTABLISHED) and those that listen to the LISTENING requests. Netstat-n displays all established valid connections. 2. What is Netstat like? People who frequently access the Internet usually use ICQ. I wonder if we have been harassed by some annoying people and want to complain but don't know how to get started? In fact, as long as we know the IP address of the other party, we can complain to its ISP. But how can I know the IP address of the other Party through ICQ? If the recipient chooses not to display the IP address when setting ICQ, we cannot see it in the Information bar. In fact, we only need to use Netstat to easily achieve this: when he is connected to us through ICQ or other tools (for example, we send him an ICQ message or a message ), enter netstat-n or netstat-a at the DOS command prompt to view the IP address or ISP domain name used by the other party to access the Internet, and even the Port used is completely exposed. Iii. Tips for using the IPConfig command IPConfig utility and its equivalent graphical user interface-WinIPCfg in Windows 95/98 can be used to display the current TCP/IP configuration setting value. This information is generally used to check whether the manually configured TCP/IP settings are correct. However, if our computer and the lan use the Dynamic Host Configuration Protocol (DHCP), the information displayed by this program may be more practical. In this case, IPConfig allows us to see if our computer has successfully rented an IP address. If so, we can see what address it has allocated. Understanding the current IP address, subnet mask, and default gateway of a computer is actually necessary for testing and fault analysis. 1. IPConfig is the most common option. ipconfig does not include any Parameter options when using IPConfig. It displays IP addresses, subnet masks, and default gateway values for each configured interface. Ipconfig/all when the all option is used, IPConfig displays the configured and used additional information (such as IP addresses) for the DNS and WINS servers ), and displays the physical address (MAC) built in the local Nic ). If the IP address is rented from the DHCP server, IPConfig displays the IP address of the DHCP server and the expected expiration date of the lease address. Ipconfig/release and ipconfig/renew are two additional options that can only work on computers that lease their IP addresses to the DHCP server. If we enter ipconfig/release, the lease IP addresses of all interfaces will be re-delivered to the DHCP server (return the IP address ). If we enter ipconfig/renew, the local computer will try to contact the DHCP server and lease an IP address. Note that in most cases, the NIC will be assigned the same IP address as previously assigned. If we are using Windows 95/98, we should be more accustomed to using winipcfg instead of ipconfig, because it is a graphical user interface and the displayed information is the same as ipconfig, you can also publish and update Dynamic IP addresses. 4. ARP (Address Translation Protocol) is an important TCP/IP protocol and used to determine the physical address of the NIC corresponding to the IP address. The practical arp command allows us to view the current content in the ARP cache of a local computer or another computer. In addition, you can manually enter static Nic physical/IP address pairs using arp commands. We may use this method for common hosts such as the default gateway and local server, this helps reduce the amount of information on the network. Common ARP Command Options: arp-a or arp-g is used to view all items in the cache. The results of the-a and-g parameters are the same. For many years,-g has been the option used on UNIX platforms to display all items in the ARP cache, windows uses arp-a (-a can be regarded as all, that is, all), but it can also accept more traditional-g options. Arp-a IP if we have multiple NICs, we can only display arp cache items related to this interface by using the IP address of the ARP-a interface. The physical IP address of arp-s can be manually entered into the ARP cache. The project remains valid during the computer boot process, or when an error occurs, the manually configured physical address automatically updates the project. Arp-d IP can use this command to manually delete a static project. Now we can use the ipconfig and ping commands to view our network configurations and determine if they are correct. We can use netstat to view the connections established between others and us and find out the IP addresses hidden by ICQ users, you can use arp to view the MAC address of the NIC. 5. Tracert, Route, and NBTStat Skills 1. Tracert skills if network connectivity problems exist, you can use the tracert command to check the path of the destination IP address and record the result. The tracert command displays a group of IP Routers used to transmit data packets from the computer to the target location, and the time required for each hop. If the data packet cannot be transmitted to the target, the tracert command displays the last vro that successfully forwarded the data packet. When a datagram is transmitted from our computer through multiple gateways to the destination, the Tracert command can be used to track the route (PATH) used by the datagram ). The path tracked by this utility is a path from the source computer to the destination. It cannot be guaranteed or considered that the datagram always follows this path. If our configuration uses DNS, we often get the name of the city, address, and common communication company from the response. Tracert is a slow command (If the destination address is too long), we need to give it about 15 seconds for each vro. Tracert is easy to use. You only need to follow tracert with an IP address or URL. Tracert will convert the domain name accordingly. Tracert: tracert IP address [-d] This command returns the list of routers that have arrived at the IP address. By using the-d option, the vro path is displayed faster, because tracert does not try to parse the name of the vro in the path. Tracert is generally used to detect the location of a fault. We can use tracert IP to locate the fault. Although we still haven't determined what the problem is, it has already told us where the problem is located, we can also confidently tell someone else that something went wrong. 2. Route usage tips Most hosts generally reside in the CIDR block that only connects to one vro. Because there is only one vro, no vro is used to publish the data to a remote computer. the IP address of the vro can be input as the default gateway of all computers in the CIDR block. However, when two or more vrouters exist on the network, we do not necessarily want to rely on the default gateway. In fact, we may want to transfer some of our remote IP addresses through a specific vro, while other remote IP addresses are transmitted through another vro. In this case, we need the corresponding routing information, which is stored in the routing table. Each host and each router has its own unique route table. Most routers use dedicated routing protocols to exchange and dynamically update route tables between routers. However, in some cases, you must manually add the project to the router and Host Routing tables. Route is used to display, manually add, and modify Route table items. General option: route print this command is used to display the current project in the route table and the output on the network segment of a single router. Because the network adapter is configured with an IP address, all these items are automatically added. Use this command to add a route entry to the route table. For example, if you want to set a route to the destination network of 209.98.32.33, the route must go through five vro CIDR blocks. First, you must go through a vro on the local network with the IP address 202.96.123.5, if the subnet mask is too large, run the following command: route add 209.98.32.33 mask 255.255.202.96.123.5 metric 5 route change. We can use this command to modify the data transmission route. However, we cannot use this command to change the data destination. In the following example, you can change the data route to another vro, which uses a straight path containing three CIDR blocks: route add 209.98.32.33 mask route tables route 202.96.123.250 metric 3 route delete Use this command to delete a route from the route table. Example: route delete 209.98.32.33 3. Use the NBTStat command to release and refresh the NetBIOS name. The NBTStat (NetBIOS statistics on TCP/IP) utility is used to provide statistics about NetBIOS. With NetBIOS, we can view the NetBIOS name table on a local computer or remote computer. Common options: nbtstat-n displays the local name and service program. Nbtstat-c this command is used to display the content cached by NetBIOS name. The NetBIOS name cache is used to store the NetBIOS Name and IP address pairs of other computers that recently communicate with this computer. Nbtstat-r this command is used to clear and reload the NetBIOS name cache. The IP address of nbtstat-a displays the physical address and name list of the other computer through the IP address. The displayed content is the same as that of the other computer running nbtstat-n. The nbtstat-s IP address displays the NetBIOS connection table of another computer whose IP address is used.
 

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.