1
1

00:00:00,850  -->  00:00:03,510
<v ->Layer Five, the Session Layer.</v>
2

2

00:00:03,510  -->  00:00:05,830
Now, layer five is our session layer,
3

3

00:00:05,830  -->  00:00:09,160
and we want to start thinking about what a session is.
4

4

00:00:09,160  -->  00:00:10,790
The way I like to think about a session
5

5

00:00:10,790  -->  00:00:13,140
is that it's a conversation that has to be kept
6

6

00:00:13,140  -->  00:00:15,400
separate from all of the others to prevent
7

7

00:00:15,400  -->  00:00:17,380
the intermingling of data.
8

8

00:00:17,380  -->  00:00:19,880
Now, if you think about yourself in a classroom setting,
9

9

00:00:19,880  -->  00:00:22,160
we might have 20 students sitting here.
10

10

00:00:22,160  -->  00:00:24,658
Now, if I wanted to ask a question to one student only,
11

11

00:00:24,658  -->  00:00:26,740
everyone else can listen to it.
12

12

00:00:26,740  -->  00:00:28,130
Maybe I want to take that student,
13

13

00:00:28,130  -->  00:00:29,960
and we're going to go walk about in to the hallway
14

14

00:00:29,960  -->  00:00:32,130
so we can have our own session, our own private
15

15

00:00:32,130  -->  00:00:34,680
conversation, while all of the other 19 students
16

16

00:00:34,680  -->  00:00:36,140
can talk among themselves.
17

17

00:00:36,140  -->  00:00:38,170
And they're having their own session.
18

18

00:00:38,170  -->  00:00:40,530
That way, we can separate these two sessions apart
19

19

00:00:40,530  -->  00:00:42,790
and each of us can talk at the same time
20

20

00:00:42,790  -->  00:00:44,290
without interfering with the other,
21

21

00:00:44,290  -->  00:00:45,970
me and my student out in the hall
22

22

00:00:45,970  -->  00:00:48,130
and all the other 19 students sitting back
23

23

00:00:48,130  -->  00:00:49,360
in the classroom.
24

24

00:00:49,360  -->  00:00:51,057
Now, that's the idea here when we talk about
25

25

00:00:51,057  -->  00:00:52,460
the session layer.
26

26

00:00:52,460  -->  00:00:54,723
We have all sorts of data flying around our networks
27

27

00:00:54,723  -->  00:00:57,815
all day long, and by establishing these sessions,
28

28

00:00:57,815  -->  00:01:00,212
we can separate them to prevent the intermingling
29

29

00:01:00,212  -->  00:01:03,040
or cross-contamination of that data.
30

30

00:01:03,040  -->  00:01:05,130
Now, what we're going to do is we're going to set up a session,
31

31

00:01:05,130  -->  00:01:06,517
we're going to maintain a session,
32

32

00:01:06,517  -->  00:01:08,270
and we're going to tear down a session
33

33

00:01:08,270  -->  00:01:10,540
here inside the session layer.
34

34

00:01:10,540  -->  00:01:12,820
Now, what is setting up a session?
35

35

00:01:12,820  -->  00:01:15,360
This is where we're going to check our user credentials,
36

36

00:01:15,360  -->  00:01:17,370
and we're going to assign a number to the session
37

37

00:01:17,370  -->  00:01:18,830
to help identify it.
38

38

00:01:18,830  -->  00:01:20,360
It's basically some random number
39

39

00:01:20,360  -->  00:01:22,115
that's going to allow us to negotiate services
40

40

00:01:22,115  -->  00:01:24,364
for that session with the server
41

41

00:01:24,364  -->  00:01:27,080
and then negotiate who's going to talk first,
42

42

00:01:27,080  -->  00:01:29,260
either the server or myself.
43

43

00:01:29,260  -->  00:01:31,800
Now, let's go back to our classroom setting once more.
44

44

00:01:31,800  -->  00:01:33,630
If Johnny asks me a question, he says,
45

45

00:01:33,630  -->  00:01:34,930
hey, professor Dion.
46

46

00:01:34,930  -->  00:01:36,420
I'll say, yes Johnny?
47

47

00:01:36,420  -->  00:01:37,380
And then, guess what?
48

48

