1
1

00:00:00,480  -->  00:00:02,550
<v Instructor>Hands-on with DHCP.</v>
2

2

00:00:02,550  -->  00:00:05,240
In this lesson, I'm going to show you DHCP
3

3

00:00:05,240  -->  00:00:06,980
and how it works behind the scenes
4

4

00:00:06,980  -->  00:00:09,700
by looking at the packets as they go across our network.
5

5

00:00:09,700  -->  00:00:11,310
Now, when we look at DHCP here,
6

6

00:00:11,310  -->  00:00:13,320
I'm going to do it in a very simplistic manner
7

7

00:00:13,320  -->  00:00:15,320
and I'm going to use a small office home office
8

8

00:00:15,320  -->  00:00:17,400
wireless router or wireless gateway.
9

9

00:00:17,400  -->  00:00:20,100
You can see that here on the left side of the screen.
10

10

00:00:20,100  -->  00:00:21,790
All right, so let's go ahead and get started here.
11

11

00:00:21,790  -->  00:00:23,490
We have a wireless router at the top
12

12

00:00:23,490  -->  00:00:26,590
and I've got two clients, PC0 and PC1.
13

13

00:00:26,590  -->  00:00:29,170
Right now, PC0 is statically assigned
14

14

00:00:29,170  -->  00:00:31,600
and PC1 is dynamically assigned.
15

15

00:00:31,600  -->  00:00:33,050
You can see that if I click on them.
16

16

00:00:33,050  -->  00:00:34,270
Here's PC1.
17

17

00:00:34,270  -->  00:00:36,020
You can see it is set up for DHCP
18

18

00:00:36,020  -->  00:00:40,010
and it's pulled an address of 192.168.0.1
19

19

00:00:40,010  -->  00:00:41,310
as its default gateway
20

20

00:00:41,310  -->  00:00:43,170
and if I look at its actual interface card,
21

21

00:00:43,170  -->  00:00:48,170
you could see its IP address over here at 192.168.0.101.
22

22

00:00:48,650  -->  00:00:50,230
Now if I look at PC0,
23

23

00:00:50,230  -->  00:00:52,040
you're going to see on PC0 that I have
24

24

00:00:52,040  -->  00:00:53,950
a statically assigned default gateway,
25

25

00:00:53,950  -->  00:00:56,080
and that gateway doesn't match the DHCP one,
26

26

00:00:56,080  -->  00:00:57,750
which is why I'm having some communication problems
27

27

00:00:57,750  -->  00:00:58,583
with this one.
28

28

00:00:58,583  -->  00:01:01,020
So I decided I'm just going to make my life easy
29

29

00:01:01,020  -->  00:01:02,610
and set up DHCP.
30

30

00:01:02,610  -->  00:01:04,720
So I'm going to click on DHCP
31

31

00:01:04,720  -->  00:01:07,290
and it will automatically switch me to DHCP.
32

32

00:01:07,290  -->  00:01:08,940
Now, once I click on DHCP,
33

33

00:01:08,940  -->  00:01:11,350
I'm going to minimize this window and that way we can see it
34

34

00:01:11,350  -->  00:01:13,650
as it steps through the DORA process.
35

35

00:01:13,650  -->  00:01:15,160
So the first packet that's going to go out
36

36

00:01:15,160  -->  00:01:18,450
is going to be a broadcast message for the discover process.
37

37

00:01:18,450  -->  00:01:20,060
Notice here, the destination.
38

38

00:01:20,060  -->  00:01:24,070
It is 255.255.255.255.
39

39

00:01:24,070  -->  00:01:26,810
And this tells us that that is the broadcast
40

40

00:01:26,810  -->  00:01:27,950
for layer three.
41

41

00:01:27,950  -->  00:01:28,950
And so we're going to send this out
42

42

00:01:28,950  -->  00:01:30,710
and everybody connected over layer three
43

43

00:01:30,710  -->  00:01:32,300
is going to get this message.
44

44

00:01:32,300  -->  00:01:33,830
In this case, the only have the person
45

45

00:01:33,830  -->  00:01:36,880
that's connected over layer three is wireless router zero.
46

46

00:01:36,880  -->  00:01:39,450
So when I do this and I hit the next button,
47

47

00:01:39,450  -->  00:01:40,950
we're going to send that packet up.
48

48

00:01:40,950  -->  00:01:42,760
It gets to wireless router zero.
49

49

00:01:42,760  -->  00:01:45,570
When it gets there, it accepts that and it processes it.
50

50

