The ping Command Explained Table

Ping Command Parameters Explained

-a Converts the target's machine identifier to an ip address

-t Will keep pinging if the user does not interrupt it

-n count Requires the ping command to send packets continuously until it has sent and received a count of requests

-d is the socket to use

-f is a fast way to ping. Turns on debugging

-f is a fast way to ping. makes the ping output packets as fast as the packets are returned from the remote host, or faster, up to 100 times per second. In this way, each request is represented by a single period. For each response a spacebar is printed.

-i seconds A number of seconds between packet transmissions. Cannot be used with -f.

-n Use numeric only. In general ping tries to convert IP addresses to hostnames. This option requires ping to print the IP address without looking up the symbolic name. This option is important if for some reason the local DNS servers cannot be used.

-p pattern The -p pattern champion can be used with this option to identify 16 pad bytes to be added to the packet. This option is useful when diagnosing data-related errors in the network.

-q Causes ping to print only some summary information at the beginning and end.

-R Adds the ICMP RECORD-ROUTE option to ECHO_REQUEST packets to require that routes be logged in the packet so that ping can print out the routing information when the data is returned. Only nine routing nodes can be logged per packet. Many hosts ignore or drop this option.

-r Causes the ping command to bypass the normal routing table used to send packets.

-s packetsize Enables the user to identify the number of bytes of data to be sent. The default is 56 characters, plus an 8-byte ICMP data header, ***64 ICMP data bytes.

-v Put ping in verbose mode. It wants the ping command to print all other returned ICMP packets in addition to the ECHO-RESPONSE packet.

=================================================================================

Parameters for ping!

ping [-t] [-a] [-n count] [-l length] [-f] [-i ttl] [-v tos] [-r count] [-s count] [[-j computer-list] | [-k computer-list]

[-w timeout] destination-list

The Ping command can be used to verify a connection to a remote computer. (This command can only be used if the TCP/IP protocol is installed.)

Parameter description:

-t : Ping the specified computer until interrupted by pressing Control-C from the keyboard.

-a : Resolves the address to the NetBios name of the computer.

-n : Send the number of ECHO packets specified by count. This command allows you to define the number of packets you want to send, which is useful for measuring network speed.

Enables you to test the average return time of sent packets, and how fast or slow it is. The default is 4.

-l : Sends ECHO packets with the specified amount of data. The default is 32 bytes; the maximum is 65500 byt.

-f : Sends a "do not segment" flag in the packet so that the packet will not be segmented by the gateway on the route. Normally, the packets you send are routed through the gateway and sent to the other side in segments, so if you add this parameter, the route will not be segmented.

-i : Sets the "time-to-live" field to the value specified by TTL. Specifies how long the TTL value stays on the other system. It also checks network performance.

-v : tos Sets the Service Type field to the value specified by tos.

-r : Records the routes of outgoing and returning packets in the Record Route field. Typically, outgoing packets are routed through a series of routes to reach the target address.

-r : Records the routes of outgoing and incoming packets in the Record Routes field. This parameter allows you to set the number of routes you want to detect. The limit is 9 routes.

-s : Specifies the timestamp for the number of leaps specified by count. Similar to the -r parameter, but this parameter does not record the routes through which packets are returned, and only records a maximum of four.

-s : Specifies the timestamp for the number of leaps specified by count.

-j : Routes packets using the list of computers specified by computer-list. Consecutive computers can be separated by intermediate gateways (routing sparse sources) The maximum number of IP allowances is 9.

-k : computer-list Routes packets using the computer-list specified by computer-list. Consecutive computers cannot be separated by an intermediate gateway (route strict

source) The maximum number of IPs allowed is 9.

-w : timeout Specifies a timeout interval in milliseconds.

destination-list: Specifies the remote computers to ping.

In general, by pinging the destination address, you can let the other side return the size of the TTL value, through the TTL value you can roughly determine the type of system of the target host is Windows or UNIX/Linux, in general the TTL value returned by the Windows system is between 100-130, and the TTL value returned by the UNIX/Linux system is between 240-2500. The TTL value returned by UNIX/Linux systems is between 240-255. However, the TTL value can be modified. Therefore, this method can be used as a reference.

The general operation is as follows:

C:\>ping www.welos.cn

Pinging [66.218.71.81] with 32 bytes of data:

Reply from 66.218.71.81: bytes=32 Reply from 66.218.71.81: bytes=32 time=160ms TTL=41

Reply from 66.218.71.81: bytes=32 time=160ms TTL=41

Reply from 66.218.71.81: bytes=32 time=160ms TTL=41

Reply from 66.218.71.81: bytes=32 time=161ms TTL=41

Ping statistics for 66.218.71.81:

Packets: Sent = 4, Received = 4, Lost = 0 (0% loss) Approximate

round trip times in milli-seconds:

Minimum = 150ms, Maximum = 161ms, Average = 157ms

-------------------------- ------------------------------------------------------

Tracerttracert

Tracert This diagnostic utility will include different time-to-live (TTL) values for the Internet Control Message Protocol (ICMP). ICMP)

