ping 정리

C:>ping /?

Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS]
[-r count] [-s count] [[-j host-list] | [-k host-list]]
[-w timeout] target_name

Options:
-t Ping the specified host until stopped.
To see statistics and continue - type Control-Break;
To stop - type Control-C.
-a Resolve addresses to hostnames.
-n count Number of echo requests to send.
-l size Send buffer size.
-f Set Don't Fragment flag in packet.
-i TTL Time To Live.
-v TOS Type Of Service.
-r count Record route for count hops.
-s count Timestamp for count hops.
-j host-list Loose source route along host-list.
-k host-list Strict source route along host-list.
-w timeout Timeout in milliseconds to wait for each reply.


C:WINDOWSsystem32>ping 192.168.0.10

Pinging 192.168.0.10 with 32 bytes of data:
Reply from 192.168.0.10: bytes=32 time=30ms TTL=255
Reply from 192.168.0.10: bytes=32 time=15ms TTL=255
Reply from 192.168.0.10: bytes=32 time=15ms TTL=255
Reply from 192.168.0.10: bytes=32 time=10ms TTL=255

Ping statistics for 192.168.0.10:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 10ms, Maximum = 30ms, Average = 17ms

ping은 매번 32 byte를 data에 적재 하여 output를 보여 줍니다.

ping는 1000 milliseconds(1 second) 내에 응답이 없으면 Request timed out 이라는 메세지를 표시합니다.

C:WINDOWSsystem32>ping 172.16.10.99
Pinging 172.16.10.99 with 32 bytes of data:

Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 172.16.10.99:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

ping time를 5000으로 늘려 줍니다.
5초 이하로 reply가 돌아 온다면 output가 출력 되겠죠~

C:WINDOWSsystem32>ping 172.16.10.99 -w 5000

Pinging 172.16.10.99 with 32 bytes of data:

Reply from 172.16.10.99: bytes=32 time=1032ms TTL=103
Reply from 172.16.10.99: bytes=32 time=1055ms TTL=103
Reply from 172.16.10.99: bytes=32 time=1059ms TTL=103
Reply from 172.16.10.99: bytes=32 time=1096ms TTL=103

Ping statistics for 172.16.10.99:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1055ms, Maximum = 1032ms, Average = 1010ms


ping 명령어를 이용하여 MTU(Maximum Transfer Unit)를 확인


ping -t 옵션 확인


ping -a 옵션 확인



"대상 호스트에 연결할 수 없습니다."라는 메시지는 해당 IP 주소가 사용중이지 않다라는 뜻
"요청 시간이 만료되었습니다."라는 메시지는 해당 IP 주소는 사용중이지만 통신을 거부하는 정책이 적용되어있다는 뜻 



+ Recent posts