WEBVTT - This file was automatically generated by VIMEO

0
00:00:18.600 --> 00:00:21.100
Hello everyone in this video. I'm gonna show you

1
00:00:21.100 --> 00:00:24.500
 how TCP works and what is P3 by

2
00:00:24.500 --> 00:00:25.000
 handshake is

3
00:00:26.400 --> 00:00:29.300
firstly we will talk about the RC a little

4
00:00:29.300 --> 00:00:32.500
 bit. What is the RFC RFC stands

5
00:00:32.500 --> 00:00:35.500
 for request for comments. It is a series

6
00:00:35.500 --> 00:00:38.400
 of documents that are created and published by

7
00:00:38.400 --> 00:00:42.400
 the internet engineering task force ietf to

8
00:00:41.400 --> 00:00:44.900
 provide technical specifications and

9
00:00:44.900 --> 00:00:47.600
 guidelines for the various protocols and

10
00:00:47.600 --> 00:00:50.100
 technologies that make up the

11
00:00:50.100 --> 00:00:53.900
 internet and the process of creating RFC is

12
00:00:53.900 --> 00:00:56.800
 open and collaborative. And the

13
00:00:56.800 --> 00:00:59.500
 goal is to reach a consensus on the

14
00:00:59.500 --> 00:01:02.300
 best way to implement a particular protocol or

15
00:01:02.300 --> 00:01:05.200
 technology. The goal of an IFC is

16
00:01:05.200 --> 00:01:08.900
 to establish a standard that is what accepted

17
00:01:08.900 --> 00:01:12.600
 and used by the internet Community. Our FC's

18
00:01:12.600 --> 00:01:15.700
 are also assigned a number which is user to

19
00:01:15.700 --> 00:01:18.900
 identify the document. For example, the first official

20
00:01:18.900 --> 00:01:23.000
 LFC was published in 1969, and

21
00:01:22.400 --> 00:01:25.800
 it was given the number RFC one.

22
00:01:26.400 --> 00:01:30.000
The number of the rfcs are incremented as

23
00:01:29.500 --> 00:01:31.800
 new documents are published.

24
00:01:32.400 --> 00:01:35.700
Overall the rfcs play a crucial role

25
00:01:35.700 --> 00:01:38.100
 in the development and evolution of the

26
00:01:38.100 --> 00:01:41.500
 internet. They provide a common understanding

27
00:01:41.500 --> 00:01:45.100
 of the protocols and the technologies that

28
00:01:44.100 --> 00:01:47.800
 make up the internet and they are

29
00:01:47.800 --> 00:01:51.000
 widely used by Engineers researchers and

30
00:01:50.700 --> 00:01:53.700
 developers to design Implement and

31
00:01:53.700 --> 00:01:57.000
 terrible should systems that use these protocols

32
00:01:56.500 --> 00:02:00.200
 and Technologies. So note

33
00:01:59.200 --> 00:02:02.500
 that everything I'm gonna tell you here

34
00:02:02.500 --> 00:02:05.900
 is based on the RFC document describing the

35
00:02:05.900 --> 00:02:07.000
 TCP protocol.

36
00:02:07.700 --> 00:02:11.000
Each detail was prepared with reference

37
00:02:10.100 --> 00:02:13.500
 to tcps RFC, which is

38
00:02:13.500 --> 00:02:16.300
 RFC 793.

39
00:02:16.900 --> 00:02:19.700
So now let's talk about TCP protocol

40
00:02:19.700 --> 00:02:22.200
 and tcp-3 way handshake.

41
00:02:23.600 --> 00:02:26.400
TCP is a transport layer protocol

42
00:02:26.400 --> 00:02:29.800
 that provides reliable ordered and error check

43
00:02:29.800 --> 00:02:32.900
 delivery of data between applications running

44
00:02:32.900 --> 00:02:35.900
 on hosts in a package Network such

45
00:02:35.900 --> 00:02:39.500
 as the internet and it is connection-oriented meaning

46
00:02:39.500 --> 00:02:43.300
 that a virtual connection must be established between two

47
00:02:42.300 --> 00:02:45.300
 and points before data can

48
00:02:45.300 --> 00:02:48.800
 be exchanged. This is done using a TV

49
00:02:48.800 --> 00:02:52.300
 handshake maybe, you know seen seen

50
00:02:51.300 --> 00:02:54.800
 egg and an egg messages, which

51
00:02:54.800 --> 00:02:57.200
 is used to establish a connection.

52
00:02:58.900 --> 00:03:01.400
And TCP uses a sliding

53
00:03:01.400 --> 00:03:04.800
 window flow control mechanism to regulate the

54
00:03:04.800 --> 00:03:07.900
 amount of data that can be sent at

55
00:03:07.900 --> 00:03:10.200
 one time this allows to receiving

56
00:03:10.200 --> 00:03:13.300
 host to control the amount of data that

57
00:03:13.300 --> 00:03:16.400
 the center can transmit and helps to

58
00:03:16.400 --> 00:03:19.600
 prevent congestion in the network the receiving host

59
00:03:19.600 --> 00:03:22.100
 sense and X message and

60
00:03:22.100 --> 00:03:25.900
 egg packet which means acknowledgment for

