Operation of common commands and parameters of ping, ipconfig, route, arp, tracert, netstat, telnet
ping command
Application scenarios: Used to solve connection, accessibility and name resolution problems.
Usage: ping domain name/IP address [parameter] (eg: ping www.baidu.com -n 1 -l 1000)
-l send buffer size
-a Resolve addresses to hostnames.
-n Number of echo requests to send.
-t Ping the specified host until stopped.
ipconfig command
Application Scenario: Display all current TCP/IP network configuration values and refresh Dynamic Host Configuration Protocol (DHCP) and Domain Name System (DNS) settings
Usage: ipconfig [parameters] (ipconfig displays all current network configurations)
ipconfig /all displays all network configurations
ipconfig -release releases DHCP information.
ipconfig -renew re-obtain address through DHCP
ipconfig /displaydns View DNS cache
ipconfig /flushdns clears the DNS cache
route command
Application scenario: display and modify the input in the local IP routing table
Usage: route command parameter (route add 172.16.10.1 mask 255.255.255.255 192.168.1.1)
route add target network MASK subnet mask gateway IP --add route
route delete target network -- delete route
route -p add destination network MASK subnet mask gateway IP
arp command
Use case: Display and modify entries in the Address Resolution Protocol ( ARP ) cache.
Usage: arp parameter
arp -a displays current ARP entries by asking for current protocol data
arp -d deletes the host specified by inet_addr.
arp -s IP MAC Add a host and associate the Internet address inet_addr with the physical address eth_addr
tracert command
Application Scenario: Display a list of near / side router interfaces for routers in the path between the source host and the destination
Usage: tracert parameter IP/domain name (such as tracert -d www.baidu.com path to Baidu server)
tracert -d IP/domain name Do not resolve addresses to hostnames.
netstat command
Application scenario: Display active TCP connections
Usage: netstat [parameter] (such as netstat -a displays the current arp entry)
-a display the current arp entry
-d Deletes the host specified by inet_addr.
telnet command
Application scenario: remote login to a server
Usage: telnet domain name port