00:01:45,570  -->  00:01:47,980
It says, oh, somebody on this network
51

51

00:01:47,980  -->  00:01:49,610
wants to get an IP address.
52

52

00:01:49,610  -->  00:01:51,300
So this was the discovery phase.
53

53

00:01:51,300  -->  00:01:53,950
Since this wireless router has a DHCP server,
54

54

00:01:53,950  -->  00:01:55,210
it's going to say, great.
55

55

00:01:55,210  -->  00:01:58,000
I can give you an IP address and I'm going to offer you one.
56

56

00:01:58,000  -->  00:01:59,800
So it's going to send a packet back.
57

57

00:01:59,800  -->  00:02:01,140
And when it sends that packet,
58

58

00:02:01,140  -->  00:02:03,150
we are going to send that out as a broadcast.
59

59

00:02:03,150  -->  00:02:06,210
So it goes to both PC0 and PC1.
60

60

00:02:06,210  -->  00:02:09,430
In this case, PC0 accepted it and PC1 didn't.
61

61

00:02:09,430  -->  00:02:11,000
Why didn't PC1 accept it?
62

62

00:02:11,000  -->  00:02:12,380
Because it didn't ask for it.
63

63

00:02:12,380  -->  00:02:13,780
It didn't do the discover process.
64

64

00:02:13,780  -->  00:02:14,927
So it says, this isn't meant for me.
65

65

00:02:14,927  -->  00:02:17,100
And it simply drops that packet.
66

66

00:02:17,100  -->  00:02:18,610
Now, on the other hand, PC0 says
67

67

00:02:18,610  -->  00:02:20,010
I was looking for a message.
68

68

00:02:20,010  -->  00:02:21,970
And so this message came as a broadcast.
69

69

00:02:21,970  -->  00:02:24,720
You could see the destination there is listed as broadcast.
70

70

00:02:24,720  -->  00:02:26,760
Now because this was sent as a broadcast message,
71

71

00:02:26,760  -->  00:02:29,090
it's coming over layer three at the broadcast.
72

72

00:02:29,090  -->  00:02:31,410
So again, you could see the destination IP address
73

73

00:02:31,410  -->  00:02:34,680
of 255.255.255.255.
74

74

00:02:34,680  -->  00:02:37,390
So everyone on this network got a copy of that,
75

75

00:02:37,390  -->  00:02:39,440
but only PC0 wanted it,
76

76

00:02:39,440  -->  00:02:41,640
so it's the only one that's going to process that message
77

77

00:02:41,640  -->  00:02:44,420
as indicated by those blue lines going over it.
78

78

00:02:44,420  -->  00:02:46,260
So next, we're going to get that.
79

79

00:02:46,260  -->  00:02:48,710
And we've discovered where we asked for it.
80

80

00:02:48,710  -->  00:02:50,340
We received it as an offer.
81

81

00:02:50,340  -->  00:02:52,500
So now we need to request it and say,
82

82

00:02:52,500  -->  00:02:54,350
can I keep that address?
83

83

00:02:54,350  -->  00:02:55,410
Now remember, we just send that out
84

84

00:02:55,410  -->  00:02:56,520
to everybody in the network.
85

85

00:02:56,520  -->  00:02:58,060
So maybe there was two or three clients
86

86

00:02:58,060  -->  00:02:59,290
that wanted that address.
87

87

00:02:59,290  -->  00:03:00,690
So whichever one requests it
88

88

00:03:00,690  -->  00:03:02,970
is then going to get an acknowledgement from the server.
89

89

00:03:02,970  -->  00:03:06,930
So PC0 is going to go back and say, I want this IP address.
90

90

00:03:06,930  -->  00:03:09,880
And so it sends its request as part of the DORA process.
91

91

00:03:09,880  -->  00:03:11,860
That goes up to wireless router zero.
92

92

00:03:11,860  -->  00:03:13,720
When it gets it, it's going to see it.
93

93

00:03:13,720  -->  00:03:16,370
And in this case, we are sending this as again,
94

94

00:03:16,370  -->  00:03:18,750
a broadcast message because everything is being done
95

95

00:03:18,750  -->  00:03:21,310
in broadcasting when you're using DHCP.
96

96

00:03:21,310  -->  00:03:24,060
Now, once it gets up there and wireless router zero sees it,
97

97

00:03:24,060  -->  00:03:25,510
it's going to process that message and say,
98

98

00:03:25,510  -->  00:03:28,680
okay, I acknowledge that PC0 can have this.
99

99