61
00:03:25.900 --> 00:03:28.800
 each block of data that it

62
00:03:28.800 --> 00:03:31.100
 receives and descend or maintains a window of

63
00:03:31.100 --> 00:03:34.900
 an acknowledged data. So the

64
00:03:34.900 --> 00:03:37.600
 size of the window is determined by the receiving

65
00:03:37.600 --> 00:03:40.800
 host and can be adjusted based on

66
00:03:40.800 --> 00:03:44.200
 network conditions. So TCP

67
00:03:43.200 --> 00:03:47.100
 also includes mechanisms some mechanisms

68
00:03:46.100 --> 00:03:50.200
 to ensure reliable data transfer such

69
00:03:49.200 --> 00:03:53.100
 as retail transmission of lost

70
00:03:52.100 --> 00:03:55.200
 packets and detection of

71
00:03:55.200 --> 00:03:58.500
 duplicate packets. If a packet is lost or corrupted.

72
00:03:58.900 --> 00:04:01.700
In transit the receiving host will

73
00:04:01.700 --> 00:04:05.100
 not send an acknowledgment. The sender

74
00:04:04.100 --> 00:04:07.400
 will retransmit the using packet.

75
00:04:07.400 --> 00:04:10.700
 So TCP also includes a mechanism

76
00:04:10.700 --> 00:04:13.400
 for detecting duplicate packets and

77
00:04:13.400 --> 00:04:15.600
 discarding them to prevent confusion.

78
00:04:16.600 --> 00:04:19.400
Now, let's look at how a TCP packet

79
00:04:19.400 --> 00:04:23.300
 is according to RFC 793

80
00:04:22.300 --> 00:04:24.700
 the TCP RFC.

81
00:04:26.300 --> 00:04:30.000
Now in here each layer or each partition

82
00:04:29.600 --> 00:04:34.100
 of a TCP packet has 32

83
00:04:32.100 --> 00:04:35.400
 bits in total

84
00:04:35.400 --> 00:04:39.500
 32 bits of space a capacity with

85
00:04:38.500 --> 00:04:41.600
 32 bits. So the

86
00:04:41.600 --> 00:04:44.200
 whole section the first section of

87
00:04:44.200 --> 00:04:48.500
 a TCP packet core section is 32

88
00:04:47.500 --> 00:04:51.500
 bits in total and the 16

89
00:04:50.500 --> 00:04:54.200
 bits of this capacity

90
00:04:53.200 --> 00:04:56.900
 belongs to the source port and

91
00:04:56.900 --> 00:05:00.000
 the other 16 bits belongs to

92
00:04:59.100 --> 00:05:02.700
 the destination Port field. The other

93
00:05:02.700 --> 00:05:05.900
 part is so you can number and

94
00:05:05.900 --> 00:05:08.700
 the Egg number fields and they

95
00:05:08.700 --> 00:05:12.000
 are also represented by 32 bits.

96
00:05:11.900 --> 00:05:14.700
 Another important area here is

97
00:05:14.700 --> 00:05:18.500
 we can focus on the flags section.

98
00:05:17.500 --> 00:05:20.100
 There are some

99
00:05:20.100 --> 00:05:23.900
 Flags parameters and maybe you know, which case

100
00:05:23.900 --> 00:05:25.800
 the black parameters.

101
00:05:26.200 --> 00:05:29.600
In this section and each flag is

102
00:05:29.600 --> 00:05:32.800
 represented by only one

103
00:05:32.800 --> 00:05:35.800
 bit. You can see it corresponds

104
00:05:35.800 --> 00:05:38.800
 to the only one bit as a

105
00:05:38.800 --> 00:05:41.600
 result. Each flag is represented with only

106
00:05:41.600 --> 00:05:42.800
 one bit.

107
00:05:43.600 --> 00:05:46.500
As you can see each one corresponds to

108
00:05:46.500 --> 00:05:47.800
 the one bit.

109
00:05:49.400 --> 00:05:52.800
Now, let's move on to the Wireshark to investigate a

110
00:05:52.800 --> 00:05:55.700
 real TCP packet on our

111
00:05:55.700 --> 00:05:56.100
 traffic.

112
00:05:58.200 --> 00:06:01.800
If you want to investigate a tcp-based conversation

113
00:06:01.800 --> 00:06:04.400
 while performing TCP analysis, you can

114
00:06:04.400 --> 00:06:07.600
 write can make a right click on the

115
00:06:07.600 --> 00:06:08.200
 packet.

116
00:06:09.100 --> 00:06:09.900
like this

117
00:06:11.800 --> 00:06:14.600
in this way, you can choose you

118
00:06:14.600 --> 00:06:18.000
 can go to the conversation filter and we

119
00:06:17.100 --> 00:06:20.600
 are choosing TCP section.

120
00:06:23.900 --> 00:06:26.900
Here we choose TCP because

121
00:06:26.900 --> 00:06:29.900
 we want to see the entire TCP conversation

122
00:06:29.900 --> 00:06:32.700
 between client and host and

123
00:06:32.700 --> 00:06:35.400
 as you can see it brought the whole

124
00:06:35.400 --> 00:06:38.200
 conversation between the two IPS.

125
00:06:38.900 --> 00:06:42.100
Between the source IP and