00:01:37,380  -->  00:01:38,640
We're going to start talking,
49

49

00:01:38,640  -->  00:01:40,560
because we've established that session.
50

50

00:01:40,560  -->  00:01:42,145
I know that Johnny wants to talk to me,
51

51

00:01:42,145  -->  00:01:44,604
and Johnny knows that I'm ready to talk to him.
52

52

00:01:44,604  -->  00:01:46,460
Now, I know who he is.
53

53

00:01:46,460  -->  00:01:47,590
He knows who I am.
54

54

00:01:47,590  -->  00:01:49,200
And we both know what each other wants.
55

55

00:01:49,200  -->  00:01:50,820
We want to start talking.
56

56

00:01:50,820  -->  00:01:52,732
In a computer network, it's a little bit more difficult
57

57

00:01:52,732  -->  00:01:54,667
but that's really the idea behind it
58

58

00:01:54,667  -->  00:01:57,000
when we start talking about a session.
59

59

00:01:57,000  -->  00:01:58,263
Now, the next thing we have to do
60

60

00:01:58,263  -->  00:02:00,398
is we have to maintain this session.
61

61

00:02:00,398  -->  00:02:02,200
This is where we're going to transfer data
62

62

00:02:02,200  -->  00:02:03,630
back and forth across the network
63

63

00:02:03,630  -->  00:02:05,720
over and over and over again.
64

64

00:02:05,720  -->  00:02:06,991
Going back to my classroom example,
65

65

00:02:06,991  -->  00:02:09,340
if Johnny asks me a question, I'd say,
66

66

00:02:09,340  -->  00:02:11,590
yes, go ahead and ask the question, Johnny.
67

67

00:02:11,590  -->  00:02:13,500
And then, Johnny's going to ask his question.
68

68

00:02:13,500  -->  00:02:15,081
And at this point, we're maintaining a session.
69

69

00:02:15,081  -->  00:02:17,525
So, here we are going back and forth, back and forth,
70

70

00:02:17,525  -->  00:02:19,380
where I can answer their question
71

71

00:02:19,380  -->  00:02:22,347
and see if I can answer everything they have for me, right?
72

72

00:02:22,347  -->  00:02:25,410
Well, the same idea happens here inside our networks.
73

73

00:02:25,410  -->  00:02:27,200
Now that the session has been established,
74

74

00:02:27,200  -->  00:02:29,280
we're going to send all of our data back and forth
75

75

00:02:29,280  -->  00:02:30,530
over and over again.
76

76

00:02:30,530  -->  00:02:32,330
Now, if we have a break in the connection,
77

77

00:02:32,330  -->  00:02:34,520
we're going to have to reestablish our connection.
78

78

00:02:34,520  -->  00:02:36,700
So, for instance, I might say, I'm sorry,
79

79

00:02:36,700  -->  00:02:37,830
I didn't hear you Johnny.
80

80

00:02:37,830  -->  00:02:39,360
Can you repeat your question?
81

81

00:02:39,360  -->  00:02:41,490
Again, I'm maintaining that session.
82

82

00:02:41,490  -->  00:02:43,120
So, that way, I can get what they want to tell me,
83

83

00:02:43,120  -->  00:02:44,630
and then I can answer them.
84

84

00:02:44,630  -->  00:02:47,360
Now, also I'm going to acknowledge the receipt of the data.
85

85

00:02:47,360  -->  00:02:49,660
I'll say, did you understand my answer, Johnny?
86

86

00:02:49,660  -->  00:02:50,840
And they'll say, yeah I did.
87

87

00:02:50,840  -->  00:02:51,970
Or no, I didn't.
88

88

00:02:51,970  -->  00:02:54,450
And if they did, they'll acknowledge the receipt.
89

89

00:02:54,450  -->  00:02:56,090
If they didn't, they're going to tell me,
90

90

00:02:56,090  -->  00:02:57,070
no, I didn't understand.
91

91

00:02:57,070  -->  00:02:59,160
Can you tell me that again a different way?
92

92

00:02:59,160  -->  00:03:01,634
Well, the same thing happens digitally with your networks.
93

93

00:03:01,634  -->  00:03:04,045
And that brings us to the final area.
94

94

00:03:04,045  -->  00:03:05,690
Tearing down a session.
95

