ͥåȥڥꥹ - SE̼η -

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

ƥꡧ7.ءL1,L2 > 7.15 ARP

(1)ARPAddress Resolution Protocol
ɥ쥹ץȥ롣
ARPIPɥ쥹MACMedia Access Control)ɥ쥹ץȥǤ롣
ǤϡTCP/IPˤARPȤơIPɥ쥹MACɥ쥹ץȥ(H16NW 22)פȽҤ٤Ƥ롣
WindowsѥǤϡarp -aޥɤǥå夷ƤARPɽ롣
arp
ARP׵ѥåȤϥ֥ɥ㥹ȡMACɥ쥹ff:ff:ff:ff:ff:ffˤǥΤ졢ֿϥ˥㥹Ȥֿ롣
ARPơ֥ϤʴǤCiscoCatalystξ硢show arp ޥɤˤƳǧ뤳ȤǤ롣MACɥ쥹ơ֥ȤʪǤ㤤åHUB򤷤ޤ礦᡼ˤäARPơ֥ݻ֤ϰۤʤޤ¿ϿʬǤ
IPɥ쥹MACɥ쥹
192.168.1.10mac1
192.168.1.30mac2

ե졼եޥå
HTYPE(2)
PTYPEʣ
HLENʣ
PLENʣ
ڥ졼ʣ
MACɥ쥹ʣ
IPɥ쥹ʣ
åȤMACɥ쥹ʣ
åȤIPɥ쥹ʣ

­
HTYPEʥϡɥסˤϡͥåȤξ1ʸ̩ˤ0x0001
PTYPEʥץȥ륿סˤǡIPv4ξ0x0800
HLENHardware lengthˤMACɥ쥹Ĺǡ6
PLENProtocol lengthˤIPɥ쥹Ĺǡ4
ڥ졼ˤrequest׵ˤξ礬1replyʱˤξ2롣
ARP׵ѥåȤξ硢֥åȤIPɥ쥹פ˲򤷤IPɥ쥹롣֥åȤMACɥ쥹פ϶ˤʤ롣


aa

֥ץեɤˤARPɽ0x0806פͤסARP׵ϡMACɥ쥹ˤϥ֥ɥ㥹ȡFF-FF-FF-FF-FF-FF)פɵ
 嵭ȥ󥯤ƤʤWiresharkǥץ㤷Ҳ𤷤ޤarp2

sef4
ARPϥ쥤䣲̿Ǥ
Υץ̤򸫤ȡIPɥ쥹äƤ뤫顢
쥤䣳̿˸ޤ
Τˡե졼Protocolեɤ0x800IPˤäƤ뤫顢פƤޤºݡ쥤3Ȳ⤷Ƥʸ⤤Ĥ뤳ȤǤ礦褯褯ե졼Ȥ򸫤ƤߤޤȡIPإåIPɥ쥹ʤɤȤϰ㤤ARPե졼ΥǡʬȤIPɥ쥹ʤɤäƤǤIPإåIPɥ쥹ʤɤǤϤޤ󡣾ܤϡHTTPICMPʤɤIPإå٤Ƥ
http://nw.seeeko.com/archives/50284032.html

ͤޤǤˡ嵭οޤARP׵äPC2ϡȤARPơ֥PC1ξ񤭹ࡣPCPCϽ񤭹ޤʤ

ARP˴ؤ
ARP˴ؤơH28FE4ˤ˲⤬ޤ
ARPεǽ
IPɥ쥹MACɥ쥹ARPεǽϡ礻ȤARP׵ɤФȤARPɤ뤳ȤǼ¸롣㤨С10.1.1.0/24ˤơۥAIPɥ쥹10.1.1.10,  MACɥ쥹00:53:00:DA;C7:0BˤۥBIPɥ쥹10.1.1.20,  MACɥ쥹00:53:00:EC:17:27˰ƤIPǡ褦ȤȤۥBMACɥ쥹ARPˤäơΤ褦ˤ롣
1˥ۥAϡIPɥ쥹10.1.1.20ФARP׵롣ΤȤARP׵ϡ֤ơI롣
2ARP׵äۥBϡARP׵᤬ʬIPɥ쥹Ф礻Ǥ뤳ȤǧȡʬIPɥ쥹10.1.1.20MACɥ쥹00:53:00:EC:17:27ǼARP롣ƱARP׵ä¾ΥۥȤϡ줬ʬIPɥ쥹Ф礻ǤϤʤΤǡ̵뤹롣
3˥ۥAϡۥBARP뤳ȤˤäơIPɥ쥹10.1.1.20бMACɥ쥹00:53:00:EC:17:27Ǥ뤳Ȥʬ롣
ۥAϡۥBIPɥ쥹줿MACɥ쥹бդ򥭥å夹롣å夬˴ޤ10.1.1.20ƤIPǡݡͥåȥե졼ΰMACɥ쥹Ȥ00:53:00:EC:17:27Ѥ롣