126
00:06:41.100 --> 00:06:47.100
 Suite 160.237 and

127
00:06:46.100 --> 00:06:49.500
 the destination IP and

128
00:06:49.500 --> 00:06:52.800
 Suite 278 and

129
00:06:52.800 --> 00:06:54.300
 223.

130
00:06:55.100 --> 00:06:58.500
Thus you will clear all the packets that

131
00:06:58.500 --> 00:07:02.200
 come between this conversation and you

132
00:07:01.200 --> 00:07:04.300
 will only see the conversation between

133
00:07:04.300 --> 00:07:06.300
 the two IPS.

134
00:07:07.300 --> 00:07:09.700
Now, let's go to the packet details.

135
00:07:10.600 --> 00:07:13.000
on this packet on the first packet

136
00:07:13.900 --> 00:07:16.800
We will see the components of TCP.

137
00:07:17.400 --> 00:07:20.800
So as you can see these fields these

138
00:07:20.800 --> 00:07:23.500
 components are also in

139
00:07:23.500 --> 00:07:27.400
 the TCP packet structure according

140
00:07:26.400 --> 00:07:29.800
 to the RFC document.

141
00:07:30.500 --> 00:07:34.200
Just like we have seen in the RFC documents. There

142
00:07:33.200 --> 00:07:37.300
 are the TCP components

143
00:07:36.300 --> 00:07:39.500
 in here in the pack details

144
00:07:39.500 --> 00:07:42.700
 first. We are seeing the source port in here and

145
00:07:42.700 --> 00:07:45.300
 it is 3372.

146
00:07:45.900 --> 00:07:49.000
And the destination Port is 80,

147
00:07:48.500 --> 00:07:52.000
 which is HTTP port and

148
00:07:51.800 --> 00:07:54.800
 the stream index just below.

149
00:07:54.800 --> 00:07:57.700
 It ensures that each conversation is

150
00:07:57.700 --> 00:08:01.000
 followed as a stream in Wireshark. For

151
00:08:00.200 --> 00:08:03.100
 example, since this conversation is the

152
00:08:03.100 --> 00:08:06.400
 first conversation in our pickup file. The index

153
00:08:06.400 --> 00:08:09.400
 value is seen as zero.

154
00:08:10.300 --> 00:08:13.300
So in this citrine index value of the second

155
00:08:13.300 --> 00:08:16.600
 conversation will be 1 thus each

156
00:08:16.600 --> 00:08:19.700
 stream is tracked with this index value.

157
00:08:19.700 --> 00:08:22.200
 For example, let's say we want to see the next

158
00:08:22.200 --> 00:08:22.800
 conversation.

159
00:08:23.700 --> 00:08:26.900
We can use this parameter and

160
00:08:26.900 --> 00:08:30.000
 we will hold the string indexed

161
00:08:29.000 --> 00:08:30.500
 field.

162
00:08:32.900 --> 00:08:35.800
And drop it to the display filter

163
00:08:35.800 --> 00:08:37.600
 field in this way.

164
00:08:39.300 --> 00:08:39.600
So

165
00:08:40.700 --> 00:08:43.800
it will ask to do selected or not

166
00:08:43.800 --> 00:08:46.700
 selected. We will choose the selected

167
00:08:46.700 --> 00:08:47.500
 option.

168
00:08:48.900 --> 00:08:49.600
as you can see

169
00:08:50.900 --> 00:08:53.500
in here, our filtering expiration

170
00:08:53.500 --> 00:08:56.500
 is tcp.stream is equal to

171
00:08:56.500 --> 00:08:57.600
 zero.

172
00:08:58.100 --> 00:09:01.000
So we want to get the string.

173
00:09:03.200 --> 00:09:04.800
which has index value 0

174
00:09:05.900 --> 00:09:08.500
now if we set the value to 1

175
00:09:09.500 --> 00:09:13.100
it will bring up the next conversation from

176
00:09:12.100 --> 00:09:14.000
 0 to 1.

177
00:09:14.700 --> 00:09:16.300
the TCP stream

178
00:09:17.200 --> 00:09:20.100
value and click on the enter

179
00:09:21.300 --> 00:09:23.200
Here it is as you can see.

180
00:09:24.300 --> 00:09:28.200
We are seeing the TCP conversation with

181
00:09:27.200 --> 00:09:30.300
 the stream index value 1.

182
00:09:31.100 --> 00:09:34.900
And this is the second conversation second TCP conversation

183
00:09:34.900 --> 00:09:36.200
 in our pickup file.

184
00:09:36.800 --> 00:09:40.000
And as you can see, there is a different tsp conversation

185
00:09:39.200 --> 00:09:42.800
 between other two different IPS.

186
00:09:43.700 --> 00:09:46.300
And let's set the index value to 0 again.

187
00:09:47.700 --> 00:09:48.000
and

188
00:09:49.400 --> 00:09:51.600
return to the previous conversation

189
00:09:55.900 --> 00:09:58.100
and click on the first packet.

190
00:10:01.300 --> 00:10:03.700
When we select the sequence number.

191
00:10:04.900 --> 00:10:07.600
And the sequence number row.

192
00:10:08.600 --> 00:10:11.500
Fields we see that they both correspond to

