ͥåȥڥꥹ - SE̼η -

ͥåȥڥꥹȤλкȤǤͥåȥڥꥹȻι
̡ʤΥġ⡢μʤɤξǺܤޤкߥʡԤäƤޤ ͥåȥڥꥹ
кʤ麸κǤܤ֥ͥڡץ꡼ʵɾҡˤǡ
ͥåȥڥꥹȻ˹ʤȡͥåȥ˴ؤμ䵻ѤǤʤɲϤʸϤȤˤĤޤ
ˡλ˹ʤǤȤ뤳ȤǤޤ

ƥꡧ8.ͥåȥءL3 > 8.3 ICMP

ICMPInternet Control Message ProtocolˤȤȼʤpingޥɤʹСȶǤ
ICMPɽpingtracertʤޤtracerouteˤǤ롣
WindowsΥޥɥץץȤǤtracertCiscoʤɤΥͥåȥǤtracerouteۤȤɡ
Ǥ®pingǤäƤߤ褦

ping
ĶѤpingǤäƤߤȡʥåǤΤǻƤߤޤ礦
㤨Сʲιޤ
ͥåȥڥꥹ_ping
Case1
PC顢192.168.2.0/24¸ߤʤIPɥ쥹PingǤäƤߤޤ礦
ping 192.168.2.100
timeout
Τ褦ˡ֥ॢȡפɽޤ

Case2
PC顢롼ΤʤͥåȥpingǤޤ礦
unreach
٤ϡְۥȤãǤޤפȽФޤ⡢Υå֤ƤΤϡ192.168.1.254ʤΤǡCisco롼Ǥ
guts
Ȥʤ狼ޤ
Case1ξϡpingäƤ⡢꤫αʤΤǡPC֥ॢȡפȤåФƤǤ͡
Case2ξϡǥեGWǤ롼ޤϤΤǤ롼ϰ褬̵ΤǡãǤޤפȤå֤Ƥޤ
̤ǤåȤ򤷤ƤȡǤڤʬˤΩޤ衪

ǤϡICMP˴ؤơTCP/IPĶˤơpingˤäƥۥȤ³ǧ򤹤Ȥ˻ѤץȥH20NW31ˡסۥȤؤIPѥåȤ顼ʤɤåΤ롣H19NW 24ˡס֥ͥåȥ³֤Ĵ٤뤿ΥޥpingѤץȥH18NW 28ˡפȽҤ٤Ƥ롣


H19NW
24 TCP/IPΥͥåȥˤICMPȤ,ŬڤʤΤϤɤ줫
MACɥ쥹ʬäƤȤIPɥ쥹βǽˤ롣
ХIPɥ쥹ȥץ饤١IPɥ쥹ߤѴ롣
ۥȤؤIPѥåȤ顼ʤɤåΤ롣
ͥåȥIPɥ쥹층,饤ȤưŪ˳Ƥ롣

ϥ
RARPNATICMPDHCP

H20NW
31 TCP/IPĶˤ,  pingˤäƥۥȤ³ǧ򤹤Ȥ˻ѤץȥϤɤ줫
CHAP
ICMP
SMTP
SNMP

ϥICMP

H26FE
34IPͥåȥˤơICMPΥ׵ᡤãǽåʤɤˤäơ̿Ȥ³ǧ륳ޥɤϤɤ줫
arp
echo
ipconfig
ping

򡧥

ե졼եޥå
IPإåIPѥåȤʤΤ¾ȶ̤Ǥ롣
ץȥֹ1Ǥ롣ͤޤǤUDP17
סtype:åμࡣȤping׵echoˤ8ǡpingαѥåȡecho reply)0
ɡcodeˡɤϾܺپɽȤСtype3ϰãǽdestination host unreachable)Ǥ뤬θϤĤ롣襳ԥ塼ʤcode1UDPΥݡȤʤ3ʢTCPTCP̥ѥåȤ֤ˡDFӥåȤåȤƤ4ʤɡ
2

ICMPΥե졼եޥåȾܺٲ
Type(8)Echo Requestξ
(1)إå
Type(1)
Code(1)
å(2)
̻(2)
ֹ(2)
ǡʲѡ

(2)Type
0Echo Reply pingޥɤαѥå
icmp2
3Destination Unreachable
εΡ롼ΤʤȤpingǤäˡ롼Υå֤
icmp
4Source Quench
5RedirectICMP쥯
8Echo Requestpingޥɤ¹Ԥ
icmp3
11Time Exceeded줿¸֡TTLTime To LiveˤĶExceededˤȤȤǡѥåȤ˴ȤΤåtracerouteϡλȤߤѤƤ롣
icmp

ºݤΥץ
Etherealǥץ㡼
⡢ҤʬǤäƤ

ʲʬΤ߸Ƥ館Ф
Ethernetͥåȥإå
ʣ˰MACɥ쥹00:0d:02:xx:xx:xx
ʣMACɥ쥹00:19:d2:xx:xx:xx
ʣ˥סIPʤ鼡IPե졼Ǥ뤳Ȥ򼨤Ƥ
InternetProtocolIPإå
ʣ˥ץȥ롡ICMP
ʣIPɥ쥹192.168.1.111
ʣ˰IPɥ쥹192.168.1.1