95

00:03:05,690  -->  00:03:07,600
So, now that the student's question has been answered
96

96

00:03:07,600  -->  00:03:09,440
in our analogy of the classroom,
97

97

00:03:09,440  -->  00:03:11,737
I'll say, Johnny, does that answer your question?
98

98

00:03:11,737  -->  00:03:13,885
And hopefully, he'll say, yes it does.
99

99

00:03:13,885  -->  00:03:15,780
And at that point, I'll say okay,
100

100

00:03:15,780  -->  00:03:17,501
we're going to move on to the next thing in the course.
101

101

00:03:17,501  -->  00:03:18,816
And as I say that,
102

102

00:03:18,816  -->  00:03:20,850
we're going to move on to the next question.
103

103

00:03:20,850  -->  00:03:22,390
That tears down the session.
104

104

00:03:22,390  -->  00:03:24,490
The session between me and Johnny is done,
105

105

00:03:24,490  -->  00:03:26,020
and I'm going to go back to teaching.
106

106

00:03:26,020  -->  00:03:27,170
And if Johnny has another question,
107

107

00:03:27,170  -->  00:03:28,580
he's going to have to raise his hand again,
108

108

00:03:28,580  -->  00:03:30,980
so that I can go and say, okay Johnny, what's your question?
109

109

00:03:30,980  -->  00:03:32,720
And we'll start a new session, right?
110

110

00:03:32,720  -->  00:03:34,730
That would be the end of that particular session
111

111

00:03:34,730  -->  00:03:37,190
once I answer his question and got confirmation
112

112

00:03:37,190  -->  00:03:38,240
that he has it.
113

113

00:03:38,240  -->  00:03:39,910
Then, we can move on.
114

114

00:03:39,910  -->  00:03:42,509
Now, this is done based on this mutual agreement.
115

115

00:03:42,509  -->  00:03:45,090
Once we've transferred all the data back and forth
116

116

00:03:45,090  -->  00:03:46,631
we wanted to, we're going to verify
117

117

00:03:46,631  -->  00:03:48,504
that I'm ready to tear down the session,
118

118

00:03:48,504  -->  00:03:50,910
you're ready for the session to be torn down,
119

119

00:03:50,910  -->  00:03:53,158
and then, we can tear down that session.
120

120

00:03:53,158  -->  00:03:55,330
The other way we could take down a session
121

121

00:03:55,330  -->  00:03:56,707
is if one of the parties disconnects
122

122

00:03:56,707  -->  00:03:58,505
and we simply can't reconnect to them.
123

123

00:03:58,505  -->  00:04:01,065
For instance let's go back to my classroom example.
124

124

00:04:01,065  -->  00:04:02,790
Johnny asked a question.
125

125

00:04:02,790  -->  00:04:05,260
I go on a 30-minute diatribe trying to explain
126

126

00:04:05,260  -->  00:04:07,930
every possible thing to answer his question.
127

127

00:04:07,930  -->  00:04:09,227
And I look up and guess what?
128

128

00:04:09,227  -->  00:04:10,839
Johnny has his head down on the table
129

129

00:04:10,839  -->  00:04:12,120
and he's fallen asleep.
130

130

00:04:12,120  -->  00:04:13,276
I bored him to death.
131

131

00:04:13,276  -->  00:04:15,820
There's no way for me to maintain that session,
132

132

00:04:15,820  -->  00:04:17,500
because he's not getting the information.
133

133

00:04:17,500  -->  00:04:19,410
He's completely asleep.
134

134

00:04:19,410  -->  00:04:22,220
He is dead asleep and he is not listening anymore.
135

135

00:04:22,220  -->  00:04:24,720
Well, he has disconnected from this conversation.
136

136

00:04:24,720  -->  00:04:27,120
And therefore, I can't re-engage.
137

137

00:04:27,120  -->  00:04:28,920
So, I'm just going to stop teaching
138

138

00:04:28,920  -->  00:04:31,150
and move on to other students who are awake
139

139

00:04:31,150  -->  00:04:32,220
and are paying attention
140

140

00:04:32,220  -->  00:04:33,617
and actually have questions for me.
141

141

00:04:33,617  -->  00:04:35,788
That's the idea here with tearing down a session.
142

142