00:03:28,680  -->  00:03:30,710
And so it sends out another message to everybody,
100

100

00:03:30,710  -->  00:03:32,460
and this goes to all the PCs.
101

101

00:03:32,460  -->  00:03:35,350
And again, just like before, this is a broadcast message.
102

102

00:03:35,350  -->  00:03:37,110
So if it wasn't intended for you,
103

103

00:03:37,110  -->  00:03:38,460
you're just going to drop it.
104

104

00:03:38,460  -->  00:03:41,290
This case, PC0 wanted it, so it accepts it
105

105

00:03:41,290  -->  00:03:42,830
and we get that green check mark.
106

106

00:03:42,830  -->  00:03:46,760
At this point, PC0 should now have an IP address.
107

107

00:03:46,760  -->  00:03:49,300
So if we go into PC0 we should now see
108

108

00:03:49,300  -->  00:03:51,360
that there is a DHCP address assigned.
109

109

00:03:51,360  -->  00:03:52,970
Now notice we have a default gateway
110

110

00:03:52,970  -->  00:03:56,780
of 192.168.0.1 that has been assigned
111

111

00:03:56,780  -->  00:03:59,490
as a dynamic DHCP gateway for us.
112

112

00:03:59,490  -->  00:04:01,700
Now, if we look at the wireless interface itself,
113

113

00:04:01,700  -->  00:04:03,310
we will see its actual IP address.
114

114

00:04:03,310  -->  00:04:06,960
In this case, 192.168.0.100
115

115

00:04:06,960  -->  00:04:10,870
with a subnet mask of 255.255.255.0,
116

116

00:04:10,870  -->  00:04:13,180
which means we are now on this network.
117

117

00:04:13,180  -->  00:04:15,560
We have a valid IP and we can start to communicate
118

118

00:04:15,560  -->  00:04:17,030
with other computers on this network
119

119

00:04:17,030  -->  00:04:20,030
or out through that default gateway over to the internet,
120

120

00:04:20,030  -->  00:04:22,220
if that wireless router is connected to a cable modem
121

121

00:04:22,220  -->  00:04:23,900
or something else like that.
122

122

00:04:23,900  -->  00:04:26,230
All right, that is the quick and dirty way
123

123

00:04:26,230  -->  00:04:28,813
of how DHCP works through the DORA process.
124

124

00:04:28,813  -->  00:04:30,520
Now, the other thing we might want to look at
125

125

00:04:30,520  -->  00:04:32,720
is inside the wireless router itself.
126

126

00:04:32,720  -->  00:04:34,050
Now I'm going to go ahead and maximize this
127

127

00:04:34,050  -->  00:04:35,370
so you can see it a little better.
128

128

00:04:35,370  -->  00:04:38,470
And over here on the front page, you see the DHCP server.
129

129

00:04:38,470  -->  00:04:39,620
It is enabled here.
130

130

00:04:39,620  -->  00:04:41,930
That's why this wireless router was entering up
131

131

00:04:41,930  -->  00:04:43,600
and handing out IP addresses,
132

132

00:04:43,600  -->  00:04:45,710
because it has a DHCP server enabled.
133

133

00:04:45,710  -->  00:04:48,010
And you can see that the router has an IP address
134

134

00:04:48,010  -->  00:04:51,180
of one 192.168.0.1.
135

135

00:04:51,180  -->  00:04:52,760
This is the default gateway
136

136

00:04:52,760  -->  00:04:55,320
and this router is acting as that default gateway.
137

137

00:04:55,320  -->  00:04:59,830
We also see it subnet mask, 255.255.255.0.
138

138

00:04:59,830  -->  00:05:02,720
That means that we have 256 total IPs,
139

139

00:05:02,720  -->  00:05:03,900
one for the broadcast,
140

140

00:05:03,900  -->  00:05:06,090
one for the network name and 254
141

141

00:05:06,090  -->  00:05:07,530
that are reserved for clients.
142

142

00:05:07,530  -->  00:05:09,940
Now, when it comes to handing out DHCP addresses,
143

143

00:05:09,940  -->  00:05:11,400
where are we going to start that?
144

144

00:05:11,400  -->  00:05:13,670
Well, here you can see the start IP address.
145

145

00:05:13,670  -->  00:05:17,430
It's set at 192.168.0.100.
146

146

00:05:17,430  -->  00:05:20,660
Now, the maximum number of users we're going to hand out is 50.
147

147

00:05:20,660  -->  00:05:22,920
That means we're only going to hand out IP addresses
148

148

00:05:22,920  -->  00:05:26,780
that start with 1920.168.0.100
149

