ͥåȥڥꥹ - SE̼η -

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

ƥꡧ9.ȥ󥹥ݡءL4 > 9.2 TCP

ľΩ

TCPTransmission Control ProtocolȤ̾ΤȤꡢTransmissionˤControlˡɤץȥǤ롣
TCPħ
ͥ̿
桢ʤɤεǽġ
ʽTCPإåSequence numberǴƤΤdzǧƤۤ
ǤϡTCPΥե˴ؤơֳǧʤϺˤä
ǡԤH18NW 21ˡפȽҤ٤Ƥ롣
ʬUDP٤®٤٤ȥ꡼ߥ󥰤ʤɤι®̿ˤUDP

Ūʥץꥱ
UDP
DNS礻ˡSNMPDHCPTFTPNTPʤ
ȥ꡼ۿǤUDPȤѤץȥ͡Ǥ

TCP
HTTPSMTPPOP3SSHFTPTelnetDNSʥžˤʤ

ե졼򸫤Ƥߤ褦
tcp
UDP٤ȡΰ㤤ϰǤ롣
http://nw.seeeko.com/archives/50284111.html

¾
TCP̿ǤϡҤäʤACK֤Ƥ롣1ѥåȡ1500ХȡˤФ1ACK֤褦ʥ᡼Ǥ롣ºݤˤϥ饤ǥ󥰥ɥεǽˤꡢɥʬޤȤACK֤Τǡ45ѥåȤ1ĤACK֤ƤΤºݤǤ
ФUDPǤACKޤä֤ʤTCP/IPΥХإåɤʤ

ݥ
TCPUDPΰ㤤ռTCP򤹤롣
桢ԤäƤ롣ʤɤäƼ¸Ƥ뤫ǧ褦

ե졼եޥåȤǧޤ礦
ˡϤɤʬ򸫤ƤΤLΥͥåȥե졼फ򤷤Ƥޤ礦
frame
Ĺ(bit)
1ݡֹ16 
2ݡֹ16  
3ֹ 32 0Ϥޤ櫓ǤϤʤͥ
ΩѤƷ

ꤦͤϡ32ӥåȤʤΤǡ
0232-1ˤꡢѥ
åȤν֤椹롣
4ǧֹ 32 
5ǡեå TCPإåĹ򼨤
6ͽ  
7ե饰 6URG,ACK,PSH,RST,SYN,
FINե饰롣
URG(Urgentˤ϶۵ޤ򼨤۵
ǽ٤ѥåȤξϡ
URGե饰1ˤ롣
ACKSYN3ϥɥ
Ѥ뤫ͭ̾Ǥ͡
RESET϶λǡIDSʤɤ
TCP̿Ǥݤ
ե饰
FIN3ϥɥλ
ȤѤ롣
8ɥ16 ɥ
9å 16 
10۵ޡUrgent)ݥ16URGե饰ONξ硢˶۵
ǡΥǤ롣
11ץ ά
12Padding  ͤʪά 
٤ΤȤǤWiresharkǥץ㤷Ƴǧޤ礦ʲϡ֥饦yahoo!ΥȤ򸫤ΥץǤºݤΥǡ򸫤ȡ򤬿ޤ뤳ȤǤ礦
tcp

TCPΥإå˴ؤơ䤬Τǥ󥸤ƤϤää񤷤ȤƤȤϻפʤ
H19NW 30
TCPΥǡž˴ؤ뵭ҤΤŬڤʤΤϤɤ줫

ɥACKԤǤǡ̤ǡͥåȥȤ˰ͤƤ롣
ֹǡȥ꡼ΥȤΥƥåȰ֤򼨤0232-1ͤȤ롣
ӥåȥեɤζ۵ޥե饰ͭդΥȤϡΥȤ۵ޤ٤Ǥ뤳Ȥɽ۵ޥǡĹꤹ뤳ȤϤǤʤ
ѥåȤνʣʤɤΥ顼򸡽Ф뤿˥åη׻Ԥ

 򡧥

