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