193
00:10:11.500 --> 00:10:15.000
 the same values on the packet by

194
00:10:14.000 --> 00:10:15.400
 Spain.

195
00:10:16.700 --> 00:10:19.600
If I choose the sequence number field.

196
00:10:20.600 --> 00:10:22.800
It corresponds some bits.

197
00:10:23.500 --> 00:10:26.400
On the packets pane pain as you

198
00:10:26.400 --> 00:10:29.500
 can see and if I choose the sequence

199
00:10:29.500 --> 00:10:30.700
 number row field.

200
00:10:32.100 --> 00:10:35.500
It is also corresponds to the same field

201
00:10:35.500 --> 00:10:39.200
 on the packet by Spain and since the

202
00:10:38.200 --> 00:10:41.400
 second number in the TCP header is

203
00:10:41.400 --> 00:10:44.700
 a random value. We see a complex number

204
00:10:44.700 --> 00:10:45.900
 in here.

205
00:10:48.500 --> 00:10:51.500
And to look at this sequence number row is

206
00:10:51.500 --> 00:10:54.200
 the origin of secant number

207
00:10:54.200 --> 00:10:57.600
 of value in the packet and it's a

208
00:10:57.600 --> 00:11:00.300
 pretty long number since it

209
00:11:00.300 --> 00:11:03.800
 will be difficult for us to follow this value. We

210
00:11:03.800 --> 00:11:04.400
 may follow the

211
00:11:06.700 --> 00:11:08.000
sequence number field this field

212
00:11:08.800 --> 00:11:11.800
Wireshark simply determines a

213
00:11:11.800 --> 00:11:14.100
 relative sequence number

214
00:11:14.100 --> 00:11:17.600
 and starts it from zero and this

215
00:11:17.600 --> 00:11:19.500
 is a virtual number.

216
00:11:20.600 --> 00:11:23.000
specified by the Wireshark itself

217
00:11:24.200 --> 00:11:28.100
So take a tricking can be done through this

218
00:11:27.100 --> 00:11:30.700
 numbering which is much better

219
00:11:30.700 --> 00:11:33.400
 readability, but we will

220
00:11:33.400 --> 00:11:37.100
 follow the sequence number row than we

221
00:11:36.100 --> 00:11:40.600
 are investigating the TCP three-way

222
00:11:39.600 --> 00:11:42.800
 handshake and TCP packets.

223
00:11:42.800 --> 00:11:45.400
 Now, let's examine the TCP three

224
00:11:45.400 --> 00:11:48.300
 way handshake process packet by packet and

225
00:11:48.300 --> 00:11:50.300
 comparing vitamin illustration.

226
00:11:51.100 --> 00:11:54.900
That I have made before I have prepared before

227
00:11:54.900 --> 00:11:57.400
 in the illustration on the left

228
00:11:57.400 --> 00:12:00.400
 side. We have our client machine and on

229
00:12:00.400 --> 00:12:04.100
 the right side. We have our host machine just

230
00:12:03.100 --> 00:12:07.300
 like in the TCP conversation

231
00:12:06.300 --> 00:12:09.400
 in PK file.

232
00:12:09.400 --> 00:12:10.700
 Maybe you know.

233
00:12:12.700 --> 00:12:16.000
And the clients IP address and save

234
00:12:15.100 --> 00:12:20.300
 it 160.237 just

235
00:12:19.300 --> 00:12:22.900
 like in the source IP

236
00:12:22.900 --> 00:12:26.200
 in our PCF file are Source IP

237
00:12:25.200 --> 00:12:28.100
 is the same and this is

238
00:12:28.100 --> 00:12:29.000
 our client.

239
00:12:30.200 --> 00:12:31.700
and the first IP address

240
00:12:32.500 --> 00:12:38.600
And with 228.23.

241
00:12:39.500 --> 00:12:43.100
And actually here the client will

242
00:12:42.100 --> 00:12:45.200
 send and HTTP request

243
00:12:45.200 --> 00:12:48.800
 to the host on the traffic. However, since

244
00:12:48.800 --> 00:12:52.400
 HTTP works with TCP tcp3, very

245
00:12:51.400 --> 00:12:54.900
 handshake must be done first and thus

246
00:12:54.900 --> 00:12:58.500
 DCP connection must be established. Therefore.

247
00:12:57.500 --> 00:13:00.500
 We will see that the three way

248
00:13:00.500 --> 00:13:03.900
 handshake takes place before the HTTP request packet

249
00:13:03.900 --> 00:13:07.500
 to be transported with the TCP protocol

250
00:13:07.500 --> 00:13:10.700
 for three way handshake first

251
00:13:10.700 --> 00:13:14.200
 declined sense a

252
00:13:13.200 --> 00:13:15.700
 scene packet as you can see

253
00:13:16.900 --> 00:13:20.300
The first packet is a syn packet.

254
00:13:20.900 --> 00:13:22.100
just like in the

255
00:13:23.700 --> 00:13:26.600
PK file the first packet is a scene packet.

256
00:13:32.900 --> 00:13:35.100
And with this packet it says

257
00:13:35.800 --> 00:13:37.800
hey, this is my sequence number.

258
00:13:38.600 --> 00:13:42.500
And save it 79 and 39.