ޤꡣTCPͥΩǤ룳ϥɥɽޤϤɤ줫H22NW14)
sway
Ϥۤ񤷤ʤǤ礦
ϥƥ
ơʤݤʤȤ򤹤Ρ
3ϥɥ򤷤ʤƤ⡢̿ϤǤޤ͡
UDPϤ줬ޤ
ʤۤɤϥǤ
ʤꤶäꤤȡ夵뤿Ǥ롣
TCPUDPȰäƥͥ󷿤ʤΤǡ̿˥ͥΩ롣줬3ϥɥΥեǤ롣ƥ뤿ˤäƤ櫓ǤϤʤѥåȤ򥭥ץ㤹ФξñǤ뤫ʥƥΰ̣ʤ櫓ǤϤʤˡ
Ū̿ΤǤϤʤξԤdzǧåꡢֹå뤳Ȥǡ̿ӽι⤤̿ǽˤ롣

ֹȳǧֹ
ˤޤ٤ΤϽФޤ󤬡ξԤϰʲǤ
SYN
ֹ桡1000ǧֹ桡0Length0)
SYNACK
ֹ桡2000ǧֹ桡1001Length0)
ACK
ֹ桡1001ǧֹ桡2001Length0)

ֹϡƥۥȤʬǴƤ֤Ǥ롣äơͥ׵ḵ׵Ǥֹ椬ޤäۤʤ롣
ǧֹϡäֹLengthäΤˤʤ롣̣ϡּ륷ֹפȤǤ롣3ϥɥLength0Ǥ뤬1ä롣
3ϥɥäμºݤ̿ǤϡʲΤ褦Lengthֹͤղä롣
ACK
ֹ桡1100ǧֹ桡2100Length5)
ACK
ֹ桡2100ǧֹ桡1105Length4)
ACK
ֹ桡1105ǧֹ桡2104Length6)

åνλ
Ȥ

TCPξ硢³γϤǤʤ³λȤƱ褦ʽ򤹤Ǥ͡
Ǥ͡
H19SW壱䣱ˤ򸫤Ƥߤޤ礦Τ褦ˡFINACKFINACKήǥͥλޤ
ͥåȥڥꥹ_3ϥɥ
­ǤλˤFINRSTRESETΰ̣ˤΣĤޤ
FIN
˽λ롣3ϥɥμƧdzǧԤ
RST
λǧԤʤRSTۥȤϡʳǥͥ˴롣ȤС֥饦XפĤƤRST롣

غ
TCP̿®¸뵻
ޤTCP̿ǤϥХåե򤹤ɬפ롣
ȤǤʤʳǧ̵˾ˤϺɬפꡢǡϥХåե¸Ƥޤǡ⥢ץꥱϤޤǤϥХåե򤹤롣
ǧټ»ܤƤ٤ʤΤǡɥʬޤȤƳǧ򤹤롣ޤǤϢ³롣ˤꡢTCP/IPΥСإåɤ򾯤ʤƹ®뤳ȤǤ롣
ǤTCPإåΥɥȤơּ¦γǧԤˡǡ³Ǥ뤫ɤȽǤ˻ѤH21SC215ˡפȽҤ٤Ƥ롣
饤ǥ󥰥ɥθդϡХåեϰijǧ褿οХåեѤǤ롣ʥ᡼
ºݤˤϡ줬ι®ѤȤƤ뤫ȤȵǤ롣WANŬ֤ǤϤäȲŪˡǹ®Ƥ롣

HTTPTCPˤΥե졼򼨤
Google˥

ʲʬΤ߸Ƥ館Ф
Ethernetͥåȥإå
ʣ˰MACɥ쥹00:0d:02:xx:xx:xx
ʣMACɥ쥹00:19:d2:xx:xx:xx
ʣ˥סIPʤ鼡IPե졼Ǥ뤳Ȥ򼨤Ƥ
InternetProtocolIPإå
ʣ˥ץȥ롡TCP
ʣIPɥ쥹192.168.1.111
ʣ˰IPɥ쥹66.249.89.99
Transmisson Control ProtocolTCPإå
ʣݡֹ桡31921024ְʾ
ʣˤݡֹ桡80
ʣ˥ֹ桡TCPͭ
HTTPΥѥå


ݥ󥵡ɥ

ΥڡΥȥåץ