ethernet type : 2048
192.168.6.123 => 192.168.6.122
Source Port : 54940
Destination Port : 59048
Sequence Number : 4198215236 // client의 시퀀스 번호 (ISN)
Acknowledge Number : 0
Header Length : 40
Flag : 2
Window Size : 14600
Checksum : 4812
Urgent Point : 0
[ SYN패킷 ]
* Flag : 0 0 0 0 1 0 / 동기화를 요청한다(TCP 3-way Handshake)
* ISN(Initialized Sequence Number) : 초기 시퀀스번호
- 운영체제에 의해서 랜덤하게 생성된다
- 서버가 상대방 클라이언트를 식별할 때 사용
- 동기화한다 = ISN을 교환한다
ethernet type : 2048
192.168.6.122 => 192.168.6.123
Source Port : 59048
Destination Port : 54940
Sequence Number : 1046069925 // Server의 시퀀스 번호 (ISN)
Acknowledge Number : 4198215237 // server는 client의 ISN에 1을 더해서 client에게보냄
Header Length : 40 // => client는 맞는 응답이 왔다고 인식한다
Flag : 18
Window Size : 14480
Checksum : 11850
Urgent Point : 0
[ SYN + ACK ] 동기화 요청에 대한 응답
* Flag : 0 1 0 0 1 0 (18)
ethernet type : 2048
192.168.6.123 => 192.168.6.122
Source Port : 54940
Destination Port : 59048
Sequence Number : 4198215237 // client ISN + 1
Acknowledge Number : 1046069926 // client는 Server의 ISN + 1 한값을 서버에게 보낸다
Header Length : 32 // => server는 올바른 응답이 왔다고 인식한다
Flag : 16
Window Size : 229
Checksum : 38077
Urgent Point : 0
[ ACK ]
* Flag : 0 1 0 0 0 0
-- 서버와 클라이언트 서로 시퀀스 넘버를 교환했다 --
( = 세션을 맺는다 )
-> 세션을 맺어진 이후에 데이터 통신이 이루어진다
00:50:56:2a:30:7c => 00:0c:29:f0:62:73
ethernet type : 2054
sender : 192.168.6.122 taget : 192.168.6.123
00:0c:29:f0:62:73 => 00:50:56:2a:30:7c
ethernet type : 2054
sender : 192.168.6.123 taget : 192.168.6.122
// 시퀀스 번호와 ACK number는 데이터가 넘어오면 데이터 크기만큼 변한다
ethernet type : 2048
192.168.6.123 => 192.168.6.122
Source Port : 54940
Destination Port : 59048
* Sequence Number : 4198215237 // client ISN + 1
* Acknowledge Number : 1046069926 // server ISN + 1
Header Length : 32
Flag : 24
Window Size : 229
Checksum : 11689
Urgent Point : 0
client -> server
[ Push + ACK ]
* Flag : 0 1 1 0 0 0 (24)
* data "hello" 전송한다
ethernet type : 2048
192.168.6.122 => 192.168.6.123
Source Port : 59048
Destination Port : 54940
* Sequence Number : 1046069926 // server ISN + 1
* Acknowledge Number : 4198215242 // hello의 크기 5byte만큼 증가한 값
Header Length : 32 // => server가 hello 데이터를 받았다고 client에게 알려주는 것
Flag : 16 // 이 값이 server에게 가지않으면 TCP의 특성인 오류제어가 적용된다
Window Size : 227
Checksum : 20047
Urgent Point : 0
server -> client
[ ACK ]
* Flag : 0 1 0 0 0 0 (16)
ethernet type : 2048
192.168.6.122 => 192.168.6.123
Source Port : 59048
Destination Port : 54940
* Sequence Number : 1046069926 // server ISN+1
* Acknowledge Number : 4198215242 // client ISN+1+5
Header Length : 32
Flag : 24
Window Size : 227
Checksum : 2672
Urgent Point : 0
server -> client
[ Push + ACK ]
* Flag : 0 1 1 0 0 0 (24)
* hello 를 전송했다 ( 에코서버 )
ethernet type : 2048
192.168.6.123 => 192.168.6.122
Source Port : 54940
Destination Port : 59048
* Sequence Number : 4198215242 // client ISN +1+5
* Acknowledge Number : 1046069931 // server ISN +1+5
Header Length : 32 // => client가 server에게 hello 데이터를 받았다고 알려주는 역할
Flag : 16
Window Size : 229
Checksum : 20038
Urgent Point : 0
client -> server
[ ACK ]
* Flag : 0 1 0 0 0 0 (16)
ethernet type : 2048
192.168.6.122 => 192.168.6.123
Source Port : 59048
Destination Port : 54940
Sequence Number : 1046069931 // server ISN +1+5
Acknowledge Number : 4198215242 // client ISN +1+5
Header Length : 32
Flag : 17
Window Size : 227
Checksum : 20040
Urgent Point : 0
server -> client
[ ACK + FIN ] 연결을 끊겟다
* Flag : 0 1 0 0 0 1 (17)
ethernet type : 2048
192.168.6.123 => 192.168.6.122
Source Port : 54940
Destination Port : 59048
Sequence Number : 4198215242 // client ISN +1+5
Acknowledge Number : 1046069932 // server ISN +1+5+1
Header Length : 32
Flag : 16
Window Size : 229
Checksum : 19994
Urgent Point : 0
client -> server
[ ACK ]
* Flag : 0 1 0 0 0 0 (16)
ethernet type : 2048
192.168.6.123 => 192.168.6.122
Source Port : 54940
Destination Port : 59048
Sequence Number : 4198215242 // client ISN +1+5
Acknowledge Number : 1046069932 // server ISN +1+5+1
Header Length : 32
Flag : 17
Window Size : 229
Checksum : 18528
Urgent Point : 0
client -> server
[ ACK + FIN ] 연결을 끊겟다
Flag : 0 1 0 0 0 1 (17)
ethernet type : 2048
192.168.6.122 => 192.168.6.123
Source Port : 59048
Destination Port : 54940
Sequence Number : 1046069932 // server ISN +1+5+1
Acknowledge Number : 4198215243 // client ISN +1+5+1
Header Length : 32
Flag : 16
Window Size : 227
Checksum : 17022
Urgent Point : 0
server -> client
[ ACK ]
Flag : 0 1 0 0 0 0 (16)