-
Notifications
You must be signed in to change notification settings - Fork 1
/
mod2-10.html
528 lines (487 loc) · 25.2 KB
/
mod2-10.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Advanced Networking - Module 2 Chapter 10 - DHCP</title>
<meta name="description" content="Abilitante alle certificazioni Cisco CCENT e CCNA">
<meta name="author" content="Hacklab Cosenza">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="css/reveal.css">
<link rel="stylesheet" href="css/theme/black.css" id="theme">
<!-- Code syntax highlighting -->
<link rel="stylesheet" href="lib/css/zenburn.css">
<!-- Printing and PDF exports -->
<script>
var link = document.createElement( 'link' );
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match( /print-pdf/gi ) ? 'css/print/pdf.css' : 'css/print/paper.css';
document.getElementsByTagName( 'head' )[0].appendChild( link );
</script>
<!--[if lt IE 9]>
<script src="lib/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div class="reveal">
<!-- Any section element inside of this container is displayed as a slide -->
<div class="slides">
<section>
<h1>Advanced Networking</h1>
<h2>Routing & Switching:<h2>
<h2>Routing & Switching Essentials</h2>
<h3>Chapter 10: DHCP</h3>
<p>
<small><a href="http://hlcs.it">Hacklab Cosenza</a> / Centro di Ricerca su Tecnologia e Innovazione</small>
</p>
</section>
<section>
<section>
<h2>DHCPv4 Allocation</h2>
<p><em>Dynamic Host Configuration Protocol</em> is the most used method for <strong>providing addressing informations</strong> to final users.</p>
<p>DHCP is a <strong>client-server</strong> protocol. Cisco routers can act as both DHCP servers and clients. There is also an optional feature set called <em>Easy IP</em> that enables a more advanced DHCP server.</p>
</section>
<section>
<h2>DHCPv4 Allocation</h2>
<p>DHCPv4 allows for <strong>3 different allocation mechanisms</strong>:</p>
<ul>
<li><strong>Manual</strong> - A pre-allocated address is configured by the administrator to be always assigned to a specific device. DHCP has only the task to communicate it to the device.</li>
<li><strong>Automatic</strong> - The server selects an address from the pool, and permanently reserves it to that device.</li>
<li><strong>Dynamic</strong> - The server selects an address from the pool and <em>leases</em> it to a device for a limited (configurable) time, after which the address is returned and the client must renew it.</li>
</ul>
</section>
</section>
<!-- TODO: Slide with operational description -->
<section>
<h2>DHCPv4 Operation</h2>
<a href="http://i.imgur.com/o1j5YsS.jpg"><img src="http://i.imgur.com/o1j5YsS.jpg" width="55%" height="55%"></a>
</section>
<section>
<section>
<h2>DHCPv4 Message Format</h2>
<img src="http://i.imgur.com/6Dya26a.gif">
<p>This format is used for all DHCP messages and <strong>encapsulated in UDP</strong> (although several DHCP implementations can also use TCP) with 67 as the client port and 68 as the server port.</p>
</section>
<section>
<h2>DHCPv4 Message Format</h2>
<ul>
<li><strong>Operation Code</strong> - The message is a 1 = request; 2 = reply.</li>
<li><strong>Hardware Type</strong> - It indicates the type of network: Ethernet, Frame Relay, etc.</li>
<li><strong>HW Address Length</strong> - Length of the L2 addresses in use.</li>
<li><strong>Hops</strong> - Set to 0 by a client before transmitting a request and used for relay.</li>
<li><strong>Transaction Identifier</strong> - 32 bits number generated by client to match requests and replies in DHCP transaction.</li>
</ul>
</section>
<section>
<h2>DHCPv4 Message Format</h2>
<ul>
<li><strong>Seconds</strong> - Time since a client began an attempt to acquire or renew a lease. It’s used by the server to prioritize replies.</li>
<li><strong>Flags</strong> - The first bit is set to 1 by the client when it doesn’t have an IP to inform that replies should be sent as broadcast.</li>
<li><strong>Client IP Address</strong> - Until the client is missing a valid IP, is set to 0. On renewal, the client inserts its valid current IP.</li>
<li><strong>Your IP Address</strong> - The IP allocated by the server.</li>
<li><strong>Server IP Address</strong> - Used by server to inform the client of the next server to use in the DHCP transaction (not necessarily the one sending the current reply).</li>
</ul>
</section>
<section>
<h2>DHCPv4 Message Format</h2>
<ul>
<li><strong>Gateway IP Address</strong> - Used in relay operations.</li>
<li><strong>Client Hardware Address</strong> - L2 address of the client.</li>
<li><strong>Server Name</strong> - The server has the option to insert its name here, either an hostname or a FQDN.</li>
<li><strong>Boot Filename</strong> - Used by clients (to request) and by servers (to provide) the path to a particular bootfile.</li>
<li><strong>DHCP Options</strong> - Variable-length field used for storing several parameters, can be used by both client and server. For instance, the sending server can always identify itself through the <em>Server Identifier</em> DHCP option, even when it’s a relay agent.</li>
</ul>
</section>
</section>
<section>
<section>
<h2>DHCDISCOVER Messages</h2>
<ul>
<li><strong>Source MAC</strong> - MAC address of the client</li>
<li><strong>Destination MAC</strong> - FF:FF:FF:FF:FF:FF</li>
<li><strong>Source IP</strong> - 0.0.0.0</li>
<li><strong>Destination IP</strong> - 255.255.255.255</li>
<li><strong>Destination Port</strong> - 67</li>
<li><strong>CIADDR</strong> - 0.0.0.0</li>
<li><strong>GIADDR</strong> - 0.0.0.0</li>
<li><strong>CHADDR</strong> - MAC address of the client</li>
<li><strong>Mask</strong> - 0.0.0.0</li>
</ul>
</section>
<section>
<h2>DHCPOFFER Messages</h2>
<ul>
<li><strong>Source MAC</strong> - MAC address of the server</li>
<li><strong>Destination MAC</strong> - MAC address of the client</li>
<li><strong>Source IP</strong> - IP of the server</li>
<li><strong>Destination IP</strong> - IP the server is leasing to the client.</li>
<li><strong>Destination Port</strong> - 68</li>
<li><strong>CIADDR</strong> - IP the server is leasing to the client.</li>
<li><strong>GIADDR</strong> - 0.0.0.0</li>
<li><strong>CHADDR</strong> - MAC address of the client</li>
<li><strong>Mask</strong> - The appropriate subnet mask for this network.</li>
</ul>
</section>
</section>
<section>
<section>
<h2>Configure DHCPv4 Server</h2>
<ul>
<li>Exclude from the pool the IP addresses that are statically assigned to certain hosts, so the DHCP server will avoid assigning those and causing a conflict.</li>
<pre><code class="no-highlight">Router(config)# ip dhcp excluded-address {low_addr} [high_addr]</code></pre>
<li>Create the DHCP pool and enter in DHCP config mode</li>
<pre><code class="no-highlight">Router(config)# ip dhcp pool {pool_name}
Router(dhcp-config)#</code></pre>
<li>Add the desired address range in the pool</li>
<pre><code class="no-highlight">Router(dhcp-config)# network {network_address} [mask | prefix-length]</code></pre>
<li>Add the default gateway</li>
<pre><code class="no-highlight">Router(dhcp-config)# default-router {address} [address_2 ... address_8]</code></pre>
</ul>
</section>
<section>
<h2>Configure DHCPv4 Server</h2>
<ul>
<li>The following steps are optional:</li>
<pre><code class="no-highlight">Router(dhcp-config)# dns-server {address} [address_2 ... address_8]
Router(dhcp-config)# domain-name {domain}
Router(dhcp-config)# lease {days [hours] [minutes] | infinite}
Router(dhcp-config)# netbios-name-server {address} [address_2 ... address_8]</code></pre>
<li>To disable DHCPv4</li>
<pre><code class="no-highlight">Router(config)# no service dhcp
</code></pre>
<li>To (re)enable it (it first must be configured)</li>
<pre><code class="no-highlight">Router(config)# service dhcp
</code></pre>
</ul>
</section>
</section>
<section>
<section>
<h2>DHCPv4 Verification</h2>
<ul>
<li>Display the current DHCP config:</li>
<pre><code class="no-highlight">Router# show running-config | section dhcp</code></pre>
<li>Display the currently leased addresses:</li>
<pre><code class="no-highlight">Router# show ip dhcp binding
Bindings from all pools not associated with VRF:
IP address Client-ID/ Lease expiration Type
Hardware address/
User name
10.16.173.0 24d9.2141.0ddd Jan 12 2013 03:42 AM Automatic
10.16.173.18 24d9.214a.6dd3 Jan 12 2013 04:59 AM Automatic
10.16.173.21 24d9.214a.eee9 Jan 12 2013 03:49 AM Automatic
10.16.173.24 24d9.214a.13d6 Jan 12 2013 03:12 AM Automatic</code></pre>
</section>
<section>
<h2>DHCPv4 Verification</h2>
<ul>
<li>Show DHCP service stats and counters:</li>
<pre><code class="no-highlight">Router# show ip dhcp server statistics
Memory usage 23991
Address pools 1
Database agents 0
Automatic bindings 1
Manual bindings 0
Expired bindings 0
Malformed messages 9
Secure arp entries 0
Message Received
BOOTREQUEST 0
DHCPDISCOVER 8
DHCPREQUEST 12
DHCPDECLINE 0
DHCPRELEASE 0
DHCPINFORM 5
Message Sent
BOOTREPLY 0
DHCPOFFER 1
DHCPACK 4
DHCPNAK 0</code></pre>
</ul>
</section>
</section>
<section>
<section>
<h2>DHCPv4 Relay</h2>
<img src="http://i.imgur.com/iPTAEKL.png" style="float: left;">
<p>In modern networks, servers are typically assigned their own, separate subnet. This is a problem for services relying on broadcast-based protocols like DHCP does.</p>
<p><strong>If the DHCP server is on a different subnet, it won’t be able to receive the broadcast requests</strong> sent by clients on a different subnet, even if it’s configured to handle those pools.</p>
<p>The solution is to set one or more router as <strong>DHCP relay agents</strong>.</p>
</section>
<section>
<h2>DHCPv4 Relay Agents</h2>
<ul>
<li>take broadcast requests from from clients on their subnet and forward them to either the actual DHCP server or another relay agent.</li>
<li>take replies coming from the actual DHCP server and forward them to the client that initiated that transaction.</li>
</ul>
<p>A Cisco router can be configured as DHCPv4 relay agent (but also for other protocols such as DNS) by entering</p>
<pre><code class="no-highlight">Router(config-if)# ip helper-address {server_ip}</code></pre>
<p><strong>the router will forward DHCP requests coming from client on that interface</strong>. The helper address will show up in the <code>show ip interface [id]</code> output.</p>
</section>
</section>
<section>
<h2>Cisco Router as DHCPv4 Client</h2>
<p>Even if configured as DHCPv4 server to handle private IP addresses for LANs, it's usual for <strong>routers with a direct connection to the Internet to also act as DHCP clients</strong>.</p>
<p>Unless we bought a service with static public IP addresses, it will receive a dynamic public IP at every connection.</p>
<pre><code class="no-highlight" style="max-height: 300px;">Router(config)# interface f0/1
Router(config-if)# ip address dhcp
Router(config-if)# no shutdown
Router(config-if)#
*Feb 18 17:35:33.518: %DHCP-6-ADDRESS_ASSIGN: Interface
FastEthernet0/1 assigned DHCP address 79.151.84.12, mask
255.255.255.224, hostname Router
Exit entirely out of configuration mode and verify the IP information on interface f0/1.
Router(config-if)# end
Router# show ip interface f0/1
FastEthernet0/1 is up, line protocol is up
Internet address is 79.151.84.12/27
Broadcast address is 255.255.255.255
Address determined by DHCP
[...]
</code></pre>
</section>
<section>
<section>
<h2>DHCPv4 Troubleshooting</h2>
<ul>
<li>Solve any address conflict.</li>
<ul>
<li>The <code>show ip dhcp conflict</code> command will show conflict detected by the server through ARP and ICMP:</li>
<pre><code class="no-highlight">Router# show ip dhcp conflict
IP address Detection Method Detection time
192.168.10.32 Ping Feb 18 2014 13:35 PM
192.168.10.64 Gratuitous ARP Feb 22 2014 07:01 AM </code></pre>
</ul>
<li>Check physical connectivity.</li>
<ul>
<li>DHCP won't ever work if interfaces are not in up/up.</li>
</ul>
<li>Test a static IPv4 config.</li>
<ul>
<li>If connectivity issues remain after statically assigning an IP address on the client, then it's not DHCP's fault.</li>
</ul>
<li>Is DHCP disabled?</li>
<ul>
<li>Check for <code>no service dhcp</code> in the running config.</li>
</ul>
</ul>
</section>
<section>
<h2>DHCPv4 Troubleshooting</h2>
<ul>
<li>Startup negotiation failure</li>
<ul>
<li>If on boot the client wasn't able to acquire an IP, try to manually initiate a new DHCP transaction.</li>
</ul>
<li>Check for possible relaying issues.</li>
<ul>
<li>Check if the issue vanishes if the client is moved in the same subnet/VLAN as the server.</li>
<li>Is the <code>ip helper-address</code> configuration correct? It must be present on the inbound interface of the LAN containing the DHCPv4 client and must be directed to the correct DHCPv4 server.</li>
</ul>
<li>Turn on DHCP debugging</li>
<ul>
<li><code>debug ip dhcp server events</code> shows address assignments, database updates, renewals,etc.</li>
</ul>
</ul>
</section>
</section>
<section>
<section>
<h2>Stateless Address AutoConfig</h2>
<p><em>SLAAC</em> is a method to <strong>obtain an IPv6 global unicast address without relying on a DHCPv6 server</strong>.</p>
<p>SLAAC <strong>relies on ICMPv6</strong> which is similar to ICMPv4 but has more functionalities and is a much more robust protocol.</p>
<p>SLAAC uses ICMPv6 <em>Router Solicitation</em> and <em>Router Advertisement</em> messages to <strong>provide informations needed to autoconfigure IPv6 addresses</strong> with no need for a DHCPv6 server.</p>
<p>This process is called <strong><em>stateless</em></strong> because <u>the server is not maintaining any client state information</u>, it only provides configuration parameters for clients, not IPv6 addresses.</p>
</section>
<section>
<h2>Router Advertisement</h2>
<ul>
<li><strong><em>Router Advertisement</em> (RA)</strong>messages</li>
<ul>
<li>Sent by routers to clients to provide addressing info.</li>
<li>A router sends an RA message periodically, or in response to an RS message.</li>
<li>Always sent <strong>to the IPv6 all-nodes multicast address FF02::1</strong>.</li>
<li>The RA message includes the prefix and prefix length of the local segment.</li>
<li>A client uses this information to create its own IPv6 global unicast address.</li>
<li>By default, Cisco routers send RA messages every 200s.</li>
</ul>
</ul>
</section>
<section>
<h2>Router Solicitation</h2>
<ul>
<li><strong><em>Router Solicitation</em> (RS)</strong> messages</li>
<ul>
<li>the client sends an RS message to the router using the <strong>IPv6 all-routers multicast address FF02::2</strong> as destination.</li>
</ul>
</ul>
</section>
<section>
<h2>SLAAC IP generation on clients</h2>
<p>After receiving a RA message the host now has a 64-bit network prefix, but needs a 64-bit <em>Interface ID</em> (IID) to create a global unicast address.</p>
<p>There are two ways the host can create its own unique IID:</p>
<ul>
<li><strong>EUI-64</strong> - Using the EUI-64 process, the host will create an IID using its 48-bit MAC address.</li>
<li><strong>Randomly generated</strong> - The 64-bit IID can be a random number generated by the client operating system.</li>
</ul>
<p>After generating the global unicast address, the host has <strong>no guarantee that it's unique</strong> (even though a conflict is higly unlikely) because of the stateless process.</p>
<p>It use an <em>ICMP Neighbour Solicitation</em> directed to its newly generated IP. If no reply is heard, the assignment is completed.</p>
</section>
</section>
<section>
<h2>SLAAC and DHCPv6</h2>
<p>ICMPv6 RA messages contain two flags that suggest to the client which address allocation solution it should use.</p>
<ul>
<li>The <strong><em>Managed Address Configuration</em></strong> flag (M flag)</li>
<li>The <strong><em>Other Configuration</em></strong> flag (O flag)</li>
</ul>
<p>Using different combinations of the M and O flags, RA messages signals one of three addressing options for the IPv6 client:</p>
<ul>
<li><strong>SLAAC</strong> (Router Advertisement only) - M = 0, O = 0</li>
<li><strong>Stateless DHCPv6</strong> (Router Advertisement and DHCPv6) - M = 0, O = 1</li>
<li><strong>Stateful DHCPv6</strong> (DHCPv6 only) - M = 1</li>
</ul>
</section>
<section>
<section>
<h2>SLAAC-only</h2>
<p>With SLAAC enabled, the router is telling the client to <strong>rely on the content of the RA for everything</strong>: prefix, prefix-length, DNS server and gateway addresses, MTU.</p>
<p>The RA as both the M flag and the O flag set to 0.</p>
<p><strong>SLAAC is the default method configured on Cisco routers</strong>.</p>
<p>To <strong>manually enable SLAAC for an interface</strong> the M and O flags need to be reset to their initial values of 0. This is done using the following commands:</p>
<pre><code class="no-highlight">Router(config-if)# no ipv6 nd managed-config-flag
Router(config-if)# no ipv6 nd other-config-flag</code></pre>
</section>
<section>
<h2>Stateless DHCPv6</h2>
<p>In a steteless DHCPv6 setup, the router is telling the client to <strong>use SLAAC for allocating a global unicast address, but that a DHCPv6 server has additional informations</strong> such as DNS servers, gateway addresses, etc.</p>
<p>As SLAAC, it is <em>stateless</em> because the DHCPv6 server is only providing RAs and additional infos, but <strong>still doesn't keep track of the IPv6 addresses</strong>.</p>
<p>The RA has the M flag set to 0 and the O flag set to 1.</p>
<p>To configure a router to <strong>advertise a stateless DHCPv6</strong> setup:</p>
<pre><code class="no-highlight">Router(config-if)# ipv6 nd other-config-flag</code></pre>
</section>
<section>
<h2>Stateful DHCPv6</h2>
<p>This is basically identical to how a DHCPv4 server operates. The router is telling the clients that it will <strong>manage all the addressing information as well as additional parameters</strong>.</p>
<p><strong><em>Stateful</em></strong> means that the DHCPv6 server will manage and <strong>keep track of the addressing informations</strong> handed to the clients.</p>
<p>The M flag set to 1 in the RA advertise a DHCPv6 Stateful setup. The O flag is irrelevant.</p>
</section>
</section>
<section>
<section>
<h2>DHCPv6 Operations</h2>
<p>DHCPv6 client/server communication are initiated by a (periodic or solicited) ICMPv6 RA message from the router, indicating stateless or stateful setups.</p>
<p>DHCPv6 server-client messages uses UDP dst-port 546.</p>
<p>DHCPv6 client-server messages uses UDP dst-port 547.</p>
</section>
<section>
<h2>DHCPv6 Operations</h2>
<ul>
<li>In order to locate the server, the client sends a DHCPv6 SOLICIT message to the reserved IPv6 multicast all-DHCPv6-servers address FF02::1:2 (which has link-local scope).</li>
<li>Server(s) respond with a DHCPv6 ADVERTISE message.</li>
<li>The client responds to the server with a:</li>
<ul>
<li>DHCPv6 REQUEST message, in stateful DHCPv6.</li>
<li>INFORMATION-REQUEST message, in stateless setups.</li>
</ul>
<li>The server sends a DHCPv6 REPLY to the client containing the requested informations.</li>
</ul>
</section>
</section>
<section>
<section>
<h2>Configure Stateless DHCPv6 Server</h2>
<pre><code class="no-highlight">## ENABLE IPV6 ROUTING
## Not required for operating as DHCPv6 server but
## Needed to be able to send RA messages
Router(config)# ipv6 unicast-routing
## CREATE THE POOL + ENTER DHCPv6 CONFIGURATION MODE
Router(config)# ipv6 dhcp pool STATELESS-V6
## CONFIGURE POOL PARAMETERS
Router(config-dhcpv6)# dns-server 2001:db8:abcd:1234::fffe
Router(config-dhcpv6)# domain-name hlcs.it
Router(config-dhcpv6)# exit
## BIND THE DHCPV6 POOL TO THE INTERFACE
Router(config)# interface gigabitethernet0/0
Router(config-if)# ipv6 address 2001:db8:abcd:1::1/64
Router(config-if)# ipv6 dhcp server STATELESS-V6
Router(config-if)# ipv6 nd other-config-flag</code></pre>
</section>
<section>
<h2>Configure Stateful DHCPv6 Server</h2>
<p>Very few differences to stateful configuration:</p>
<pre><code class="no-highlight">Router(config)#ipv6 unicast-routing
Router(config)# ipv6 dhcp pool STATEFULL-V6
## THIS TIME, ADDRESSING INFORMATION IS CONFIGURED FOR THE POOL
## SYNTAX: adress prefix {prefix-length} [lifetime {valid_lifetime preferred-lifetime | infinite}
Router(config-dhcpv6)# address prefix 2001:db8:abcd:1::/64 lifetime infinite
Router(config-dhcpv6)# dns-server 2001:db8:abcd:1234::fffe
Router(config-dhcpv6)# domain-name hlcs.it
Router(config-dhcpv6)# exit
Router(config)#interface gigabitethernet0/0
Router(config-if)# ipv6 address 2001:db8:abcd:1::1/64
Router(config-if)# ipv6 dhcp server STATEFULL-V6
## WE NEED TO ADVERTISE THE STATEFUL SETUP
Router(config-if)# ipv6 nd managed-config-flag</code></pre>
</section>
<section>
<h2>Cisco Router as DHCPv6 Client</h2>
<p>The router needs an IPv6 link-local address on the interface to send and receive RA, RS and DHCPv6 messages.</p>
<p>The link-local address is created automatically when an IPv6 global unicast address is assigned, or by manually enabling IPv6 with the command <code>ipv6 enable</code>.</p>
<ul>
<li>To configure the router as client in a <strong>stateless</strong> setup:</li>
<pre><code class="no-highlight">Router(config)#interface gigabitethernet0/0
Router(config-if)#ipv6 enable
Router(config-if)#ipv6 address autoconfig</code></pre>
<li>As client in a <strong>stateful</strong> setup:</li>
<pre><code class="no-highlight">Router(config)#interface gigabitethernet0/0
Router(config-if)#ipv6 enable
Router(config-if)#ipv6 address dhcp</code></pre>
</ul>
</section>
<section>
<h2>Cisco Router as DHCPv6 Relay Agent</h2>
<p>When a router on a segment is configured as DHCPv6 relay, client will send their messages to the IPv6 multicast <em>All DHCPv6 Relay Agents and Servers</em> address FF01::1:2.</p>
<pre><code class="no-highlight">Router(config)#interface gigabitethernet0/0
## THIS IS THE EQUIVALENT OF IPv4 ip helper-address COMMAND
Router(config-if)#ipv6 dhcp relay destination 2001:db8:abcd:1::f
Router(config-dhcpv6)#end
Router#show ipv6 dhcp interface gigabitethernet0/0
GigabitEthernet0/0 is in relay mode
Relay destinations:
2001:db8:abcd:1::f
Router#</code></pre>
</section>
</section>
<!-- TODO: Missing Veryfing and Troubleshooting IPv6 -->
<section>
<h1>End of Lesson</h1>
</section>
</div>
</div>
<script src="lib/js/head.min.js"></script>
<script src="js/reveal.js"></script>
<script>
// More info https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
progress: true,
history: true,
center: true,
transition: 'slide', // none/fade/slide/convex/concave/zoom
// More info https://github.com/hakimel/reveal.js#dependencies
dependencies: [
{ src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: 'plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: 'plugin/zoom-js/zoom.js', async: true },
{ src: 'plugin/notes/notes.js', async: true }
]
});
</script>
</body>
</html>