The diagnostic utility sends ICMP echo packets to the destination to determine the route used to reach the destination. Each router on the path is required to decrement the TTL on the packet by at least 1 before forwarding it, so the TTL

is a valid count of the leap points. When the TTL on a packet reaches 0, the router should send an "ICMP timed out" message back to the source system. tracert sends the echo packet with a TTL

of 1, and increments the TTL by 1 on each subsequent transmission until the destination responds, or until the TTL

reaches its maximum value, and thus determines the route. maximum value, thus determining the route. Routing determines the route by examining the "ICMP timed out" message sent back by the intermediate router. However, some routers silently downlink packets with expired TTL

values that tracert does not see.

tracert [-d] [-h maximum_hops] [-j computer-list] [-w timeout]

target_name

Parameter Description:

/d Specifies that the address is not to be resolved to a computer name.

-h maximum_hops Specifies the maximum number of hops to search for a target.

-j computer-list Specifies sparse source routing along computer-list.

-w timeout Wait for timeout per answer Specifies the number of microseconds.

target_name The name of the target computer.

The general approach is as follows:

C:\>tracert www.welos.cn

Tracing route to [66.218.71.81] over a maximum

of 30 hops:

1 10 ms <10 ms <10 ms 19.218.71.81]. ms <10 ms 192.168.0.7

2 <10 ms 10 ms <10 ms 210.192.97.129

3 <10 ms 20 ms 10 ms 192.168.200.21

4 <10 ms 10 ms 10 ms 203.212.0.69

5 <10 ms 10 ms 10 ms 10 ms 202.108.252.1

6 10 ms 10 ms <10 ms 202.106.193.201

7 10 ms 20 ms 20 ms 202.106.193.169

8 <10 ms 10 ms 10 ms 202.106.192.226

9 <10 ms 10 ms 10 ms 10 ms 202.96.12.45

10 20 ms 30 ms 20 ms p-6-0-r1-c-shsh-1.cn.net [202.97.34.34]

11 20 ms 30 ms 30 ms p-3-0-r3-i-shsh-1.cn.net [202.97.33.74]

12 160 ms 161 ms 160 ms if-7-7.core1.LosAngeles.Teleglobe.net

[ 207.45.193.73]

13 200 ms 201 ms 200 ms if-4-0.core1.Sacramento.Teleglobe.net

[64.86.83.170]

14 190 ms 190 ms 190 ms if-2-0. core1.PaloAlto.Teleglobe.net

[64.86.83.201]

15 160 ms 160 ms 160 ms 160 ms ix-5-0.core1.PaloAlto.Teleglobe.net

[207.45.196.90]

16 180 ms 180 ms 160 ms ge-1-3-0.msr1.pao.yahoo.com

[216.115.100.150]

17 170 ms 210 ms 321 ms vl10.bas1.scd.yahoo.com [66.218. 64.134]

18 170 ms 170 ms 170 ms w2.scd.yahoo.com [66.218.71.81]

===============================================