RARPReverse Address Resolution Protocol
եɥ쥹ץȥ롣ARPAddress Resolution ProtocolˤȤϵդˡMACɥ쥹IPɥ쥹褹ץȥ롣
RARPMACɥ쥹IPɥ쥹롣ARPȤϵǽդʤΤǡReverseդƤ롣
ǤϡŸջIPɥ쥹ݻ뤳ȤǤʤ֤Ÿ˼֤MACɥ쥹鼫֤˳ƤƤIPɥ쥹Τ뤿ѤǡؤΥץȥǡ֥ɥ㥹ȤѤΡפȤ롣H21NW 11)
ºݤưȤƤϡRARPФˡMACɥ쥹IPɥ쥹бɽݴɤƤޤIPɥ쥹Ƥʤ֤顢IPɥ쥹ȤRARPΥå褿顢IPɥ쥹ޤ
rarp
sef4 
ʤǤ졩
ޤɤʵ濫Ǥ
ˡDHCPФǤ⡢MACɥ쥹IPɥ쥹ξǤޤ͡
ΤˤǤȤޤIPɥ쥹Ƥʤ֤ۤܤޤ󤷡RARPBOOTPDHCPץȥͥƤޤ㤨СIPɥ쥹ǤϤʤǡǥեGWDNS뤳ȤǤޤʤΤǡRARPȤΤäơARPȿФư򤹤٤򤷤ƤФǤ礦

Proxy ARP
ǸProxyARPǤRARPƱͤˡۤɽפǤϤޤΤǡʹήƤäƹޤ
ȤߤϡARPԤΤǤȤС֥ͥåȥޥǤʤŤPC¸ߤ˻Ȥޤ

[PC1ʸŤPCˡ172.16.1.1]---[롼]---[PC2(PCˡ172.16.2.1/24]

嵭οޤ򾯤­ޤŤPCϥ֥ͥåȤǤʤΤǡ172.16.1.1PCϥ饹BǤ

ͥåȥڥꥹȤܻؤSE졩
֥ͥåȤȤǰʤΤǡ172.ǻϤޤIPɥ쥹ϼưŪ˥饹BĤޤͥåȥɥ쥹172.16.0.0/16ˤʤΤǤ͡
ǤäơPC2172.16.2.1ˤƱ172.16.0.0/16ΥͥåȥˤȹͤơARPꤲޤǤºݤˤϥ롼ǥȤʬƤޤARPPC2ˤϤޤ󡣤ǡ롼PCProxyˤǸŤPCARP֤ΤǤ

5

⤽⡢IPɥ쥹MACɥ쥹2ĤȤäƤ뤫䤳Ȼפޤ
ɤ餫ĤˤФΤˡ
ޤ⤤ʤޤL2٥̿MACɥ쥹̵ȤǤʤMACɥ쥹ɬܤIPɥ쥹̵ǡMACɥ쥹ǤΥ󥿡ͥåȤԲǽǤϤʤ⤷ʤIPɥ쥹ϥץʹͤǥ롼ƥ󥰤γǰʬ䤹2ŴˤʤäȤƤ⡢äΤǤϤʤȻפ

H28NW6ˤǤϡIPv4ǤARPѤGratuitous ARP פȤơ֥åIPɥ쥹եɤ˼üѤIPɥ쥹ơMACɥ쥹䤤碌פȤޤ
GARPλȤߤϡβˤ褦ˡּݡȤꤵ줿IPɥ쥹β׵᤹פȤǤGARPΥѥåȤWiresharkǥץ㤷ʲ˼ޤIPɥ쥹ȡIPɥ쥹ƱˤʤäƤޤĤޤꡢּʬȤMACɥ쥹򶵤ƤפȸäƤΤǤ
GARP
ͥåȥڥꥹȤܻؤSE

ʤʬIPɥ쥹褹ɬפǤ
ʬIPɥ쥹MACɥ쥹ʤ顤褷ʤƤ狼äƤΤǤϡ
̤ꡣ褷ʤƤʬäƤޤGARPꤲŪϡʬMACɥ쥹ΤꤿΤǤϤʤ̤ΤȤˤޤGARP뤳ȤˤäơʬIPɥ쥹MACɥ쥹ΤΤǤ
H26NW壱2ˤǤϡּݡȤꤵ줿IPɥ쥹β׵̡᤹GARPϡGratuitous ARPͤѤ³ARPơ֥򹹿뵡ǽפȤޤ
ˡ̤βH25NW孶1ˤǤGARPŪ졢ϡƱ쥵֥ͥåIPΡɤARPå򹹿뤿פȤʤäƤޤ
Τ褦ˡGARPARPȤƤΰ̣ޤGratuitous֤ΤʤסֺΤʤפȤ̣ʤΤ⡢ǤΤǤϤʤǤ礦


ݥ󥵡ɥ

ΥڡΥȥåץ