259
00:13:41.500 --> 00:13:44.700
 This complex number is my

260
00:13:44.700 --> 00:13:46.500
 sequence number.

261
00:13:47.300 --> 00:13:50.500
And say this hey, this is my sequence number.

262
00:13:52.100 --> 00:13:54.300
to inform the host machine

263
00:13:54.900 --> 00:13:57.600
and let's see this packet in Wireshark.

264
00:13:59.300 --> 00:13:59.600
in here

265
00:14:02.900 --> 00:14:05.500
this is our first packet and

266
00:14:05.900 --> 00:14:06.500
this is the

267
00:14:07.300 --> 00:14:08.200
scene packet

268
00:14:09.100 --> 00:14:12.400
as you can see in the first packet the

269
00:14:12.400 --> 00:14:16.600
 sequence number and with 79 and

270
00:14:16.600 --> 00:14:17.500
 39.

271
00:14:18.200 --> 00:14:21.000
The sequence number values are the same.

272
00:14:21.700 --> 00:14:23.100
with the illustration

273
00:14:23.800 --> 00:14:24.200
then

274
00:14:25.100 --> 00:14:28.500
the host the sends a scene act

275
00:14:28.500 --> 00:14:32.600
 packet in response to response the

276
00:14:31.600 --> 00:14:33.500
 client.

277
00:14:34.100 --> 00:14:37.700
And since it ends scene and

278
00:14:37.700 --> 00:14:40.700
 eight messages together in one packet,

279
00:14:40.700 --> 00:14:43.700
 we see these messages as a

280
00:14:43.700 --> 00:14:46.400
 single packet on our terrific traffic

281
00:14:46.400 --> 00:14:49.700
 as you can see the second packet

282
00:14:49.700 --> 00:14:51.600
 is a thin egg packet.

283
00:14:52.100 --> 00:14:56.300
But this packet contains actually two

284
00:14:55.300 --> 00:14:56.900
 messages.

285
00:14:57.800 --> 00:15:00.700
as seen and egg messages

286
00:15:01.400 --> 00:15:04.800
So therefore our second packet will

287
00:15:04.800 --> 00:15:07.800
 be the one that contains the scene

288
00:15:07.800 --> 00:15:10.400
 and egg messages in the

289
00:15:10.400 --> 00:15:13.300
 first packet declines set to the

290
00:15:13.300 --> 00:15:16.000
 host a this is my sequence number.

291
00:15:17.200 --> 00:15:20.200
Now in the second packet with the scene

292
00:15:20.200 --> 00:15:20.500
 message.

293
00:15:21.600 --> 00:15:24.600
The host says hey, this is my second

294
00:15:24.600 --> 00:15:26.500
 number to the client.

295
00:15:27.200 --> 00:15:31.000
And it shows its sequence

296
00:15:30.300 --> 00:15:33.600
 number as these number

297
00:15:33.600 --> 00:15:37.400
 ends with 83 and 79.

298
00:15:38.500 --> 00:15:42.300
And in this way, it reports the initial sequence

299
00:15:41.300 --> 00:15:44.900
 number value to the client and to

300
00:15:44.900 --> 00:15:47.800
 host also notifies with an X

301
00:15:47.800 --> 00:15:50.600
 message that it has received the

302
00:15:50.600 --> 00:15:51.400
 sequence number.

303
00:15:52.300 --> 00:15:54.400
That the client has sent to it.

304
00:15:55.200 --> 00:15:58.600
And that is that it has received the same

305
00:15:58.600 --> 00:15:58.800
 message.

306
00:15:59.900 --> 00:16:03.100
And it says I acknowledge your

307
00:16:02.100 --> 00:16:05.800
 sequence number and I wait

308
00:16:05.800 --> 00:16:08.500
 next one is as I specified

309
00:16:08.500 --> 00:16:11.200
 in this x number in my X number

310
00:16:11.200 --> 00:16:15.000
 the number ends with 79 and

311
00:16:14.000 --> 00:16:15.400
 4.

312
00:16:16.500 --> 00:16:19.600
So one edit version of the previous

313
00:16:19.600 --> 00:16:22.800
 scene number of the client. The

314
00:16:22.800 --> 00:16:25.800
 ACT number is one edit version

315
00:16:25.800 --> 00:16:28.900
 of the clients sequence numbers

316
00:16:28.900 --> 00:16:29.700
 and

317
00:16:30.600 --> 00:16:34.800
That is what x numbers in sinach

318
00:16:33.800 --> 00:16:36.800
 means now. Let's open

319
00:16:36.800 --> 00:16:39.900
 the synag packet. The second packet is

320
00:16:39.900 --> 00:16:42.500
 you can see in here. The seconds

321
00:16:42.500 --> 00:16:45.300
 number is the number ends with

322
00:16:45.300 --> 00:16:48.700
 8379 just like

323
00:16:48.700 --> 00:16:51.000
 in our illustration.

324
00:16:51.600 --> 00:16:55.200
And H value is the number

325
00:16:54.200 --> 00:16:58.500
 ends with 79 and

326
00:16:57.500 --> 00:17:00.500
 40 just like

327
00:17:00.500 --> 00:17:02.500
 in our illustration.

