Introduction and use of the ping command tutorial

Source: Internet
Author: User
Tags echo message nslookup

We all know, usually we in the installation of community broadband when the total heard 1m,2m bandwidth, most friends think that the ultimate speed is 2mb/s. Actually, it's not like that. Here the 1M bandwidth refers to the 1mb/s, that is, 1024kb/s, and we usually say the download speed is kb/, B and B is not the same, b refers to Byte (byte) and B refers to bit (bit), the relationship between them is 8bit=1byte, So the 1M bandwidth limit download speed should be 1024kb/s divided by 8=128kb/s (2M bandwidth is 256kb/s), so, online to improve the speed of the posts are deceptive, this is the limit can not be exceeded, unless the service provider to give you higher bandwidth, of course, you will pay the I hope this post will help our friends understand the problem thoroughly.

Ping can be used to check whether the network is smooth or network connection speed, and as a network administrator ping command is the first DOS command that must be mastered. We can use ping to send a packet to a computer that is assigned an IP on the network, and the other side is going to return a packet of the same size, and the other machine can be judged by the returned packet.

Now go to the command prompt to ping the operation.

Start → run in run enter "cmd" return or click OK to open the command prompt. (pictured below)

We'll see a long lost command prompt after it's opened (figure below)

Now let's take a look at the various parameter commands for the ping. Enter the following format: "ping/?" Or you can just hit "ping."

You can see the parameters of the ping command when you enter.

Chinese parameters

-a resolves the address to the computer name.

-T verifies the connection to the specified computer until the user interrupts.

-N sends an ECHO message of the number specified by count

-L sends an ECHO message that contains the length of the data specified by length

-F sends a "do not fragment" flag in the package. The package will not be segmented by the gateway on the route.

-V Set the service Type field to the value specified by TOS

-R records routing of sending and returning messages in the Record route field

-s specifies a time stamp that is the number of forwarding times specified by count.

-j a routed message that passes through a list of computers specified by Computer-list. Intermediate gateways may separate contiguous computers

(Loose source routing). The maximum number of IP addresses allowed is 9

-K routed packets through the list of computers specified by Computer-list. Intermediate gateways may separate contiguous computers

(Strict source routing). The maximum number of IP addresses allowed is 9.

-W Specifies the time-out interval in milliseconds.

The ping command tests whether the TCP/IP protocol is properly installed and the network is unblocked

For example, we ping our forum website address bbs.cfanclub.net Input command "ping bbs.cfanclub.net (as shown below)

The place where the white line is used to enlarge is to return 4 packets

60.28.160.112 is the forum host IP address.

Bytes=32 is the number of bytes sent

Time is meant to mean the smaller the number of times returned

The TTL is the time that the packet survives from going to the back. And according to the numbers behind the LLT, we can judge each other's operating system.

For example, the return of the ttl=128 host may be a WIN2000 or WinXP system, if the ttl=250 or ttl=64 the other host system may be unix/liux operating systems and ttl=32 the other side may be win95/98 system. Why is he possible? Because the registry can be used to modify the host's operating system. Type

Now ping the domain of our forum "ping Bbs.cfanclub.net"

The returned ttl=119 can basically determine that the host is a WinXP system. The following figure shows

For example, ping Baidu under the domain name "ping baidu.com" through the following figure we can see the return of ttl=53, so that the basic can judge Baidu's host is the Liux operating system.

If you "ping bbs.cfanclub.net" get a request failure result as shown below.

First check the network equipment is normal, and then check the local connection in the DNS address is filled out and correct, and check whether the network cable is unobstructed, network cable socket is correct, if the ping is the other side of the machine's IP need to consider whether the other side of the firewall to stop.

Perhaps some people will ask the above forum IP is how to display it? In fact, ping domain name can be displayed, but there is a more professional command is "nslookup."

Nslookup can query the IP address of the corresponding domain name as well as a and CNAME records, if the CNAME record returns the setting record of the alias record.

Here simply talk about the use of "nslookup domain name" or forum as an example in the beginning of the operation of the input cmd open a command prompt

When you enter the following command "Nolookup bbs.cfanclub.net" you will get the results shown in the figure, mainly to see the white mark below

Domain and IP as good as all show it (about the use of nolookup command here for the moment, please understand)

Here we have some of the commands we use to ping

-T indicates that packets will be sent uninterrupted to the destination IP until we force it to stop

Method Ping-t Bbs.cfanclub.net

If you want to send a packet at ping time, we can add a-t before or after the address

Like Ping-t bbs.cfanclub.net or ping bbs.cfanclub.net-t can

If you want to stop this command, press CTRL + C to stop the current command (CTRL + C to stop the task command at the command prompt)

-N defines the number of packets sent to the destination IP, which defaults to 3 times

Send 6 Packets Here we can enter "Ping-n 6 bbs.cfanclub.net" When sending 6 packets will automatically stop if you only want to determine whether the other IP exists ping1 time

--l defines the size of the packet sent, which defaults to 32 bytes and can be defined to a maximum of 65500 bytes

He uses the same method as above.

Now to send a 600-byte packet as an example "Ping-l bbs.cfanclub.net"

Do not underestimate these several ping commands! If your Internet connection is good enough you can use the ping command above to "attack" others oh [s:23]

Actually want to use ping to test your speed is not very difficult, as long as the following formula can be calculated [s:25] (excluding the network peak)

"Network speed equals = Bytes Sent/return time [milliseconds]) K-byte" see the measured speed of the network can not be surprised OH

We all know, usually we are in the installation of community broadband when we always hear 1m,2m bandwidth, most friends think that the ultimate speed is 2mb/s. Actually, it's not like that. Here the 1M bandwidth refers to the 1mb/s, that is, 1024kb/s, and we usually say the download speed is kb/, B and B is not the same, b refers to Byte (byte) and B refers to bit (bit), the relationship between them is 8bit=1byte, So the 1M bandwidth limit download speed should be 1024kb/s divided by 8=128kb/s (2M bandwidth is 256kb/s), so, online to improve the speed of the posts are deceptive, this is the limit can not be exceeded, unless the service provider to give you higher bandwidth, of course, you will pay the I hope this post will help our friends understand the problem thoroughly.

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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.