ѥåĹTOSType Of Service)եɤꡢѥåȤ̤ͥĤ뤳ȤǤ롣ޤȤƤʤ
ICMPΥѥå

Type
Summary of Message Types
    0  Echo Reply
    3  Destination Unreachable
    4  Source Quench
    5  Redirect
    8  Echo
   11  Time Exceeded
   12  Parameter Problem
   13  Timestamp
   14  Timestamp Reply
   15  Information Request
   16  Information Reply
  
  http://tools.ietf.org/html/rfc792
 
Code
CodeϡTypeƤξܺ٤Ǥ롣
 㤨СDestination UnreachableType=3ˤΤȤCodeϰʲǤʤUnreachableʤΤξܺ٤ʬޤ
      0 = net unreachable
      1 = host unreachable
      2 = protocol unreachable
      3 = port unreachable
      4 = fragmentation needed and DF set
      5 = source route failed.
    http://tools.ietf.org/html/rfc792

롼ƥ󥰤ˤơŬڤʥ롼ˤICMPType5ˤΥåICMPѥåȤǡGatewaya AddressȤ󤬤ꡢŬڤGatewayʥ롼˾롣ΡICMP쥯ȤICMPѥåȤȴ㤤ƤޤǤϤʤäǤ

ʲιޤǹͤޤ
PCΥǥեȥ 192.168.1.254IPɥ쥹 R1ʲޭˤǤ PC 172.16.1.0/24Υͥåȥ̿ Υͥåȥ̿硤ޤϥǥեȥǤR1˥ѥåȤޤʲޭˡ R1ϤΥѥåȤ R2žʲޭˤ 172.16.1.0/24Υͥåȥ˥ѥåȤϤޤʲޭˡ
ǡäȤϩ뤳ȤΤICMP쥯ȤǤ
ICMP쥯

򸫤Ƥߤޤ礦
H29NW2
7IPv4ˤICMPΥå˴ؤȤơŬڤʤΤϤɤ줫
ꤷ롼ƥ󥰤Ԥ,  Echo Reply ֤
žƤǡ롼ΥͥåȥκŬʥ롼ΤƷϩѹˤ,  RedirectѤ롣
ե饰ȤκΩ˥ॢȤȯϡǡ˴Parameter Problem ֤
롼ǥåžݤˡ¦ΥХåեդ줿TimeExceededꡤۥȤ뤳Ȥ¥

Echo Replyϡ˱ΥåǤ
Ǥ
ॢȤȯƤΤǡ֤ĶᤷȤ̣Time Exceededޤ
Source Quenchޤ

Ĥ

tracerouteWindowsǤtracertˤϡåIPؤ̿ϩ狼ʵǽǤ뤬ɤʻȤߤˤʤäƤΤǤ
tracerouteICMPѥåȤѤƤޤ
ʲιޤ

PC1ۡ       ڎَA   ڎَB     ڎَC     PC2
10.1.1.10 10.1.1.1  1.1.1.2  2.1.1.1     3.1.1.10
        1.1.1.1     2.1.1.1    3.1.1.1

PC110.1.1.10ˤPC23.1.1.10ˤPingǤޤ

Reply from 3.1.1.10: bytes=32 time<10ms TTL=128
Τ褦ˡOK֤äƤȤޤ

٤traceroute򤷤ޤ
ICMPѥåȤTTLTime To Live¸֡ˤ1ꤷޤ
롼A10.1.1.1ˤϤޤ
TTL¸֡ˤ1ΥѥåȤϡ롼AϤȤTTL0ˤʤꡢ˴ޤ˴줿ȤΤ뤿ˡ롼Atime exceeded¸֤ĶᤷˤȤå֤ޤ
PC1time exceeded֤äƤIPɥ쥹򸫤ơǽΥ롼ϥ롼A10.1.1.1ˤǤ뤳Ȥ狼ޤ
ư򷫤֤ޤTTL2ꤷƱ򤷤ޤ
Ʊͤˡtime exceeded֤äƤIPɥ쥹򸫤ơΥ롼ϥ롼B1.1.1.2ˤǤ뤳Ȥ狼ޤ
sef4

PingNGˤʤΤǤ⡢ޤǤϷϩ狼롣
Ի׵ĤǤ
PingNGˤʤ硢ǽŪʰϤʤƤ⡢ηϩޤǤϤ礬ޤȤСǽŪʰFirewallǵݤƤ䡢ǽŪʰľΥ롼ƥ󥰤ְäƤʤɤǤ
tracerouteλȤߤ褦ˡǽŪʰ˴طʤ缡TTL䤷ƤΤǡPingNGǤޤǤηϩ狼礬ΤǤ

ȤȤϡˤϽФʤȹͤƤޤ

TTL֤Ȥ˰㤦ȤСWindowsXPѥ󤫤pingǤĤLinuxФ64Cisco롼255Ϥޤ롣
ʤߤˡWindowsѥ128ϤޤΤǡICMPEcho RequestTTL128Echo Reply64Ȱۤʤͤˤʤ롣


ݥ󥵡ɥ

ΥڡΥȥåץ