328
00:17:03.300 --> 00:17:06.500
So with the same act packet the

329
00:17:06.500 --> 00:17:09.800
 host sense to messages as

330
00:17:09.800 --> 00:17:13.600
 a scene message and an egg

331
00:17:13.600 --> 00:17:13.800
 message.

332
00:17:14.900 --> 00:17:17.900
And in sin message, it sends

333
00:17:17.900 --> 00:17:20.900
 its thin sequence number and

334
00:17:20.900 --> 00:17:24.000
 also it informs that I have

335
00:17:23.300 --> 00:17:25.800
 received your sequence number.

336
00:17:26.600 --> 00:17:29.300
This number and I am waiting the

337
00:17:29.300 --> 00:17:32.300
 next one as the edit version of it.

338
00:17:33.300 --> 00:17:36.400
This act number ends with

339
00:17:36.400 --> 00:17:37.900
 79 and 40.

340
00:17:38.600 --> 00:17:41.000
So it means that the sequence number of the

341
00:17:41.400 --> 00:17:43.400
 next packet coming from the client.

342
00:17:44.200 --> 00:17:47.200
To the host will be this number.

343
00:17:50.100 --> 00:17:54.000
In response to this thin egg message from the host. The

344
00:17:53.600 --> 00:17:56.700
 client also sends an

345
00:17:56.700 --> 00:17:57.800
 egg packet.

346
00:17:58.900 --> 00:17:59.800
Just like in here.

347
00:18:02.400 --> 00:18:05.100
client also sends an egg packet as you

348
00:18:05.100 --> 00:18:07.800
 can see and in this message, the client says

349
00:18:08.700 --> 00:18:11.200
technology or sequence number as well.

350
00:18:11.900 --> 00:18:14.300
So and says that the sequence number

351
00:18:14.300 --> 00:18:17.800
 of the next packet that the host will send is

352
00:18:17.800 --> 00:18:20.300
 this number that ends with

353
00:18:20.300 --> 00:18:22.400
 83 and 80?

354
00:18:23.200 --> 00:18:26.300
And it is also added version of the

355
00:18:26.300 --> 00:18:29.800
 previous sequence number of the

356
00:18:29.800 --> 00:18:31.300
 host as you can see.

357
00:18:33.700 --> 00:18:37.000
And thus it reports the expected sequence

358
00:18:36.300 --> 00:18:39.200
 number as the X number,

359
00:18:39.200 --> 00:18:42.800
 of course because steps two and three

360
00:18:42.800 --> 00:18:46.100
 can be combined in a single packet.

361
00:18:45.100 --> 00:18:49.200
 This is called three way

362
00:18:49.200 --> 00:18:53.400
 or three message. We can say handshake the

363
00:18:52.400 --> 00:18:55.700
 three way handshake has three

364
00:18:55.700 --> 00:18:56.300
 steps.

365
00:18:57.100 --> 00:18:58.000
is in here

366
00:18:58.800 --> 00:19:02.100
the first step is a syn packet

367
00:19:01.100 --> 00:19:04.900
 from client to the host and the

368
00:19:04.900 --> 00:19:05.800
 second step.

369
00:19:06.800 --> 00:19:09.800
With the syntax packet

370
00:19:09.800 --> 00:19:12.100
 from host to the client.

371
00:19:13.200 --> 00:19:16.600
And the last step the third step in the

372
00:19:16.600 --> 00:19:20.000
 third step the client sends and X message.

373
00:19:22.900 --> 00:19:25.900
So after all TCP connection is now established

374
00:19:25.900 --> 00:19:28.400
 as you can see now the client

375
00:19:28.400 --> 00:19:31.800
 can send data wire TCP protocol. Let's

376
00:19:31.800 --> 00:19:34.700
 say the client will send an HTTP request

377
00:19:34.700 --> 00:19:36.700
 packet wire TCP.

378
00:19:37.300 --> 00:19:41.000
and after the tcp3v handshake process the

379
00:19:40.400 --> 00:19:43.800
 httpa conversation and

380
00:19:43.800 --> 00:19:47.300
 now begins in the packet

381
00:19:46.300 --> 00:19:47.500
 4

382
00:19:48.300 --> 00:19:51.900
now click on the packet for and let's look

383
00:19:51.900 --> 00:19:53.600
 at the packages in here.

384
00:19:54.400 --> 00:19:57.800
And expand the transmission control protocol TCP

385
00:19:57.800 --> 00:19:58.400
 field.

386
00:19:59.500 --> 00:20:02.700
As you can see in here, the sequence

387
00:20:02.700 --> 00:20:05.900
 number is the same as the

388
00:20:05.900 --> 00:20:07.300
 third packet.

389
00:20:08.400 --> 00:20:10.300
the second number in the

390
00:20:11.200 --> 00:20:12.200
record for

391
00:20:12.700 --> 00:20:15.500
and include 79 and

392
00:20:15.500 --> 00:20:18.100
 40 and when we look at

393
00:20:18.100 --> 00:20:22.200
 the third packet, it is the same of the packet

394
00:20:21.200 --> 00:20:22.300
 for

395
00:20:23.700 --> 00:20:26.500
so the sequence number didn't change

