오늘의 인기 글
최근 글
최근 댓글
Today
Total
05-09 00:00
관리 메뉴

우노

[Network] Ping 사용법 본문

Network & Security/Develop

[Network] Ping 사용법

운호(Noah) 2021. 7. 15. 10:58

Ping 이란?

  • Paket Internet Groper의 약어이며, 컴퓨터 네트워크 상태를 점검, 진단하는 명령어입니다.

작동 원리

  • 네트워크 상태를 확인하려는 대상(target)을 향해
  • 일정 크기의 패킷(packet, 네트워크 최소 전송단위)을 보낸 후(ICMP echo request)
  • 대상 컴퓨터가 이에 대해 응답하는 메시지(ICMP echo reply)를 보내면
  • 이를 수신, 분석하여
  • 대상 컴퓨터가 작동하는지, 대상 컴퓨터까지 도달하는 네트워크 상태가 어떠한지 파악할수 있습니다.

Ping 사용법

ping [목적지] [옵션]

  • 옵션은 생략 가능합니다.

Ping 사용 예제 (로컬 호스트와 통신)

  • 로컬 호스트는 자신의 컴퓨터를 의미하며,

  • 보통 자신의 컴퓨터가 인터넷과 정상적으로 연결되어있는지 확인하기 위하여 사용합니다.

  • 터미널 실행 후, [ping 127.0.0.1] 를 입력합니다.

      ping 127.0.0.1
  • 응답은 아래와 같습니다.

      PING 127.0.0.1 (127.0.0.1): 56 data bytes
      64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.068 ms
      64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.090 ms
      64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.108 ms
      64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.106 ms
      64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.119 ms
      6 packets transmitted, 6 packets received, 0.0% packet loss
      round-trip min/avg/max/stddev = 0.069/0.111/0.153/0.032 ms
    • time : 응답에 걸린 시간 (ms)
    • 6 개의 패킷이 정상적으로 응답된 것을 확인할 수 있습니다.

Ping 사용 예제 (특정 URL과 통신)

  • 터미널 실행 후, [ping 특정URL] 를 입력합니다.

      ping www.google.com
  • 응답은 아래와 같습니다.

      PING www.google.com (172.217.175.100): 56 data bytes
      64 bytes from 172.217.175.100: icmp_seq=0 ttl=113 time=37.351 ms
      64 bytes from 172.217.175.100: icmp_seq=1 ttl=113 time=37.261 ms
      64 bytes from 172.217.175.100: icmp_seq=2 ttl=113 time=37.733 ms
      64 bytes from 172.217.175.100: icmp_seq=3 ttl=113 time=37.393 ms
      64 bytes from 172.217.175.100: icmp_seq=4 ttl=113 time=37.001 ms
      64 bytes from 172.217.175.100: icmp_seq=5 ttl=113 time=36.192 ms
      64 bytes from 172.217.175.100: icmp_seq=6 ttl=113 time=37.469 ms
      7 packets transmitted, 7 packets received, 0.0% packet loss
      round-trip min/avg/max/stddev = 36.192/37.200/37.733/0.459 ms
    • time : 응답에 걸린 시간 (ms)
    • 7 개의 패킷이 정상적으로 응답된 것을 확인할 수 있습니다.
Comments