C.W.K.
Stream
Lesson 10 of 12 · published

Gateway & 라우팅

~15 min · gateway, routing, traceroute, mtr

Level 0Pinger
0 XP0/101 lessons0/12 achievements
0/150 XP to next level150 XP to go0% complete

Default gateway

default gateway 는 로컬 서브넷이랑 그 외 전부를 잇는 라우터야. 도착지가 로컬 서브넷에 없는 패킷은 다 gateway 가 받아서 더 먼 곳으로 forward. 보통 가정용은 192.168.1.1 이나 192.168.0.1, DHCP 가 자동 설정.

Route 테이블

모든 장치가 routing table 가져 — "이 도착지에 대해 어느 인터페이스, 어느 gateway?" 에 답하는 작은 규칙 집합. 가장 중요한 두 규칙:

  • Local subnet — "192.168.1.0/24 면 en0 으로 직접 장치한테 보냄" (gateway 필요 없음, ARP 가 MAC 찾음).
  • Default route — "그 외 전부 gateway 한테, 알아서 처리하게."

Traceroute — 모든 hop 노출

traceroute 가 너랑 도착지 사이 라우터 체인을 드러내. "인터넷이 느린 것 같아" 또는 "이 사이트 나만 안 됨" 진단할 때 도구.

출력 한 줄 = hop 하나. 별표 (* * *) 는 라우터가 probe 에 답 안 했다는 뜻 — 보통 ICMP rate-limited probe 를 조용히 drop 하도록 설정돼서지 문제는 아니야. 진짜 패킷 손실은 여러 hop 연속해서 답 빠짐으로 나타나.

mtr 은 traceroute 의 더 나은 사촌 — 실시간 업데이트, hop 별 누적 손실/지연 통계. 특정 도착지로 가는 path 진단할 때 항상 이거 잡아.

Code

라우트 보기·bash
# Full routing table (macOS / BSD)
netstat -rn

# Just the default route (macOS)
route -n get default

# Linux
ip route show

# Typical macOS output:
#   default            192.168.1.1        UGScg          en0
#   192.168.1.0/24     link#13            UCS            en0
Path trace 와 라이브 모니터·bash
# Standard traceroute
traceroute github.com

# Use ICMP (more friendly through some firewalls)
sudo traceroute -I github.com

# Live-updating, cumulative stats per hop
mtr github.com

# Non-interactive report — paste this in a bug report or to your ISP
mtr --report -c 100 github.com

External links

Exercise

mtr 설치 (brew install mtr) 하고 mtr github.com 돌려. ~30 사이클 누적되게 둬. 식별 — (a) hop 1 의 gateway, (b) 네 망 밖의 첫 hop (ISP 의 첫 라우터), (c) 의미 있는 손실 있는 hop. 그다음 mtr --report -c 100 github.com 으로 정적 스냅샷 — 지원 티켓에 첨부할 만한 거. report 모드가 어떻게 다른지 봐.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.