Network management personnel must be required to command (paste)

Source: Internet
Author: User
Tags command line interface connect return client
Network Management | Network management personnel must command
If you've ever played with a router, you know the funny command abbreviations in the router.
For example, "sh int" means "show interface".

Now Windows 2000 also has a tool like the interface, called Netsh.

In Windows 2000, under the CMD shell, we enter the Netsh
Just come out:netsh> prompt,
Enter int IP to display:
Interface ip>
Then enter dump and we can see the network configuration of the current system:

# ----------------------------------
# Interface IP Configuration
# ----------------------------------
pushd Interface IP


# Interface IP Configuration for ' Local area Connection '

Set address name = ' Local area Connection ' Source = static addr = 192.168.1.168
Mask = 255.255.255.0
Add address name = ' Local area Connection ' addr = 192.1.1.111 mask = 255.255.255.0
Set address name = ' Local area Connection ' gateway = 192.168.1.100 gwmetric = 1
Set DNS name = "Local area Connection" Source = static Addr = 202.96.209.5
Set WINS name = "Local area Connection" Source = static Addr = None


popd
# End of Interface IP configuration

This is a way of interacting with each other.
We can enter the command directly:
"netsh interface ip add address ' local area Connection ' 10.0.0.2
255.0.0.0 "
To add an IP address.

If you do not know the grammar, it does not matter Oh!
At the prompt, enter? We can find the answer. Convenient inconvenient ah?
It turns out that there are some things that people like about Microsoft. Alas, very few of them!


Windows Network Command line program
This section includes:

Use Ipconfig/all to view configuration
Use Ipconfig/renew to refresh the configuration
Using Ipconfig to manage DNS and DHCP class IDs
Use Ping to test connection
Resolving hardware address problems with ARP
Using nbtstat to troubleshoot NetBIOS name problems
Display connection statistics using netstat
Using tracert to track network connections
Testing routers using Pathping
Use Ipconfig/all to view configuration
When you discover and troubleshoot TCP/IP network problems, first check the TCP/IP configuration on the computer that is having problems. OK
Use the ipconfig command to obtain host configuration information, including the IP address, subnet mask, and default gateway.

Attention

For Windows 95 and Windows 98 clients, use the winipcfg command instead of the IPCONFI
G command.
When using the ipconfig command with the/ALL option, detailed configuration reports for all interfaces are given, including any
The configured serial port. With Ipconfig/all, you can redirect the command output to a file and
The output is pasted into another document. You can also use this output to confirm the TCP/IP configuration for each computer on the network, or
Further investigate TCP/IP network problems.

For example, if the computer is configured with an IP address that duplicates an existing IP address, the subnet mask appears as 0.0.0
.0.

The following example is the Ipconfig/all command output, which is configured to use the DHCP server to dynamically configure
TCP/IP and uses WINS and DNS servers to resolve names.

Windows IP Configuration

Node Type ..... : Hybrid
IP Routing Enabled ..... : No
WINS Proxy Enabled ..... : No

Ethernet Adapter Local Area Connection:

Host Name ..... : corp1.microsoft.com
DNS Servers .......:10.1.0.200
Description ...: 3Com 3c90x Ethernet Adapter
Physical Address ...: 00-60-08-3e-46-07
DHCP Enabled ...: Yes
Autoconfiguration Enabled.: Yes
IP address ..... . : 192.168.0.112
Subnet Mask ..... : 255.255.0.0
Default Gateway ... : 192.168.0.1
DHCP Server ..... : 10.1.0.50
Primary WINS Server .... : 10.1.0.101
Secondary WINS Server ...: 10.1.0.102
Lease obtained ..... : Wednesday, September, 1998 10:32:13 AM
Lease Expires ..... : Friday, September, 1998 10:32:13 AM


If there is no problem with TCP/IP configuration, the next test can connect to other hosts on the TCP/IP network.

Use Ipconfig/renew to refresh the configuration
When troubleshooting TCP/IP network problems, first check the TCP/IP configuration on the computer that is experiencing the problem. If your computer
To enable DHCP and use the DHCP server to obtain configuration, start refreshing your lease using the ipconfig/renew command
About.

When using ipconfig/renew, all network adapters on computers that use DHCP, except those manually configured
adapters, try to connect to the DHCP server, update the existing configuration, or obtain a new configuration.

You can also use the ipconfig command with the/release option to immediately release the current DHCP configuration of the host. Yes
For more information about DHCP and lease procedures, see how clients obtain configuration.

Attention

For DHCP-enabled Windows 95 and Windows 98 clients, use the rel of the winipcfg command
Ease and renew options, instead of the ipconfig/release and Ipconfig/renew commands, manual
Releases or updates the client's IP configuration lease.
Using Ipconfig to manage DNS and DHCP class IDs
You can also use the ipconfig command:

Displays or resets the DNS cache.
For more information, see View or reset the client resolver cache using Ipconfig.

Refreshes the registered DNS name.
For more information, see Updating DNS client registration using ipconfig.

Displays the DHCP class ID for the adapter.
For more information, see Displaying DHCP class ID information on a client computer.