149

00:05:26,780  -->  00:05:31,220
all the way up to 192.168.0.149,
150

150

00:05:31,220  -->  00:05:33,930
giving me 50 total clients that we can use.
151

151

00:05:33,930  -->  00:05:35,790
Now, if you have a particular device that you want
152

152

00:05:35,790  -->  00:05:37,500
to always get the same IP address,
153

153

00:05:37,500  -->  00:05:40,560
like maybe a wireless printer or a laptop or a server,
154

154

00:05:40,560  -->  00:05:43,190
you can do that using DHCP reservations.
155

155

00:05:43,190  -->  00:05:45,940
In this device, you just click DHCP reservations
156

156

00:05:45,940  -->  00:05:47,700
and here you'll see it's already been configured
157

157

00:05:47,700  -->  00:05:49,090
so that there are two devices
158

158

00:05:49,090  -->  00:05:51,010
that are getting IP addresses this way.
159

159

00:05:51,010  -->  00:05:54,813
We have one set 192.168.0.101,
160

160

00:05:54,813  -->  00:05:56,350
and we know which one that was.
161

161

00:05:56,350  -->  00:05:57,660
That was PC1.
162

162

00:05:57,660  -->  00:06:01,190
And then we have 192.168.0.100,
163

163

00:06:01,190  -->  00:06:03,600
which was PC0, the one we just turned on
164

164

00:06:03,600  -->  00:06:05,550
and went through the DORA process for.
165

165

00:06:05,550  -->  00:06:07,530
This means that anytime I turn off that thing
166

166

00:06:07,530  -->  00:06:09,870
and I put it at static and I come back to doing dynamic,
167

167

00:06:09,870  -->  00:06:11,620
I'm always going to get the same address
168

168

00:06:11,620  -->  00:06:13,440
because this is what I reserved for it.
169

169

00:06:13,440  -->  00:06:15,830
Now, if I didn't care what address I had for this device,
170

170

00:06:15,830  -->  00:06:17,600
I can go ahead and remove the mapping.
171

171

00:06:17,600  -->  00:06:18,750
In the instance of a laptop,
172

172

00:06:18,750  -->  00:06:20,820
I really don't care which IP it has,
173

173

00:06:20,820  -->  00:06:22,830
but if I had a printer or a file server
174

174

00:06:22,830  -->  00:06:24,090
or something like that,
175

175

00:06:24,090  -->  00:06:26,200
I might want to have a DHCP reservation
176

176

00:06:26,200  -->  00:06:28,010
so it doesn't change each time.
177

177

00:06:28,010  -->  00:06:29,730
If you want to add something to this list,
178

178

00:06:29,730  -->  00:06:30,750
you can just give it a name.
179

179

00:06:30,750  -->  00:06:32,450
For instance, let's say I have a printer.
180

180

00:06:32,450  -->  00:06:34,830
I'm going to say that is going to be 103
181

181

00:06:34,830  -->  00:06:37,160
and I'm going to save the Mac address for that printer,
182

182

00:06:37,160  -->  00:06:42,110
and nominally I'm just going to say it's 112233445566,
183

183

00:06:42,110  -->  00:06:43,780
and then I'll hit add, and you'll see
184

184

00:06:43,780  -->  00:06:45,600
that it is now being reserved.
185

185

00:06:45,600  -->  00:06:46,980
Down here we have printer.
186

186

00:06:46,980  -->  00:06:50,810
We have the IP address of 192.168.0.103
187

187

00:06:50,810  -->  00:06:53,160
and the Mac address that I just assigned.
188

188

00:06:53,160  -->  00:06:55,120
If I no longer want to have that reservation,
189

189

00:06:55,120  -->  00:06:57,200
I simply go over and click remove.
190

190

00:06:57,200  -->  00:06:59,250
Then, because this is a graphical user interface,
191

191

00:06:59,250  -->  00:07:02,100
always click save settings so that your settings are saved
192

192

00:07:02,100  -->  00:07:04,100
and it is applied to that router.
193

193

00:07:04,100  -->  00:07:06,870
All right, hopefully you enjoyed that little demonstration
194

194

00:07:06,870  -->  00:07:09,520
with DHCP and it helps you understand a little better
195

195

00:07:09,520  -->  00:07:12,800
how the whole DORA process works with the DHCP server
196

196

00:07:12,800  -->  00:07:15,500
and when you might want to use scopes and reservations
197

197

00:07:15,500  -->  00:07:17,133
inside your DHCP setup.