396
00:20:26.500 --> 00:20:27.300
 in here.

397
00:20:28.500 --> 00:20:29.300
They are the same.

398
00:20:30.200 --> 00:20:33.900
Because the egg doesn't occupy a sequence

399
00:20:33.900 --> 00:20:34.700
 numbers space.

400
00:20:35.400 --> 00:20:38.400
And the sequence number didn't change

401
00:20:38.400 --> 00:20:39.300
 in here.

402
00:20:40.100 --> 00:20:43.700
Keep in mind that always the client sends

403
00:20:43.700 --> 00:20:44.100
 the data.

404
00:20:45.200 --> 00:20:49.000
in here containing an HTTP request via

405
00:20:48.000 --> 00:20:50.300
 TCP

406
00:20:51.300 --> 00:20:53.300
And we see this data.

407
00:20:54.500 --> 00:20:58.000
under the TCP heater as

408
00:20:57.100 --> 00:20:59.900
 TCP payload

409
00:21:01.700 --> 00:21:05.400
As you can see at the bottom of TCP field,

410
00:21:05.400 --> 00:21:08.400
 there is a TCP payload. And when

411
00:21:08.400 --> 00:21:11.700
 we click on the TCP payload, we see

412
00:21:11.700 --> 00:21:15.600
 that it corresponds to the HTTP get

413
00:21:15.600 --> 00:21:18.500
 request on the packet bytes

414
00:21:18.500 --> 00:21:18.600
 pane.

415
00:21:19.400 --> 00:21:23.000
Let me show you the message the

416
00:21:22.900 --> 00:21:25.600
 HTTP message when we

417
00:21:25.600 --> 00:21:28.700
 look at when we click on the TCP payload, then

418
00:21:28.700 --> 00:21:30.700
 we click on the TCP payload.

419
00:21:31.300 --> 00:21:34.500
On the packet details pane. It corresponds to

420
00:21:34.500 --> 00:21:38.800
 the HTTP get packet

421
00:21:37.800 --> 00:21:39.400
 get message.

422
00:21:40.100 --> 00:21:42.000
in the packet by Spain

423
00:21:43.400 --> 00:21:44.000
you can see it.

424
00:21:46.400 --> 00:21:49.700
And this data is wrapped with TCP heater

425
00:21:49.700 --> 00:21:51.800
 in transport layer.

426
00:21:52.500 --> 00:21:56.100
Therefore we see the TCP header

427
00:21:55.100 --> 00:21:58.100
 fields in front of

428
00:21:58.100 --> 00:21:58.900
 data.

429
00:22:00.100 --> 00:22:04.100
the payload in front of payload data

430
00:22:03.100 --> 00:22:06.600
 payload in packet details pane

431
00:22:07.600 --> 00:22:10.600
So who sends the next packet

432
00:22:10.600 --> 00:22:14.200
 is the host which has the port

433
00:22:13.200 --> 00:22:15.700
 number 80?

434
00:22:16.500 --> 00:22:19.700
as the HTTP port numbers

435
00:22:20.700 --> 00:22:23.000
It's part is 80.

436
00:22:24.200 --> 00:22:27.700
And the host sense this packet to

437
00:22:27.700 --> 00:22:28.400
 the client.

438
00:22:29.900 --> 00:22:32.400
as a response and on the

439
00:22:32.400 --> 00:22:35.400
 other hand the client told the host

440
00:22:35.400 --> 00:22:38.300
 in the previous packet that it was

441
00:22:38.300 --> 00:22:41.500
 expecting the sequence number

442
00:22:41.500 --> 00:22:42.200
 as

443
00:22:43.600 --> 00:22:47.000
in its acknowledged number and in

444
00:22:46.000 --> 00:22:47.200
 here

445
00:22:48.100 --> 00:22:52.200
it says that I am expecting your new sequence

446
00:22:51.200 --> 00:22:54.800
 number as this number ends

447
00:22:54.800 --> 00:22:56.500
 with 83 and 80.

448
00:22:57.300 --> 00:23:00.600
And then we look at the next packet that

449
00:23:00.600 --> 00:23:03.900
 sends by the host. We will

450
00:23:03.900 --> 00:23:06.800
 see this number as its sequence

451
00:23:06.800 --> 00:23:07.100
 number.

452
00:23:07.800 --> 00:23:08.600
Let's look at this.

453
00:23:11.400 --> 00:23:16.100
As you can see in here the seconds number 8380.

454
00:23:16.900 --> 00:23:17.400
just like

455
00:23:18.500 --> 00:23:21.500
in the previous packet this number is

456
00:23:22.400 --> 00:23:23.600
an X number

457
00:23:24.800 --> 00:23:26.000
you can see in here.

458
00:23:28.600 --> 00:23:32.300
So the client said that and

459
00:23:31.300 --> 00:23:35.200
 they think your sequence number as this

460
00:23:34.200 --> 00:23:35.400
 number.

461
00:23:36.300 --> 00:23:39.700
And the host sense packet with this

462
00:23:39.700 --> 00:23:41.800
 number as sequence number.

463
00:23:42.600 --> 00:23:43.700
on the next packet

464
00:23:44.600 --> 00:23:45.200
as you can see

465
00:23:46.200 --> 00:23:49.600
the second number is the same with the