00:04:35,788  -->  00:04:37,438
This can be done either mutually
143

143

00:04:37,438  -->  00:04:39,560
where we both have finished the communication
144

144

00:04:39,560  -->  00:04:41,120
and we say, yep, I'm done, you're done,
145

145

00:04:41,120  -->  00:04:42,250
we understand each other.
146

146

00:04:42,250  -->  00:04:43,230
We move on.
147

147

00:04:43,230  -->  00:04:45,750
Or the other party simply disappears.
148

148

00:04:45,750  -->  00:04:47,633
In which case, I want to free up my resources
149

149

00:04:47,633  -->  00:04:49,270
so I can go help other people again.
150

150

00:04:49,270  -->  00:04:51,440
And that's what I would do as a computer.
151

151

00:04:51,440  -->  00:04:53,568
So, what are some examples of Layer 5 devices
152

152

00:04:53,568  -->  00:04:56,440
or protocols, or things that you should associate
153

153

00:04:56,440  -->  00:04:57,800
with Layer 5?
154

154

00:04:57,800  -->  00:05:02,000
Well, the two big ones are H.323 and NetBIOS.
155

155

00:05:02,000  -->  00:05:03,879
Let's talk about H.323 first.
156

156

00:05:03,879  -->  00:05:08,010
H.323 is used to set up, maintain, and tear down
157

157

00:05:08,010  -->  00:05:09,880
voice and video connections.
158

158

00:05:09,880  -->  00:05:11,810
If you're using FaceTime or Skype
159

159

00:05:11,810  -->  00:05:13,780
or something like that, you're probably using
160

160

00:05:13,780  -->  00:05:16,370
something like H.323, which operates
161

161

00:05:16,370  -->  00:05:19,580
over the RTP or Real-Time Protocol.
162

162

00:05:19,580  -->  00:05:21,709
Now, I know I just threw out a lot of acronyms for you.
163

163

00:05:21,709  -->  00:05:26,010
For the exam, if you see something like H.323
164

164

00:05:26,010  -->  00:05:29,730
or H.264, I want you to think about streaming audio
165

165

00:05:29,730  -->  00:05:30,940
or streaming video.
166

166

00:05:30,940  -->  00:05:33,070
Something like FaceTime, Skype, YouTube,
167

167

00:05:33,070  -->  00:05:35,655
video teleconference, something like that.
168

168

00:05:35,655  -->  00:05:40,210
These operate over the Real-Time Protocol, known as RTP.
169

169

00:05:40,210  -->  00:05:43,370
Any time you see RTP, I want you to think about
170

170

00:05:43,370  -->  00:05:45,560
streaming audio or streaming video.
171

171

00:05:45,560  -->  00:05:47,530
Generally in a two-way format,
172

172

00:05:47,530  -->  00:05:50,250
like a phone call or a FaceTime session.
173

173

00:05:50,250  -->  00:05:51,720
Keep those in your head, and you're going to do great
174

174

00:05:51,720  -->  00:05:53,810
on the exam cause they do like to throw those in
175

175

00:05:53,810  -->  00:05:55,520
and I want you to see those.
176

176

00:05:55,520  -->  00:05:56,568
Now, the second thing I mentioned
177

177

00:05:56,568  -->  00:05:59,201
is that we have something known as NetBIOS.
178

178

00:05:59,201  -->  00:06:01,646
Now, NetBIOS is used by computers to share files
179

179

00:06:01,646  -->  00:06:03,480
over a network.
180

180

00:06:03,480  -->  00:06:06,120
Windows uses this as the method of its file sharing
181

181

00:06:06,120  -->  00:06:08,400
as well inside, so you're going to see it a lot
182

182

00:06:08,400  -->  00:06:09,620
on your networks.
183

183

00:06:09,620  -->  00:06:12,012
Now, again, when we talk about Layer 5 devices,
184

184

00:06:12,012  -->  00:06:14,410
there's really not a device necessarily,
185

185

00:06:14,410  -->  00:06:16,680
but it's more of these protocols and software.
186

186

00:06:16,680  -->  00:06:20,848
So, if you see something like H.323, RTP, or NetBIOS,
187

187

00:06:20,848  -->  00:06:24,083
I want you to remember, these are all Layer 5 issues.