Sets the DHCP class ID for the adapter.
For more information, see Setting DHCP class ID information on a client computer.

Use Ping to test connection
The Ping command helps verify the connectivity of IP levels. When discovering and resolving problems, you can use Ping to the target host
The machine name or IP address sends an ICMP response request. Need to verify that the host can connect to the TCP/IP network and network
Resource, use Ping. You can also use Ping to isolate network hardware problems and incompatible configurations.

It is usually best to use the Ping command to verify that the route between the local computer and the network host is present, and to connect
The IP address of the network host that is connected. Ping the IP address of the target host to see if it responds, as follows:

Ping IP_Address

The following steps should be performed when using Ping:

Ping loopback addresses Verify that TCP/IP is installed on the local computer and that the configuration is correct.
Ping 127.0.0.1

Ping the IP address of the local computer to verify that it is correctly added to the network.
Ping Ip_address_of_local_host

Ping the IP address of the default gateway to verify that the default gateway is running and that it can be connected to the local host on the local network
Hearing
Ping Ip_address_of_default_gateway

Ping the IP address of the remote host to authenticate the ability to communicate through the router.
Ping Ip_address_of_remote_host

The Ping command resolves the computer name to an IP address with the name resolution of a Windows sockets word, so if
Successful address, but Ping failed with name, the problem is on address or name resolution, not network connection
The problem of the generality. For more information, see Resolving Hardware address problems with ARP.

If you are unable to successfully use Ping at any point, confirm:

Restart the computer after you install and configure TCP/IP.
IP address of the local computer on the General tab of the Internet Protocol (TCP/IP) Properties dialog box
effective and correct.
IP routing is enabled, and links between routers are available.
You can use the different options of the Ping command to specify the packet size to use, how many packets to send,
Whether to record the used route, the time to Live (TTL) value to use, and whether to set the "Do not Fragment" flag. Can
To type ping-? View these options.

The following example shows how to send two Ping to an IP address 172.16.48.10, each of which is 1,450 bytes:

C:>ping-n 2-l 1450 172.16.48.10
Pinging 172.16.48.10 with 1450 bytes of data:

Reply from 172.16.48.10:bytes=1450 time<10ms ttl=32
Reply from 172.16.48.10:bytes=1450 time<10ms ttl=32

Ping statistics for 157.59.8.1:
Packets:sent = 2, Received = 2, Lost = 0 (0% loss),
Approximate roundtrip times in milli-seconds:
Minimum = 0ms, Maximum = 10ms, Average = 2ms
By default, the Ping waits 1,000 milliseconds (1 seconds) for each response to return before the request timeout is displayed. If a Ping-probed remote system passes through a long delayed link, such as a satellite link, the response may take longer to return. You can use the-w (wait) option to specify a longer timeout.

Resolving hardware address problems with ARP
Address Resolution Protocol (ARP) allows a host to find the media access control address of a host on the same physical network, if the IP address of the latter is given. To make ARP more efficient, each computer caches IP to media access control address mappings to eliminate duplicate ARP broadcast requests.

You can use the ARP command to view and modify ARP table entries on the local computer. ARP commands are useful for viewing ARP caching and resolving address resolution problems.

For more information, see View the Address Resolution Protocol (ARP) cache and add static ARP cache entries.

Using nbtstat to troubleshoot NetBIOS name problems
NetBIOS (NetBT) on TCP/IP resolves the NetBIOS name to an IP address. TCP/IP provides many options for NetBIOS name resolution, including local cache search, WINS server queries, broadcasts, DNS server queries, and Lmhosts and host file searches.

Nbtstat is a useful tool for solving NetBIOS name resolution problems. You can use the nbtstat command to delete or correct a preloaded project:

NBTSTAT-N displays the names that are registered locally on the system by programs such as the server or redirector.
NBTSTAT-C Displays the NetBIOS name cache, which contains the names of other computers to address mappings.
Nbtstat-r clears the name cache and reloads it from the Lmhosts file.
NBTSTAT-RR releases the NetBIOS names registered on the WINS server, and then refreshes their registrations.
Nbtstat-a name performs the NetBIOS adapter status command on the computer specified by name. The adapter Status command returns the local NetBIOS name table for the computer and the media access control address of the adapter.
Nbtstat-s lists the current NetBIOS sessions and their status, including statistics, as shown in the following example:
NetBIOS Connection Table

Local name In/out Remote Host Input Output
------------------------------------------------------------------
CORP1 <00> Connected out corpsup1<20> 6MB 5MB
CORP1 <00> Connected out corpprint<20> 108KB 116KB
CORP1 <00> Connected out corpsrc1<20> 299KB 19KB
CORP1 <00> Connected out corpemail1<20> 324KB 19KB
CORP1 <03> Listening
Display connection statistics using netstat
You can use the Netstat command to display protocol statistics and current TCP/IP connections. The netstat-a command displays all connections, while NETSTAT-R displays the routing table and active connections. The NETSTAT-E command displays Ethernet statistics, and netstat-s displays statistics for each protocol. If you use Netstat-n, you cannot convert addresses and port numbers to names.

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.