466
00:23:49.600 --> 00:23:51.000
 previous X number.

467
00:23:53.100 --> 00:23:56.100
Remember always that key Point packet sent

468
00:23:56.100 --> 00:23:59.700
 with the TCP protocol are called segments. So

469
00:23:59.700 --> 00:24:02.800
 segments also carry an X

470
00:24:02.800 --> 00:24:06.000
 number, which is the sequence number of the next expected

471
00:24:05.000 --> 00:24:06.600
 data.

472
00:24:07.100 --> 00:24:10.800
when the TCP transmits a segment containing data

473
00:24:11.500 --> 00:24:14.300
Puts a copy on a written as

474
00:24:14.300 --> 00:24:17.200
 Mission queue and starts a timer

475
00:24:17.200 --> 00:24:20.600
 when acknowledgment for that data is received.

476
00:24:20.600 --> 00:24:23.500
 The segment is deleted from the queue.

477
00:24:24.200 --> 00:24:27.500
The acknowledgment isn't received before the timer

478
00:24:27.500 --> 00:24:30.800
 runs out. This segment is returned method.

479
00:24:32.300 --> 00:24:35.600
So this is how TCP communication is done with

480
00:24:35.600 --> 00:24:38.600
 sequence and X numbers. All right.

481
00:24:38.600 --> 00:24:41.300
 How is a TCP packet set to

482
00:24:41.300 --> 00:24:44.200
 scene packet or scene message

483
00:24:44.200 --> 00:24:45.900
 or AC message?

484
00:24:46.400 --> 00:24:47.900
The answer is simple.

485
00:24:49.300 --> 00:24:53.600
This property of the packet is set using TCP

486
00:24:52.600 --> 00:24:54.000
 Flex.

487
00:24:54.900 --> 00:24:57.700
So when we look at the scene packet

488
00:24:57.700 --> 00:24:59.000
 is in here.

489
00:25:00.300 --> 00:25:03.500
We see that the flags field in

490
00:25:03.500 --> 00:25:03.600
 here.

491
00:25:04.700 --> 00:25:08.000
Just like in the TCP structure

492
00:25:07.600 --> 00:25:11.200
 according to the RFC document. There

493
00:25:10.200 --> 00:25:13.700
 are some flag values. First

494
00:25:13.700 --> 00:25:16.300
 one is the Urgent. The second one

495
00:25:16.300 --> 00:25:19.400
 is acknowledgment and the other one push

496
00:25:19.400 --> 00:25:22.700
 and reset and scene and

497
00:25:22.700 --> 00:25:23.200
 Fin.

498
00:25:24.300 --> 00:25:27.800
So, for example, we see that the scene

499
00:25:27.800 --> 00:25:30.900
 flag pit value is in here one.

500
00:25:31.900 --> 00:25:34.700
So other flag values are set

501
00:25:34.700 --> 00:25:35.700
 to 0.

502
00:25:36.900 --> 00:25:40.200
For example egg is 0 reset

503
00:25:39.200 --> 00:25:42.200
 is zero. Fin is

504
00:25:42.200 --> 00:25:45.600
 0 only the scene flag is

505
00:25:45.600 --> 00:25:46.900
 set to 1.

506
00:25:47.800 --> 00:25:51.000
Because this packet becomes the

507
00:25:50.400 --> 00:25:51.800
 scene packet.

508
00:25:53.200 --> 00:25:56.500
And in order to make this packet as

509
00:25:56.500 --> 00:25:59.400
 a scene packet, it is set

510
00:25:59.400 --> 00:26:02.000
 to the one as bit value.

511
00:26:04.500 --> 00:26:07.200
So how then is setting down in the

512
00:26:07.200 --> 00:26:10.000
 thin egg packet, let's look at

513
00:26:10.000 --> 00:26:10.300
 this.

514
00:26:11.500 --> 00:26:14.700
And in here because of this packet

515
00:26:14.700 --> 00:26:18.800
 is a thin egg packet the acknowledgment

516
00:26:17.800 --> 00:26:20.300
 flag is set to

517
00:26:20.300 --> 00:26:23.400
 the one and the thin flag

518
00:26:23.400 --> 00:26:25.600
 is also set to the one.

519
00:26:26.300 --> 00:26:29.400
It value and the other ones are

520
00:26:29.400 --> 00:26:31.100
 0 as well.

521
00:26:32.700 --> 00:26:35.700
So by these values are

522
00:26:35.700 --> 00:26:37.800
 set to the 1

523
00:26:38.800 --> 00:26:41.700
the x value and the

524
00:26:41.700 --> 00:26:44.900
 scene value. This packet is made as

525
00:26:44.900 --> 00:26:46.800
 a thin egg packet.

526
00:26:49.300 --> 00:26:52.300
So this is how TCP protocol works in the network

527
00:26:52.300 --> 00:26:52.800
 traffic?

528
00:26:55.200 --> 00:26:58.100
So that's all for this lesson and we will discuss

529
00:26:58.100 --> 00:27:01.300
 about the DHCP and net bios and

530
00:27:01.300 --> 00:27:04.600
 the curbs on the next lesson. See you

531
00:27:04.600 --> 00:27:05.500
 on the next video.
